Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion springfield/base/templates/base-protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{% block extra_meta %}{% endblock %}

{% block shared_meta %}
<title>{% filter striptags %}{% block page_title_full %}{% block page_title_prefix %}{% endblock %}{% block page_title %}{% endblock %}{% endblock page_title_full %}{% block page_title_suffix %} — Firefox{% endblock %}{% endfilter %}</title>
<title>{% filter striptags %}{% block page_title_full %}{% block page_title_prefix %}{% endblock %}{% block page_title %}{% endblock %}{% endblock page_title_full %}{% block page_title_suffix %} — Firefox.com{% endblock %}{% block page_title_region %}{% endblock %}{% endfilter %}</title>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this is a global base template, I'd ask around first if that is a pattern worth encouraging in the first place.

My understanding is when a customization is necessary, there's a reason, and it should be explicit at that exact page, with ideally tailored titles fully.

(Not sure if the concern is still valid after these years though. Figured a reviewer will have some guidance.)

<meta name="description" content="{% filter striptags %}{% block page_desc %}{% endblock %}{% endfilter %}">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Firefox">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
{% from "macros.html" import google_play_button, apple_app_store_button, fxa_email_form with context %}

{# Issue 13019: Avoid duplicate content for English pages. #}
{%- block page_title_region -%}
{% if LANG == 'en-US' %} (US){%- endif -%}
{% if LANG == 'en-GB' %} (UK){%- endif -%}
{%- endblock -%}

{%- block page_title -%}
{%- if LANG == 'en-US' -%}
Firefox for Desktop — Firefox (US)
{%- elif LANG == 'en-GB' -%}
Firefox for Desktop — Firefox (UK)
{%- if LANG == 'en-US' or LANG == 'en-GB' -%}
Firefox for Desktop available for Windows, Mac and Linux
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After outsourcing the region, we could go back to using the FTL files here, right? Or what was the reason they weren't used here in the first place?

{%- else -%}
{{ ftl('firefox-browsers-page-title-v2') }} - Firefox
{{ ftl('firefox-browsers-page-title-v2') }}
{%- endif -%}
{%- endblock -%}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
{% set _entrypoint = 'www.firefox.com-firefox-mobile' %}

{% block page_title %}{{ ftl('browsers-mobile-firefox-mobile-browsers-put') }}{% endblock %}

{# Issue 13019: Avoid duplicate content for English pages. #}
{%- block page_title_region -%}
{% if LANG == 'en-US' %} (US){%- endif -%}
{% if LANG == 'en-GB' %} (UK){%- endif -%}
{%- endblock -%}

{% block page_desc %}{{ ftl('browsers-mobile-overview-of-all-mobile') }}{% endblock %}

{% block body_class %}{{ super() }} mobile-overview{% endblock %}
Expand Down
13 changes: 8 additions & 5 deletions springfield/firefox/templates/firefox/browsers/mobile/ios.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@
{% endif %}
{% endblock %}

{# Issue 13019: Avoid duplicate content for English pages. #}
{%- block page_title_full -%}
{%- if LANG == 'en-US' -%}
Get Firefox for iOS (iPhone and iPad) — Mozilla (US)
{%- elif LANG == 'en-GB' -%}
Download Firefox for iOS (iPhone and iPad) — Mozilla (UK)
{%- if LANG == 'en-US' or LANG == 'en-GB' -%}
Get Firefox for iOS (iPhone and iPad) from Mozilla
Comment on lines -25 to +27
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea of disambiguating the titles across multiple English regions is mainly in changing the wording as whole, to make it more custom. The "Download" vs. "Get" for US × GB is intentional.

Which may actually mean discouraging from just slapping a region suffix through a function — the titles when in risk of duplicate content should be as distinct as possible, esp. including fine tuning the phrasing or vocabulary.

(Which, correctly, would hint at fully localizing them via Fluent +Pontoon then, and just handling the potential suffix programmatically. Thing is, the titles might have been pulled out of community l10n flows for better visibility and direct influence on the content right here in the repo by the team — to actually make sure the linked ticket is sufficiently taken into consideration, and the actual phrasing is deliberately different — which wouldn't have been obvious just from l10n point of view in Pontoon…)

That said, I'm not sure the benefit to make that more systemic is worth the global project impact, as the cases ticketed are hand-picked to be customized. (Which, outside of this PR, is being done in a handful of major pages already; the linked ticket only listed the "leftovers" that might need some more love, but there are also a few more already resolved and worded up to expectations already.)

{%- else -%}
{{ ftl('mobile-ios-firefox-browser-ios') }} - Mozilla
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here BTW the format for RoW seems to keep the old style though then. For not introducing a new l10n string just for potential "from Mozilla" here I guess?

{%- endif -%}
{%- endblock -%}

{# Issue 13019: Avoid duplicate content for English pages. #}
{%- block page_title_region -%}
{% if LANG == 'en-US' %} (US){%- endif -%}
{% if LANG == 'en-GB' %} (UK){%- endif -%}
{%- endblock -%}

{% block page_desc %}{{ ftl('mobile-ios-see-your-open-tabs') }}{% endblock %}

{% block body_class %}{{ super() }} mobile-ios{% endblock %}
Expand Down