Bug 1424683 - Introduce brand.ftl and migrate brand-short-name to it. r?pike
MozReview-Commit-ID: Cl0jQEkuD8q
new file mode 100644
--- /dev/null
+++ b/browser/branding/aurora/locales/en-US/brand.ftl
@@ -0,0 +1,15 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# 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/.
+
+## Firefox Brand
+##
+## Firefox must be treated as a brand, and kept in English.
+## It cannot be:
+## - Declined to adapt to grammatical case.
+## - Transliterated.
+## - Translated.
+##
+## Reference: https://www.mozilla.org/styleguide/communications/translation/
+
+-brand-short-name = Firefox Developer Edition
--- a/browser/branding/aurora/locales/jar.mn
+++ b/browser/branding/aurora/locales/jar.mn
@@ -1,12 +1,14 @@
#filter substitution
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
+[localization] @AB_CD@.jar:
+ branding (en-US/**/*.ftl)
@AB_CD@.jar:
% locale branding @AB_CD@ %locale/branding/
# Aurora branding only exists in en-US
locale/branding/brand.dtd (en-US/brand.dtd)
locale/branding/brand.properties (en-US/brand.properties)
locale/branding/browserconfig.properties
new file mode 100644
--- /dev/null
+++ b/browser/branding/nightly/locales/en-US/brand.ftl
@@ -0,0 +1,15 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# 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/.
+
+## Firefox Brand
+##
+## Firefox must be treated as a brand, and kept in English.
+## It cannot be:
+## - Declined to adapt to grammatical case.
+## - Transliterated.
+## - Translated.
+##
+## Reference: https://www.mozilla.org/styleguide/communications/translation/
+
+-brand-short-name = Nightly
--- a/browser/branding/nightly/locales/jar.mn
+++ b/browser/branding/nightly/locales/jar.mn
@@ -1,12 +1,14 @@
#filter substitution
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
+[localization] @AB_CD@.jar:
+ branding (en-US/**/*.ftl)
@AB_CD@.jar:
% locale branding @AB_CD@ %locale/branding/
# Nightly branding only exists in en-US
locale/branding/brand.dtd (en-US/brand.dtd)
locale/branding/brand.properties (en-US/brand.properties)
locale/branding/browserconfig.properties
new file mode 100644
--- /dev/null
+++ b/browser/branding/official/locales/en-US/brand.ftl
@@ -0,0 +1,15 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# 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/.
+
+## Firefox Brand
+##
+## Firefox must be treated as a brand, and kept in English.
+## It cannot be:
+## - Declined to adapt to grammatical case.
+## - Transliterated.
+## - Translated.
+##
+## Reference: https://www.mozilla.org/styleguide/communications/translation/
+
+-brand-short-name = Firefox
--- a/browser/branding/official/locales/jar.mn
+++ b/browser/branding/official/locales/jar.mn
@@ -1,11 +1,13 @@
#filter substitution
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
+[localization] @AB_CD@.jar:
+ branding (%*.ftl)
@AB_CD@.jar:
% locale branding @AB_CD@ %locale/branding/
locale/branding/brand.dtd (%brand.dtd)
locale/branding/brand.properties (%brand.properties)
locale/branding/browserconfig.properties
new file mode 100644
--- /dev/null
+++ b/browser/branding/unofficial/locales/en-US/brand.ftl
@@ -0,0 +1,15 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# 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/.
+
+## Firefox Brand
+##
+## Firefox must be treated as a brand, and kept in English.
+## It cannot be:
+## - Declined to adapt to grammatical case.
+## - Transliterated.
+## - Translated.
+##
+## Reference: https://www.mozilla.org/styleguide/communications/translation/
+
+-brand-short-name = Nightly
--- a/browser/branding/unofficial/locales/jar.mn
+++ b/browser/branding/unofficial/locales/jar.mn
@@ -1,12 +1,14 @@
#filter substitution
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
+[localization] @AB_CD@.jar:
+ branding (en-US/**/*.ftl)
@AB_CD@.jar:
% locale branding @AB_CD@ %locale/branding/
# Unofficial branding only exists in en-US
locale/branding/brand.dtd (en-US/brand.dtd)
locale/branding/brand.properties (en-US/brand.properties)
locale/branding/browserconfig.properties
new file mode 100644
--- /dev/null
+++ b/python/l10n/fluent_migrations/bug_1424683_brand_short_name.py
@@ -0,0 +1,26 @@
+# coding=utf8
+
+# Any copyright is dedicated to the Public Domain.
+# http://creativecommons.org/publicdomain/zero/1.0/
+
+from __future__ import absolute_import
+import fluent.syntax.ast as FTL
+from fluent.migrate import COPY
+
+
+def migrate(ctx):
+ """Bug 1424683 - Migrate brand-short-name to Fluent, part {index}."""
+
+ ctx.add_transforms(
+ 'browser/branding/official/brand.ftl',
+ 'browser/branding/official/locales/en-US/brand.ftl',
+ [
+ FTL.Term(
+ id=FTL.Identifier('-brand-short-name'),
+ value=COPY(
+ 'browser/branding/official/brand.dtd',
+ 'brandShortName'
+ )
+ ),
+ ]
+ )