Skip to content

Commit

Permalink
Bug 1588142 - Move Fluent about:preferences title attribute to a titl…
Browse files Browse the repository at this point in the history
…e tag r=fluent-reviewers,Gijs

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

--HG--
extra : moz-landing-system : lando
  • Loading branch information
Kirk Steuber committed Nov 14, 2019
1 parent 2ad7a54 commit 3beae18
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
6 changes: 3 additions & 3 deletions browser/components/preferences/in-content/preferences.xul
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"/>
Expand Down
11 changes: 5 additions & 6 deletions browser/locales/en-US/browser/preferences/preferences.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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"))

0 comments on commit 3beae18

Please sign in to comment.