From 7a6979beef3fa09c3338301d18f7a777a212e9d4 Mon Sep 17 00:00:00 2001 From: Reem H <42309026+reemhamz@users.noreply.github.com> Date: Tue, 12 Sep 2023 22:02:07 +0300 Subject: [PATCH] updated templates to include switch and fallback strings --- bedrock/base/templates/macros.html | 7 +- .../firefox/templates/firefox/accounts.html | 31 ++++++-- .../firefox/browsers/compare/brave.html | 8 ++- .../firefox/browsers/compare/safari.html | 17 +++-- .../firefox/features/password-manager.html | 6 +- .../templates/firefox/features/sync.html | 8 ++- .../templates/firefox/privacy/products.html | 72 +++++++++++++++---- .../includes/newsletter-strings.json | 2 +- .../templates/newsletter/management.html | 6 +- .../templates/products/relay/faq.html | 8 ++- .../products/vpn/includes/download-faq.html | 8 ++- l10n/en/firefox/accounts.ftl | 3 + l10n/en/firefox/privacy-hub.ftl | 21 ++++++ l10n/en/fxa_form.ftl | 3 + media/css/firefox/accounts-2019.scss | 2 +- 15 files changed, 165 insertions(+), 37 deletions(-) diff --git a/bedrock/base/templates/macros.html b/bedrock/base/templates/macros.html index 4b4381136ad..7e15c9e62f7 100644 --- a/bedrock/base/templates/macros.html +++ b/bedrock/base/templates/macros.html @@ -117,7 +117,12 @@

{{ form_title }}

{% if intro_text %} {{ intro_text }} {% else %} - {{ ftl('fxa-form-enter-your-email') }} + {% if switch('moz-accounts-update') %} + {{ ftl('fxa-form-enter-your-email-v2', fallback='fxa-form-enter-your-email') }} + {% else %} + {{ ftl('fxa-form-enter-your-email') }} + {% endif %} + {% endif %}

diff --git a/bedrock/firefox/templates/firefox/accounts.html b/bedrock/firefox/templates/firefox/accounts.html index c11fdc8e3e4..59bf44d1f34 100644 --- a/bedrock/firefox/templates/firefox/accounts.html +++ b/bedrock/firefox/templates/firefox/accounts.html @@ -11,14 +11,18 @@ {% set _entrypoint = 'mozilla.org-firefox-accounts' %} {%- block page_title -%} - {{ ftl('firefox-accounts-get-a-firefox-account') }} + {% if switch('moz-accounts-update') %} + {{ ftl('mozilla-accounts-get-a-mozilla-account', fallback='firefox-accounts-get-a-firefox-account') }} + {% else %} + {{ ftl('firefox-accounts-get-a-firefox-account') }} + {% endif %} {%- endblock -%} {%- block page_desc -%} {{ ftl('firefox-accounts-securely-sync-your') }} {%- endblock -%} {% block page_image %}{{ static('img/firefox/template/page-image-master.jpg') }}{% endblock %} -{% block page_favicon %}{{ static('img/favicons/firefox/favicon.ico') }}{% endblock %} +{% block page_favicon %}{{ static('img/favicons/mozilla/favicon.ico') }}{% endblock %} {% block page_favicon_large %}{{ static('img/favicons/firefox/favicon-196x196.png') }}{% endblock %} {% block page_ios_icon %}{{ static('img/favicons/firefox/apple-touch-icon.png') }}{% endblock %} @@ -40,8 +44,12 @@

- - {{ ftl('sub-navigation-mozilla-accounts') }} + + {% if switch('moz-accounts-update') %} + {{ ftl('sub-navigation-mozilla-accounts', fallback='sub-navigation-firefox-accounts') }} + {% else %} + {{ ftl('sub-navigation-firefox-accounts') }} + {% endif %}

-

{{ ftl('mozilla-accounts-already') }}

+ + {% if switch('moz-accounts-update') %} +

{{ ftl('mozilla-accounts-already', fallback='firefox-accounts-already') }}

+ {% else %} +

{{ ftl('firefox-accounts-already') }}

+ {% endif %} + {{ ftl('firefox-accounts-manage') }}
@@ -88,7 +102,12 @@

-

{{ ftl('mozilla-account-sign-in-to', fallback='firefox-accounts-meet-our-family-of') }}

+ + {% if switch('moz-accounts-update') %} +

{{ ftl('mozilla-account-sign-in-to', fallback='firefox-account-sign-in-to') }}

+ {% else %} +

{{ ftl('firefox-account-sign-in-to') }}

+ {% endif %}

{{ ftl('firefox-accounts-firefox-browser') }}

    diff --git a/bedrock/firefox/templates/firefox/browsers/compare/brave.html b/bedrock/firefox/templates/firefox/browsers/compare/brave.html index c63393095be..19bc6fb429c 100644 --- a/bedrock/firefox/templates/firefox/browsers/compare/brave.html +++ b/bedrock/firefox/templates/firefox/browsers/compare/brave.html @@ -237,9 +237,15 @@

    {{ ftl('compare-shared-portability-strong') }}

    {{ ftl('compare-brave-the-ability-to-sync-your-passwords') }}

    -

    {{ ftl('compare-brave-the-firefox-browser-also-gives-v2', accounts='href="%s" data-cta-type="link" data-cta-name="Firefox Account"'|safe|format(url('firefox.accounts')), + {% if switch('moz-accounts-update') %} +

    {{ ftl('compare-brave-the-firefox-browser-also-gives-v2', fallback='compare-brave-the-firefox-browser-also-gives', accounts='href="%s" data-cta-type="link" data-cta-name="Firefox Account"'|safe|format(url('firefox.accounts')), monitor='href="https://monitor.firefox.com/" rel="external noopener" data-cta-text="Monitor" data-cta-type="link"'|safe, breaches='href="https://monitor.firefox.com/breaches" rel="external noopener" data-cta-text="Data breaches" data-cta-type="link"'|safe) }}

    + {% else %} +

    {{ ftl('compare-brave-the-firefox-browser-also-gives', accounts='href="%s" data-cta-type="link" data-cta-name="Firefox Account"'|safe|format(url('firefox.accounts')), + monitor='href="https://monitor.firefox.com/" rel="external noopener" data-cta-text="Monitor" data-cta-type="link"'|safe, + breaches='href="https://monitor.firefox.com/breaches" rel="external noopener" data-cta-text="Data breaches" data-cta-type="link"'|safe) }}

    + {% endif %}

    {{ ftl('compare-brave-brave-also-recently-gained') }}

    diff --git a/bedrock/firefox/templates/firefox/browsers/compare/safari.html b/bedrock/firefox/templates/firefox/browsers/compare/safari.html index 71216590d12..b647d5cddeb 100644 --- a/bedrock/firefox/templates/firefox/browsers/compare/safari.html +++ b/bedrock/firefox/templates/firefox/browsers/compare/safari.html @@ -182,16 +182,15 @@

    {{ ftl('compare-shared-utility-strong') }}

    {{ ftl('compare-safari-like-safari-firefox-encourages', attrs='href="https://addons.mozilla.org" rel="external noopener" data-cta-text="add-ons and extensions" data-cta-type="link"'|safe) }}

    - - {% if ftl_has_messages('compare-safari-also-when-you-sign-up-for-updated-v2', 'compare-safari-firefox-is-also-great-for-video', 'compare-safari-screenshots-is-another-popular') %} -

    {{ ftl('compare-safari-also-when-you-sign-up-for-updated-v2', pocket='href="https://getpocket.com/" rel="external noopener" data-cta-text="Pocket" data-cta-type="link"'|safe) }}

    + {% if switch('moz-accounts-update') %} +

    {{ ftl('compare-safari-also-when-you-sign-up-for-updated-v2', fallback='compare-safari-also-when-you-sign-up-for-updated', pocket='href="https://getpocket.com/" rel="external noopener" data-cta-text="Pocket" data-cta-type="link"'|safe) }}

    + {% else %} + {{ ftl('compare-safari-also-when-you-sign-up-for-updated', pocket='href="https://getpocket.com/" rel="external noopener" data-cta-text="Pocket" data-cta-type="link"'|safe) }} + {% endif %}

    {{ ftl('compare-safari-firefox-is-also-great-for-video') }}

    {{ ftl('compare-safari-screenshots-is-another-popular', attrs='href="https://screenshots.firefox.com" rel="external noopener" data-cta-text="Screenshots" data-cta-type="link"'|safe) }}

    - {% else %} -

    {{ ftl('compare-safari-also-when-you-sign-up-for', fallback='compare-safari-also-when-you-sign-up-for-fallback', pocket='href="https://getpocket.com/" rel="external noopener" data-cta-text="Pocket" data-cta-type="link"'|safe, send='href="https://send.firefox.com/" rel="external noopener" data-cta-text="Send" data-cta-type="link"'|safe ) }}

    - {% endif %}

    {{ ftl('compare-safari-both-browsers-have-a-lot') }}

    @@ -243,7 +242,11 @@

    {{ ftl('compare-shared-portability-strong') }}

    {{ ftl('compare-safari-firefox-and-safari-both-provide') }}

    -

    {{ ftl('compare-safari-firefox-also-offers-a-similar-updated-v2', fallback='compare-safari-firefox-also-offers-a-similar', attrs = 'href="%s" data-cta-type="link" data-cta-name="Firefox Account"'|safe|format(url('firefox.accounts'))) }}

    + {% if switch('moz-accounts-update') %} +

    {{ ftl('compare-safari-firefox-also-offers-a-similar-updated-v2', fallback='compare-safari-firefox-also-offers-a-similar-updated', attrs = 'href="%s" data-cta-type="link" data-cta-name="Firefox Account"'|safe|format(url('firefox.accounts'))) }}

    + {% else %} +

    {{ ftl('compare-safari-firefox-also-offers-a-similar-updated', attrs = 'href="%s" data-cta-type="link" data-cta-name="Firefox Account"'|safe|format(url('firefox.accounts'))) }}

    + {% endif %}

    {{ ftl('compare-safari-the-firefox-app-for-ios-and', ios='href="%s" rel="external noopener" data-cta-text="iOS" data-cta-type="link"'|safe|format(app_store_url('firefox')), android='href="%s" rel="external noopener" data-cta-text="Android" data-cta-type="link"'|safe|format(play_store_url('firefox'))) }}

    diff --git a/bedrock/firefox/templates/firefox/features/password-manager.html b/bedrock/firefox/templates/firefox/features/password-manager.html index 339df1cfcb2..c45aa8db088 100644 --- a/bedrock/firefox/templates/firefox/features/password-manager.html +++ b/bedrock/firefox/templates/firefox/features/password-manager.html @@ -12,7 +12,11 @@ {% block article_content %}

    {{ ftl('password-manager-firefox-securely-stores-your') }}

    -

    {{ ftl('password-manager-with-a-free-mozilla-account', fxa=url('firefox.accounts')) }}

    + {% if switch('moz-accounts-update') %} +

    {{ ftl('password-manager-with-a-free-mozilla-account', fallback='password-manager-with-a-free-firefox-account', fxa=url('firefox.accounts')) }}

    + {% else %} +

    {{ ftl('password-manager-with-a-free-firefox-account', fxa=url('firefox.accounts')) }}

    + {% endif %}

    {{ ftl('password-manager-password-autofill-for-easy-logins') }}

    {{ ftl('password-manager-firefox-can-automatically-fill-in') }}

    diff --git a/bedrock/firefox/templates/firefox/features/sync.html b/bedrock/firefox/templates/firefox/features/sync.html index d7b9aaaf71d..062ad7e7953 100644 --- a/bedrock/firefox/templates/firefox/features/sync.html +++ b/bedrock/firefox/templates/firefox/features/sync.html @@ -11,7 +11,13 @@ {% block article_content %}

    {{ ftl('features-sync-with-firefox-you-can-pick-up-where') }}

    -

    {{ ftl('features-sync-sign-up-for-a-free-mozilla-account', fxa=url('firefox.accounts')) }}

    + + {% if switch('moz-accounts-update') %} +

    {{ ftl('features-sync-sign-up-for-a-free-mozilla-account', fallback='features-sync-sign-up-for-a-free-firefox-account', fxa=url('firefox.accounts')) }}

    + {% else %} +

    {{ ftl('features-sync-sign-up-for-a-free-firefox-account', fxa=url('firefox.accounts')) }}

    + {% endif %} +
    {{ resp_img( diff --git a/bedrock/firefox/templates/firefox/privacy/products.html b/bedrock/firefox/templates/firefox/privacy/products.html index c05f0d3f2e1..4defcebc5de 100644 --- a/bedrock/firefox/templates/firefox/privacy/products.html +++ b/bedrock/firefox/templates/firefox/privacy/products.html @@ -115,8 +115,13 @@

    base_el='li', body=True ) %} -

    {{ ftl('firefox-privacy-hub-if-you-have-a-firefox-account') }}

    - {% endcall %} + {% if switch('moz-accounts-update') %} +

    {{ ftl('firefox-privacy-hub-if-you-have-a-mozilla-account', fallback='firefox-privacy-hub-if-you-have-a-firefox-account') }}

    + {% else %} +

    {{ ftl('firefox-privacy-hub-if-you-have-a-firefox-account') }}

    + {% endif %} + + {% endcall %}

@@ -202,25 +207,62 @@

{{ ftl('firefox-privacy-hub-pocket') }}

-

{{ ftl('firefox-privacy-hub-your-firefox-account') }}

+

+ + {% if switch('moz-accounts-update') %} + {{ ftl('firefox-privacy-hub-your-mozilla-account', fallback='firefox-privacy-hub-your-firefox-account') }} + {% else %} + {{ ftl('firefox-privacy-hub-your-firefox-account') }} + {% endif %} + + +

- {{ ftl('firefox-privacy-hub-all-the-information-synced') }} + + {% if switch('moz-accounts-update') %} + {{ ftl('firefox-privacy-hub-all-the-information-synced-v2', fallback='firefox-privacy-hub-all-the-information-synced') }} + {% else %} + {{ ftl('firefox-privacy-hub-all-the-information-synced') }} + {% endif %} +
- {{ fxa_email_form( - entrypoint=_entrypoint, - form_title=ftl('firefox-privacy-hub-take-your-privacy-and-bookmarks'), - button_class='mzp-c-button mzp-t-primary mzp-t-product', - style='trailhead', - utm_campaign=_utm_campaign) - }} + + {% if switch('moz-accounts-update') %} + {{ fxa_email_form( + entrypoint=_entrypoint, + form_title=ftl('firefox-privacy-hub-take-your-privacy-and-bookmarks-v2', fallback='firefox-privacy-hub-take-your-privacy-and-bookmarks'), + button_class='mzp-c-button mzp-t-primary mzp-t-product', + style='trailhead', + utm_campaign=_utm_campaign) + }} + {% else %} + {{ fxa_email_form( + entrypoint=_entrypoint, + form_title=ftl('firefox-privacy-hub-take-your-privacy-and-bookmarks'), + button_class='mzp-c-button mzp-t-primary mzp-t-product', + style='trailhead', + utm_campaign=_utm_campaign) + }} + {% endif %} +
diff --git a/bedrock/newsletter/templates/newsletter/includes/newsletter-strings.json b/bedrock/newsletter/templates/newsletter/includes/newsletter-strings.json index 444f1f1bafb..b463c9acccc 100644 --- a/bedrock/newsletter/templates/newsletter/includes/newsletter-strings.json +++ b/bedrock/newsletter/templates/newsletter/includes/newsletter-strings.json @@ -122,7 +122,7 @@ }, "mozilla-accounts": { "description": "{{ ftl('newsletters-get-tips-from-mozilla')|striptags }}", - "title": "{{ ftl('newsletters-mozilla-accounts')|striptags }}" + "title": "{{ ftl('newsletters-mozilla-accounts', fallback='newsletters-firefox-accounts')|striptags }}" }, "mozilla-and-you": { "description": "{{ ftl('newsletters-get-how-tos')|striptags }}", diff --git a/bedrock/newsletter/templates/newsletter/management.html b/bedrock/newsletter/templates/newsletter/management.html index 700c51039ab..c4f0f098f97 100644 --- a/bedrock/newsletter/templates/newsletter/management.html +++ b/bedrock/newsletter/templates/newsletter/management.html @@ -109,7 +109,11 @@

{{ ftl('newsletters-manage-your-email-preferences') }}

{{ ftl('newsletters-text-subscribers-will-receive') }}