From aeeacd10d322a6e599631c500de03172d69984de Mon Sep 17 00:00:00 2001 From: Noritada Kobayashi Date: Wed, 10 Jan 2024 05:53:34 +0900 Subject: [PATCH] Mark more texts for localization (#2436) --- .../com/modals/ContentFilteringSettings.tsx | 36 +++++++++++-------- src/view/com/modals/InviteCodes.tsx | 13 ++++--- src/view/com/modals/UserAddRemoveLists.tsx | 2 +- src/view/screens/AppPasswords.tsx | 9 ++--- src/view/screens/Settings.tsx | 27 +++++++------- 5 files changed, 49 insertions(+), 38 deletions(-) diff --git a/src/view/com/modals/ContentFilteringSettings.tsx b/src/view/com/modals/ContentFilteringSettings.tsx index 8b42e1b1..88fb4344 100644 --- a/src/view/com/modals/ContentFilteringSettings.tsx +++ b/src/view/com/modals/ContentFilteringSettings.tsx @@ -104,6 +104,7 @@ export function Component({}: {}) { function AdultContentEnabledPref() { const pal = usePalette('default') + const {_} = useLingui() const {data: preferences} = usePreferencesQuery() const {mutate, variables} = usePreferencesSetAdultContentMutation() const {openModal} = useModalControls() @@ -121,23 +122,27 @@ function AdultContentEnabledPref() { enabled: !(variables?.enabled ?? preferences?.adultContentEnabled), }) } catch (e) { - Toast.show('There was an issue syncing your preferences with the server') + Toast.show( + _(msg`There was an issue syncing your preferences with the server`), + ) logger.error('Failed to update preferences with server', {error: e}) } - }, [variables, preferences, mutate]) + }, [variables, preferences, mutate, _]) return ( {isIOS ? ( preferences?.adultContentEnabled ? null : ( - Adult content can only be enabled via the Web at{' '} - - . + + Adult content can only be enabled via the Web at{' '} + + . + ) ) : typeof preferences?.birthDate === 'undefined' ? ( @@ -150,7 +155,7 @@ function AdultContentEnabledPref() { ) : (preferences.userAge || 0) >= 18 ? ( - You must be 18 or older to enable adult content. + You must be 18 or older to enable adult content.