Bug 1588142 - Move Fluent about:preferences title attribute to a title tag r=fluent-reviewers,Gijs

Differential Revision: https://phabricator.services.mozilla.com/D51713

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kirk Steuber 2019-11-12 18:00:05 +00:00
Родитель 66fd9b08ff
Коммит f28fdd0bc0
3 изменённых файлов: 27 добавлений и 9 удалений

Просмотреть файл

@ -20,9 +20,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:html="http://www.w3.org/1999/xhtml"
role="document"
data-l10n-id="pref-page"
data-l10n-attrs="title">
role="document">
<head>
<!-- @CSP: The 'oncommand' handler for 'focusSearch1' can not easily be rewritten (see Bug 371900)
@ -31,6 +29,8 @@
Additionally we should remove 'unsafe-inline' from style-src, see Bug 1579160 -->
<meta http-equiv="Content-Security-Policy" content="default-src chrome:; script-src chrome: 'sha512-X8+p/CqXeMdssOoFOf5RV+RpkvnN9pukQ20acGc7LqMgfYLW+lR0WAYT66OtSTpFHE/Qgx/ZCBs2RMc4QrA8FQ=='; img-src chrome: moz-icon: https: data:; style-src chrome: data: 'unsafe-inline'; object-src 'none'" />
<title data-l10n-id="pref-page-title"></title>
<link rel="localization" href="branding/brand.ftl"/>
<link rel="localization" href="browser/branding/brandings.ftl"/>
<link rel="localization" href="browser/branding/sync-brand.ftl"/>

Просмотреть файл

@ -9,12 +9,11 @@ do-not-track-option-default-content-blocking-known =
do-not-track-option-always =
.label = Always
pref-page =
.title =
{ PLATFORM() ->
[windows] Options
*[other] Preferences
}
pref-page-title =
{ PLATFORM() ->
[windows] Options
*[other] Preferences
}
# This is used to determine the width of the search field in about:preferences,
# in order to make the entire placeholder string visible

Просмотреть файл

@ -0,0 +1,19 @@
# coding=utf8
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
from __future__ import absolute_import
from fluent.migrate import COPY_PATTERN
from fluent.migrate.helpers import transforms_from
def migrate(ctx):
"""Bug 1588142 - about:preferences - migrate the root xul:window element to an html:html element, part {index}."""
ctx.add_transforms(
"browser/browser/preferences/preferences.ftl",
"browser/browser/preferences/preferences.ftl",
transforms_from(
"""
pref-page-title = {COPY_PATTERN(from_file, "pref-page.title")}
""", from_file="browser/browser/preferences/preferences.ftl"))