Skip to content

Commit

Permalink
Merge pull request #2501 from pmclanahan/l10n_has_tag_use_all_lang_files
Browse files Browse the repository at this point in the history
Fix bug 920113, 949163: tags should be from all lang files.
  • Loading branch information
jgmize committed Nov 17, 2014
2 parents e83bf57 + 6bd7991 commit cd372f9
Show file tree
Hide file tree
Showing 28 changed files with 164 additions and 115 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{% block telemetry_id %}australis-tour-firstrun-29-release{% endblock %}

{% block doorhanger_title %}
{% if l10n_has_tag('new_doorhanger') or settings.DEV %}
{% if l10n_has_tag('new_doorhanger') %}
{# L10n: This is the title for a door-hanger menu that shows in the browser chrome #}
data-title="{{ _('Take a quick tour') }}"
{% else %}
Expand Down
10 changes: 5 additions & 5 deletions bedrock/firefox/templates/firefox/channel.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
{# L10n: This is the string for the <title> tag on the page. #}

{% block page_title %}
{% if l10n_has_tag('channel_dev_edition') or settings.DEV %}
{% if l10n_has_tag('channel_dev_edition') %}
{{_('Download Firefox Developer Edition or Beta &amp; Help Determine the Next Firefox')}}
{% else %}
{{_('Download Firefox Aurora or Beta &amp; Help Determine the Next Firefox')}}
{% endif %}
{% endblock %}

{% block page_desc %}
{% if l10n_has_tag('channel_dev_edition') or settings.DEV %}
{% if l10n_has_tag('channel_dev_edition') %}
{{ _('Download and test Firefox future releases. Experience the newest innovations with the Developer Edition or Beta builds.') }}
{% else %}
{{ _('Download and test Firefox future releases. Experience the newest innovations with the Aurora or Beta builds.') }}
Expand Down Expand Up @@ -53,7 +53,7 @@ <h3>{{_('The latest features in a more stable environment')}}</h3>
<div class="download-box mobile" id="beta-mobile">
{{ download_firefox('beta', icon=False, mobile=True, small=True) }}
</div>
{% if l10n_has_tag('telemetry_notice') or settings.DEV %}
{% if l10n_has_tag('telemetry_notice') %}
<p class="warning">
{% trans link=url('privacy.notices.firefox') + '#telemetry' %}
Firefox Beta automatically sends feedback to Mozilla. <a href="{{ link }}">Learn more</a>.
Expand Down Expand Up @@ -83,7 +83,7 @@ <h3>{{_('Tried, tested and used by millions around the world')}}</h3>
<div id="aurora" class="pager-page">
<h2 class="channel-title channel-title-aurora">{{ high_res_img('img/firefox/channel/title-dev.png', {'alt': 'Firefox Developer Edition', 'width': '214', 'height': '100'}) }}</h2>
{# L10n: This description applies to Firefox Developer Edition #}
{% if l10n_has_tag('channel_dev_edition') or settings.DEV %}
{% if l10n_has_tag('channel_dev_edition') %}
<h3>{{_('Built for those who build the Web')}}</h3>
{% else %}
<h3>{{_('The newest innovations in an experimental environment')}}</h3>
Expand All @@ -95,7 +95,7 @@ <h3>{{_('The newest innovations in an experimental environment')}}</h3>
{{ download_firefox('aurora', icon=False, mobile=True, small=True) }}
</div>
<p class="warning">
{% if l10n_has_tag('channel_dev_edition') or settings.DEV %}
{% if l10n_has_tag('channel_dev_edition') %}
{% trans link=url('privacy.notices.firefox') + '#telemetry' %}
Firefox Aurora and Firefox Developer Edition automatically send feedback to Mozilla. <a href="{{ link }}">Learn more</a>.
{% endtrans %}
Expand Down
2 changes: 1 addition & 1 deletion bedrock/firefox/templates/firefox/desktop/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{% block page_title_prefix %}{% endblock %}
{% block page_title %}
{% if l10n_has_tag('home_title_update') or settings.DEV %}
{% if l10n_has_tag('home_title_update') %}
{{ _("Firefox Web browser — Trusted, Flexible, Fast — Committed to you, your privacy and an open Web") }}
{% else %}
{{ _("Firefox Web browser — Trusted, Flexible, Fast — There's never been a better time") }}
Expand Down
12 changes: 6 additions & 6 deletions bedrock/firefox/templates/firefox/desktop/tips.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h4>{{ _('How to:') }}</h4>
<p>
{{ _('Click the star to add bookmarks and manage them from the same spot.') }}
<a href="https://support.mozilla.org/kb/use-bookmarks-to-save-and-organize-websites">
{% if l10n_has_tag('sync_device_note') or settings.DEV %}
{% if l10n_has_tag('sync_device_note') %}
{{ _('Learn more about bookmarks') }}
{% else %}
{{ _('Learn more') }}
Expand Down Expand Up @@ -129,7 +129,7 @@ <h4>{{ _('How to:') }}</h4>
<p>
{{ _('Open the menu, select “<strong>Customize</strong>” and drag any button out of the toolbar.') }}
<a rel="external" href="https://support.mozilla.org/kb/customize-firefox-controls-buttons-and-toolbars">
{% if l10n_has_tag('sync_device_note') or settings.DEV %}
{% if l10n_has_tag('sync_device_note') %}
{{ _('Learn more about customizing') }}
{% else %}
{{ _('Learn more') }}
Expand Down Expand Up @@ -159,7 +159,7 @@ <h4>{{ _('How to:') }}</h4>
<p>
{{ _('Open the menu, select “<strong>Customize</strong>” and drag any button into the toolbar or menu.') }}
<a rel="external" href="https://support.mozilla.org/kb/customize-firefox-controls-buttons-and-toolbars?src=tips-arrange">
{% if l10n_has_tag('sync_device_note') or settings.DEV %}
{% if l10n_has_tag('sync_device_note') %}
{{ _('Learn more about customizing') }}
{% else %}
{{ _('Learn more') }}
Expand All @@ -179,7 +179,7 @@ <h4>{{ _('How to:') }}</h4>

<h3>{{ _('Stay in Sync') }}</h3>
<p>
{% if l10n_has_tag('sync_device_note') or settings.DEV %}
{% if l10n_has_tag('sync_device_note') %}
{{ _('Use Sync to magically access your open tabs, passwords and more wherever you use Firefox.') }}
{% else %}
{{ _('Use Sync to magically access your open tabs, passwords and more from any device.') }}
Expand All @@ -193,7 +193,7 @@ <h4>{{ _('How to:') }}</h4>
<p>
{{ _('Choose “<strong>Sign in to Sync</strong>” from the menu and make Firefox your own wherever you use it.') }}
<a rel="external" href="https://support.mozilla.org/kb/how-do-i-set-up-firefox-sync">
{% if l10n_has_tag('sync_device_note') or settings.DEV %}
{% if l10n_has_tag('sync_device_note') %}
{{ _('Learn more about Sync') }}
{% else %}
{{ _('Learn more') }}
Expand Down Expand Up @@ -223,7 +223,7 @@ <h4>{{ _('How to:') }}</h4>
<p>
{{ _('Select “<strong>Customize</strong>” from the menu and drag in the add-ons you want.') }}
<a rel="external" href="https://support.mozilla.org/kb/find-and-install-add-ons-add-features-to-firefox">
{% if l10n_has_tag('sync_device_note') or settings.DEV %}
{% if l10n_has_tag('sync_device_note') %}
{{ _('Learn more about add-ons') }}
{% else %}
{{ _('Learn more') }}
Expand Down
2 changes: 1 addition & 1 deletion bedrock/firefox/templates/firefox/desktop/trust.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h3>{{ _('Private browsing') }}</h3>

<a class="more" rel="external" href="https://support.mozilla.org/kb/private-browsing-browse-web-without-saving-info">{{ _('Learn how to open a private window') }}</a>
</li>
{% if l10n_has_tag('forget_button') or settings.DEV %}
{% if l10n_has_tag('forget_button') %}
<li id="privacy-forget" class="last">
<h3>{{ _('Forget Button') }}</h3>

Expand Down
6 changes: 3 additions & 3 deletions bedrock/firefox/templates/firefox/new.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h2><img src="{{ MEDIA_URL }}img/firefox/new/header-firefox.png?2013-06" alt="{{
<div class="row">
<img src="{{ media('img/firefox/new/firefox-logo.png?2013-06') }}" alt="Firefox" />
<h1 class="large">
{% if l10n_has_tag('fx10_independent') or settings.DEV %}
{% if l10n_has_tag('fx10_independent') %}
{{ _('Choose Independent.') }}
<br>
{{ _('Choose Firefox.') }}
Expand Down Expand Up @@ -106,7 +106,7 @@ <h1 class="large">
<ul>
<li><a href="{{ url('firefox.desktop.index') }}">{{_('Learn more about Firefox for desktop')}}</a></li>
<li><a href="https://support.mozilla.org/products/firefox">{{_('Need help?')}}</a></li>
{% if l10n_has_tag('mobile_links') or settings.DEV %}
{% if l10n_has_tag('mobile_links') %}
<li><a href="{{settings.GOOGLE_PLAY_FIREFOX_LINK }}">{{_('Get Firefox on your Android device')}}</a></li>
<li><a href="{{ url('firefox.os.index') }}">{{_('Learn about Firefox OS')}}</a></li>
{% endif %}
Expand All @@ -126,7 +126,7 @@ <h1 class="large">
</div>
<div class="ios-links-wrapper latest-links-wrapper">
<ul>
{% if l10n_has_tag('mobile_links') or settings.DEV %}
{% if l10n_has_tag('mobile_links') %}
<li>
<a href="{{ settings.GOOGLE_PLAY_FIREFOX_LINK }}">{{_('Get Firefox on your Android device')}}</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion bedrock/firefox/templates/firefox/nightly_firstrun.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h3>{{ _('Show everyone that you’re helping to build the Web the world needs.'
</div>

{% if not request.locale.startswith('en') %}
{% if l10n_has_tag('promo_locale') or settings.DEV %}
{% if l10n_has_tag('promo_locale') %}
{# The following block is entirely defined by locales, and the placeholder in en-US here will never be exposed to production #}
<div class="blue-box l10n">
{% l10n promo_locale %}
Expand Down
2 changes: 1 addition & 1 deletion bedrock/firefox/templates/firefox/privacy_tour/tour.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h2 class="tour-search-engine step-target" data-target="searchEngine-ddg">
{{ _('%s lets you <br>search anonymously')|format('DuckDuckGo') }}
</h2>
<ul>
{% if l10n_has_tag('tracking_update') or settings.DEV %}
{% if l10n_has_tag('tracking_update') %}
<li>{{ _('Get great results with no tracking') }}</li>
{% else %}
<li>{{ _('Get great results with less tracking') }}</li>
Expand Down
2 changes: 1 addition & 1 deletion bedrock/firefox/templates/firefox/sync-new.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h1>{{ _('Take your Web with you') }}</h1>

<div class="show-not-fx warning">
<p>
{% if l10n_has_tag('firefox_sync_non_fx') or settings.DEV %}
{% if l10n_has_tag('firefox_sync_non_fx') %}
{{ _('Sync is just one of the great features you’ll only get with Firefox.') }}
{% else %}
{{ _('Sync is just one of the great features you’ll only get with Firefox. Discover them all!') }}
Expand Down
4 changes: 2 additions & 2 deletions bedrock/firefox/templates/firefox/sync-old.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h2>{{ _('Get started with Sync. It’s fast, safe and easy:') }}</h2>
</header>
<section>
<ol>
{% if l10n_has_tag('sync_new_markup') or settings.DEV %}
{% if l10n_has_tag('sync_new_markup') %}
<li>{% trans url='https://support.mozilla.org/kb/learn-more-about-the-design-of-new-firefox' %}
Open the <a class="menu" href="{{ url }}#w_a-handy-new-menu">menu</a> in the top right of Firefox and select “<strong>Sign in to Sync.</strong>
{% endtrans %}</li>
Expand Down Expand Up @@ -61,7 +61,7 @@ <h2>{{ _('Have an Android phone or tablet?') }}</h2>
</header>
<section>
<p>
{% if l10n_has_tag('sync_new_markup') or settings.DEV %}
{% if l10n_has_tag('sync_new_markup') %}
{% trans url=settings.GOOGLE_PLAY_FIREFOX_LINK %}
<a href="{{ url }}">Download Firefox for Android</a> to sync between your desktop and mobile devices.
{% endtrans %}
Expand Down
2 changes: 1 addition & 1 deletion bedrock/firefox/templates/firefox/sync.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. -#}

{% if l10n_has_tag('firefox_sync_redesign') or settings.DEV %}
{% if l10n_has_tag('firefox_sync_redesign') %}
{% include 'firefox/sync-new.html' %}
{% else %}
{% include 'firefox/sync-old.html' %}
Expand Down
6 changes: 3 additions & 3 deletions bedrock/mozorg/templates/mozorg/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ <h4><a href="{{ url('mozorg.mission') }}">{{ _('The Mozilla mission') }}</a></h4
</li>
<li>
<h4><a href="https://careers.mozilla.org/">{{ _('Career center') }}</a></h4>
{% if l10n_has_tag('about_links') or settings.DEV %}
{% if l10n_has_tag('about_links') %}
<p>{{ _('Want to work at Mozilla? Apply today!') }}</p>
{% else %}
<p>{{ _('Want to work on Firefox? Apply today!') }}</p>
Expand All @@ -78,7 +78,7 @@ <h4><a href="/styleguide">{{ _('Mozilla style guide') }}</a></h4>
<h4><a href="{{ url('mozorg.contact.spaces.spaces-landing') }}">{{ _('Locations & contacts') }}</a></h4>
<p>{{ _('Addresses, emails, support and feedback forms') }}</p>
</li>
{% if l10n_has_tag('about_links') or settings.DEV %}
{% if l10n_has_tag('about_links') %}
<li>
<h4><a href="{{ url('foundation.moco') }} ">{{ _('The Mozilla Corporation') }} </a></h4>
<p>{{ _('A corporation that serves the public good. Seriously.') }}</p>
Expand Down Expand Up @@ -107,7 +107,7 @@ <h4><a href="{{ url('privacy') }}">{{ _('Privacy center') }}</a></h4>
<h4><a href="{{ php_url('/about/partnerships') }}">{{ _('Mozilla partnerships') }}</a></h4>
<p>{{ _('Details about partnering with us') }}</p>
</li>
{% if l10n_has_tag('about_links') or settings.DEV %}
{% if l10n_has_tag('about_links') %}
<li>
<h4><a href="{{ url('foundation.index') }}">{{ _('The Mozilla Foundation') }}</a></h4>
<p>{{ _('The non-profit organization behind Firefox and all Mozilla products') }}</p>
Expand Down
4 changes: 2 additions & 2 deletions bedrock/mozorg/templates/mozorg/about/manifesto.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. -#}

{% if not settings.DEV and not l10n_has_tag('manifesto_landing') %}
{% if not l10n_has_tag('manifesto_landing') %}
{#- Show the old page if the landing page is not localized yet -#}
{% include 'mozorg/about/manifesto-details.html' %}
{% else %}
Expand Down Expand Up @@ -225,7 +225,7 @@ <h4>{{ _('Learn more') }}</h4>
<ul class="resources">
<li><a href="https://groups.google.com/forum/#!forum/mozilla.governance">{{ _('Participate in our governance forum') }}</a></li>

{% if l10n_has_tag('join-us') or settings.DEV %}
{% if l10n_has_tag('join-us') %}
<li><a href="{{ url('mozorg.contribute') }}">{{ _('Join us as a volunteer') }}</a></li>
<li><a href="{{ url('mozorg.contribute.studentambassadors.landing') }}">{{ _('Join us as a student ambassador') }}</a></li>
{% else %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
{{ js('contribute-2015') }}
{% endblock %}

{% if l10n_has_tag('contribute_2015', 'mozorg/contribute') or settings.DEV %}
{% if l10n_has_tag('contribute_2015') %}
{% block site_header_nav %}{% endblock %}
{% block site_header_logo %}{% endblock %}
{% endif %}

{% block content %}
<main role="main">

{% if l10n_has_tag('contribute_2015', 'mozorg/contribute') or settings.DEV %}
{% if l10n_has_tag('contribute_2015') %}
{% block contrib_head %}
<header class="page-head">
<div class="contribute-masthead">
Expand Down Expand Up @@ -107,7 +107,7 @@ <h1 class="page-title">{% block contrib_page_title %}{% endblock %}</h1>

{% block contrib_content %}{% endblock contrib_content %}

{% if l10n_has_tag('contribute_2015', 'mozorg/contribute') or settings.DEV %}
{% if l10n_has_tag('contribute_2015') %}
{% block contrib_footer %}
<section class="section contrib-extra">
<div class="container">
Expand Down
12 changes: 6 additions & 6 deletions bedrock/mozorg/templates/mozorg/contribute/contribute-old.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h3>{{_('Helping Users')}}</h3>
<img src="{{ media('/img/contribute/logos/qmo.png') }}" alt="">
<h3>{{_('Quality Assurance')}}</h3>
<p>
{% if l10n_has_tag('contribute_mayupdates', 'mozorg/contribute') or settings.DEV %}
{% if l10n_has_tag('contribute_mayupdates') %}
{% trans %}
Quality Assurance testing is one of the easiest ways to get started with Mozilla and is a great way to get familiar with our code and tools.
{% endtrans %}
Expand Down Expand Up @@ -165,7 +165,7 @@ <h3>{{_('Web Development') }}</h3>
</p>
</li>

{% if l10n_has_tag('contribute_mayupdates', 'mozorg/contribute') or settings.DEV %}
{% if l10n_has_tag('contribute_mayupdates') %}
<li id="markeplace">
<img src="{{ media('/img/contribute/logos/marketplace.png') }}" alt="">
<h3>{{ _('Firefox Marketplace') }}</h3>
Expand All @@ -181,7 +181,7 @@ <h3>{{ _('Firefox Marketplace') }}</h3>
<img src="{{ media('/img/contribute/logos/addons.png') }}" alt="">
<h3>{{_('Add-ons') }}</h3>
<p>
{% if l10n_has_tag('contribute_mayupdates', 'mozorg/contribute') or settings.DEV %}
{% if l10n_has_tag('contribute_mayupdates') %}
{% trans addons_url='https://addons.mozilla.org/developers/docs/getting-started', addons_wiki='https://wiki.mozilla.org/Marketplace/Contributing/Addons' %}
Add-ons are what make Firefox the most extensible and customizable browser available. Get started <a href="{{ addons_url }}">building an add-on</a>, and <a href="{{ addons_wiki }}">learn more about the different ways you can contribute</a>.
{% endtrans %}
Expand Down Expand Up @@ -217,7 +217,7 @@ <h3>{{_('Documentation and Writing') }}</h3>
<img src="{{ media('/img/contribute/logos/webmaker.png') }}" alt="">
<h3>{{_('Education') }}</h3>
<p>
{% if l10n_has_tag('webmaker_update', 'mozorg/contribute') or settings.DEV %}
{% if l10n_has_tag('webmaker_update') %}
{% trans webmaker='https://webmaker.org/',
webmaker_tools='https://webmaker.org/tools/',
webmaker_resources='https://webmaker.org/resources/',
Expand All @@ -233,7 +233,7 @@ <h3>{{_('Education') }}</h3>
</p>
</li>

{% if l10n_has_tag('contribute_fellowship', 'mozorg/contribute') or settings.DEV %}
{% if l10n_has_tag('contribute_fellowship') %}
<li id="fellowship">
<img src="{{ media('/img/contribute/logos/fellowship.png') }}" alt="">
<h3>{{ _('Fellowships') }}</h3>
Expand All @@ -245,7 +245,7 @@ <h3>{{ _('Fellowships') }}</h3>
</li>
{% endif %}

{% if l10n_has_tag('hiveglobal', 'mozorg/contribute') or settings.DEV %}
{% if l10n_has_tag('hiveglobal') %}
<li id="hivenetworks">
<img src="{{ media('/img/contribute/logos/hive.png') }}" alt="">
<h3>{{ _('Hive Networks') }}</h3>
Expand Down
2 changes: 1 addition & 1 deletion bedrock/mozorg/templates/mozorg/contribute/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{% add_lang_files "mozorg/contribute" %}

{% if l10n_has_tag('contribute_2015', 'mozorg/contribute') or settings.DEV %}
{% if l10n_has_tag('contribute_2015') %}
{% include 'mozorg/contribute/contribute.html' %}
{% else %}
{% include 'mozorg/contribute/contribute-old.html' %}
Expand Down
Loading

0 comments on commit cd372f9

Please sign in to comment.