about summary refs log tree commit diff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Lists.tsx17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/components/Lists.tsx b/src/components/Lists.tsx
index 58aa74b38..c879f9411 100644
--- a/src/components/Lists.tsx
+++ b/src/components/Lists.tsx
@@ -3,7 +3,8 @@ 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 {Text} from '#/components/Typography'
@@ -59,6 +60,7 @@ function ListFooterMaybeError({
   onRetry?: () => Promise<unknown>
 }) {
   const t = useTheme()
+  const {_} = useLingui()
 
   if (!isError) return null
 
@@ -84,7 +86,7 @@ function ListFooterMaybeError({
         </Text>
         <Button
           variant="gradient"
-          label="Press to retry"
+          label={_(msg`Press to retry`)}
           style={[
             a.align_center,
             a.justify_center,
@@ -94,7 +96,7 @@ function ListFooterMaybeError({
             a.py_sm,
           ]}
           onPress={onRetry}>
-          Retry
+          <Trans>Retry</Trans>
         </Button>
       </View>
     </View>
@@ -145,6 +147,7 @@ export function ListMaybePlaceholder({
   const navigation = useNavigation<NavigationProp>()
   const t = useTheme()
   const {gtMobile, gtTablet} = useBreakpoints()
+  const {_} = useLingui()
 
   const canGoBack = navigation.canGoBack()
   const onGoBack = React.useCallback(() => {
@@ -221,7 +224,7 @@ export function ListMaybePlaceholder({
               <Button
                 variant="solid"
                 color="primary"
-                label="Click here"
+                label={_(msg`Click here`)}
                 onPress={onRetry}
                 size="large"
                 style={[
@@ -229,17 +232,17 @@ export function ListMaybePlaceholder({
                   a.overflow_hidden,
                   {paddingVertical: 10},
                 ]}>
-                Retry
+                <Trans>Retry</Trans>
               </Button>
             )}
             <Button
               variant="solid"
               color={isError && onRetry ? 'secondary' : 'primary'}
-              label="Click here"
+              label={_(msg`Click here`)}
               onPress={onGoBack}
               size="large"
               style={[a.rounded_sm, a.overflow_hidden, {paddingVertical: 10}]}>
-              Go Back
+              <Trans>Go Back</Trans>
             </Button>
           </View>
         </>