From f3004691fdc82f0f7186066665302f83f53b06b1 Mon Sep 17 00:00:00 2001 From: Frudrax Cheng Date: Thu, 19 Dec 2024 10:38:31 +0800 Subject: [PATCH 1/2] Implement localization for ProfileList section titles --- src/view/screens/ProfileList.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/view/screens/ProfileList.tsx b/src/view/screens/ProfileList.tsx index 788f41c559..84cb5578ee 100644 --- a/src/view/screens/ProfileList.tsx +++ b/src/view/screens/ProfileList.tsx @@ -79,7 +79,7 @@ import * as Prompt from '#/components/Prompt' import {ReportDialog, useReportDialogControl} from '#/components/ReportDialog' import {RichText} from '#/components/RichText' -const SECTION_TITLES_CURATE = ['Posts', 'People'] +const SECTION_TITLES_CURATE_RAW = [msg`Posts`, msg`People`] interface SectionRef { scrollToTop: () => void @@ -162,6 +162,7 @@ function ProfileListScreenLoaded({ const isHidden = list.labels?.findIndex(l => l.val === '!hide') !== -1 const isOwner = currentAccount?.did === list.creator.did const scrollElRef = useAnimatedRef() + const SECTION_TITLES_CURATE = SECTION_TITLES_CURATE_RAW.map(title => _(title)) const moderation = React.useMemo(() => { return moderateUserList(list, moderationOpts) From 80fc2b36c2fd258a385036ec6799380f59c7fb51 Mon Sep 17 00:00:00 2001 From: Frudrax Cheng Date: Thu, 19 Dec 2024 11:02:20 +0800 Subject: [PATCH 2/2] Inline localization for ProfileList section titles --- src/view/screens/ProfileList.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/view/screens/ProfileList.tsx b/src/view/screens/ProfileList.tsx index 84cb5578ee..ab70f61674 100644 --- a/src/view/screens/ProfileList.tsx +++ b/src/view/screens/ProfileList.tsx @@ -79,8 +79,6 @@ import * as Prompt from '#/components/Prompt' import {ReportDialog, useReportDialogControl} from '#/components/ReportDialog' import {RichText} from '#/components/RichText' -const SECTION_TITLES_CURATE_RAW = [msg`Posts`, msg`People`] - interface SectionRef { scrollToTop: () => void } @@ -162,7 +160,6 @@ function ProfileListScreenLoaded({ const isHidden = list.labels?.findIndex(l => l.val === '!hide') !== -1 const isOwner = currentAccount?.did === list.creator.did const scrollElRef = useAnimatedRef() - const SECTION_TITLES_CURATE = SECTION_TITLES_CURATE_RAW.map(title => _(title)) const moderation = React.useMemo(() => { return moderateUserList(list, moderationOpts) @@ -212,7 +209,7 @@ function ProfileListScreenLoaded({