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

[web] Replace `pro` with `commons` wording on institutional subscript… (#34078)

* [web] Replace `pro` with `commons` wording on institutional subscriptions

Replaces the wording in several places:
- subscription settings
- email tags
- features tooltip
- institution portal

GitOrigin-RevId: 1b9a0e51245ed8a41865300d9e9d555bc05e6c17
Miguel Serrano 2 месяцев назад
Родитель
Сommit
f07212337f

+ 1 - 1
services/web/frontend/extracted-translations.json

@@ -335,6 +335,7 @@
   "comment_only_upgrade_for_track_changes": "",
   "comment_only_upgrade_to_enable_track_changes": "",
   "common": "",
+  "commons": "",
   "commons_plan_tooltip": "",
   "compact": "",
   "company_name": "",
@@ -1486,7 +1487,6 @@
   "proceeding_to_paypal_takes_you_to_the_paypal_site_to_pay": "",
   "processing": "",
   "processing_uppercase": "",
-  "professional": "",
   "progress_bar_percentage": "",
   "project_access": "",
   "project_actions": "",

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

@@ -5,14 +5,10 @@ import MaterialIcon from '@/shared/components/material-icon'
 
 type CommonsPlanProps = Pick<
   CommonsPlanSubscription,
-  'subscription' | 'plan' | 'featuresPageURL'
+  'subscription' | 'featuresPageURL'
 >
 
-function CommonsPlan({
-  featuresPageURL,
-  subscription,
-  plan,
-}: CommonsPlanProps) {
+function CommonsPlan({ featuresPageURL, subscription }: CommonsPlanProps) {
   const { t } = useTranslation()
   const currentPlanLabel = (
     <Trans
@@ -26,7 +22,6 @@ function CommonsPlan({
       <span className="current-plan-label d-md-none">{currentPlanLabel}</span>
       <OLTooltip
         description={t('commons_plan_tooltip', {
-          plan: plan.name,
           institution: subscription.name,
         })}
         id="commons-plan"

+ 0 - 1
services/web/frontend/js/features/project-list/components/current-plan-widget/current-plan-widget.tsx

@@ -64,7 +64,6 @@ function CurrentPlanWidget() {
     currentPlan = (
       <CommonsPlan
         subscription={usersBestSubscription.subscription}
-        plan={usersBestSubscription.plan}
         featuresPageURL={featuresPageURL}
       />
     )

+ 4 - 4
services/web/frontend/js/features/settings/components/emails/email.tsx

@@ -21,11 +21,11 @@ function Email({ userEmailData }: EmailProps) {
   )
 
   const isPrimary = userEmailData.default
-  const isProfessional =
+  const hasInstitutionalSubscription =
     userEmailData.confirmedAt &&
     userEmailData.affiliation?.institution.confirmed &&
     userEmailData.affiliation.licence !== 'free'
-  const hasBadges = isPrimary || isProfessional
+  const hasBadges = isPrimary || hasInstitutionalSubscription
 
   return (
     <>
@@ -52,8 +52,8 @@ function Email({ userEmailData }: EmailProps) {
               <OLBadge bg="info">Primary</OLBadge>{' '}
             </>
           )}
-          {isProfessional && (
-            <OLBadge bg="primary">{t('professional')}</OLBadge>
+          {hasInstitutionalSubscription && (
+            <OLBadge bg="primary">{t('commons')}</OLBadge>
           )}
         </div>
       )}

+ 1 - 1
services/web/frontend/js/features/settings/components/emails/sso-alert.tsx

@@ -72,7 +72,7 @@ export function SSOAlert() {
                   <Trans
                     i18nKey="this_grants_access_to_features_2"
                     components={[<strong />]} // eslint-disable-line react/jsx-key
-                    values={{ featureType: t('professional') }}
+                    values={{ featureType: t('commons') }}
                     shouldUnescape
                     tOptions={{ interpolation: { escapeValue: true } }}
                   />

+ 1 - 1
services/web/frontend/js/features/subscription/components/dashboard/institution-memberships.tsx

@@ -32,7 +32,7 @@ function InstitutionMemberships() {
           <Trans
             i18nKey="you_are_on_x_plan_as_a_confirmed_member_of_institution_y"
             values={{
-              planName: 'Pro',
+              planName: 'Commons',
               institutionName: institution.name || '',
             }}
             shouldUnescape

+ 1 - 1
services/web/frontend/js/features/subscription/components/dashboard/states/active/active.tsx

@@ -56,7 +56,7 @@ export function ActiveSubscription({
   if (onStandalonePlan) {
     planName = 'Overleaf Free'
     if (institutionMemberships && institutionMemberships.length > 0) {
-      planName = 'Overleaf Pro'
+      planName = 'Overleaf Commons'
     }
     if (memberGroupSubscriptions.length > 0) {
       if (memberGroupSubscriptions.some(s => s.planLevelName === 'Pro')) {

+ 2 - 2
services/web/locales/da.json

@@ -275,7 +275,7 @@
   "column_width_is_x_click_to_resize": "Kolonnebredden er __width__. Klik for at ændre",
   "comment": "Kommentar",
   "common": "Almindelig",
-  "commons_plan_tooltip": "Du er på __plan__ abonnementet gennem din tilknytning til __institution__. Klik for at finde ud af hvordan du bedst udnytter dine Overlaf Premium-funktioner.",
+  "commons_plan_tooltip": "Du er på Commons abonnementet gennem din tilknytning til __institution__. Klik for at finde ud af hvordan du bedst udnytter dine Overlaf Premium-funktioner.",
   "compact": "Kompakt",
   "company_name": "Virksomhedsnavn",
   "compare": "Sammenlign",
@@ -849,7 +849,7 @@
   "institution_acct_successfully_linked_2": "Din <0>__appName__</0>-konto er nu sammenkædet med din institutionelle konto fra <0>__institutionName__</0>.",
   "institution_and_role": "Institution og rolle",
   "institution_email_new_to_app": "Din <b>__institutionName__</b> e-mailaddresse (<b>__email__</b>) er ny for __appName__.",
-  "institution_has_overleaf_subscription": "<0>__institutionName__</0> har et Overleaf abonnement. Klik på bekræftelseslinket sendt til __emailAddress__ for at opgradere til <0>Overleaf Professionel</0>.",
+  "institution_has_overleaf_subscription": "<0>__institutionName__</0> har et Overleaf abonnement. Klik på bekræftelseslinket sendt til __emailAddress__ for at opgradere til <0>Overleaf Commons</0>.",
   "institution_templates": "Institutionsskabeloner",
   "institutional": "Institutionel",
   "institutional_login_unknown": "Beklager, vi ved ikke hvilken institution har udstedt den e-mailadresse. Du kan kigge i vores <a href=\"__link__\">liste over institutioner</a> for at finde den, eller du kan gøre brug af en af de andre muligheder herunder.",

+ 2 - 2
services/web/locales/de.json

@@ -335,7 +335,7 @@
   "comment": "Kommentar",
   "comment_only": "Nur Kommentare",
   "common": "Häufige",
-  "commons_plan_tooltip": "Du hast Zugriff auf ein __plan__ Abonnement über deine Angehörigkeit bei __institution__. Klicke hier um herauszufinden was die Overleaf Premiumfunktionen Dir ermöglichen.",
+  "commons_plan_tooltip": "Du hast Zugriff auf ein Commons Abonnement über deine Angehörigkeit bei __institution__. Klicke hier um herauszufinden was die Overleaf Premiumfunktionen Dir ermöglichen.",
   "compact": "Kompakt",
   "company_name": "Firmenname",
   "compare": "Vergleichen",
@@ -790,7 +790,7 @@
   "institution_acct_successfully_linked_2": "Dein Konto <0>__appName__</0> wurde erfolgreich mit deinem institutionellen Konto <0>__institutionName__</0> verknüpft.",
   "institution_and_role": "Institution und Rolle",
   "institution_email_new_to_app": "Deine <b>__institutionName__</b>-E-Mail-Adresse (<b>__email__</b>) ist neu bei __appName__.",
-  "institution_has_overleaf_subscription": "<0>__institutionName__</0> hat ein Overleaf-Abonnement. Klicke auf den Bestätigungslink, der an __emailAddress__ gesendet wurde, um auf <0>Overleaf Professional</0> umzusteigen.",
+  "institution_has_overleaf_subscription": "<0>__institutionName__</0> hat ein Overleaf-Abonnement. Klicke auf den Bestätigungslink, der an __emailAddress__ gesendet wurde, um auf <0>Overleaf Commons</0> umzusteigen.",
   "institution_templates": "Institutionsvorlagen",
   "institutional": "Institutionell",
   "institutional_login_unknown": "Leider wissen wir nicht, welche Institution diese E-Mail-Adresse ausgegeben hat. Du kannst unsere <a href=\"__link__\">Liste der Institutionen</a> durchsuchen, um deine zu finden, oder du kannst eine der anderen Optionen nutzen.",

+ 3 - 2
services/web/locales/en.json

@@ -439,7 +439,8 @@
   "comment_only_upgrade_for_track_changes": "Comment only. Upgrade for track changes.",
   "comment_only_upgrade_to_enable_track_changes": "Comment only. <0>Upgrade</0> to enable track changes.",
   "common": "Common",
-  "commons_plan_tooltip": "You’re on the __plan__ plan because of your affiliation with __institution__. Click to find out how to make the most of your Overleaf premium features.",
+  "commons": "Commons",
+  "commons_plan_tooltip": "You’re on the Commons plan provided by __institution__. Click to find out how to make the most of your Overleaf premium features.",
   "community_articles": "Community articles",
   "community_articles_lowercase": "community articles",
   "compact": "Compact",
@@ -1259,7 +1260,7 @@
   "institution_acct_successfully_linked_2": "Your <0>__appName__</0> account was successfully linked to your <0>__institutionName__</0> institutional account.",
   "institution_and_role": "Institution and role",
   "institution_email_new_to_app": "Your <b>__institutionName__</b> email (<b>__email__</b>) is new to __appName__.",
-  "institution_has_overleaf_subscription": "<0>__institutionName__</0> has an Overleaf subscription. Click the confirmation link sent to __emailAddress__ to upgrade to <0>Overleaf Pro</0>.",
+  "institution_has_overleaf_subscription": "<0>__institutionName__</0> has an Overleaf subscription. Click the confirmation link sent to __emailAddress__ to upgrade to <0>Overleaf Commons</0>.",
   "institution_templates": "Institution Templates",
   "institutional": "Institutional",
   "institutional_login_unknown": "Sorry, we don’t know which institution issued that email address. You can browse our <a href=\"__link__\">list of institutions</a> to find yours, or you can use one of the other options below.",

+ 1 - 1
services/web/locales/fr.json

@@ -228,7 +228,7 @@
   "column_width_is_x_click_to_resize": "La largeur de la colonne est __width__. Cliquez pour redimensionner",
   "comment": "Commentaire",
   "common": "Commun",
-  "commons_plan_tooltip": "Vous bénéficiez de l’offre __plan__ en raison de votre affiliation avec __institution__. Cliquez pour découvrir comment profiter au mieux de vos fonctionnalités Overleaf premium.",
+  "commons_plan_tooltip": "Vous bénéficiez de l’offre Commons en raison de votre affiliation avec __institution__. Cliquez pour découvrir comment profiter au mieux de vos fonctionnalités Overleaf premium.",
   "compact": "Compact",
   "company_name": "Nom de l’entreprise",
   "comparing_from_x_to_y": "Différence entre <0>__startTime__</0> et <0>__endTime__</0>",

+ 2 - 2
services/web/locales/zh-CN.json

@@ -322,7 +322,7 @@
   "comment_only_upgrade_for_track_changes": "仅评论。升级可跟踪更改。",
   "comment_only_upgrade_to_enable_track_changes": "仅评论。<0>升级</0>以启用跟踪更改。",
   "common": "通用",
-  "commons_plan_tooltip": "由于您与 __institution__ 的隶属关系,您加入了 __plan__ 计划。 单击以了解如何充分利用 Overleaf 高级功能。",
+  "commons_plan_tooltip": "由于您与 __institution__ 的隶属关系,您加入了 Commons 计划。 单击以了解如何充分利用 Overleaf 高级功能。",
   "community_articles": "社区文章",
   "community_articles_lowercase": "社区文章",
   "compact": "紧凑的",
@@ -981,7 +981,7 @@
   "institution_acct_successfully_linked_2": "您的<0>__appName__</0>帐户已成功链接到您的&lt;0\\&gt;__institutionName__机构帐户。",
   "institution_and_role": "机构和角色",
   "institution_email_new_to_app": "您的 <b>__institutionName__</b> 电子邮件地址 (<b>__email__</b>) 对__appName__ 是新的。",
-  "institution_has_overleaf_subscription": "<0>__institutionName__</0>已有Overleaf订阅。单击发送到__emailAddress__的确认链接,升级到<0>Overleaf Professional</0>。",
+  "institution_has_overleaf_subscription": "<0>__institutionName__</0>已有Overleaf订阅。单击发送到__emailAddress__的确认链接,升级到<0>Overleaf Commons</0>。",
   "institution_templates": "机构模版",
   "institutional": "机构",
   "institutional_login_unknown": "抱歉,我们不知道是哪个机构发的那个电子邮件地址。您可以浏览我们的\n<a href=\"__link__\">机构列表</a> 找到您的机构,也可以在此处使用您的电子邮件地址和密码注册。",

+ 1 - 1
services/web/test/frontend/features/project-list/components/current-plan-widget.test.tsx

@@ -289,7 +289,7 @@ describe('<CurrentPlanWidget />', function () {
 
         await screen.findByRole('tooltip', {
           name: new RegExp(
-            `on the ${subscription.plan.name} plan because of your affiliation with ${subscription.subscription.name}`,
+            `on the Commons plan provided by ${subscription.subscription.name}`,
             'i'
           ),
         })

+ 1 - 1
services/web/test/frontend/features/project-list/components/notifications.test.tsx

@@ -839,7 +839,7 @@ describe('<UserNotifications />', function () {
           'You are one step away from accessing Overleaf premium features'
         )
         expect(alert.textContent).to.contain(
-          `Overleaf has an Overleaf subscription. Click the confirmation link sent to ${email} to upgrade to Overleaf Pro`
+          `Overleaf has an Overleaf subscription. Click the confirmation link sent to ${email} to upgrade to Overleaf Commons`
         )
       })
     }

+ 2 - 2
services/web/test/frontend/features/settings/components/emails/emails-section.test.tsx

@@ -111,14 +111,14 @@ describe('<EmailsSection />', function () {
     await screen.findByRole('button', { name: 'Send confirmation code' })
   })
 
-  it('renders professional label', async function () {
+  it('renders commons label', async function () {
     fetchMock.get('/user/emails?ensureAffiliation=true', [professionalUserData])
     renderEmailsSection()
 
     const node = await screen.findByText(professionalUserData.email, {
       exact: false,
     })
-    expect(within(node).getByText(/professional/i)).to.exist
+    expect(within(node).getByText(/commons/i)).to.exist
   })
 
   it('shows loader when resending email', async function () {

+ 2 - 2
services/web/test/frontend/features/settings/components/emails/sso-alert.test.tsx

@@ -24,12 +24,12 @@ describe('<SSOAlert/>', function () {
       screen.getByText('Overleaf University', { exact: false })
     })
 
-    it('when entitled, it should render access granted to "professional" features', function () {
+    it('when entitled, it should render access granted to "commons" features', function () {
       window.metaAttributesCache.get('ol-institutionLinked').hasEntitlement =
         true
       render(<SSOAlert />)
       screen.getByText('this grants you access', { exact: false })
-      screen.getByText('Professional')
+      screen.getByText('Commons')
     })
 
     it('when the email is not canonical it should also render a warning alert', function () {

+ 2 - 2
services/web/test/frontend/features/subscription/components/dashboard/institution-memberships.test.tsx

@@ -49,10 +49,10 @@ describe('<InstitutionMemberships />', function () {
     })
     expect(elements.length).to.equal(2)
     expect(elements[0].textContent).to.equal(
-      'You are on our Pro plan as a confirmed member of Test University'
+      'You are on our Commons plan as a confirmed member of Test University'
     )
     expect(elements[1].textContent).to.equal(
-      'You are on our Pro plan as a confirmed member of Example Institution'
+      'You are on our Commons plan as a confirmed member of Example Institution'
     )
   })