Просмотр исходного кода

Merge pull request #9912 from overleaf/ab-current-plan-group-tooltip-i18n-fix

[web] Fix translation for group plan tooltip

GitOrigin-RevId: c0a71c0379dea511f68d65b65b1673948b9451e0
Alexandre Bourdin 4 лет назад
Родитель
Сommit
af90c5adc8

+ 3 - 2
services/web/frontend/extracted-translations.json

@@ -112,6 +112,7 @@
   "created_at": "",
   "creating": "",
   "current_password": "",
+  "date": "",
   "delete": "",
   "delete_account": "",
   "delete_account_confirmation_label": "",
@@ -255,6 +256,8 @@
   "go_prev_page": "",
   "go_to_code_location_in_pdf": "",
   "go_to_pdf_location_in_code": "",
+  "group_plan_tooltip": "",
+  "group_plan_with_name_tooltip": "",
   "have_an_extra_backup": "",
   "headers": "",
   "hide_outline": "",
@@ -457,7 +460,6 @@
   "private": "",
   "processing": "",
   "professional": "",
-  "proj_timed_out_reason": "",
   "project": "",
   "project_approaching_file_limit": "",
   "project_flagged_too_many_compiles": "",
@@ -519,7 +521,6 @@
   "revoke": "",
   "revoke_invite": "",
   "role": "",
-  "save_changes": "",
   "save_or_cancel-cancel": "",
   "save_or_cancel-or": "",
   "save_or_cancel-save": "",

+ 7 - 5
services/web/frontend/js/features/project-list/components/current-plan-widget/group-plan.tsx

@@ -28,12 +28,14 @@ function GroupPlan({ subscription, plan, remainingTrialDays }: GroupPlanProps) {
     <>
       <span className="current-plan-label visible-xs">{currentPlanLabel}</span>
       <Tooltip
-        description={t(
+        description={
           subscription.teamName != null
-            ? 'group_plan_with_name_tooltip'
-            : 'group_plan_tooltip',
-          { plan: plan.name, groupName: subscription.teamName }
-        )}
+            ? t('group_plan_with_name_tooltip', {
+                plan: plan.name,
+                groupName: subscription.teamName,
+              })
+            : t('group_plan_tooltip', { plan: plan.name })
+        }
         id="group-plan"
         overlayProps={{ placement: 'bottom' }}
       >