about summary refs log tree commit diff
path: root/src/view/screens/AppPasswords.tsx
diff options
context:
space:
mode:
authorAnsh <anshnanda10@gmail.com>2023-11-09 10:04:16 -0800
committerGitHub <noreply@github.com>2023-11-09 10:04:16 -0800
commit4c7850f8c48a0cb3f83f33b1701a99066c6b31db (patch)
tree62313ddf74601d42c70365e0863adbfbc7c93b0e /src/view/screens/AppPasswords.tsx
parent82059b7ee138d24ff50b0f4fad0eaeac860bb78c (diff)
downloadvoidsky-4c7850f8c48a0cb3f83f33b1701a99066c6b31db.tar.zst
Internationalization & localization (#1822)
* install and setup lingui

* setup dynamic locale activation and async loading

* first pass of automated replacement of text messages

* add some more documentaton

* fix nits

* add `es` and `hi`locales for testing purposes

* make accessibilityLabel localized

* compile and extract new messages

* fix merge conflicts

* fix eslint warning

* change instructions from sending email to opening PR

* fix comments
Diffstat (limited to 'src/view/screens/AppPasswords.tsx')
-rw-r--r--src/view/screens/AppPasswords.tsx17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/view/screens/AppPasswords.tsx b/src/view/screens/AppPasswords.tsx
index 338adfbaf..092f4bc2c 100644
--- a/src/view/screens/AppPasswords.tsx
+++ b/src/view/screens/AppPasswords.tsx
@@ -16,6 +16,8 @@ import {useAnalytics} from 'lib/analytics/analytics'
 import {useFocusEffect} from '@react-navigation/native'
 import {ViewHeader} from '../com/util/ViewHeader'
 import {CenteredView} from 'view/com/util/Views'
+import {Trans, msg} from '@lingui/macro'
+import {useLingui} from '@lingui/react'
 import {useSetMinimalShellMode} from '#/state/shell'
 import {useModalControls} from '#/state/modals'
 import {useLanguagePrefs} from '#/state/preferences'
@@ -55,8 +57,10 @@ export const AppPasswords = withAuthRequired(
           <AppPasswordsHeader />
           <View style={[styles.empty, pal.viewLight]}>
             <Text type="lg" style={[pal.text, styles.emptyText]}>
-              You have not created any app passwords yet. You can create one by
-              pressing the button below.
+              <Trans>
+                You have not created any app passwords yet. You can create one
+                by pressing the button below.
+              </Trans>
             </Text>
           </View>
           {!isTabletOrDesktop && <View style={styles.flex1} />}
@@ -146,8 +150,10 @@ function AppPasswordsHeader() {
           pal.text,
           isTabletOrDesktop && styles.descriptionDesktop,
         ]}>
-        Use app passwords to login to other Bluesky clients without giving full
-        access to your account or password.
+        <Trans>
+          Use app passwords to login to other Bluesky clients without giving
+          full access to your account or password.
+        </Trans>
       </Text>
     </>
   )
@@ -164,6 +170,7 @@ function AppPassword({
 }) {
   const pal = usePalette('default')
   const store = useStores()
+  const {_} = useLingui()
   const {openModal} = useModalControls()
   const {contentLanguages} = useLanguagePrefs()
 
@@ -188,7 +195,7 @@ function AppPassword({
       style={[styles.item, pal.border]}
       onPress={onDelete}
       accessibilityRole="button"
-      accessibilityLabel="Delete app password"
+      accessibilityLabel={_(msg`Delete app password`)}
       accessibilityHint="">
       <View>
         <Text type="md-bold" style={pal.text}>