Skip to content

Commit

Permalink
updated templates to include switch and fallback strings
Browse files Browse the repository at this point in the history
  • Loading branch information
reemhamz committed Sep 14, 2023
1 parent df8c4fa commit 7a6979b
Show file tree
Hide file tree
Showing 15 changed files with 165 additions and 37 deletions.
7 changes: 6 additions & 1 deletion bedrock/base/templates/macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ <h2 class="mzp-c-form-title">{{ form_title }}</h2>
{% 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 %}
</p>
</header>
Expand Down
31 changes: 25 additions & 6 deletions bedrock/firefox/templates/firefox/accounts.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

Expand All @@ -40,8 +44,12 @@
<div class="c-sub-navigation-content">
<h2 class="c-sub-navigation-title is-summary">
<a href="{{ url('firefox.accounts') }}" data-link-type="nav" data-link-position="subnav" data-link-name="Firefox Accounts">
<img class="c-sub-navigation-icon" src="{{ static('protocol/img/logos/firefox/logo.svg') }}" width="24" height="24" alt="">
{{ ftl('sub-navigation-mozilla-accounts') }}
<img class="c-sub-navigation-icon" src="{{ static('protocol/img/logos/mozilla/logo.svg') }}" width="24" height="24" alt="">
{% if switch('moz-accounts-update') %}
{{ ftl('sub-navigation-mozilla-accounts', fallback='sub-navigation-firefox-accounts') }}
{% else %}
{{ ftl('sub-navigation-firefox-accounts') }}
{% endif %}
</a>
</h2>
<ul class="c-sub-navigation-list is-details is-closed">
Expand Down Expand Up @@ -80,15 +88,26 @@ <h2 class="c-sub-navigation-title is-summary">
</div>

<div class="c-manage">
<p>{{ ftl('mozilla-accounts-already') }}</p>

{% if switch('moz-accounts-update') %}
<p>{{ ftl('mozilla-accounts-already', fallback='firefox-accounts-already') }}</p>
{% else %}
<p>{{ ftl('firefox-accounts-already') }}</p>
{% endif %}

<a href="https://accounts.firefox.com/settings" id="manage">{{ ftl('firefox-accounts-manage') }}</a>
</div>
</div>
</div>
<div class="mzp-c-split-body">

<div class="accounts-products">
<h2>{{ ftl('mozilla-account-sign-in-to', fallback='firefox-accounts-meet-our-family-of') }}</h2>

{% if switch('moz-accounts-update') %}
<h2>{{ ftl('mozilla-account-sign-in-to', fallback='firefox-account-sign-in-to') }}</h2>
{% else %}
<h2>{{ ftl('firefox-account-sign-in-to') }}</h2>
{% endif %}

<a href="{{ url('firefox.browsers.index') }}"><h4 class="mzp-c-wordmark mzp-t-wordmark-sm mzp-t-product-firefox">{{ ftl('firefox-accounts-firefox-browser') }}</h4></a>
<ul class="mzp-u-list-styled">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,15 @@ <h2>{{ ftl('compare-shared-portability-strong') }}</h2>

<p>{{ ftl('compare-brave-the-ability-to-sync-your-passwords') }}</p>

<p>{{ 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') %}
<p>{{ 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) }}</p>
{% else %}
<p>{{ 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) }}</p>
{% endif %}

<p>{{ ftl('compare-brave-brave-also-recently-gained') }}</p>

Expand Down
17 changes: 10 additions & 7 deletions bedrock/firefox/templates/firefox/browsers/compare/safari.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,15 @@ <h2>{{ ftl('compare-shared-utility-strong') }}</h2>

<p>{{ 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) }}</p>


{% 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') %}
<p>{{ 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) }}</p>
{% if switch('moz-accounts-update') %}
<p>{{ 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) }}</p>
{% 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 %}

<p>{{ ftl('compare-safari-firefox-is-also-great-for-video') }}</p>

<p>{{ 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) }}</p>
{% else %}
<p>{{ 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 ) }}</p>
{% endif %}

<p>{{ ftl('compare-safari-both-browsers-have-a-lot') }}</p>

Expand Down Expand Up @@ -243,7 +242,11 @@ <h2>{{ ftl('compare-shared-portability-strong') }}</h2>

<p>{{ ftl('compare-safari-firefox-and-safari-both-provide') }}</p>

<p>{{ 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'))) }}</p>
{% if switch('moz-accounts-update') %}
<p>{{ 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'))) }}</p>
{% else %}
<p>{{ 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'))) }}</p>
{% endif %}

<p>{{ 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'))) }}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
{% block article_content %}
<p>{{ ftl('password-manager-firefox-securely-stores-your') }}</p>

<p>{{ ftl('password-manager-with-a-free-mozilla-account', fxa=url('firefox.accounts')) }}</p>
{% if switch('moz-accounts-update') %}
<p>{{ ftl('password-manager-with-a-free-mozilla-account', fallback='password-manager-with-a-free-firefox-account', fxa=url('firefox.accounts')) }}</p>
{% else %}
<p>{{ ftl('password-manager-with-a-free-firefox-account', fxa=url('firefox.accounts')) }}</p>
{% endif %}

<h2>{{ ftl('password-manager-password-autofill-for-easy-logins') }}</h2>
<p>{{ ftl('password-manager-firefox-can-automatically-fill-in') }}</p>
Expand Down
8 changes: 7 additions & 1 deletion bedrock/firefox/templates/firefox/features/sync.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@

{% block article_content %}
<p>{{ ftl('features-sync-with-firefox-you-can-pick-up-where') }}</p>
<p>{{ ftl('features-sync-sign-up-for-a-free-mozilla-account', fxa=url('firefox.accounts')) }}</p>

{% if switch('moz-accounts-update') %}
<p>{{ ftl('features-sync-sign-up-for-a-free-mozilla-account', fallback='features-sync-sign-up-for-a-free-firefox-account', fxa=url('firefox.accounts')) }}</p>
{% else %}
<p>{{ ftl('features-sync-sign-up-for-a-free-firefox-account', fxa=url('firefox.accounts')) }}</p>
{% endif %}


<figure class="c-article-figure">
{{ resp_img(
Expand Down
72 changes: 57 additions & 15 deletions bedrock/firefox/templates/firefox/privacy/products.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,13 @@ <h3 class="privacy-products-hero-sub-title">
base_el='li',
body=True
) %}
<p>{{ ftl('firefox-privacy-hub-if-you-have-a-firefox-account') }}</p>
{% endcall %}
{% if switch('moz-accounts-update') %}
<p>{{ ftl('firefox-privacy-hub-if-you-have-a-mozilla-account', fallback='firefox-privacy-hub-if-you-have-a-firefox-account') }}</p>
{% else %}
<p>{{ ftl('firefox-privacy-hub-if-you-have-a-firefox-account') }}</p>
{% endif %}

{% endcall %}
</ul>
</div>

Expand Down Expand Up @@ -202,25 +207,62 @@ <h2>{{ ftl('firefox-privacy-hub-pocket') }}</h2>

<section class="privacy-products-accounts mzp-l-content mzp-l-columns mzp-t-columns-two">
<div>
<h2 class="mzp-c-card-feature-title">{{ ftl('firefox-privacy-hub-your-firefox-account') }}</h2>
<h2 class="mzp-c-card-feature-title">

{% 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 %}


</h2>
<div class="mzp-c-card-feature-desc">
{{ 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 %}

</div>
</div>
<div class="mzp-c-emphasis-box">
{{ 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 %}


<p class="fxa-signin">
{{ 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 %}



</p>
</div>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}",
Expand Down
6 changes: 5 additions & 1 deletion bedrock/newsletter/templates/newsletter/management.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ <h1>{{ ftl('newsletters-manage-your-email-preferences') }}</h1>
<small>{{ ftl('newsletters-text-subscribers-will-receive') }}</small>

<aside>
<p>{{ ftl('newsletters-many-of-our-communications-v2', url='https://support.mozilla.org/kb/managing-account-data') }}</p>
{% if switch('moz-accounts-update') %}
<p>{{ ftl('newsletters-many-of-our-communications-v2', fallback='newsletters-many-of-our-communications', url='https://support.mozilla.org/kb/managing-account-data') }}</p>
{% else %}
<p>{{ ftl('newsletters-many-of-our-communications', url='https://support.mozilla.org/kb/managing-account-data') }}</p>
{% endif %}

<p>{{ ftl('newsletters-to-get-access-to-the-whole', url=url('firefox.accounts')) }}</p>

Expand Down
8 changes: 7 additions & 1 deletion bedrock/products/templates/products/relay/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ <h3> {{ ftl('faq-question-email-storage-question') }}</h3>
<h3> {{ ftl('faq-question-acceptable-use-question') }}</h3>
<p> {{ ftl('faq-question-acceptable-use-answer-a-html', url=url('legal.terms.acceptable-use')) }}</p>
<ul class="mzp-u-list-styled">
<li>{{ ftl('faq-question-acceptable-use-answer-measure-account-v2') }}</li>

{% if switch('moz-accounts-update') %}
<li>{{ ftl('faq-question-acceptable-use-answer-measure-account-v2', fallback='faq-question-acceptable-use-answer-measure-account') }}</li>
{% else %}
<li>{{ ftl('faq-question-acceptable-use-answer-measure-account') }}</li>
{% endif %}

<li>{{ ftl('faq-question-acceptable-use-answer-measure-unlimited-payment-2') }}</li>
<li>{{ ftl('faq-question-acceptable-use-answer-measure-rate-limit-2') }}</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ <h3>{{ ftl('vpn-download-faq-working') }}</h3>
<summary>
<h3>{{ ftl('vpn-download-faq-add-device') }}</h3>
</summary>
<p>{{ ftl('vpn-download-faq-adding-another-v3', fallback='vpn-download-faq-adding-another-v2', subscription='https://support.mozilla.org/kb/how-add-devices-your-mozilla-vpn-subscription') }}</p>

{% if switch('moz-accounts-update') %}
<p>{{ ftl('vpn-download-faq-adding-another-v3', fallback='vpn-download-faq-adding-another-v2', subscription='https://support.mozilla.org/kb/how-add-devices-your-mozilla-vpn-subscription') }}</p>
{% else %}
<p>{{ ftl('vpn-download-faq-adding-another-v2', fallback='vpn-download-faq-adding-another', subscription='https://support.mozilla.org/kb/how-add-devices-your-mozilla-vpn-subscription') }}</p>
{% endif %}

</details>
<details>
<summary>
Expand Down
3 changes: 3 additions & 0 deletions l10n/en/firefox/accounts.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
### URL: https://www-dev.allizom.org/firefox/accounts/

# HTML page title
mozilla-accounts-get-a-mozilla-account = Get a { -brand-name-mozilla-account } – Keep your data private, safe and synced
# Obsolete string
firefox-accounts-get-a-firefox-account = Get a { -brand-name-firefox-account } – Keep your data private, safe and synced
# HTML page description
Expand Down
21 changes: 21 additions & 0 deletions l10n/en/firefox/privacy-hub.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ firefox-privacy-hub-meet-four-of-the-most-common = Meet four of the most common
firefox-privacy-hub-always-in-your-control = Always in your control
firefox-privacy-hub-want-to-customize-what = Want to customize what gets blocked? Your settings are only one click away.
firefox-privacy-hub-protection-beyond-tracking = Protection beyond tracking
firefox-privacy-hub-if-you-have-a-mozilla-account = If you have a { -brand-name-mozilla-account }, you can also see how we’re helping you protect your personal info and passwords.
# Obsolete string
firefox-privacy-hub-if-you-have-a-firefox-account = If you have a { -brand-name-firefox-account }, you can also see how we’re helping you protect your personal info and passwords.
# Variables:
Expand All @@ -93,10 +96,28 @@ firefox-privacy-hub-send-a-file = Send a file
firefox-privacy-hub-pocket = { -brand-name-pocket }
firefox-privacy-hub-pocket-recommends-high = { -brand-name-pocket } recommends high-quality, human-curated articles without collecting your browsing history or sharing your personal information with advertisers.
firefox-privacy-hub-get-pocket = Get { -brand-name-pocket }
firefox-privacy-hub-your-mozilla-account = Your { -brand-name-mozilla-account }
# Obsolete string
firefox-privacy-hub-your-firefox-account = Your { -brand-name-firefox-account }
firefox-privacy-hub-all-the-information-synced-v2 = All the information synced through your { -brand-name-mozilla-account } — from browser history to passwords — is encrypted. And your account password is the only key.
# Obsolete string
firefox-privacy-hub-all-the-information-synced = All the information synced through your { -brand-name-firefox-account } — from browser history to passwords — is encrypted. And your account password is the only key.
firefox-privacy-hub-take-your-privacy-and-bookmarks-v2 = Take your privacy and bookmarks everywhere with a { -brand-name-mozilla-account }.
# Obsolete string
firefox-privacy-hub-take-your-privacy-and-bookmarks = Take your privacy and bookmarks everywhere with a { -brand-name-firefox-account }.
# Variables:
# $signin (string) - anchor link url and attributes
# $class_name (string) - CSS class name for sign in link
# $learn_more (url) - link to https://www.mozilla.org/firefox/accounts/
firefox-privacy-hub-already-have-an-account-v2 = Already have an account? <a { $sign_in } class="{ $class_name }">Sign In</a> or <a href="{ $learn_more }">learn more</a> about joining { -brand-name-mozilla }.
# Obsolete string
# Variables:
# $signin (string) - anchor link url and attributes
# $class_name (string) - CSS class name for sign in link
Expand Down
3 changes: 3 additions & 0 deletions l10n/en/fxa_form.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

# Obsolete string
fxa-form-enter-your-email = <strong>Enter your email</strong> to access { -brand-name-firefox-accounts }.
fxa-form-enter-your-email-v2 = <strong>Enter your email</strong> to create a { -brand-name-mozilla-account }.
# Variables:
# $url1 (url) - link to https://accounts.firefox.com/legal/terms
# $url2 (url) - link to https://accounts.firefox.com/legal/privacy
Expand Down
Loading

0 comments on commit 7a6979b

Please sign in to comment.