Mark more texts for localization

This commit is contained in:
Minseo Lee
2024-02-14 11:06:37 +09:00
parent 836cff306e
commit 3f5bdd8be3
27 changed files with 127 additions and 93 deletions
+13 -6
View File
@@ -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>