From 3f5bdd8be37efbe3bf7b1b60bea2bfa4e32aa159 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Wed, 14 Feb 2024 11:06:37 +0900 Subject: [PATCH 01/33] Mark more texts for localization --- .../AdultContentEnabledPref.tsx | 12 +++-- src/view/com/auth/HomeLoggedOutCTA.tsx | 8 +++- src/view/com/auth/SplashScreen.tsx | 8 +++- src/view/com/auth/create/Policies.tsx | 19 +++++--- src/view/com/auth/create/Step3.tsx | 2 +- src/view/com/auth/login/LoginForm.tsx | 2 +- .../onboarding/RecommendedFollowsItem.tsx | 6 ++- .../com/auth/onboarding/WelcomeMobile.tsx | 6 ++- src/view/com/auth/server-input/index.tsx | 2 +- src/view/com/lightbox/Lightbox.tsx | 4 +- src/view/com/modals/ChangeHandle.tsx | 46 ++++++++++--------- src/view/com/modals/ChangePassword.tsx | 4 +- src/view/com/modals/DeleteAccount.tsx | 6 +-- src/view/com/modals/InAppBrowserConsent.tsx | 2 +- src/view/com/modals/LinkWarning.tsx | 4 +- src/view/com/modals/ModerationDetails.tsx | 2 +- src/view/com/modals/VerifyEmail.tsx | 2 +- .../com/modals/crop-image/CropImage.web.tsx | 12 ++--- .../com/modals/report/InputIssueDetails.tsx | 6 +-- src/view/com/modals/report/Modal.tsx | 7 ++- src/view/com/post-thread/PostThreadItem.tsx | 4 +- .../profile/ProfileHeaderSuggestedFollows.tsx | 14 +++--- src/view/screens/LanguageSettings.tsx | 2 +- src/view/screens/Moderation.tsx | 4 +- src/view/screens/ProfileFeed.tsx | 2 +- src/view/screens/Settings/index.tsx | 32 +++++++------ src/view/shell/NavSignupCard.tsx | 2 +- 27 files changed, 127 insertions(+), 93 deletions(-) diff --git a/src/screens/Onboarding/StepModeration/AdultContentEnabledPref.tsx b/src/screens/Onboarding/StepModeration/AdultContentEnabledPref.tsx index b38b3df1..c3d61640 100644 --- a/src/screens/Onboarding/StepModeration/AdultContentEnabledPref.tsx +++ b/src/screens/Onboarding/StepModeration/AdultContentEnabledPref.tsx @@ -85,7 +85,9 @@ export function AdultContentEnabledPref({ a.align_center, a.py_md, ]}> - <Text style={[a.font_bold]}>Enable Adult Content</Text> + <Text style={[a.font_bold]}> + <Trans>Enable Adult Content</Trans> + </Text> <Toggle.Switch /> </View> </Toggle.Item> @@ -106,7 +108,9 @@ export function AdultContentEnabledPref({ )} <Prompt.Outer control={prompt}> - <Prompt.Title>Adult Content</Prompt.Title> + <Prompt.Title> + <Trans>Adult Content</Trans> + </Prompt.Title> <Prompt.Description> <Trans> Due to Apple policies, adult content can only be enabled on the web @@ -114,7 +118,9 @@ export function AdultContentEnabledPref({ </Trans> </Prompt.Description> <Prompt.Actions> - <Prompt.Action onPress={prompt.close}>OK</Prompt.Action> + <Prompt.Action onPress={prompt.close}> + <Trans>OK</Trans> + </Prompt.Action> </Prompt.Actions> </Prompt.Outer> </> diff --git a/src/view/com/auth/HomeLoggedOutCTA.tsx b/src/view/com/auth/HomeLoggedOutCTA.tsx index f796d8ba..a5b5bf7b 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 134ae11f..f3d78347 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 2c7d6081..803e2ad3 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/Step3.tsx b/src/view/com/auth/create/Step3.tsx index 3a52abf8..afd21a32 100644 --- a/src/view/com/auth/create/Step3.tsx +++ b/src/view/com/auth/create/Step3.tsx @@ -30,7 +30,7 @@ export function Step3({ <TextInput testID="handleInput" icon="at" - placeholder="e.g. alice" + placeholder={_(msg`e.g. alice`)} value={uiState.handle} editable autoFocus diff --git a/src/view/com/auth/login/LoginForm.tsx b/src/view/com/auth/login/LoginForm.tsx index e480de7a..821660b7 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 07001068..993bc34a 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 @@ export function ProfileCard({ }) { const {track} = useAnalytics() const pal = usePalette('default') + const {_} = useLingui() const [addingMoreSuggestions, setAddingMoreSuggestions] = React.useState(false) const [queueFollow, queueUnfollow] = useProfileFollowMutationQueue(profile) @@ -133,7 +135,7 @@ export 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 5de1a781..b8659d56 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 a7062197..2277eb86 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" diff --git a/src/view/com/lightbox/Lightbox.tsx b/src/view/com/lightbox/Lightbox.tsx index 2ee5b8d5..5bab643c 100644 --- a/src/view/com/lightbox/Lightbox.tsx +++ b/src/view/com/lightbox/Lightbox.tsx @@ -78,9 +78,9 @@ function LightboxFooter({imageIndex}: {imageIndex: number}) { try { await saveImageToMediaLibrary({uri}) - Toast.show('Saved to your camera roll.') + Toast.show(_(msg`Saved to your camera roll.`)) } catch (e: any) { - Toast.show(`Failed to save image: ${String(e)}`) + Toast.show(_(msg`Failed to save image: ${String(e)}`)) } }, [permissionResponse, requestPermission, _], diff --git a/src/view/com/modals/ChangeHandle.tsx b/src/view/com/modals/ChangeHandle.tsx index a43c30c2..f04bdb0e 100644 --- a/src/view/com/modals/ChangeHandle.tsx +++ b/src/view/com/modals/ChangeHandle.tsx @@ -150,7 +150,7 @@ export function Inner({ accessibilityHint={_(msg`Exits handle change process`)} onAccessibilityEscape={onPressCancel}> <Text type="lg" style={pal.textLight}> - Cancel + <Trans>Cancel</Trans> </Text> </TouchableOpacity> </View> @@ -254,7 +254,7 @@ function ProvidedHandleForm({ <TextInput testID="setHandleInput" style={[pal.text, styles.textInput]} - placeholder="e.g. alice" + placeholder={_(msg`e.g. alice`)} placeholderTextColor={pal.colors.textLight} autoCapitalize="none" keyboardAppearance={theme.colorScheme} @@ -277,8 +277,8 @@ function ProvidedHandleForm({ <TouchableOpacity onPress={onToggleCustom} accessibilityRole="button" - accessibilityHint="Hosting provider" - accessibilityLabel={_(msg`Opens modal for using custom domain`)}> + accessibilityLabel={_(msg`Hosting provider`)} + accessibilityHint={_(msg`Opens modal for using custom domain`)}> <Text type="md-medium" style={[pal.link, s.pl10, s.pt5]}> <Trans>I have my own domain</Trans> </Text> @@ -324,8 +324,8 @@ function CustomHandleForm({ Clipboard.setString( isDNSForm ? `did=${currentAccount.did}` : currentAccount.did, ) - Toast.show('Copied to clipboard') - }, [currentAccount, isDNSForm]) + Toast.show(_(msg`Copied to clipboard`)) + }, [currentAccount, isDNSForm, _]) const onChangeHandle = React.useCallback( (v: string) => { setHandle(v) @@ -378,7 +378,7 @@ function CustomHandleForm({ <TextInput testID="setHandleInput" style={[pal.text, styles.textInput]} - placeholder="e.g. alice.com" + placeholder={_(msg`e.g. alice.com`)} placeholderTextColor={pal.colors.textLight} autoCapitalize="none" keyboardAppearance={theme.colorScheme} @@ -387,7 +387,7 @@ function CustomHandleForm({ editable={!isProcessing} accessibilityLabelledBy="customDomain" accessibilityLabel={_(msg`Custom domain`)} - accessibilityHint="Input your preferred hosting provider" + accessibilityHint={_(msg`Input your preferred hosting provider`)} /> </View> <View style={styles.spacer} /> @@ -395,18 +395,18 @@ function CustomHandleForm({ <View style={[styles.selectableBtns]}> <SelectableBtn selected={isDNSForm} - label="DNS Panel" + label={_(msg`DNS Panel`)} left onSelect={() => setDNSForm(true)} - accessibilityHint="Use the DNS panel" + accessibilityHint={_(msg`Use the DNS panel`)} style={s.flex1} /> <SelectableBtn selected={!isDNSForm} - label="No DNS Panel" + label={_(msg`No DNS Panel`)} right onSelect={() => setDNSForm(false)} - accessibilityHint="Use a file on your server" + accessibilityHint={_(msg`Use a file on your server`)} style={s.flex1} /> </View> @@ -418,7 +418,7 @@ function CustomHandleForm({ </Text> <View style={[styles.dnsTable, pal.btn]}> <Text type="md-medium" style={[styles.dnsLabel, pal.text]}> - Host: + <Trans>Host:</Trans> </Text> <View style={[styles.dnsValue]}> <Text type="mono" style={[styles.monoText, pal.text]}> @@ -426,7 +426,7 @@ function CustomHandleForm({ </Text> </View> <Text type="md-medium" style={[styles.dnsLabel, pal.text]}> - Type: + <Trans>Type:</Trans> </Text> <View style={[styles.dnsValue]}> <Text type="mono" style={[styles.monoText, pal.text]}> @@ -434,7 +434,7 @@ function CustomHandleForm({ </Text> </View> <Text type="md-medium" style={[styles.dnsLabel, pal.text]}> - Value: + <Trans>Value:</Trans> </Text> <View style={[styles.dnsValue]}> <Text type="mono" style={[styles.monoText, pal.text]}> @@ -443,7 +443,7 @@ function CustomHandleForm({ </View> </View> <Text type="md" style={[pal.text, s.pt20, s.pl5]}> - This should create a domain record at:{' '} + <Trans>This should create a domain record at:</Trans> </Text> <Text type="mono" style={[styles.monoText, pal.text, s.pt5, s.pl5]}> _atproto.{handle} @@ -463,7 +463,7 @@ function CustomHandleForm({ </View> <View style={styles.spacer} /> <Text type="md" style={[pal.text, s.pb5, s.pl5]}> - That contains the following: + <Trans>That contains the following:</Trans> </Text> <View style={[styles.valueContainer, pal.btn]}> <View style={[styles.dnsValue]}> @@ -478,7 +478,9 @@ function CustomHandleForm({ <View style={styles.spacer} /> <Button type="default" style={[s.p20, s.mb10]} onPress={onPressCopy}> <Text type="xl" style={[pal.link, s.textCenter]}> - Copy {isDNSForm ? 'Domain Value' : 'File Contents'} + <Trans> + Copy {isDNSForm ? _(msg`Domain Value`) : _(msg`File Contents`)} + </Trans> </Text> </Button> {canSave === true && ( @@ -504,8 +506,8 @@ function CustomHandleForm({ ) : ( <Text type="xl-medium" style={[s.white, s.textCenter]}> {canSave - ? `Update to ${handle}` - : `Verify ${isDNSForm ? 'DNS Record' : 'Text File'}`} + ? _(msg`Update to ${handle}`) + : _(msg`Verify ${isDNSForm ? 'DNS Record' : 'Text File'}`)} </Text> )} </Button> @@ -513,9 +515,9 @@ function CustomHandleForm({ <TouchableOpacity onPress={onToggleCustom} accessibilityLabel={_(msg`Use default provider`)} - accessibilityHint="Use bsky.social as hosting provider"> + accessibilityHint={_(msg`Use bsky.social as hosting provider`)}> <Text type="md-medium" style={[pal.link, s.pl10, s.pt5]}> - Nevermind, create a handle for me + <Trans>Nevermind, create a handle for me</Trans> </Text> </TouchableOpacity> </> diff --git a/src/view/com/modals/ChangePassword.tsx b/src/view/com/modals/ChangePassword.tsx index d8add979..44d85fc4 100644 --- a/src/view/com/modals/ChangePassword.tsx +++ b/src/view/com/modals/ChangePassword.tsx @@ -180,7 +180,7 @@ export function Component() { <TextInput testID="codeInput" style={[pal.text, styles.textInput]} - placeholder="Reset code" + placeholder={_(msg`Reset code`)} placeholderTextColor={pal.colors.textLight} value={resetCode} onChangeText={setResetCode} @@ -207,7 +207,7 @@ export function Component() { <TextInput testID="codeInput" style={[pal.text, styles.textInput]} - placeholder="New password" + placeholder={_(msg`New password`)} placeholderTextColor={pal.colors.textLight} onChangeText={setNewPassword} secureTextEntry diff --git a/src/view/com/modals/DeleteAccount.tsx b/src/view/com/modals/DeleteAccount.tsx index 40d78cfe..2301e7a6 100644 --- a/src/view/com/modals/DeleteAccount.tsx +++ b/src/view/com/modals/DeleteAccount.tsx @@ -173,7 +173,7 @@ export function Component({}: {}) { </Text> <TextInput style={[styles.textInput, pal.borderDark, pal.text, styles.mb20]} - placeholder="Confirmation code" + placeholder={_(msg`Confirmation code`)} placeholderTextColor={pal.textLight.color} keyboardAppearance={theme.colorScheme} value={confirmCode} @@ -192,7 +192,7 @@ export function Component({}: {}) { </Text> <TextInput style={[styles.textInput, pal.borderDark, pal.text]} - placeholder="Password" + placeholder={_(msg`Password`)} placeholderTextColor={pal.textLight.color} keyboardAppearance={theme.colorScheme} secureTextEntry @@ -228,7 +228,7 @@ export function Component({}: {}) { onPress={onCancel} accessibilityRole="button" accessibilityLabel={_(msg`Cancel account deletion`)} - accessibilityHint="Exits account deletion process" + accessibilityHint={_(msg`Exits account deletion process`)} onAccessibilityEscape={onCancel}> <Text type="button-lg" style={pal.textLight}> <Trans context="action">Cancel</Trans> diff --git a/src/view/com/modals/InAppBrowserConsent.tsx b/src/view/com/modals/InAppBrowserConsent.tsx index 86bb46ca..3fa51593 100644 --- a/src/view/com/modals/InAppBrowserConsent.tsx +++ b/src/view/com/modals/InAppBrowserConsent.tsx @@ -77,7 +77,7 @@ export function Component({href}: {href: string}) { }} accessibilityLabel={_(msg`Cancel`)} accessibilityHint="" - label="Cancel" + label={_(msg`Cancel`)} labelContainerStyle={{justifyContent: 'center', padding: 8}} labelStyle={[s.f18]} /> diff --git a/src/view/com/modals/LinkWarning.tsx b/src/view/com/modals/LinkWarning.tsx index 81fdc728..4e6d8f91 100644 --- a/src/view/com/modals/LinkWarning.tsx +++ b/src/view/com/modals/LinkWarning.tsx @@ -74,7 +74,7 @@ export function Component({text, href}: {text: string; href: string}) { onPress={onPressVisit} accessibilityLabel={_(msg`Visit Site`)} accessibilityHint="" - label="Visit Site" + label={_(msg`Visit Site`)} labelContainerStyle={{justifyContent: 'center', padding: 4}} labelStyle={[s.f18]} /> @@ -86,7 +86,7 @@ export function Component({text, href}: {text: string; href: string}) { }} accessibilityLabel={_(msg`Cancel`)} accessibilityHint="" - label="Cancel" + label={_(msg`Cancel`)} labelContainerStyle={{justifyContent: 'center', padding: 4}} labelStyle={[s.f18]} /> diff --git a/src/view/com/modals/ModerationDetails.tsx b/src/view/com/modals/ModerationDetails.tsx index f890d50d..6c022761 100644 --- a/src/view/com/modals/ModerationDetails.tsx +++ b/src/view/com/modals/ModerationDetails.tsx @@ -115,7 +115,7 @@ export function Component({ closeModal() }}> <Text type="button-lg" style={[pal.textLight, s.textCenter, s.white]}> - Okay + <Trans>Okay</Trans> </Text> </Button> </View> diff --git a/src/view/com/modals/VerifyEmail.tsx b/src/view/com/modals/VerifyEmail.tsx index 30a57afc..d3086d38 100644 --- a/src/view/com/modals/VerifyEmail.tsx +++ b/src/view/com/modals/VerifyEmail.tsx @@ -149,7 +149,7 @@ export function Component({showReminder}: {showReminder?: boolean}) { onPress={onEmailIncorrect} style={styles.changeEmailLink}> <Text type="lg" style={pal.link}> - Change + <Trans>Change</Trans> </Text> </Pressable> </> diff --git a/src/view/com/modals/crop-image/CropImage.web.tsx b/src/view/com/modals/crop-image/CropImage.web.tsx index 6f094a1f..98a2494e 100644 --- a/src/view/com/modals/crop-image/CropImage.web.tsx +++ b/src/view/com/modals/crop-image/CropImage.web.tsx @@ -100,7 +100,7 @@ export function Component({ onPress={doSetAs(AspectRatio.Wide)} accessibilityRole="button" accessibilityLabel={_(msg`Wide`)} - accessibilityHint="Sets image aspect ratio to wide"> + accessibilityHint={_(msg`Sets image aspect ratio to wide`)}> <RectWideIcon size={24} style={as === AspectRatio.Wide ? s.blue3 : pal.text} @@ -110,7 +110,7 @@ export function Component({ onPress={doSetAs(AspectRatio.Tall)} accessibilityRole="button" accessibilityLabel={_(msg`Tall`)} - accessibilityHint="Sets image aspect ratio to tall"> + accessibilityHint={_(msg`Sets image aspect ratio to tall`)}> <RectTallIcon size={24} style={as === AspectRatio.Tall ? s.blue3 : pal.text} @@ -120,7 +120,7 @@ export function Component({ onPress={doSetAs(AspectRatio.Square)} accessibilityRole="button" accessibilityLabel={_(msg`Square`)} - accessibilityHint="Sets image aspect ratio to square"> + accessibilityHint={_(msg`Sets image aspect ratio to square`)}> <SquareIcon size={24} style={as === AspectRatio.Square ? s.blue3 : pal.text} @@ -132,9 +132,9 @@ export function Component({ onPress={onPressCancel} accessibilityRole="button" accessibilityLabel={_(msg`Cancel image crop`)} - accessibilityHint="Exits image cropping process"> + accessibilityHint={_(msg`Exits image cropping process`)}> <Text type="xl" style={pal.link}> - Cancel + <Trans>Cancel</Trans> </Text> </TouchableOpacity> <View style={s.flex1} /> @@ -142,7 +142,7 @@ export function Component({ onPress={onPressDone} accessibilityRole="button" accessibilityLabel={_(msg`Save image crop`)} - accessibilityHint="Saves image crop settings"> + accessibilityHint={_(msg`Saves image crop settings`)}> <LinearGradient colors={[gradients.blueLight.start, gradients.blueLight.end]} start={{x: 0, y: 0}} diff --git a/src/view/com/modals/report/InputIssueDetails.tsx b/src/view/com/modals/report/InputIssueDetails.tsx index 2bc86f75..0ebb25ce 100644 --- a/src/view/com/modals/report/InputIssueDetails.tsx +++ b/src/view/com/modals/report/InputIssueDetails.tsx @@ -39,7 +39,7 @@ export function InputIssueDetails({ onPress={goBack} accessibilityRole="button" accessibilityLabel={_(msg`Add details`)} - accessibilityHint="Add more details to your report"> + accessibilityHint={_(msg`Add more details to your report`)}> <FontAwesomeIcon size={18} icon="angle-left" style={[pal.link]} /> <Text style={[pal.text, s.f18, pal.link]}> {' '} @@ -49,8 +49,8 @@ export function InputIssueDetails({ <View style={[pal.btn, styles.detailsInputContainer]}> <TextInput accessibilityLabel={_(msg`Text input field`)} - accessibilityHint="Enter a reason for reporting this post." - placeholder="Enter a reason or any other details here." + accessibilityHint={_(msg`Enter a reason for reporting this post.`)} + placeholder={_(msg`Enter a reason or any other details here.`)} placeholderTextColor={pal.textLight.color} value={details} onChangeText={setDetails} diff --git a/src/view/com/modals/report/Modal.tsx b/src/view/com/modals/report/Modal.tsx index abbad9b4..236f3273 100644 --- a/src/view/com/modals/report/Modal.tsx +++ b/src/view/com/modals/report/Modal.tsx @@ -41,6 +41,7 @@ type ReportComponentProps = export function Component(content: ReportComponentProps) { const {closeModal} = useModalControls() const pal = usePalette('default') + const {_} = useLingui() const {isMobile} = useWebMediaQueries() const [isProcessing, setIsProcessing] = useState(false) const [showDetailsInput, setShowDetailsInput] = useState(false) @@ -77,7 +78,9 @@ export function Component(content: ReportComponentProps) { }, reason: details, }) - Toast.show("Thank you for your report! We'll look into it promptly.") + Toast.show( + _(msg`Thank you for your report! We'll look into it promptly.`), + ) closeModal() return @@ -189,7 +192,7 @@ const SelectIssue = ({ onPress={goToDetails} accessibilityRole="button" accessibilityLabel={_(msg`Add details`)} - accessibilityHint="Add more details to your report"> + accessibilityHint={_(msg`Add more details to your report`)}> <Text style={[s.f18, pal.link]}> <Trans>Add details to report</Trans> </Text> diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 826d0d16..fc13fa0e 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -296,7 +296,7 @@ let PostThreadItemLoaded = ({ color={pal.colors.textLight} /> <Text type="sm-medium" style={pal.textLight}> - Muted + <Trans>Muted</Trans> </Text> </View> )} @@ -578,7 +578,7 @@ let PostThreadItemLoaded = ({ title={itemTitle} noFeedback> <Text type="sm-medium" style={pal.textLight}> - More + <Trans>More</Trans> </Text> <FontAwesomeIcon icon="angle-right" diff --git a/src/view/com/profile/ProfileHeaderSuggestedFollows.tsx b/src/view/com/profile/ProfileHeaderSuggestedFollows.tsx index 6edc61fc..ab406aee 100644 --- a/src/view/com/profile/ProfileHeaderSuggestedFollows.tsx +++ b/src/view/com/profile/ProfileHeaderSuggestedFollows.tsx @@ -21,7 +21,8 @@ import {useModerationOpts} from '#/state/queries/preferences' import {useSuggestedFollowsByActorQuery} from '#/state/queries/suggested-follows' import {useProfileShadow} from '#/state/cache/profile-shadow' import {useProfileFollowMutationQueue} from '#/state/queries/profile' -import {Trans} from '@lingui/macro' +import {useLingui} from '@lingui/react' +import {Trans, msg} from '@lingui/macro' const OUTER_PADDING = 10 const INNER_PADDING = 14 @@ -168,6 +169,7 @@ function SuggestedFollow({ }) { const {track} = useAnalytics() const pal = usePalette('default') + const {_} = useLingui() const moderationOpts = useModerationOpts() const profile = useProfileShadow(profileUnshadowed) const [queueFollow, queueUnfollow] = useProfileFollowMutationQueue(profile) @@ -178,20 +180,20 @@ function SuggestedFollow({ await queueFollow() } catch (e: any) { if (e?.name !== 'AbortError') { - Toast.show('An issue occurred, please try again.') + Toast.show(_(msg`An issue occurred, please try again.`)) } } - }, [queueFollow, track]) + }, [queueFollow, track, _]) const onPressUnfollow = React.useCallback(async () => { try { await queueUnfollow() } catch (e: any) { if (e?.name !== 'AbortError') { - Toast.show('An issue occurred, please try again.') + Toast.show(_(msg`An issue occurred, please try again.`)) } } - }, [queueUnfollow]) + }, [queueUnfollow, _]) if (!moderationOpts) { return null @@ -236,7 +238,7 @@ function SuggestedFollow({ </View> <Button - label={following ? 'Unfollow' : 'Follow'} + label={following ? _(msg`Unfollow`) : _(msg`Follow`)} type="inverted" labelStyle={{textAlign: 'center'}} onPress={following ? onPressUnfollow : onPressFollow} diff --git a/src/view/screens/LanguageSettings.tsx b/src/view/screens/LanguageSettings.tsx index 819840a4..27da07d8 100644 --- a/src/view/screens/LanguageSettings.tsx +++ b/src/view/screens/LanguageSettings.tsx @@ -97,7 +97,7 @@ export function LanguageSettingsScreen(_props: Props) { <Text style={[pal.text, s.pb10]}> <Trans> Select your app language for the default text to display in the - app + app. </Trans> </Text> diff --git a/src/view/screens/Moderation.tsx b/src/view/screens/Moderation.tsx index 8f1fe75b..e96bb396 100644 --- a/src/view/screens/Moderation.tsx +++ b/src/view/screens/Moderation.tsx @@ -69,8 +69,8 @@ export function ModerationScreen({}: Props) { style={[styles.linkCard, pal.view]} onPress={onPressContentFiltering} accessibilityRole="tab" - accessibilityHint="Content filtering" - accessibilityLabel=""> + accessibilityLabel={_(msg`Content filtering`)} + accessibilityHint=""> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon icon="eye" diff --git a/src/view/screens/ProfileFeed.tsx b/src/view/screens/ProfileFeed.tsx index be9eec81..d502fdbf 100644 --- a/src/view/screens/ProfileFeed.tsx +++ b/src/view/screens/ProfileFeed.tsx @@ -103,7 +103,7 @@ export function ProfileFeedScreen(props: Props) { <Button type="default" accessibilityLabel={_(msg`Go Back`)} - accessibilityHint="Return to previous page" + accessibilityHint={_(msg`Return to previous page`)} onPress={onPressBack} style={{flexShrink: 1}}> <Text type="button" style={pal.text}> diff --git a/src/view/screens/Settings/index.tsx b/src/view/screens/Settings/index.tsx index 9abf0f2b..daabf6de 100644 --- a/src/view/screens/Settings/index.tsx +++ b/src/view/screens/Settings/index.tsx @@ -531,8 +531,8 @@ export function SettingsScreen({}: Props) { ]} onPress={openHomeFeedPreferences} accessibilityRole="button" - accessibilityHint="" - accessibilityLabel={_(msg`Opens the home feed preferences`)}> + accessibilityLabel={_(msg`Home feed preferences`)} + accessibilityHint={_(msg`Opens the home feed preferences`)}> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon icon="sliders" @@ -552,8 +552,8 @@ export function SettingsScreen({}: Props) { ]} onPress={openThreadsPreferences} accessibilityRole="button" - accessibilityHint="" - accessibilityLabel={_(msg`Opens the threads preferences`)}> + accessibilityLabel={_(msg`Thread preferences`)} + accessibilityHint={_(msg`Opens the threads preferences`)}> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon icon={['far', 'comments']} @@ -572,8 +572,8 @@ export function SettingsScreen({}: Props) { pal.view, isSwitchingAccounts && styles.dimmed, ]} - accessibilityHint="My Saved Feeds" - accessibilityLabel={_(msg`Opens screen with all saved feeds`)} + accessibilityLabel={_(msg`My saved feeds`)} + accessibilityHint={_(msg`Opens screen with all saved feeds`)} onPress={onPressSavedFeeds}> <View style={[styles.iconContainer, pal.btn]}> <HashtagIcon style={pal.text} size={18} strokeWidth={3} /> @@ -730,7 +730,9 @@ export function SettingsScreen({}: Props) { onPress={() => openModal({name: 'change-password'})} accessibilityRole="button" accessibilityLabel={_(msg`Change password`)} - accessibilityHint={_(msg`Change your Bluesky password`)}> + accessibilityHint={_( + msg`Opens modal for change your Bluesky password`, + )}> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon icon="lock" @@ -752,7 +754,7 @@ export function SettingsScreen({}: Props) { accessibilityRole="button" accessibilityLabel={_(msg`Export my data`)} accessibilityHint={_( - msg`Download Bluesky account data (repository)`, + msg`Opens modal for download Bluesky account data (repository)`, )}> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon @@ -789,8 +791,8 @@ export function SettingsScreen({}: Props) { style={[pal.view, styles.linkCardNoIcon]} onPress={onPressSystemLog} accessibilityRole="button" - accessibilityHint="Open system log" - accessibilityLabel={_(msg`Opens the system log page`)}> + accessibilityLabel={_(msg`Open system log`)} + accessibilityHint={_(msg`Opens the system log page`)}> <Text type="lg" style={pal.text}> <Trans>System log</Trans> </Text> @@ -811,7 +813,7 @@ export function SettingsScreen({}: Props) { style={[pal.view, styles.linkCardNoIcon]} onPress={onPressResetPreferences} accessibilityRole="button" - accessibilityLabel={_(msg`Reset preferences`)} + accessibilityLabel={_(msg`Reset preferences state`)} accessibilityHint={_(msg`Resets the preferences state`)}> <Text type="lg" style={pal.text}> <Trans>Reset preferences state</Trans> @@ -821,7 +823,7 @@ export function SettingsScreen({}: Props) { style={[pal.view, styles.linkCardNoIcon]} onPress={onPressResetOnboarding} accessibilityRole="button" - accessibilityLabel={_(msg`Reset onboarding`)} + accessibilityLabel={_(msg`Reset onboarding state`)} accessibilityHint={_(msg`Resets the onboarding state`)}> <Text type="lg" style={pal.text}> <Trans>Reset onboarding state</Trans> @@ -832,7 +834,7 @@ export function SettingsScreen({}: Props) { onPress={clearAllLegacyStorage} accessibilityRole="button" accessibilityLabel={_(msg`Clear all legacy storage data`)} - accessibilityHint={_(msg`Clear all legacy storage data`)}> + accessibilityHint={_(msg`Clears all legacy storage data`)}> <Text type="lg" style={pal.text}> <Trans> Clear all legacy storage data (restart after this) @@ -844,7 +846,7 @@ export function SettingsScreen({}: Props) { onPress={clearAllStorage} accessibilityRole="button" accessibilityLabel={_(msg`Clear all storage data`)} - accessibilityHint={_(msg`Clear all storage data`)}> + accessibilityHint={_(msg`Clears all storage data`)}> <Text type="lg" style={pal.text}> <Trans>Clear all storage data (restart after this)</Trans> </Text> @@ -933,7 +935,7 @@ function EmailConfirmationNotice() { ]} accessibilityRole="button" accessibilityLabel={_(msg`Verify my email`)} - accessibilityHint="" + accessibilityHint={_(msg`Opens modal for email verification`)} onPress={() => openModal({name: 'verify-email'})}> <FontAwesomeIcon icon="envelope" diff --git a/src/view/shell/NavSignupCard.tsx b/src/view/shell/NavSignupCard.tsx index bae37e83..83d14149 100644 --- a/src/view/shell/NavSignupCard.tsx +++ b/src/view/shell/NavSignupCard.tsx @@ -58,7 +58,7 @@ let NavSignupCard = ({}: {}): React.ReactNode => { accessibilityHint={_(msg`Sign in`)} accessibilityLabel={_(msg`Sign in`)}> <Text type="md" style={[pal.text, s.bold]}> - Sign in + <Trans>Sign in</Trans> </Text> </Button> </View> From 44259948ccb290c2a52496491c4a8d1cbbd071ef Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Wed, 14 Feb 2024 16:14:29 +0900 Subject: [PATCH 02/33] Update Drawer.tsx --- src/view/shell/Drawer.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx index 2a37d1fe..23a15d6b 100644 --- a/src/view/shell/Drawer.tsx +++ b/src/view/shell/Drawer.tsx @@ -93,10 +93,12 @@ let DrawerProfileCard = ({ {formatCountShortOnly(profile?.followersCount ?? 0)} </Text>{' '} {pluralize(profile?.followersCount || 0, 'follower')} ·{' '} - <Text type="xl-medium" style={pal.text}> - {formatCountShortOnly(profile?.followsCount ?? 0)} - </Text>{' '} - following + <Trans> + <Text type="xl-medium" style={pal.text}> + {formatCountShortOnly(profile?.followsCount ?? 0)} + </Text>{' '} + following + </Trans> </Text> </TouchableOpacity> ) From a7661b1f6fa38cec33465ce83f3a40afbeffa65a Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Thu, 15 Feb 2024 09:19:22 +0900 Subject: [PATCH 03/33] Update src/view/screens/Settings/index.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> --- src/view/screens/Settings/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/screens/Settings/index.tsx b/src/view/screens/Settings/index.tsx index daabf6de..a4224290 100644 --- a/src/view/screens/Settings/index.tsx +++ b/src/view/screens/Settings/index.tsx @@ -731,7 +731,7 @@ export function SettingsScreen({}: Props) { accessibilityRole="button" accessibilityLabel={_(msg`Change password`)} accessibilityHint={_( - msg`Opens modal for change your Bluesky password`, + msg`Opens modal for changing your Bluesky password`, )}> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon From 3f1a85198ae102ff0661f2bb1c7474dc15a5ed5f Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Thu, 15 Feb 2024 09:19:28 +0900 Subject: [PATCH 04/33] Update src/view/screens/Settings/index.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> --- src/view/screens/Settings/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/screens/Settings/index.tsx b/src/view/screens/Settings/index.tsx index a4224290..461c378d 100644 --- a/src/view/screens/Settings/index.tsx +++ b/src/view/screens/Settings/index.tsx @@ -754,7 +754,7 @@ export function SettingsScreen({}: Props) { accessibilityRole="button" accessibilityLabel={_(msg`Export my data`)} accessibilityHint={_( - msg`Opens modal for download Bluesky account data (repository)`, + msg`Opens modal for downloading Bluesky account data (repository)`, )}> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon From 83cb04b691954ab6bae302c7c6cd3de7f6e0743d Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Thu, 15 Feb 2024 09:19:40 +0900 Subject: [PATCH 05/33] Update src/view/com/modals/LinkWarning.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> --- src/view/com/modals/LinkWarning.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/com/modals/LinkWarning.tsx b/src/view/com/modals/LinkWarning.tsx index 4e6d8f91..6d2f687a 100644 --- a/src/view/com/modals/LinkWarning.tsx +++ b/src/view/com/modals/LinkWarning.tsx @@ -85,7 +85,7 @@ export function Component({text, href}: {text: string; href: string}) { closeModal() }} accessibilityLabel={_(msg`Cancel`)} - accessibilityHint="" + accessibilityHint={_(msg`Cancels opening the linked website`)} label={_(msg`Cancel`)} labelContainerStyle={{justifyContent: 'center', padding: 4}} labelStyle={[s.f18]} From b0cdaf71ddbe9f6ba1b3b4db3536111c6a42f8a8 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Thu, 15 Feb 2024 09:19:46 +0900 Subject: [PATCH 06/33] Update src/view/com/modals/LinkWarning.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> --- src/view/com/modals/LinkWarning.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/com/modals/LinkWarning.tsx b/src/view/com/modals/LinkWarning.tsx index 6d2f687a..b5ff6700 100644 --- a/src/view/com/modals/LinkWarning.tsx +++ b/src/view/com/modals/LinkWarning.tsx @@ -73,7 +73,7 @@ export function Component({text, href}: {text: string; href: string}) { type="primary" onPress={onPressVisit} accessibilityLabel={_(msg`Visit Site`)} - accessibilityHint="" + accessibilityHint={_(msg`Opens the linked website`)} label={_(msg`Visit Site`)} labelContainerStyle={{justifyContent: 'center', padding: 4}} labelStyle={[s.f18]} From 2823e8aa47698bdaa3c1deae2a8e542e2f80592f Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Thu, 15 Feb 2024 09:19:54 +0900 Subject: [PATCH 07/33] Update src/view/screens/Moderation.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> --- src/view/screens/Moderation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/screens/Moderation.tsx b/src/view/screens/Moderation.tsx index e96bb396..f12f6be0 100644 --- a/src/view/screens/Moderation.tsx +++ b/src/view/screens/Moderation.tsx @@ -70,7 +70,7 @@ export function ModerationScreen({}: Props) { onPress={onPressContentFiltering} accessibilityRole="tab" accessibilityLabel={_(msg`Content filtering`)} - accessibilityHint=""> + accessibilityHint={_(msg`Opens the content filtering preferences`)}> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon icon="eye" From c94e5f81a02f9c4b192772c5ad5e3150c4b08a2c Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Thu, 15 Feb 2024 09:39:29 +0900 Subject: [PATCH 08/33] Update index.tsx --- src/view/screens/Settings/index.tsx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/view/screens/Settings/index.tsx b/src/view/screens/Settings/index.tsx index 461c378d..c39fb500 100644 --- a/src/view/screens/Settings/index.tsx +++ b/src/view/screens/Settings/index.tsx @@ -472,20 +472,20 @@ export function SettingsScreen({}: Props) { label={_(msg`System`)} left onSelect={() => setColorMode('system')} - accessibilityHint={_(msg`Set color theme to system setting`)} + accessibilityHint={_(msg`Sets color theme to system setting`)} /> <SelectableBtn selected={colorMode === 'light'} label={_(msg`Light`)} onSelect={() => setColorMode('light')} - accessibilityHint={_(msg`Set color theme to light`)} + accessibilityHint={_(msg`Sets color theme to light`)} /> <SelectableBtn selected={colorMode === 'dark'} label={_(msg`Dark`)} right onSelect={() => setColorMode('dark')} - accessibilityHint={_(msg`Set color theme to dark`)} + accessibilityHint={_(msg`Sets color theme to dark`)} /> </View> </View> @@ -504,14 +504,14 @@ export function SettingsScreen({}: Props) { label={_(msg`Dim`)} left onSelect={() => setDarkTheme('dim')} - accessibilityHint={_(msg`Set dark theme to the dim theme`)} + accessibilityHint={_(msg`Sets dark theme to the dim theme`)} /> <SelectableBtn selected={darkTheme === 'dark'} label={_(msg`Dark`)} right onSelect={() => setDarkTheme('dark')} - accessibilityHint={_(msg`Set dark theme to the dark theme`)} + accessibilityHint={_(msg`Sets dark theme to the dark theme`)} /> </View> </View> @@ -572,9 +572,10 @@ export function SettingsScreen({}: Props) { pal.view, isSwitchingAccounts && styles.dimmed, ]} + onPress={onPressSavedFeeds} + accessibilityRole="button" accessibilityLabel={_(msg`My saved feeds`)} - accessibilityHint={_(msg`Opens screen with all saved feeds`)} - onPress={onPressSavedFeeds}> + accessibilityHint={_(msg`Opens screen with all saved feeds`)}> <View style={[styles.iconContainer, pal.btn]}> <HashtagIcon style={pal.text} size={18} strokeWidth={3} /> </View> @@ -673,7 +674,7 @@ export function SettingsScreen({}: Props) { onPress={onPressAppPasswords} accessibilityRole="button" accessibilityLabel={_(msg`App password settings`)} - accessibilityHint={_(msg`Opens the app password settings page`)}> + accessibilityHint={_(msg`Opens the app password settings`)}> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon icon="lock" @@ -694,7 +695,7 @@ export function SettingsScreen({}: Props) { onPress={isSwitchingAccounts ? undefined : onPressChangeHandle} accessibilityRole="button" accessibilityLabel={_(msg`Change handle`)} - accessibilityHint={_(msg`Choose a new Bluesky username or create`)}> + accessibilityHint={_(msg`Opens modal for choosing or creating a new Bluesky username`)}> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon icon="at" From cb4092c95957fa2b00ab20bd119afc2c3f6105d1 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Thu, 15 Feb 2024 09:41:51 +0900 Subject: [PATCH 09/33] Update index.tsx --- src/view/screens/Settings/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/view/screens/Settings/index.tsx b/src/view/screens/Settings/index.tsx index c39fb500..dd208370 100644 --- a/src/view/screens/Settings/index.tsx +++ b/src/view/screens/Settings/index.tsx @@ -695,7 +695,9 @@ export function SettingsScreen({}: Props) { onPress={isSwitchingAccounts ? undefined : onPressChangeHandle} accessibilityRole="button" accessibilityLabel={_(msg`Change handle`)} - accessibilityHint={_(msg`Opens modal for choosing or creating a new Bluesky username`)}> + accessibilityHint={_( + msg`Opens modal for choosing or creating a new Bluesky username`, + )}> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon icon="at" From 880149c05ec2812d5414476824edda0ee2ddbc98 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Thu, 15 Feb 2024 09:46:30 +0900 Subject: [PATCH 10/33] Update ProfileFeed.tsx --- src/view/screens/ProfileFeed.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/screens/ProfileFeed.tsx b/src/view/screens/ProfileFeed.tsx index d502fdbf..4901308b 100644 --- a/src/view/screens/ProfileFeed.tsx +++ b/src/view/screens/ProfileFeed.tsx @@ -103,7 +103,7 @@ export function ProfileFeedScreen(props: Props) { <Button type="default" accessibilityLabel={_(msg`Go Back`)} - accessibilityHint={_(msg`Return to previous page`)} + accessibilityHint={_(msg`Returns to previous page`)} onPress={onPressBack} style={{flexShrink: 1}}> <Text type="button" style={pal.text}> From 46ee6a07480ef136c0fc8b41a406098899fd23f4 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Fri, 16 Feb 2024 09:00:59 +0900 Subject: [PATCH 11/33] Update LanguageSettings.tsx --- src/view/screens/LanguageSettings.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/screens/LanguageSettings.tsx b/src/view/screens/LanguageSettings.tsx index 27da07d8..b86cd46e 100644 --- a/src/view/screens/LanguageSettings.tsx +++ b/src/view/screens/LanguageSettings.tsx @@ -296,7 +296,7 @@ export function LanguageSettingsScreen(_props: Props) { type="button" style={[pal.text, {flexShrink: 1, overflow: 'hidden'}]} numberOfLines={1}> - {myLanguages.length ? myLanguages : 'Select languages'} + {myLanguages.length ? myLanguages : _(msg`Select languages`)} </Text> </Button> </View> From 312f54cfc02c74bf559bd05ebc026a30f054266f Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Fri, 16 Feb 2024 10:05:40 +0900 Subject: [PATCH 12/33] Update Moderation.tsx --- src/view/screens/Moderation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/screens/Moderation.tsx b/src/view/screens/Moderation.tsx index f12f6be0..36f1fb83 100644 --- a/src/view/screens/Moderation.tsx +++ b/src/view/screens/Moderation.tsx @@ -70,7 +70,7 @@ export function ModerationScreen({}: Props) { onPress={onPressContentFiltering} accessibilityRole="tab" accessibilityLabel={_(msg`Content filtering`)} - accessibilityHint={_(msg`Opens the content filtering preferences`)}> + accessibilityHint={_(msg`Opens modal for content filtering preferences`)}> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon icon="eye" From 36d2b02a9ea4016817b3c9d6fc305d09482ffe33 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Fri, 16 Feb 2024 10:05:43 +0900 Subject: [PATCH 13/33] Update index.tsx --- src/view/screens/Settings/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/screens/Settings/index.tsx b/src/view/screens/Settings/index.tsx index dd208370..e2ddd377 100644 --- a/src/view/screens/Settings/index.tsx +++ b/src/view/screens/Settings/index.tsx @@ -776,7 +776,7 @@ export function SettingsScreen({}: Props) { accessibilityRole="button" accessibilityLabel={_(msg`Delete account`)} accessibilityHint={_( - msg`Opens modal for account deletion confirmation. Requires email code.`, + msg`Opens modal for account deletion confirmation. Requires email code`, )}> <View style={[styles.iconContainer, dangerBg]}> <FontAwesomeIcon From b8b5d24fb943639ace52d4281e06871e5d497b30 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Fri, 16 Feb 2024 10:08:28 +0900 Subject: [PATCH 14/33] Update Moderation.tsx --- src/view/screens/Moderation.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/view/screens/Moderation.tsx b/src/view/screens/Moderation.tsx index 36f1fb83..9db35806 100644 --- a/src/view/screens/Moderation.tsx +++ b/src/view/screens/Moderation.tsx @@ -70,7 +70,9 @@ export function ModerationScreen({}: Props) { onPress={onPressContentFiltering} accessibilityRole="tab" accessibilityLabel={_(msg`Content filtering`)} - accessibilityHint={_(msg`Opens modal for content filtering preferences`)}> + accessibilityHint={_( + msg`Opens modal for content filtering preferences`, + )}> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon icon="eye" From b3e6f0f29deae515d232d14f099e8c144d870f48 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Fri, 16 Feb 2024 10:16:56 +0900 Subject: [PATCH 15/33] Update ExportCarDialog.tsx --- src/view/screens/Settings/ExportCarDialog.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/view/screens/Settings/ExportCarDialog.tsx b/src/view/screens/Settings/ExportCarDialog.tsx index 720cd4f0..8c028d4d 100644 --- a/src/view/screens/Settings/ExportCarDialog.tsx +++ b/src/view/screens/Settings/ExportCarDialog.tsx @@ -78,8 +78,9 @@ export function ExportCarDialog({ <InlineLink to="https://atproto.com/blog/repo-export" style={[a.text_sm]}> - this blogpost. + this blogpost </InlineLink> + . </Trans> </P> From 25d7e2449fcb7f23ae636a2d4e00a2191a00ceab Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Sat, 24 Feb 2024 18:23:14 +0900 Subject: [PATCH 16/33] Update NotFound.tsx --- src/view/screens/NotFound.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/screens/NotFound.tsx b/src/view/screens/NotFound.tsx index dfa840ab..bdf55b89 100644 --- a/src/view/screens/NotFound.tsx +++ b/src/view/screens/NotFound.tsx @@ -51,7 +51,7 @@ export const NotFoundScreen = () => { </Text> <Button type="primary" - label={canGoBack ? 'Go back' : 'Go home'} + label={canGoBack ? _(msg`Go back`) : _(msg`Go home`)} onPress={onPressHome} /> </View> From 7a920d2eb46a3915371248e7d8c4cb82419f87ff Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Sat, 24 Feb 2024 18:25:29 +0900 Subject: [PATCH 17/33] Update NotFound.tsx --- src/view/screens/NotFound.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/view/screens/NotFound.tsx b/src/view/screens/NotFound.tsx index bdf55b89..064234f2 100644 --- a/src/view/screens/NotFound.tsx +++ b/src/view/screens/NotFound.tsx @@ -52,6 +52,8 @@ export const NotFoundScreen = () => { <Button type="primary" label={canGoBack ? _(msg`Go back`) : _(msg`Go home`)} + accessibilityLabel={canGoBack ? _(msg`Go Back`) : _(msg`Go home`)} + accessibilityHint={canGoBack ? _(msg`Returns to previous page`) : _(msg`Returns to home page`)} onPress={onPressHome} /> </View> From 5809dd06245f8a2da82f8ff74540e72b660c8ec5 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Sat, 24 Feb 2024 18:29:01 +0900 Subject: [PATCH 18/33] accessibilityLabel --- src/view/screens/NotFound.tsx | 4 ++-- src/view/screens/ProfileFeed.tsx | 2 +- src/view/screens/ProfileList.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/view/screens/NotFound.tsx b/src/view/screens/NotFound.tsx index 064234f2..2ac05c46 100644 --- a/src/view/screens/NotFound.tsx +++ b/src/view/screens/NotFound.tsx @@ -51,8 +51,8 @@ export const NotFoundScreen = () => { </Text> <Button type="primary" - label={canGoBack ? _(msg`Go back`) : _(msg`Go home`)} - accessibilityLabel={canGoBack ? _(msg`Go Back`) : _(msg`Go home`)} + label={canGoBack ? _(msg`Go Back`) : _(msg`Go Home`)} + accessibilityLabel={canGoBack ? _(msg`Go back`) : _(msg`Go home`)} accessibilityHint={canGoBack ? _(msg`Returns to previous page`) : _(msg`Returns to home page`)} onPress={onPressHome} /> diff --git a/src/view/screens/ProfileFeed.tsx b/src/view/screens/ProfileFeed.tsx index 2c346e89..d92c1cd8 100644 --- a/src/view/screens/ProfileFeed.tsx +++ b/src/view/screens/ProfileFeed.tsx @@ -103,7 +103,7 @@ export function ProfileFeedScreen(props: Props) { <View style={{flexDirection: 'row'}}> <Button type="default" - accessibilityLabel={_(msg`Go Back`)} + accessibilityLabel={_(msg`Go back`)} accessibilityHint={_(msg`Returns to previous page`)} onPress={onPressBack} style={{flexShrink: 1}}> diff --git a/src/view/screens/ProfileList.tsx b/src/view/screens/ProfileList.tsx index d86b569e..b3072c39 100644 --- a/src/view/screens/ProfileList.tsx +++ b/src/view/screens/ProfileList.tsx @@ -894,7 +894,7 @@ function ErrorScreen({error}: {error: string}) { <View style={{flexDirection: 'row'}}> <Button type="default" - accessibilityLabel={_(msg`Go Back`)} + accessibilityLabel={_(msg`Go back`)} accessibilityHint={_(msg`Return to previous page`)} onPress={onPressBack} style={{flexShrink: 1}}> From 860b5307adf29e7f47e2ef6a84af1932929223b1 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Sat, 24 Feb 2024 18:29:12 +0900 Subject: [PATCH 19/33] Update NotFound.tsx --- src/view/screens/NotFound.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/view/screens/NotFound.tsx b/src/view/screens/NotFound.tsx index 2ac05c46..7d51619b 100644 --- a/src/view/screens/NotFound.tsx +++ b/src/view/screens/NotFound.tsx @@ -53,7 +53,11 @@ export const NotFoundScreen = () => { type="primary" label={canGoBack ? _(msg`Go Back`) : _(msg`Go Home`)} accessibilityLabel={canGoBack ? _(msg`Go back`) : _(msg`Go home`)} - accessibilityHint={canGoBack ? _(msg`Returns to previous page`) : _(msg`Returns to home page`)} + accessibilityHint={ + canGoBack + ? _(msg`Returns to previous page`) + : _(msg`Returns to home page`) + } onPress={onPressHome} /> </View> From b2605d3908c9e3d59e07c5a53172b067f55e650c Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Tue, 27 Feb 2024 19:17:47 +0900 Subject: [PATCH 20/33] Update ChangePassword.tsx --- src/view/com/modals/ChangePassword.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/com/modals/ChangePassword.tsx b/src/view/com/modals/ChangePassword.tsx index 44d85fc4..b2415a1e 100644 --- a/src/view/com/modals/ChangePassword.tsx +++ b/src/view/com/modals/ChangePassword.tsx @@ -137,7 +137,7 @@ export function Component() { <View> <View style={styles.titleSection}> <Text type="title-lg" style={[pal.text, styles.title]}> - {stage !== Stages.Done ? 'Change Password' : 'Password Changed'} + {stage !== Stages.Done ? _(msg`Change Password`) : _(msg`Password Changed`)} </Text> </View> From 41e69651f97cc95d42ff4ae247706604faca51ae Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Tue, 27 Feb 2024 19:17:58 +0900 Subject: [PATCH 21/33] Update ChangePassword.tsx --- src/view/com/modals/ChangePassword.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/view/com/modals/ChangePassword.tsx b/src/view/com/modals/ChangePassword.tsx index b2415a1e..4badc88a 100644 --- a/src/view/com/modals/ChangePassword.tsx +++ b/src/view/com/modals/ChangePassword.tsx @@ -137,7 +137,9 @@ export function Component() { <View> <View style={styles.titleSection}> <Text type="title-lg" style={[pal.text, styles.title]}> - {stage !== Stages.Done ? _(msg`Change Password`) : _(msg`Password Changed`)} + {stage !== Stages.Done + ? _(msg`Change Password`) + : _(msg`Password Changed`)} </Text> </View> From 537ae578d6501319e07132ea8b12c280e0755fca Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Thu, 29 Feb 2024 14:25:52 +0900 Subject: [PATCH 22/33] Update Search.tsx --- src/view/screens/Search/Search.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/screens/Search/Search.tsx b/src/view/screens/Search/Search.tsx index 42eec53d..b3ff0e2e 100644 --- a/src/view/screens/Search/Search.tsx +++ b/src/view/screens/Search/Search.tsx @@ -772,7 +772,7 @@ export function SearchScreen( {searchHistory.length > 0 && ( <View style={styles.searchHistoryContent}> <Text style={[pal.text, styles.searchHistoryTitle]}> - Recent Searches + <Trans>Recent Searches</Trans> </Text> {searchHistory.map((historyItem, index) => ( <View key={index} style={styles.historyItemContainer}> From d0438b6b28ff87628f737f8dd26bace8916ef59c Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Sat, 2 Mar 2024 13:26:21 +0900 Subject: [PATCH 23/33] Update Lists.tsx --- src/components/Lists.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/Lists.tsx b/src/components/Lists.tsx index 12a93580..9778545d 100644 --- a/src/components/Lists.tsx +++ b/src/components/Lists.tsx @@ -2,7 +2,8 @@ import React from 'react' import {atoms as a, useBreakpoints, useTheme} from '#/alf' import {View} from 'react-native' 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 {Text} from '#/components/Typography' @@ -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 = useNavigation<NavigationProp>() const t = useTheme() const {gtMobile} = useBreakpoints() + const {_} = useLingui() const canGoBack = navigation.canGoBack() const onGoBack = React.useCallback(() => { @@ -218,7 +221,7 @@ export function ListMaybePlaceholder({ <Button variant="solid" color="primary" - label="Click here" + label={_(msg`Click here`)} onPress={onRetry} size="large" style={[ @@ -226,17 +229,17 @@ export function ListMaybePlaceholder({ a.overflow_hidden, {paddingVertical: 10}, ]}> - Retry + <Trans>Retry</Trans> </Button> )} <Button variant="solid" color={isError && onRetry ? 'secondary' : 'primary'} - label="Click here" + label={_(msg`Click here`)} onPress={onGoBack} size="large" style={[a.rounded_sm, a.overflow_hidden, {paddingVertical: 10}]}> - Go Back + <Trans>Go Back</Trans> </Button> </View> </> From 4a858bacd6033a443858d9c599b12adc6ea316c9 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Wed, 6 Mar 2024 19:38:13 +0900 Subject: [PATCH 24/33] Update src/view/screens/Settings/index.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> --- src/view/screens/Settings/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/screens/Settings/index.tsx b/src/view/screens/Settings/index.tsx index 7a725a66..f0d19e37 100644 --- a/src/view/screens/Settings/index.tsx +++ b/src/view/screens/Settings/index.tsx @@ -531,7 +531,7 @@ export function SettingsScreen({}: Props) { ]} onPress={openFollowingFeedPreferences} accessibilityRole="button" - accessibilityLabel={_(msg`Home feed preferences`)} + accessibilityLabel={_(msg`Following feed preferences`)} accessibilityHint={_(msg`Opens the home feed preferences`)}> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon From 0c6a82062f9c9c47338fe50f0ef37a1c068939c2 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Wed, 6 Mar 2024 19:38:23 +0900 Subject: [PATCH 25/33] Update src/view/screens/Settings/index.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> --- src/view/screens/Settings/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/screens/Settings/index.tsx b/src/view/screens/Settings/index.tsx index f0d19e37..2e2de1d8 100644 --- a/src/view/screens/Settings/index.tsx +++ b/src/view/screens/Settings/index.tsx @@ -532,7 +532,7 @@ export function SettingsScreen({}: Props) { onPress={openFollowingFeedPreferences} accessibilityRole="button" accessibilityLabel={_(msg`Following feed preferences`)} - accessibilityHint={_(msg`Opens the home feed preferences`)}> + accessibilityHint={_(msg`Opens the Following feed preferences`)}> <View style={[styles.iconContainer, pal.btn]}> <FontAwesomeIcon icon="sliders" From 2938a1397e763f44e088cde11d8b975b036a6405 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Wed, 13 Mar 2024 10:41:34 +0900 Subject: [PATCH 26/33] Update index.tsx --- src/components/Menu/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Menu/index.tsx b/src/components/Menu/index.tsx index 9be9dd86..051e95b9 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> ) } From 1760043f79f6e50de3bb2df97c3d6fe9c700b035 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Wed, 13 Mar 2024 10:41:38 +0900 Subject: [PATCH 27/33] Update index.tsx --- src/components/TagMenu/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/TagMenu/index.tsx b/src/components/TagMenu/index.tsx index 849a3f42..ae4b50bf 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> </> )} From 7a0bf7266a5a871fafb08194d794318fb02ac999 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Sat, 16 Mar 2024 16:48:58 +0900 Subject: [PATCH 28/33] Update Lists.tsx --- src/components/Lists.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/Lists.tsx b/src/components/Lists.tsx index 8a6dfdc7..f506f52c 100644 --- a/src/components/Lists.tsx +++ b/src/components/Lists.tsx @@ -6,7 +6,7 @@ import {Loader} from '#/components/Loader' 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' @@ -223,7 +223,7 @@ export function ListMaybePlaceholder({ <Button variant="solid" color="primary" - label={_(msg`Click here`)} + label={_(msg`Click here to retry`)} onPress={onRetry} size="large" style={[ @@ -231,17 +231,21 @@ export function ListMaybePlaceholder({ a.overflow_hidden, {paddingVertical: 10}, ]}> - <Trans>Retry</Trans> + <ButtonText> + <Trans>Retry</Trans> + </ButtonText> </Button> )} <Button variant="solid" color={isError && onRetry ? 'secondary' : 'primary'} - label={_(msg`Click here`)} + label={_(msg`Click here to go back`)} onPress={onGoBack} size="large" style={[a.rounded_sm, a.overflow_hidden, {paddingVertical: 10}]}> - <Trans>Go Back</Trans> + <ButtonText> + <Trans>Go Back</Trans> + </ButtonText> </Button> </View> </> From b4480738e3346b8b80fcdc3481b1de3266577ca0 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Sat, 16 Mar 2024 16:50:15 +0900 Subject: [PATCH 29/33] Update ReasonOptions.tsx --- src/view/com/modals/report/ReasonOptions.tsx | 45 +++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/src/view/com/modals/report/ReasonOptions.tsx b/src/view/com/modals/report/ReasonOptions.tsx index 23b49b66..de904556 100644 --- a/src/view/com/modals/report/ReasonOptions.tsx +++ b/src/view/com/modals/report/ReasonOptions.tsx @@ -1,63 +1,66 @@ import {View} from 'react-native' import React, {useMemo} from 'react' import {AtUri, ComAtprotoModerationDefs} from '@atproto/api' +import {Trans} from '@lingui/macro' import {Text} from '../../util/text/Text' import {UsePaletteValue, usePalette} from 'lib/hooks/usePalette' import {RadioGroup, RadioGroupItem} from 'view/com/util/forms/RadioGroup' import {CollectionId} from './types' -type ReasonMap = Record<string, {title: string; description: string}> +type ReasonMap = Record<string, {title: JSX.Element; description: JSX.Element}> const CommonReasons = { [ComAtprotoModerationDefs.REASONRUDE]: { - title: 'Anti-Social Behavior', - description: 'Harassment, trolling, or intolerance', + title: <Trans>Anti-Social Behavior</Trans>, + description: <Trans>Harassment, trolling, or intolerance</Trans>, }, [ComAtprotoModerationDefs.REASONVIOLATION]: { - title: 'Illegal and Urgent', - description: 'Glaring violations of law or terms of service', + title: <Trans>Illegal and Urgent</Trans>, + description: <Trans>Glaring violations of law or terms of service</Trans>, }, [ComAtprotoModerationDefs.REASONOTHER]: { - title: 'Other', - description: 'An issue not included in these options', + title: <Trans>Other</Trans>, + description: <Trans>An issue not included in these options</Trans>, }, } const CollectionToReasonsMap: Record<string, ReasonMap> = { [CollectionId.Post]: { [ComAtprotoModerationDefs.REASONSPAM]: { - title: 'Spam', - description: 'Excessive mentions or replies', + title: <Trans>Spam</Trans>, + description: <Trans>Excessive mentions or replies</Trans>, }, [ComAtprotoModerationDefs.REASONSEXUAL]: { - title: 'Unwanted Sexual Content', - description: 'Nudity or pornography not labeled as such', + title: <Trans>Unwanted Sexual Content</Trans>, + description: <Trans>Nudity or pornography not labeled as such</Trans>, }, __copyright__: { - title: 'Copyright Violation', - description: 'Contains copyrighted material', + title: <Trans>Copyright Violation</Trans>, + description: <Trans>Contains copyrighted material</Trans>, }, ...CommonReasons, }, [CollectionId.List]: { ...CommonReasons, [ComAtprotoModerationDefs.REASONVIOLATION]: { - title: 'Name or Description Violates Community Standards', - description: 'Terms used violate community standards', + title: <Trans>Name or Description Violates Community Standards</Trans>, + description: <Trans>Terms used violate community standards</Trans>, }, }, } const AccountReportReasons = { [ComAtprotoModerationDefs.REASONMISLEADING]: { - title: 'Misleading Account', - description: 'Impersonation or false claims about identity or affiliation', + title: <Trans>Misleading Account</Trans>, + description: ( + <Trans>Impersonation or false claims about identity or affiliation</Trans> + ), }, [ComAtprotoModerationDefs.REASONSPAM]: { - title: 'Frequently Posts Unwanted Content', - description: 'Spam; excessive mentions or replies', + title: <Trans>Frequently Posts Unwanted Content</Trans>, + description: <Trans>Spam; excessive mentions or replies</Trans>, }, [ComAtprotoModerationDefs.REASONVIOLATION]: { - title: 'Name or Description Violates Community Standards', - description: 'Terms used violate community standards', + title: <Trans>Name or Description Violates Community Standards</Trans>, + description: <Trans>Terms used violate community standards</Trans>, }, } From 12d8f0071abc02eda8b09c181ff69d188b5b6fe5 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Sat, 16 Mar 2024 16:56:56 +0900 Subject: [PATCH 30/33] Update ReasonOptions.tsx --- src/view/com/modals/report/ReasonOptions.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/view/com/modals/report/ReasonOptions.tsx b/src/view/com/modals/report/ReasonOptions.tsx index de904556..1c67bd26 100644 --- a/src/view/com/modals/report/ReasonOptions.tsx +++ b/src/view/com/modals/report/ReasonOptions.tsx @@ -70,8 +70,8 @@ const Option = ({ description, }: { pal: UsePaletteValue - description: string - title: string + description: JSX.Element + title: JSX.Element }) => { return ( <View> From a3786ee5cddceaa6efa78bf4ec2c9768f3abc674 Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Sat, 16 Mar 2024 17:02:05 +0900 Subject: [PATCH 31/33] Update Modal.tsx --- src/view/com/modals/report/Modal.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/view/com/modals/report/Modal.tsx b/src/view/com/modals/report/Modal.tsx index 236f3273..dbe36484 100644 --- a/src/view/com/modals/report/Modal.tsx +++ b/src/view/com/modals/report/Modal.tsx @@ -23,10 +23,10 @@ const DMCA_LINK = 'https://bsky.social/about/support/copyright' export const snapPoints = [575] const CollectionNames = { - [CollectionId.FeedGenerator]: 'Feed', - [CollectionId.Profile]: 'Profile', - [CollectionId.List]: 'List', - [CollectionId.Post]: 'Post', + [CollectionId.FeedGenerator]: <Trans>Feed</Trans>, + [CollectionId.Profile]: <Trans>Profile</Trans>, + [CollectionId.List]: <Trans>List</Trans>, + [CollectionId.Post]: <Trans>Post</Trans>, } type ReportComponentProps = @@ -129,9 +129,9 @@ export function Component(content: ReportComponentProps) { // If no atUri is passed, that means the reporting collection is account const getCollectionNameForReport = (atUri: AtUri | null) => { - if (!atUri) return 'Account' + if (!atUri) return <Trans>Account</Trans> // Generic fallback for any collection being reported - return CollectionNames[atUri.collection as CollectionId] || 'Content' + return CollectionNames[atUri.collection as CollectionId] || <Trans>Content</Trans> } const SelectIssue = ({ From 86d036cca8ea1546908b2e53b985162bc8023d3d Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Sat, 16 Mar 2024 17:04:45 +0900 Subject: [PATCH 32/33] Update Modal.tsx --- src/view/com/modals/report/Modal.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/view/com/modals/report/Modal.tsx b/src/view/com/modals/report/Modal.tsx index dbe36484..90697b07 100644 --- a/src/view/com/modals/report/Modal.tsx +++ b/src/view/com/modals/report/Modal.tsx @@ -131,7 +131,9 @@ export function Component(content: ReportComponentProps) { const getCollectionNameForReport = (atUri: AtUri | null) => { if (!atUri) return <Trans>Account</Trans> // Generic fallback for any collection being reported - return CollectionNames[atUri.collection as CollectionId] || <Trans>Content</Trans> + return ( + CollectionNames[atUri.collection as CollectionId] || <Trans>Content</Trans> + ) } const SelectIssue = ({ From 73dae9f7b5c169aa303e9ef9487040e850998edf Mon Sep 17 00:00:00 2001 From: Minseo Lee <itoupluk427@gmail.com> Date: Sat, 16 Mar 2024 17:17:54 +0900 Subject: [PATCH 33/33] Update Modal.tsx --- src/view/com/modals/report/Modal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/com/modals/report/Modal.tsx b/src/view/com/modals/report/Modal.tsx index 90697b07..02ecefc0 100644 --- a/src/view/com/modals/report/Modal.tsx +++ b/src/view/com/modals/report/Modal.tsx @@ -26,7 +26,7 @@ const CollectionNames = { [CollectionId.FeedGenerator]: <Trans>Feed</Trans>, [CollectionId.Profile]: <Trans>Profile</Trans>, [CollectionId.List]: <Trans>List</Trans>, - [CollectionId.Post]: <Trans>Post</Trans>, + [CollectionId.Post]: <Trans context="description">Post</Trans>, } type ReportComponentProps =