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

Merge pull request #24634 from overleaf/ii-flexible-group-licensing-replace-add-with-purchase

[web] Replace "add" with "buy" in FL

GitOrigin-RevId: 2c9aa50f138306a46ebfd8557d907c6c55d694bc
ilkin-overleaf 1 год назад
Родитель
Сommit
3b5a148cdc

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

@@ -72,9 +72,7 @@
   "add_error_assist_annual_to_your_projects": "",
   "add_error_assist_annual_to_your_projects": "",
   "add_error_assist_to_your_projects": "",
   "add_error_assist_to_your_projects": "",
   "add_files": "",
   "add_files": "",
-  "add_licenses": "",
   "add_more_editors": "",
   "add_more_editors": "",
-  "add_more_licenses": "",
   "add_more_licenses_to_my_plan": "",
   "add_more_licenses_to_my_plan": "",
   "add_more_managers": "",
   "add_more_managers": "",
   "add_new_email": "",
   "add_new_email": "",
@@ -182,6 +180,8 @@
   "blocked_filename": "",
   "blocked_filename": "",
   "blog": "",
   "blog": "",
   "browser": "",
   "browser": "",
+  "buy_licenses": "",
+  "buy_more_licenses": "",
   "by_subscribing_you_agree_to_our_terms_of_service": "",
   "by_subscribing_you_agree_to_our_terms_of_service": "",
   "can_edit_content": "",
   "can_edit_content": "",
   "can_link_institution_email_acct_to_institution_acct": "",
   "can_link_institution_email_acct_to_institution_acct": "",
@@ -731,7 +731,7 @@
   "hotkey_undo": "",
   "hotkey_undo": "",
   "hotkeys": "",
   "hotkeys": "",
   "how_it_works": "",
   "how_it_works": "",
-  "how_many_licenses_do_you_want_to_add": "",
+  "how_many_licenses_do_you_want_to_buy": "",
   "how_to_create_tables": "",
   "how_to_create_tables": "",
   "how_to_insert_images": "",
   "how_to_insert_images": "",
   "how_we_use_your_data": "",
   "how_we_use_your_data": "",

+ 3 - 3
services/web/frontend/js/features/group-management/components/add-seats/add-seats.tsx

@@ -281,7 +281,7 @@ function AddSeats() {
               >
               >
                 <div className="d-grid gap-1">
                 <div className="d-grid gap-1">
                   <h4 className="fw-bold m-0 card-description-secondary">
                   <h4 className="fw-bold m-0 card-description-secondary">
-                    {t('add_more_licenses')}
+                    {t('buy_more_licenses')}
                   </h4>
                   </h4>
                   <div>
                   <div>
                     {t('your_current_plan_supports_up_to_x_licenses', {
                     {t('your_current_plan_supports_up_to_x_licenses', {
@@ -308,7 +308,7 @@ function AddSeats() {
                 <div>
                 <div>
                   <FormGroup controlId="number-of-users-input">
                   <FormGroup controlId="number-of-users-input">
                     <FormLabel>
                     <FormLabel>
-                      {t('how_many_licenses_do_you_want_to_add')}
+                      {t('how_many_licenses_do_you_want_to_buy')}
                     </FormLabel>
                     </FormLabel>
                     <FormControl
                     <FormControl
                       type="text"
                       type="text"
@@ -366,7 +366,7 @@ function AddSeats() {
                     }
                     }
                     isLoading={isAddingSeats || isSendingMailToSales}
                     isLoading={isAddingSeats || isSendingMailToSales}
                   >
                   >
-                    {shouldContactSales ? t('send_request') : t('add_licenses')}
+                    {shouldContactSales ? t('send_request') : t('buy_licenses')}
                   </Button>
                   </Button>
                 </div>
                 </div>
               </form>
               </form>

+ 1 - 1
services/web/frontend/js/features/group-management/components/group-members.tsx

@@ -74,7 +74,7 @@ export default function GroupMembers() {
                 rel="noreferrer noopener"
                 rel="noreferrer noopener"
                 onClick={() => sendMB('flex-add-users')}
                 onClick={() => sendMB('flex-add-users')}
               >
               >
-                {t('add_more_licenses')}.
+                {t('buy_more_licenses')}.
               </a>
               </a>
             </>
             </>
           )}
           )}

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

@@ -376,7 +376,7 @@ function FlexibleGroupLicensingActions({
           href="/user/subscription/group/add-users"
           href="/user/subscription/group/add-users"
           onClick={() => sendMB('flex-add-users')}
           onClick={() => sendMB('flex-add-users')}
         >
         >
-          {t('add_more_licenses')}
+          {t('buy_more_licenses')}
         </OLButton>
         </OLButton>
       )}
       )}
     </>
     </>

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

@@ -87,9 +87,7 @@
   "add_error_assist_annual_to_your_projects": "Add Error Assist Annual <sparkle/> to your projects and get unlimited AI help to fix LaTeX errors faster.",
   "add_error_assist_annual_to_your_projects": "Add Error Assist Annual <sparkle/> to your projects and get unlimited AI help to fix LaTeX errors faster.",
   "add_error_assist_to_your_projects": "Add Error Assist <sparkle/> to your projects and get unlimited AI help to fix LaTeX errors faster.",
   "add_error_assist_to_your_projects": "Add Error Assist <sparkle/> to your projects and get unlimited AI help to fix LaTeX errors faster.",
   "add_files": "Add Files",
   "add_files": "Add Files",
-  "add_licenses": "Add licenses",
   "add_more_editors": "Add more editors",
   "add_more_editors": "Add more editors",
-  "add_more_licenses": "Add more licenses",
   "add_more_licenses_to_my_plan": "Add more licenses to my plan",
   "add_more_licenses_to_my_plan": "Add more licenses to my plan",
   "add_more_managers": "Add more managers",
   "add_more_managers": "Add more managers",
   "add_new_email": "Add new email",
   "add_new_email": "Add new email",
@@ -239,6 +237,8 @@
   "brl_discount_offer_plans_page_banner": "__flag__ <b>Great news!</b> We’ve applied a 50% discount to premium plans on this page for our users in Brazil. Check out the new lower prices.",
   "brl_discount_offer_plans_page_banner": "__flag__ <b>Great news!</b> We’ve applied a 50% discount to premium plans on this page for our users in Brazil. Check out the new lower prices.",
   "browser": "Browser",
   "browser": "Browser",
   "built_in": "Built-In",
   "built_in": "Built-In",
+  "buy_licenses": "Buy licenses",
+  "buy_more_licenses": "Buy more licenses",
   "buy_now_no_exclamation_mark": "Buy now",
   "buy_now_no_exclamation_mark": "Buy now",
   "by": "by",
   "by": "by",
   "by_joining_labs": "By joining Labs, you agree to receive occasional emails and updates from Overleaf—for example, to request your feedback. You also agree to our <0>terms of service</0> and <1>privacy notice</1>.",
   "by_joining_labs": "By joining Labs, you agree to receive occasional emails and updates from Overleaf—for example, to request your feedback. You also agree to our <0>terms of service</0> and <1>privacy notice</1>.",
@@ -953,7 +953,7 @@
   "hotkey_undo": "Undo",
   "hotkey_undo": "Undo",
   "hotkeys": "Hotkeys",
   "hotkeys": "Hotkeys",
   "how_it_works": "How it works",
   "how_it_works": "How it works",
-  "how_many_licenses_do_you_want_to_add": "How many licenses do you want to add?",
+  "how_many_licenses_do_you_want_to_buy": "How many licenses do you want to buy?",
   "how_many_users_do_you_need": "How many users do you need?",
   "how_many_users_do_you_need": "How many users do you need?",
   "how_to_create_tables": "How to create tables",
   "how_to_create_tables": "How to create tables",
   "how_to_insert_images": "How to insert images",
   "how_to_insert_images": "How to insert images",

+ 6 - 6
services/web/test/frontend/features/group-management/components/add-seats.spec.tsx

@@ -15,7 +15,7 @@ describe('<AddSeats />', function () {
 
 
     cy.mount(<AddSeats />)
     cy.mount(<AddSeats />)
 
 
-    cy.findByRole('button', { name: /add licenses/i })
+    cy.findByRole('button', { name: /buy licenses/i })
     cy.findByTestId('add-more-users-group-form')
     cy.findByTestId('add-more-users-group-form')
   })
   })
 
 
@@ -35,8 +35,8 @@ describe('<AddSeats />', function () {
     })
     })
   })
   })
 
 
-  it('shows the "Add more licenses" label', function () {
-    cy.findByText(/add more licenses/i)
+  it('shows the "Buy more licenses" label', function () {
+    cy.findByText(/buy more licenses/i)
   })
   })
 
 
   it('shows the maximum supported users', function () {
   it('shows the maximum supported users', function () {
@@ -90,7 +90,7 @@ describe('<AddSeats />', function () {
 
 
   describe('cost summary', function () {
   describe('cost summary', function () {
     beforeEach(function () {
     beforeEach(function () {
-      cy.findByLabelText(/how many licenses do you want to add/i).as('input')
+      cy.findByLabelText(/how many licenses do you want to buy/i).as('input')
     })
     })
 
 
     it('shows the title', function () {
     it('shows the title', function () {
@@ -139,7 +139,7 @@ describe('<AddSeats />', function () {
         this.numberOfUsersExceedingMaxLimit = MAX_NUMBER_OF_USERS + 1
         this.numberOfUsersExceedingMaxLimit = MAX_NUMBER_OF_USERS + 1
 
 
         cy.get('@input').type(this.numberOfUsersExceedingMaxLimit.toString())
         cy.get('@input').type(this.numberOfUsersExceedingMaxLimit.toString())
-        cy.findByRole('button', { name: /add licenses/i }).should('not.exist')
+        cy.findByRole('button', { name: /buy licenses/i }).should('not.exist')
         cy.findByRole('button', { name: /send request/i }).as('sendRequestBtn')
         cy.findByRole('button', { name: /send request/i }).as('sendRequestBtn')
       })
       })
 
 
@@ -237,7 +237,7 @@ describe('<AddSeats />', function () {
           },
           },
         }
         }
 
 
-        cy.findByRole('button', { name: /add licenses/i }).as('addUsersBtn')
+        cy.findByRole('button', { name: /buy licenses/i }).as('addUsersBtn')
         cy.findByRole('button', { name: /send request/i }).should('not.exist')
         cy.findByRole('button', { name: /send request/i }).should('not.exist')
       })
       })
 
 

+ 4 - 4
services/web/test/frontend/features/group-management/components/group-members.spec.tsx

@@ -532,7 +532,7 @@ describe('GroupMembers', function () {
       )
       )
 
 
       cy.findByTestId('group-size-details').contains(
       cy.findByTestId('group-size-details').contains(
-        'You have 2 licenses and your plan supports up to 10. Add more licenses.'
+        'You have 2 licenses and your plan supports up to 10. Buy more licenses.'
       )
       )
       cy.findByTestId('add-more-members-form').within(() => {
       cy.findByTestId('add-more-members-form').within(() => {
         cy.contains('Invite more members')
         cy.contains('Invite more members')
@@ -552,11 +552,11 @@ describe('GroupMembers', function () {
       )
       )
 
 
       cy.findByTestId('group-size-details').contains(
       cy.findByTestId('group-size-details').contains(
-        'You have 1 license and your plan supports up to 10. Add more licenses.'
+        'You have 1 license and your plan supports up to 10. Buy more licenses.'
       )
       )
     })
     })
 
 
-    it('renders the group members page without "add more licenses" link when not admin', function () {
+    it('renders the group members page without "buy more licenses" link when not admin', function () {
       cy.window().then(win => {
       cy.window().then(win => {
         win.metaAttributesCache.set('ol-users', [this.JOHN_DOE])
         win.metaAttributesCache.set('ol-users', [this.JOHN_DOE])
         win.metaAttributesCache.set('ol-canUseAddSeatsFeature', false)
         win.metaAttributesCache.set('ol-canUseAddSeatsFeature', false)
@@ -570,7 +570,7 @@ describe('GroupMembers', function () {
 
 
       cy.findByTestId('group-size-details').within(() => {
       cy.findByTestId('group-size-details').within(() => {
         cy.findByText(/you have \d+ license and your plan supports up to \d+/i)
         cy.findByText(/you have \d+ license and your plan supports up to \d+/i)
-        cy.findByText(/add more licenses/i).should('not.exist')
+        cy.findByText(/buy more licenses/i).should('not.exist')
       })
       })
     })
     })
   })
   })