about summary refs log tree commit diff
path: root/src/view/com/auth/create
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/auth/create')
-rw-r--r--src/view/com/auth/create/Policies.tsx19
-rw-r--r--src/view/com/auth/create/state.ts4
2 files changed, 15 insertions, 8 deletions
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/create/state.ts b/src/view/com/auth/create/state.ts
index 7a727ec0b..840084dcb 100644
--- a/src/view/com/auth/create/state.ts
+++ b/src/view/com/auth/create/state.ts
@@ -12,7 +12,7 @@ import {createFullHandle, validateHandle} from '#/lib/strings/handles'
 import {cleanError} from '#/lib/strings/errors'
 import {useOnboardingDispatch} from '#/state/shell/onboarding'
 import {useSessionApi} from '#/state/session'
-import {DEFAULT_SERVICE, IS_PROD_SERVICE} from '#/lib/constants'
+import {DEFAULT_SERVICE, IS_TEST_USER} from '#/lib/constants'
 import {
   DEFAULT_PROD_FEEDS,
   usePreferencesSetBirthDateMutation,
@@ -147,7 +147,7 @@ export function useSubmitCreateAccount(
             : undefined,
         })
         setBirthDate({birthDate: uiState.birthDate})
-        if (IS_PROD_SERVICE(uiState.serviceUrl)) {
+        if (!IS_TEST_USER(uiState.handle)) {
           setSavedFeeds(DEFAULT_PROD_FEEDS)
         }
       } catch (e: any) {