-
Notifications
You must be signed in to change notification settings - Fork 21
Refine page titles as suggested and introduce block page_title_region (#385)
#770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 -%} | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 %} | ||
|
|
||
There was a problem hiding this comment.
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.)