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.tsx23
-rw-r--r--src/components/Menu/index.tsx6
-rw-r--r--src/components/TagMenu/index.tsx4
3 files changed, 22 insertions, 11 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>
         </>
diff --git a/src/components/Menu/index.tsx b/src/components/Menu/index.tsx
index 9be9dd86b..051e95b95 100644
--- a/src/components/Menu/index.tsx
+++ b/src/components/Menu/index.tsx
@@ -17,7 +17,7 @@ import {
   ItemIconProps,
 } from '#/components/Menu/types'
 import {Button, ButtonText} from '#/components/Button'
-import {msg} from '@lingui/macro'
+import {Trans, msg} from '@lingui/macro'
 import {useLingui} from '@lingui/react'
 import {isNative} from 'platform/detection'
 
@@ -209,7 +209,9 @@ function Cancel() {
       variant="ghost"
       color="secondary"
       onPress={() => control.close()}>
-      <ButtonText>Cancel</ButtonText>
+      <ButtonText>
+        <Trans>Cancel</Trans>
+      </ButtonText>
     </Button>
   )
 }
diff --git a/src/components/TagMenu/index.tsx b/src/components/TagMenu/index.tsx
index 13e4e7d6b..0ed703667 100644
--- a/src/components/TagMenu/index.tsx
+++ b/src/components/TagMenu/index.tsx
@@ -264,7 +264,9 @@ export function TagMenu({
                 variant="ghost"
                 color="secondary"
                 onPress={() => control.close()}>
-                <ButtonText>Cancel</ButtonText>
+                <ButtonText>
+                  <Trans>Cancel</Trans>
+                </ButtonText>
               </Button>
             </>
           )}