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 @@
{{ 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') }}{{ 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-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-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-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 %} +- {{ ftl('firefox-privacy-hub-already-have-an-account', - sign_in=fxa_link_fragment(entrypoint=_entrypoint, action='signin', optional_parameters={'utm_campaign': _utm_campaign}), - class_name='js-fxa-cta-link js-fxa-product-button', - learn_more=url('firefox.accounts') )}} + {% if switch('moz-accounts-update') %} + {{ ftl('firefox-privacy-hub-already-have-an-account-v2', fallback='firefox-privacy-hub-already-have-an-account', + sign_in=fxa_link_fragment(entrypoint=_entrypoint, action='signin', optional_parameters={'utm_campaign': _utm_campaign}), + class_name='js-fxa-cta-link js-fxa-product-button', + learn_more=url('firefox.accounts') )}} + {% else %} + {{ ftl('firefox-privacy-hub-already-have-an-account', + sign_in=fxa_link_fragment(entrypoint=_entrypoint, action='signin', optional_parameters={'utm_campaign': _utm_campaign}), + class_name='js-fxa-cta-link js-fxa-product-button', + learn_more=url('firefox.accounts') )}} + {% endif %} + + +