From 2c717dc1e72ab114e5be3057a236aadd229652a7 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 10 Apr 2026 09:50:30 -0700 Subject: [PATCH] Rename moderation link in settings to "Moderation and content filters" (#10192) --- src/screens/Settings/Settings.tsx | 104 ++++++++++++++---------------- 1 file changed, 49 insertions(+), 55 deletions(-) diff --git a/src/screens/Settings/Settings.tsx b/src/screens/Settings/Settings.tsx index 223a003638..2e0138c5e2 100644 --- a/src/screens/Settings/Settings.tsx +++ b/src/screens/Settings/Settings.tsx @@ -2,9 +2,7 @@ import {useState} from 'react' import {Alert, LayoutAnimation, Linking, Pressable, View} from 'react-native' import {useReducedMotion} from 'react-native-reanimated' import {type AppBskyActorDefs, moderateProfile} from '@atproto/api' -import {msg} from '@lingui/core/macro' -import {useLingui} from '@lingui/react' -import {Trans} from '@lingui/react/macro' +import {Trans, useLingui} from '@lingui/react/macro' import {useNavigation} from '@react-navigation/native' import {type NativeStackScreenProps} from '@react-navigation/native-stack' @@ -73,7 +71,7 @@ import {useActivitySubscriptionsNudged} from '#/storage/hooks/activity-subscript type Props = NativeStackScreenProps export function SettingsScreen({}: Props) { const ax = useAnalytics() - const {_} = useLingui() + const {t: l} = useLingui() const reducedMotion = useReducedMotion() const {logoutEveryAccount} = useSessionApi() const {accounts, currentAccount} = useSession() @@ -121,10 +119,8 @@ export function SettingsScreen({}: Props) { {accounts.length > 1 ? ( <> { if (!reducedMotion) { LayoutAnimation.configureNext( @@ -174,7 +170,7 @@ export function SettingsScreen({}: Props) { )} - + Account @@ -182,21 +178,23 @@ export function SettingsScreen({}: Props) { + label={l`Privacy and security`}> Privacy and security - + - Moderation + Moderation and content filters + label={l`Notifications`}> Notifications @@ -204,7 +202,7 @@ export function SettingsScreen({}: Props) { + label={l`Content and media`}> Content and media @@ -215,7 +213,7 @@ export function SettingsScreen({}: Props) { !ax.features.enabled(ax.features.ImportContactsSettingsDisable) && ( + label={l`Find friends from contacts`}> Find friends from contacts @@ -224,7 +222,7 @@ export function SettingsScreen({}: Props) { )} + label={l`Appearance`}> Appearance @@ -232,15 +230,13 @@ export function SettingsScreen({}: Props) { + label={l`Accessibility`}> Accessibility - + Languages @@ -248,15 +244,15 @@ export function SettingsScreen({}: Props) { void Linking.openURL(HELP_DESK_URL)} - label={_(msg`Help`)} - accessibilityHint={_(msg`Opens helpdesk in browser`)}> + label={l`Help`} + accessibilityHint={l`Opens helpdesk in browser`}> Help - + About @@ -266,7 +262,7 @@ export function SettingsScreen({}: Props) { signOutPromptControl.open()} - label={_(msg`Sign out`)}> + label={l`Sign out`}> Sign out @@ -283,7 +279,7 @@ export function SettingsScreen({}: Props) { } setShowDevOptions(d => !d) }} - label={_(msg`Developer options`)}> + label={l`Developer options`}> Developer options @@ -297,11 +293,11 @@ export function SettingsScreen({}: Props) { logoutEveryAccount('Settings')} - confirmButtonCta={_(msg`Sign out`)} - cancelButtonCta={_(msg`Cancel`)} + confirmButtonCta={l`Sign out`} + cancelButtonCta={l`Cancel`} confirmButtonColor="negative" /> @@ -378,7 +374,7 @@ function ProfilePreview({ } function DevOptions() { - const {_} = useLingui() + const {t: l} = useLingui() const agent = useAgent() const [override, setOverride] = useStorage(device, [ 'policyUpdateDebugOverride', @@ -397,12 +393,12 @@ function DevOptions() { const resetOnboarding = () => { navigation.navigate('Home') onboardingDispatch({type: 'start'}) - Toast.show(_(msg`Onboarding reset`)) + Toast.show(l`Onboarding reset`) } const clearAllStorage = async () => { await clearStorage() - Toast.show(_(msg`Storage cleared, you need to restart the app now.`)) + Toast.show(l`Storage cleared, you need to restart the app now.`) } const onPressUnsnoozeReminder = () => { @@ -413,7 +409,7 @@ function DevOptions() { ...persisted.get('reminders'), lastEmailConfirm: lastEmailConfirm.toISOString(), }) - Toast.show(_(msg`You probably want to restart the app now.`)) + Toast.show(l`You probably want to restart the app now.`) } const onPressActySubsUnNudge = () => { @@ -448,42 +444,42 @@ function DevOptions() { <> navigation.navigate('Log')} - label={_(msg`Open system log`)}> + label={l`Open system log`}> System log navigation.navigate('Debug')} - label={_(msg`Open storybook page`)}> + label={l`Open storybook page`}> Storybook navigation.navigate('DebugMod')} - label={_(msg`Open moderation debug page`)}> + label={l`Open moderation debug page`}> Debug Moderation deleteChatDeclarationRecord()} - label={_(msg`Open storybook page`)}> + label={l`Open storybook page`}> Delete chat declaration record void resetOnboarding()} - label={_(msg`Reset onboarding state`)}> + label={l`Reset onboarding state`}> Reset onboarding state + label={l`Unsnooze email reminder`}> Unsnooze email reminder @@ -491,7 +487,7 @@ function DevOptions() { {actyNotifNudged && ( + label={l`Reset activity subscription nudge`}> Reset activity subscription nudge @@ -499,7 +495,7 @@ function DevOptions() { )} void clearAllStorage()} - label={_(msg`Clear all storage data`)}> + label={l`Clear all storage data`}> Clear all storage data (restart after this) @@ -507,7 +503,7 @@ function DevOptions() { {IS_IOS ? ( + label={l`Apply Pull Request`}> Apply Pull Request @@ -516,7 +512,7 @@ function DevOptions() { {IS_NATIVE && isCurrentlyRunningPullRequestDeployment ? ( void revertToEmbedded()} - label={_(msg`Unapply Pull Request`)}> + label={l`Unapply Pull Request`}> Unapply Pull Request {currentChannel} @@ -564,7 +560,7 @@ function DevOptions() { } function AddAccountRow() { - const {_} = useLingui() + const {t: l} = useLingui() const {setShowLoggedOut} = useLoggedOutViewControls() const closeEverything = useCloseAllActiveElements() @@ -576,7 +572,7 @@ function AddAccountRow() { return ( + label={l`Add another account`}> Add another account @@ -599,7 +595,7 @@ function AccountRow({ logContext: 'Settings', ) => void }) { - const {_} = useLingui() + const {t: l} = useLingui() const t = useTheme() const moderationOpts = useModerationOpts() @@ -616,7 +612,7 @@ function AccountRow({ + label={l`Switch account`}> {moderationOpts && profile ? ( {!pendingDid && ( - + {({props, state}) => ( removePromptControl.open()}> Remove account @@ -668,15 +664,13 @@ function AccountRow({ { removeAccount(account) - Toast.show(_(msg`Account removed from quick access`)) + Toast.show(l`Account removed from quick access`) }} - confirmButtonCta={_(msg`Remove`)} + confirmButtonCta={l`Remove`} confirmButtonColor="negative" />