From e6b681838b0c094ccffcc52f235eda43b2111261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Alby?= Date: Thu, 7 Jul 2022 10:01:55 +0200 Subject: [PATCH] Merge pull request #8706 from overleaf/ta-beta-program-copy Update Beta Program Copy GitOrigin-RevId: 49afa2ca394bee3d48aeb37bbe909f666ff845a2 --- services/web/app/views/beta_program/opt_in.pug | 16 ++++++++++------ .../web/frontend/extracted-translations.json | 3 ++- .../settings/components/beta-program-section.tsx | 11 +++++++++-- services/web/locales/en.json | 12 +++++++----- .../components/beta-program-section.test.tsx | 3 ++- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/services/web/app/views/beta_program/opt_in.pug b/services/web/app/views/beta_program/opt_in.pug index 2cb2b4ddf0..07be27c338 100644 --- a/services/web/app/views/beta_program/opt_in.pug +++ b/services/web/app/views/beta_program/opt_in.pug @@ -14,17 +14,21 @@ block content .row .col-md-12 if user.betaProgram - p #{translate("beta_program_already_participating")}. - p #{translate("thank_you_for_being_part_of_our_beta_program")}. + p.text-centered + strong #{translate("beta_program_already_participating")}. + p !{translate("thank_you_for_being_part_of_our_beta_program", {}, ['strong'])}. else - p #{translate("beta_program_benefits")} + p.text-centered + strong #{translate("beta_program_not_participating")}. + p !{translate("beta_program_benefits", {}, ['strong'])} p #[strong How it works:] ul li #{translate("beta_program_badge_description")} #[span(aria-label=translate("beta_feature_badge") role="img").beta-badge] - li #{translate("you_will_be_able_to_contact_us_any_time_to_share_your_feedback")}. - li #{translate("we_may_also_contact_you_from_time_to_time_by_email_with_a_survey")}. - li #{translate("you_can_opt_in_and_out_of_the_program_at_any_time_on_this_page")}. + li !{translate("you_will_be_able_to_contact_us_any_time_to_share_your_feedback", {}, ['strong'])}. + li !{translate("we_may_also_contact_you_from_time_to_time_by_email_with_a_survey", {}, ['strong'])}. + li !{translate("you_can_opt_in_and_out_of_the_program_at_any_time_on_this_page", {}, ['strong'])}. + p !{translate("note_features_under_development", {}, ['strong'])}. .row.text-centered .col-md-12 diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index 3407cc7fb0..4234c8bfb7 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -21,7 +21,8 @@ "autocomplete_references": "", "back_to_your_projects": "", "beta_program_already_participating": "", - "beta_program_benefits": "", + "beta_program_benefits": "<0>", + "beta_program_not_participating": "", "blocked_filename": "", "can_edit": "", "can_link_your_institution_acct_2": "", diff --git a/services/web/frontend/js/features/settings/components/beta-program-section.tsx b/services/web/frontend/js/features/settings/components/beta-program-section.tsx index 027e1209b3..9060b0e252 100644 --- a/services/web/frontend/js/features/settings/components/beta-program-section.tsx +++ b/services/web/frontend/js/features/settings/components/beta-program-section.tsx @@ -1,4 +1,4 @@ -import { useTranslation } from 'react-i18next' +import { useTranslation, Trans } from 'react-i18next' import { useUserContext } from '../../../shared/context/user-context' function BetaProgramSection() { @@ -8,10 +8,17 @@ function BetaProgramSection() { return ( <>

{t('sharelatex_beta_program')}

+ {betaProgram ? null : ( +

+ + + +

+ )}

{betaProgram ? t('beta_program_already_participating') - : t('beta_program_benefits')} + : t('beta_program_not_participating')}

{t('manage_beta_program_membership')} diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 52e8b9bfa2..994ed2d85d 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -81,10 +81,11 @@ "last_login": "Last Login", "last_active": "Last Active", "last_active_description": "Last time a project was opened.", - "thank_you_for_being_part_of_our_beta_program": "Thank you for being part of our Beta Program, where you can have early access to new features and help us understand your needs better", - "you_will_be_able_to_contact_us_any_time_to_share_your_feedback": "You will be able to contact us any time to share your feedback", - "we_may_also_contact_you_from_time_to_time_by_email_with_a_survey": "We may also contact you from time to time by email with a survey, or to see if you would like to participate in other user research initiatives", - "you_can_opt_in_and_out_of_the_program_at_any_time_on_this_page": "You can opt in and out of the program at any time on this page", + "thank_you_for_being_part_of_our_beta_program": "Thank you for being part of our Beta Program, where you can have <0>early access to new features and help us understand your needs better", + "you_will_be_able_to_contact_us_any_time_to_share_your_feedback": "<0>You will be able to contact us any time to share your feedback", + "we_may_also_contact_you_from_time_to_time_by_email_with_a_survey": "<0>We may also contact you from time to time by email with a survey, or to see if you would like to participate in other user research initiatives", + "you_can_opt_in_and_out_of_the_program_at_any_time_on_this_page": "You can <0>opt in and out of the program at any time on this page", + "note_features_under_development": "<0>Please note that features in this program are still being tested and actively developed. This means that they might <0>change, be <0>removed or <0>become part of a premium plan.", "give_feedback": "Give feedback", "beta_feature_badge": "Beta feature badge", "invalid_filename": "Upload failed: check that the file name doesn’t contain special characters, trailing/leading whitespace or more than __nameLimit__ characters", @@ -768,8 +769,9 @@ "enable_beta": "Enable Beta", "user_in_beta_program": "User is participating in Beta Program", "beta_program_already_participating": "You are enrolled in the Beta Program", + "beta_program_not_participating": "You are not enrolled in the Beta Program", "sharelatex_beta_program": "__appName__ Beta Program", - "beta_program_benefits": "We’re always improving __appName__. By joining our Beta program you can have early access to new features and help us understand your needs better.", + "beta_program_benefits": "We’re always improving __appName__. By joining this program you can have <0>early access to new features and help us understand your needs better.", "beta_program_opt_in_action": "Opt-In to Beta Program", "conflicting_paths_found": "Conflicting Paths Found", "following_paths_conflict": "The following files and folders conflict with the same path", diff --git a/services/web/test/frontend/features/settings/components/beta-program-section.test.tsx b/services/web/test/frontend/features/settings/components/beta-program-section.test.tsx index 5904ec5d81..12307c7e61 100644 --- a/services/web/test/frontend/features/settings/components/beta-program-section.test.tsx +++ b/services/web/test/frontend/features/settings/components/beta-program-section.test.tsx @@ -40,6 +40,7 @@ describe('', function () { betaProgram: false, }) renderSectionWithUserProvider() - screen.getByText(/By joining our Beta program you can have early access/) + screen.getByText('You are not enrolled in the Beta Program') + screen.getByText(/By joining this program you can have/) }) })