about summary refs log tree commit diff
path: root/src/view/com/auth
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/auth')
-rw-r--r--src/view/com/auth/HomeLoggedOutCTA.tsx8
-rw-r--r--src/view/com/auth/SplashScreen.tsx8
-rw-r--r--src/view/com/auth/create/Policies.tsx19
-rw-r--r--src/view/com/auth/login/LoginForm.tsx2
-rw-r--r--src/view/com/auth/onboarding/RecommendedFollowsItem.tsx6
-rw-r--r--src/view/com/auth/onboarding/WelcomeMobile.tsx6
-rw-r--r--src/view/com/auth/server-input/index.tsx2
7 files changed, 35 insertions, 16 deletions
diff --git a/src/view/com/auth/HomeLoggedOutCTA.tsx b/src/view/com/auth/HomeLoggedOutCTA.tsx
index f796d8bae..a5b5bf7ba 100644
--- a/src/view/com/auth/HomeLoggedOutCTA.tsx
+++ b/src/view/com/auth/HomeLoggedOutCTA.tsx
@@ -52,7 +52,9 @@ export function HomeLoggedOutCTA() {
           onPress={showCreateAccount}
           accessibilityRole="button"
           accessibilityLabel={_(msg`Create new account`)}
-          accessibilityHint="Opens flow to create a new Bluesky account">
+          accessibilityHint={_(
+            msg`Opens flow to create a new Bluesky account`,
+          )}>
           <Text
             style={[
               s.white,
@@ -68,7 +70,9 @@ export function HomeLoggedOutCTA() {
           onPress={showSignIn}
           accessibilityRole="button"
           accessibilityLabel={_(msg`Sign in`)}
-          accessibilityHint="Opens flow to sign into your existing Bluesky account">
+          accessibilityHint={_(
+            msg`Opens flow to sign into your existing Bluesky account`,
+          )}>
           <Text
             style={[
               pal.text,
diff --git a/src/view/com/auth/SplashScreen.tsx b/src/view/com/auth/SplashScreen.tsx
index 134ae11f1..f3d783476 100644
--- a/src/view/com/auth/SplashScreen.tsx
+++ b/src/view/com/auth/SplashScreen.tsx
@@ -66,7 +66,9 @@ export const SplashScreen = ({
             onPress={onPressCreateAccount}
             accessibilityRole="button"
             accessibilityLabel={_(msg`Create new account`)}
-            accessibilityHint="Opens flow to create a new Bluesky account">
+            accessibilityHint={_(
+              msg`Opens flow to create a new Bluesky account`,
+            )}>
             <Text style={[s.white, styles.btnLabel]}>
               <Trans>Create a new account</Trans>
             </Text>
@@ -77,7 +79,9 @@ export const SplashScreen = ({
             onPress={onPressSignin}
             accessibilityRole="button"
             accessibilityLabel={_(msg`Sign in`)}
-            accessibilityHint="Opens flow to sign into your existing Bluesky account">
+            accessibilityHint={_(
+              msg`Opens flow to sign into your existing Bluesky account`,
+            )}>
             <Text style={[pal.text, styles.btnLabel]}>
               <Trans>Sign In</Trans>
             </Text>
diff --git a/src/view/com/auth/create/Policies.tsx b/src/view/com/auth/create/Policies.tsx
index 2c7d60818..803e2ad32 100644
--- a/src/view/com/auth/create/Policies.tsx
+++ b/src/view/com/auth/create/Policies.tsx
@@ -9,6 +9,8 @@ import {TextLink} from '../../util/Link'
 import {Text} from '../../util/text/Text'
 import {s, colors} from 'lib/styles'
 import {usePalette} from 'lib/hooks/usePalette'
+import {Trans, msg} from '@lingui/macro'
+import {useLingui} from '@lingui/react'
 
 type ServiceDescription = ComAtprotoServerDescribeServer.OutputSchema
 
@@ -20,6 +22,7 @@ export const Policies = ({
   needsGuardian: boolean
 }) => {
   const pal = usePalette('default')
+  const {_} = useLingui()
   if (!serviceDescription) {
     return <View />
   }
@@ -40,7 +43,9 @@ export const Policies = ({
           />
         </View>
         <Text style={[pal.textLight, s.pl5, s.flex1]}>
-          This service has not provided terms of service or a privacy policy.
+          <Trans>
+            This service has not provided terms of service or a privacy policy.
+          </Trans>
         </Text>
       </View>
     )
@@ -51,7 +56,7 @@ export const Policies = ({
       <TextLink
         key="tos"
         href={tos}
-        text="Terms of Service"
+        text={_(msg`Terms of Service`)}
         style={[pal.link, s.underline]}
       />,
     )
@@ -61,7 +66,7 @@ export const Policies = ({
       <TextLink
         key="pp"
         href={pp}
-        text="Privacy Policy"
+        text={_(msg`Privacy Policy`)}
         style={[pal.link, s.underline]}
       />,
     )
@@ -79,12 +84,14 @@ export const Policies = ({
   return (
     <View style={styles.policies}>
       <Text style={pal.textLight}>
-        By creating an account you agree to the {els}.
+        <Trans>By creating an account you agree to the {els}.</Trans>
       </Text>
       {needsGuardian && (
         <Text style={[pal.textLight, s.bold]}>
-          If you are not yet an adult according to the laws of your country,
-          your parent or legal guardian must read these Terms on your behalf.
+          <Trans>
+            If you are not yet an adult according to the laws of your country,
+            your parent or legal guardian must read these Terms on your behalf.
+          </Trans>
         </Text>
       )}
     </View>
diff --git a/src/view/com/auth/login/LoginForm.tsx b/src/view/com/auth/login/LoginForm.tsx
index fdba9f203..3202d69c5 100644
--- a/src/view/com/auth/login/LoginForm.tsx
+++ b/src/view/com/auth/login/LoginForm.tsx
@@ -207,7 +207,7 @@ export const LoginForm = ({
             testID="loginPasswordInput"
             ref={passwordInputRef}
             style={[pal.text, styles.textInput]}
-            placeholder="Password"
+            placeholder={_(msg`Password`)}
             placeholderTextColor={pal.colors.textLight}
             autoCapitalize="none"
             autoCorrect={false}
diff --git a/src/view/com/auth/onboarding/RecommendedFollowsItem.tsx b/src/view/com/auth/onboarding/RecommendedFollowsItem.tsx
index 434b10c22..dba3f8c56 100644
--- a/src/view/com/auth/onboarding/RecommendedFollowsItem.tsx
+++ b/src/view/com/auth/onboarding/RecommendedFollowsItem.tsx
@@ -11,7 +11,8 @@ import {Text} from 'view/com/util/text/Text'
 import Animated, {FadeInRight} from 'react-native-reanimated'
 import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
 import {useAnalytics} from 'lib/analytics/analytics'
-import {Trans} from '@lingui/macro'
+import {useLingui} from '@lingui/react'
+import {Trans, msg} from '@lingui/macro'
 import {Shadow, useProfileShadow} from '#/state/cache/profile-shadow'
 import {useProfileFollowMutationQueue} from '#/state/queries/profile'
 import {logger} from '#/logger'
@@ -70,6 +71,7 @@ function ProfileCard({
 }) {
   const {track} = useAnalytics()
   const pal = usePalette('default')
+  const {_} = useLingui()
   const [addingMoreSuggestions, setAddingMoreSuggestions] =
     React.useState(false)
   const [queueFollow, queueUnfollow] = useProfileFollowMutationQueue(
@@ -136,7 +138,7 @@ function ProfileCard({
           type={profile.viewer?.following ? 'default' : 'inverted'}
           labelStyle={styles.followButton}
           onPress={onToggleFollow}
-          label={profile.viewer?.following ? 'Unfollow' : 'Follow'}
+          label={profile.viewer?.following ? _(msg`Unfollow`) : _(msg`Follow`)}
         />
       </View>
       {profile.description ? (
diff --git a/src/view/com/auth/onboarding/WelcomeMobile.tsx b/src/view/com/auth/onboarding/WelcomeMobile.tsx
index 5de1a7817..b8659d56c 100644
--- a/src/view/com/auth/onboarding/WelcomeMobile.tsx
+++ b/src/view/com/auth/onboarding/WelcomeMobile.tsx
@@ -6,7 +6,8 @@ import {usePalette} from 'lib/hooks/usePalette'
 import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
 import {Button} from 'view/com/util/forms/Button'
 import {ViewHeader} from 'view/com/util/ViewHeader'
-import {Trans} from '@lingui/macro'
+import {useLingui} from '@lingui/react'
+import {Trans, msg} from '@lingui/macro'
 
 type Props = {
   next: () => void
@@ -15,6 +16,7 @@ type Props = {
 
 export function WelcomeMobile({next, skip}: Props) {
   const pal = usePalette('default')
+  const {_} = useLingui()
 
   return (
     <View style={[styles.container]} testID="welcomeOnboarding">
@@ -91,7 +93,7 @@ export function WelcomeMobile({next, skip}: Props) {
 
       <Button
         onPress={next}
-        label="Continue"
+        label={_(msg`Continue`)}
         testID="continueBtn"
         style={[styles.buttonContainer]}
         labelStyle={styles.buttonText}
diff --git a/src/view/com/auth/server-input/index.tsx b/src/view/com/auth/server-input/index.tsx
index 32b5a3141..b26ac1dcb 100644
--- a/src/view/com/auth/server-input/index.tsx
+++ b/src/view/com/auth/server-input/index.tsx
@@ -115,7 +115,7 @@ export function ServerInputDialog({
                   testID="customServerTextInput"
                   value={customAddress}
                   onChangeText={setCustomAddress}
-                  label={_(msg`my-server.com`)}
+                  label="my-server.com"
                   accessibilityLabelledBy="address-input-label"
                   autoCapitalize="none"
                   keyboardType="url"