about summary refs log tree commit diff
path: root/src/components/Lists.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Lists.tsx')
-rw-r--r--src/components/Lists.tsx23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/components/Lists.tsx b/src/components/Lists.tsx
index 8a889c15e..7476a8e2f 100644
--- a/src/components/Lists.tsx
+++ b/src/components/Lists.tsx
@@ -3,9 +3,10 @@ import {atoms as a, useBreakpoints, useTheme} from '#/alf'
 import {View} from 'react-native'
 import {CenteredView} from 'view/com/util/Views'
 import {Loader} from '#/components/Loader'
-import {Trans} from '@lingui/macro'
+import {Trans, msg} from '@lingui/macro'
+import {useLingui} from '@lingui/react'
 import {cleanError} from 'lib/strings/errors'
-import {Button} from '#/components/Button'
+import {Button, ButtonText} from '#/components/Button'
 import {Text} from '#/components/Typography'
 import {StackActions} from '@react-navigation/native'
 import {router} from '#/routes'
@@ -58,6 +59,7 @@ function ListFooterMaybeError({
   onRetry?: () => Promise<unknown>
 }) {
   const t = useTheme()
+  const {_} = useLingui()
 
   if (!isError) return null
 
@@ -83,7 +85,7 @@ function ListFooterMaybeError({
         </Text>
         <Button
           variant="gradient"
-          label="Press to retry"
+          label={_(msg`Press to retry`)}
           style={[
             a.align_center,
             a.justify_center,
@@ -93,7 +95,7 @@ function ListFooterMaybeError({
             a.py_sm,
           ]}
           onPress={onRetry}>
-          Retry
+          <Trans>Retry</Trans>
         </Button>
       </View>
     </View>
@@ -144,6 +146,7 @@ export function ListMaybePlaceholder({
   const navigation = useNavigationDeduped()
   const t = useTheme()
   const {gtMobile, gtTablet} = useBreakpoints()
+  const {_} = useLingui()
 
   const canGoBack = navigation.canGoBack()
   const onGoBack = React.useCallback(() => {
@@ -220,7 +223,7 @@ export function ListMaybePlaceholder({
               <Button
                 variant="solid"
                 color="primary"
-                label="Click here"
+                label={_(msg`Click here to retry`)}
                 onPress={onRetry}
                 size="large"
                 style={[
@@ -228,17 +231,21 @@ export function ListMaybePlaceholder({
                   a.overflow_hidden,
                   {paddingVertical: 10},
                 ]}>
-                Retry
+                <ButtonText>
+                  <Trans>Retry</Trans>
+                </ButtonText>
               </Button>
             )}
             <Button
               variant="solid"
               color={isError && onRetry ? 'secondary' : 'primary'}
-              label="Click here"
+              label={_(msg`Click here to go back`)}
               onPress={onGoBack}
               size="large"
               style={[a.rounded_sm, a.overflow_hidden, {paddingVertical: 10}]}>
-              Go Back
+              <ButtonText>
+                <Trans>Go Back</Trans>
+              </ButtonText>
             </Button>
           </View>
         </>