From e1b04ade05ae38bb08c8a1de4e2d0f1f221a0cf8 Mon Sep 17 00:00:00 2001 From: Tim Down <158919+timdown@users.noreply.github.com> Date: Mon, 16 Jun 2025 09:16:37 +0100 Subject: [PATCH] Merge pull request #25877 from overleaf/td-limit-browser-translate Prevent browser translation of stuff that shouldn't be translated in project dashboard GitOrigin-RevId: aba5d28d368277730d3bdc9aced6b9257cbd7950 --- .../components/current-plan-widget/commons-plan.tsx | 5 ++++- .../components/current-plan-widget/free-plan.tsx | 5 ++++- .../components/current-plan-widget/group-plan.tsx | 10 +++++++--- .../components/current-plan-widget/individual-plan.tsx | 10 +++++++--- .../components/current-plan-widget/paused-plan.tsx | 2 +- .../project-list/components/sidebar/sidebar-ds-nav.tsx | 2 +- .../project-list/components/sidebar/tags-list.tsx | 1 + .../components/table/cells/inline-tags.tsx | 1 + .../components/table/cells/last-updated-cell.tsx | 2 +- .../project-list/components/table/cells/owner-cell.tsx | 2 +- .../components/table/project-list-owner-name.tsx | 2 +- .../components/table/project-list-table-row.tsx | 4 +++- .../table/project-tools/buttons/tags-dropdown.tsx | 1 + .../components/title/project-list-title.tsx | 9 ++++++++- .../components/bootstrap-5/footer/fat-footer-base.tsx | 2 +- .../ui/components/bootstrap-5/language-picker.tsx | 2 +- .../ui/components/types/dropdown-menu-props.ts | 1 + .../frontend/js/shared/components/material-icon.tsx | 7 ++++++- 18 files changed, 50 insertions(+), 18 deletions(-) diff --git a/services/web/frontend/js/features/project-list/components/current-plan-widget/commons-plan.tsx b/services/web/frontend/js/features/project-list/components/current-plan-widget/commons-plan.tsx index e687c8a362..ca4cb55b64 100644 --- a/services/web/frontend/js/features/project-list/components/current-plan-widget/commons-plan.tsx +++ b/services/web/frontend/js/features/project-list/components/current-plan-widget/commons-plan.tsx @@ -15,7 +15,10 @@ function CommonsPlan({ }: CommonsPlanProps) { const { t } = useTranslation() const currentPlanLabel = ( - }} /> + }} + /> ) return ( diff --git a/services/web/frontend/js/features/project-list/components/current-plan-widget/free-plan.tsx b/services/web/frontend/js/features/project-list/components/current-plan-widget/free-plan.tsx index fe3fb18125..feffb68598 100644 --- a/services/web/frontend/js/features/project-list/components/current-plan-widget/free-plan.tsx +++ b/services/web/frontend/js/features/project-list/components/current-plan-widget/free-plan.tsx @@ -10,7 +10,10 @@ type FreePlanProps = Pick function FreePlan({ featuresPageURL }: FreePlanProps) { const { t } = useTranslation() const currentPlanLabel = ( - }} /> + }} + /> ) const handleClick = () => { diff --git a/services/web/frontend/js/features/project-list/components/current-plan-widget/group-plan.tsx b/services/web/frontend/js/features/project-list/components/current-plan-widget/group-plan.tsx index 235c34ba15..16596c5929 100644 --- a/services/web/frontend/js/features/project-list/components/current-plan-widget/group-plan.tsx +++ b/services/web/frontend/js/features/project-list/components/current-plan-widget/group-plan.tsx @@ -15,21 +15,25 @@ function GroupPlan({ remainingTrialDays, }: GroupPlanProps) { const { t } = useTranslation() + const planNameComponent = const currentPlanLabel = remainingTrialDays >= 0 ? ( remainingTrialDays === 1 ? ( - }} /> + ) : ( }} + components={{ b: planNameComponent }} values={{ days: remainingTrialDays }} shouldUnescape tOptions={{ interpolation: { escapeValue: true } }} /> ) ) : ( - }} /> + ) return ( diff --git a/services/web/frontend/js/features/project-list/components/current-plan-widget/individual-plan.tsx b/services/web/frontend/js/features/project-list/components/current-plan-widget/individual-plan.tsx index f0870ac12a..e4723cf718 100644 --- a/services/web/frontend/js/features/project-list/components/current-plan-widget/individual-plan.tsx +++ b/services/web/frontend/js/features/project-list/components/current-plan-widget/individual-plan.tsx @@ -14,21 +14,25 @@ function IndividualPlan({ remainingTrialDays, }: IndividualPlanProps) { const { t } = useTranslation() + const planNameComponent = const currentPlanLabel = remainingTrialDays >= 0 ? ( remainingTrialDays === 1 ? ( - }} /> + ) : ( }} + components={{ b: planNameComponent }} values={{ days: remainingTrialDays }} shouldUnescape tOptions={{ interpolation: { escapeValue: true } }} /> ) ) : ( - }} /> + ) return ( diff --git a/services/web/frontend/js/features/project-list/components/current-plan-widget/paused-plan.tsx b/services/web/frontend/js/features/project-list/components/current-plan-widget/paused-plan.tsx index a501731b18..f282800c61 100644 --- a/services/web/frontend/js/features/project-list/components/current-plan-widget/paused-plan.tsx +++ b/services/web/frontend/js/features/project-list/components/current-plan-widget/paused-plan.tsx @@ -13,7 +13,7 @@ function PausedPlan({ subscriptionPageUrl }: PausedPlanProps) { i18nKey="your_premium_plan_is_paused" components={[ // eslint-disable-next-line react/jsx-key - , + , ]} /> ) diff --git a/services/web/frontend/js/features/project-list/components/sidebar/sidebar-ds-nav.tsx b/services/web/frontend/js/features/project-list/components/sidebar/sidebar-ds-nav.tsx index 2aaed364a7..eba033ea76 100644 --- a/services/web/frontend/js/features/project-list/components/sidebar/sidebar-ds-nav.tsx +++ b/services/web/frontend/js/features/project-list/components/sidebar/sidebar-ds-nav.tsx @@ -154,7 +154,7 @@ function SidebarDsNav() { )} -
+
Digital Science
diff --git a/services/web/frontend/js/features/project-list/components/sidebar/tags-list.tsx b/services/web/frontend/js/features/project-list/components/sidebar/tags-list.tsx index 452b003b2b..1c6298603c 100644 --- a/services/web/frontend/js/features/project-list/components/sidebar/tags-list.tsx +++ b/services/web/frontend/js/features/project-list/components/sidebar/tags-list.tsx @@ -57,6 +57,7 @@ export default function TagsList() {