Bug 1507441 - Replace FTL.VariantName with FTL.Identifier in existing recipes and documentation, fix nits in recipes r=stas
authorFrancesco Lodolo (:flod) <flod@lodolo.net>
Thu, 15 Nov 2018 12:48:09 +0000
changeset 503007 cdda77f8def9461f56242266c233671ba2633714
parent 503006 d1e2bb18d628e3b5cd6ed47e4a9adf55a8cdcfd1
child 503008 6bea66b73cd229a993f408c9081272eede9d721d
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstas
bugs1507441
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1507441 - Replace FTL.VariantName with FTL.Identifier in existing recipes and documentation, fix nits in recipes r=stas Differential Revision: https://phabricator.services.mozilla.com/D12001
intl/l10n/docs/fluent_migrations.rst
python/l10n/fluent_migrations/bug_1486934_aboutAbout.py
python/l10n/fluent_migrations/bug_1486935_aboutprofiles.py
python/l10n/fluent_migrations/bug_1486937_abouturlclassifier.py
python/l10n/fluent_migrations/bug_1491676_preferences_properties.py
python/l10n/fluent_migrations/bug_1491677_extensions.py
python/l10n/fluent_migrations/bug_1501900_aboutdevtools.py
--- a/intl/l10n/docs/fluent_migrations.rst
+++ b/intl/l10n/docs/fluent_migrations.rst
@@ -482,17 +482,17 @@ category used in plural forms. For these reasons, it’s not possible to use
                                       key=FTL.NumberExpression("1"),
                                       default=False,
                                       value=COPY(
                                           "browser/chrome/browser/preferences/main.dtd",
                                           "useCurrentPage.label",
                                       )
                                   ),
                                   FTL.Variant(
-                                      key=FTL.VariantName("other"),
+                                      key=FTL.Identifier("other"),
                                       default=True,
                                       value=COPY(
                                           "browser/chrome/browser/preferences/main.dtd",
                                           "useMultiple.label",
                                       )
                                   )
                               ]
                           )
--- a/python/l10n/fluent_migrations/bug_1486934_aboutAbout.py
+++ b/python/l10n/fluent_migrations/bug_1486934_aboutAbout.py
@@ -3,17 +3,17 @@
 # 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.helpers import transforms_from
 
 def migrate(ctx):
-    """Bug 1486934 - Modify about:about to use fluent for localization, part {index}."""
+    """Bug 1486934 - Modify about:about to use Fluent for localization, part {index}."""
 
     ctx.add_transforms(
         "toolkit/toolkit/about/aboutAbout.ftl",
         "toolkit/toolkit/about/aboutAbout.ftl",
         transforms_from(
 """
 about-about-title = { COPY("toolkit/chrome/global/aboutAbout.dtd", "aboutAbout.title") }
 about-about-note = { COPY("toolkit/chrome/global/aboutAbout.dtd", "aboutAbout.note", trim:"True") }
--- a/python/l10n/fluent_migrations/bug_1486935_aboutprofiles.py
+++ b/python/l10n/fluent_migrations/bug_1486935_aboutprofiles.py
@@ -2,17 +2,17 @@ from __future__ import absolute_import
 import fluent.syntax.ast as FTL
 from fluent.migrate.helpers import transforms_from
 from fluent.migrate.helpers import VARIABLE_REFERENCE
 from fluent.migrate import REPLACE
 from fluent.migrate import COPY
 
 
 def migrate(ctx):
-    """ Bug 1486935 - Migrate about:Profiles strings to FTL, part {index}. """
+    """ Bug 1486935 - Migrate about:profiles to Fluent, part {index}. """
 
     ctx.add_transforms(
         "toolkit/toolkit/about/aboutProfiles.ftl",
         "toolkit/toolkit/about/aboutProfiles.ftl",
          transforms_from(
 """
 profiles-title = { COPY("toolkit/chrome/global/aboutProfiles.dtd", "aboutProfiles.title")}
 profiles-subtitle = { COPY("toolkit/chrome/global/aboutProfiles.dtd", "aboutProfiles.subtitle")}
@@ -100,33 +100,33 @@ profiles-delete-profile-failed-message =
                 elements=[
                     FTL.Placeable(
                         expression=FTL.SelectExpression(
                             selector=FTL.CallExpression(
                                 callee=FTL.Function("PLATFORM")
                             ),
                             variants=[
                                 FTL.Variant(
-                                    key=FTL.VariantName("macos"),
+                                    key=FTL.Identifier("macos"),
                                     default=False,
                                     value=COPY(
                                         "toolkit/chrome/global/aboutProfiles.properties",
                                         "macOpenDir"
                                     )
                                 ),
                                 FTL.Variant(
-                                    key=FTL.VariantName("windows"),
+                                    key=FTL.Identifier("windows"),
                                     default=False,
                                     value=COPY(
                                         "toolkit/chrome/global/aboutProfiles.properties",
                                         "winOpenDir2"
                                     )
                                 ),
                                 FTL.Variant(
-                                    key=FTL.VariantName("other"),
+                                    key=FTL.Identifier("other"),
                                     default=True,
                                     value=COPY(
                                         "toolkit/chrome/global/aboutProfiles.properties",
                                         "openDir"
                                     )
                                 )
                             ]
                         )
--- a/python/l10n/fluent_migrations/bug_1486937_abouturlclassifier.py
+++ b/python/l10n/fluent_migrations/bug_1486937_abouturlclassifier.py
@@ -6,17 +6,17 @@
 from __future__ import absolute_import
 import fluent.syntax.ast as FTL
 from fluent.migrate.helpers import transforms_from
 from fluent.migrate.helpers import VARIABLE_REFERENCE
 from fluent.migrate import REPLACE
 
 
 def migrate(ctx):
-    """Bug 1486937 - Use fluent for about:url-classifier"""
+    """Bug 1486937 - Migrate about:url-classifier to Fluent, part {index}."""
 
     ctx.add_transforms(
         "toolkit/toolkit/about/url-classifier.ftl",
         "toolkit/toolkit/about/url-classifier.ftl",
         transforms_from(
 """
 url-classifier-title = { COPY("toolkit/chrome/global/aboutUrlClassifier.dtd", "aboutUrlClassifier.title")}
 url-classifier-provider-title = { COPY("toolkit/chrome/global/aboutUrlClassifier.dtd", "aboutUrlClassifier.providerTitle")}
--- a/python/l10n/fluent_migrations/bug_1491676_preferences_properties.py
+++ b/python/l10n/fluent_migrations/bug_1491676_preferences_properties.py
@@ -6,31 +6,31 @@
 from __future__ import absolute_import
 import fluent.syntax.ast as FTL
 from fluent.migrate.helpers import transforms_from
 from fluent.migrate.helpers import VARIABLE_REFERENCE, TERM_REFERENCE
 from fluent.migrate import REPLACE, COPY
 
 
 def migrate(ctx):
-    """Bug 1486937 - Move strings from preferences.properties to Fluent"""
+    """Bug 1491676 - Move strings from preferences.properties to Fluent"""
 
     ctx.add_transforms(
         "toolkit/toolkit/preferences/preferences.ftl",
         "toolkit/toolkit/preferences/preferences.ftl",
         transforms_from(
             """
 password-not-set =
         .value = { COPY(from_path, "password_not_set") }
 failed-pw-change = { COPY(from_path, "failed_pw_change") }
 incorrect-pw = { COPY(from_path, "incorrect_pw") }
 pw-empty-warning = { COPY(from_path, "pw_empty_warning") }
-pw-change-ok = { COPY(from_path, "pw_change_ok") } { -pw-empty-warning }
-pw-erased-ok = { COPY(from_path, "pw_erased_ok") } { -pw-empty-warning }
-pw-not-wanted = { COPY(from_path, "pw_not_wanted") }
+pw-change-ok = { COPY(from_path, "pw_change_ok") }
+pw-erased-ok = { COPY(from_path, "pw_erased_ok") } { pw-empty-warning }
+pw-not-wanted = { COPY(from_path, "pw_not_wanted") } { pw-empty-warning }
 pw-change2empty-in-fips-mode = { COPY(from_path, "pw_change2empty_in_fips_mode") }
 pw-change-success-title = { COPY(from_path, "pw_change_success_title") }
 pw-change-failed-title = { COPY(from_path, "pw_change_failed_title") }
 pw-remove-button =
     .label = { COPY(from_path, "pw_remove_button") }
 """, from_path="toolkit/chrome/mozapps/preferences/preferences.properties"))
 
     ctx.add_transforms(
@@ -74,25 +74,25 @@ choose-download-folder-title = { COPY(fr
                             elements=[
                                 FTL.Placeable(
                                     expression=FTL.SelectExpression(
                                         selector=FTL.CallExpression(
                                             callee=FTL.Function("PLATFORM")
                                         ),
                                         variants=[
                                             FTL.Variant(
-                                                key=FTL.VariantName("windows"),
+                                                key=FTL.Identifier("windows"),
                                                 default=False,
                                                 value=COPY(
                                                     "browser/chrome/browser/preferences/preferences.properties",
                                                     "spaceAlert.over5GB.prefButtonWin.label"
                                                 )
                                             ),
                                             FTL.Variant(
-                                                key=FTL.VariantName("other"),
+                                                key=FTL.Identifier("other"),
                                                 default=True,
                                                 value=COPY(
                                                     "browser/chrome/browser/preferences/preferences.properties",
                                                     "spaceAlert.over5GB.prefButton.label"
                                                 )
                                             ),
                                         ]
                                     )
@@ -106,25 +106,25 @@ choose-download-folder-title = { COPY(fr
                             elements=[
                                 FTL.Placeable(
                                     expression=FTL.SelectExpression(
                                         selector=FTL.CallExpression(
                                             callee=FTL.Function("PLATFORM")
                                         ),
                                         variants=[
                                             FTL.Variant(
-                                                key=FTL.VariantName("windows"),
+                                                key=FTL.Identifier("windows"),
                                                 default=False,
                                                 value=COPY(
                                                     "browser/chrome/browser/preferences/preferences.properties",
                                                     "spaceAlert.over5GB.prefButtonWin.accesskey"
                                                 )
                                             ),
                                             FTL.Variant(
-                                                key=FTL.VariantName("other"),
+                                                key=FTL.Identifier("other"),
                                                 default=True,
                                                 value=COPY(
                                                     "browser/chrome/browser/preferences/preferences.properties",
                                                     "spaceAlert.over5GB.prefButton.accesskey"
                                                 )
                                             ),
                                         ]
                                     )
@@ -140,30 +140,30 @@ choose-download-folder-title = { COPY(fr
                     elements=[
                         FTL.Placeable(
                             expression=FTL.SelectExpression(
                                 selector=FTL.CallExpression(
                                     callee=FTL.Function("PLATFORM")
                                 ),
                                 variants=[
                                     FTL.Variant(
-                                        key=FTL.VariantName("windows"),
+                                        key=FTL.Identifier("windows"),
                                         default=False,
                                         value=REPLACE(
                                             "browser/chrome/browser/preferences/preferences.properties",
                                             "spaceAlert.over5GB.messageWin1",
                                             {
                                                 "%S": TERM_REFERENCE(
                                                     "-brand-short-name"
                                                 ),
                                             }
                                         )
                                     ),
                                     FTL.Variant(
-                                        key=FTL.VariantName("other"),
+                                        key=FTL.Identifier("other"),
                                         default=True,
                                         value=REPLACE(
                                             "browser/chrome/browser/preferences/preferences.properties",
                                             "spaceAlert.over5GB.message1",
                                             {
                                                 "%S": TERM_REFERENCE(
                                                     "-brand-short-name"
                                                 ),
--- a/python/l10n/fluent_migrations/bug_1491677_extensions.py
+++ b/python/l10n/fluent_migrations/bug_1491677_extensions.py
@@ -115,28 +115,28 @@ legacy-extensions =
                     elements=[
                         FTL.Placeable(
                             expression=FTL.SelectExpression(
                                 selector=FTL.CallExpression(
                                     callee=FTL.Function("PLATFORM"),
                                 ),
                                 variants=[
                                     FTL.Variant(
-                                        key=FTL.VariantName("windows"),
+                                        key=FTL.Identifier("windows"),
                                         default=False,
                                         value=REPLACE(
                                             "toolkit/chrome/mozapps/extensions/extensions.dtd",
                                             "preferencesWin.label",
                                             {
                                                 "&brandShortName;" : TERM_REFERENCE("-brand-short-name")
                                             }
                                         )
                                     ),
                                     FTL.Variant(
-                                        key=FTL.VariantName("other"),
+                                        key=FTL.Identifier("other"),
                                         default=True,
                                         value=REPLACE(
                                             "toolkit/chrome/mozapps/extensions/extensions.dtd",
                                             "preferencesUnix.label",
                                             {
                                                 "&brandShortName;" : TERM_REFERENCE("-brand-short-name")
                                             }
                                         )
@@ -156,25 +156,25 @@ legacy-extensions =
                             elements=[
                                 FTL.Placeable(
                                     expression=FTL.SelectExpression(
                                         selector=FTL.CallExpression(
                                             callee=FTL.Function("PLATFORM"),
                                         ),
                                         variants=[
                                             FTL.Variant(
-                                                key=FTL.VariantName("windows"),
+                                                key=FTL.Identifier("windows"),
                                                 default=False,
                                                 value=COPY(
                                                     "toolkit/chrome/mozapps/extensions/extensions.dtd",
                                                     "cmd.preferencesWin.label"
                                                 )
                                             ),
                                             FTL.Variant(
-                                                key=FTL.VariantName("other"),
+                                                key=FTL.Identifier("other"),
                                                 default=True,
                                                 value=COPY(
                                                     "toolkit/chrome/mozapps/extensions/extensions.dtd",
                                                     "cmd.preferencesUnix.label"
                                                 )
                                             )
                                         ]
                                     )
@@ -188,25 +188,25 @@ legacy-extensions =
                             elements=[
                                 FTL.Placeable(
                                     expression=FTL.SelectExpression(
                                         selector=FTL.CallExpression(
                                             callee=FTL.Function("PLATFORM"),
                                         ),
                                         variants=[
                                             FTL.Variant(
-                                                key=FTL.VariantName("windows"),
+                                                key=FTL.Identifier("windows"),
                                                 default=False,
                                                 value=COPY(
                                                     "toolkit/chrome/mozapps/extensions/extensions.dtd",
                                                     "cmd.preferencesWin.accesskey"
                                                 )
                                             ),
                                             FTL.Variant(
-                                                key=FTL.VariantName("other"),
+                                                key=FTL.Identifier("other"),
                                                 default=True,
                                                 value=COPY(
                                                     "toolkit/chrome/mozapps/extensions/extensions.dtd",
                                                     "cmd.preferencesUnix.accesskey"
                                                 )
                                             )
                                         ]
                                     )
@@ -266,25 +266,25 @@ legacy-extensions =
                             elements=[
                                 FTL.Placeable(
                                     expression=FTL.SelectExpression(
                                         selector=FTL.CallExpression(
                                             callee=FTL.Function("PLATFORM"),
                                         ),
                                         variants=[
                                             FTL.Variant(
-                                                key=FTL.VariantName("windows"),
+                                                key=FTL.Identifier("windows"),
                                                 default=False,
                                                 value=COPY(
                                                     "toolkit/chrome/mozapps/extensions/extensions.dtd",
                                                     "detail.showPreferencesWin.label"
                                                 )
                                             ),
                                             FTL.Variant(
-                                                key=FTL.VariantName("other"),
+                                                key=FTL.Identifier("other"),
                                                 default=True,
                                                 value=COPY(
                                                     "toolkit/chrome/mozapps/extensions/extensions.dtd",
                                                     "detail.showPreferencesUnix.label"
                                                 )
                                             )
                                         ]
                                     )
@@ -298,25 +298,25 @@ legacy-extensions =
                             elements=[
                                 FTL.Placeable(
                                     expression=FTL.SelectExpression(
                                         selector=FTL.CallExpression(
                                             callee=FTL.Function("PLATFORM"),
                                         ),
                                         variants=[
                                             FTL.Variant(
-                                                key=FTL.VariantName("windows"),
+                                                key=FTL.Identifier("windows"),
                                                 default=False,
                                                 value=COPY(
                                                     "toolkit/chrome/mozapps/extensions/extensions.dtd",
                                                     "detail.showPreferencesWin.accesskey"
                                                 )
                                             ),
                                             FTL.Variant(
-                                                key=FTL.VariantName("other"),
+                                                key=FTL.Identifier("other"),
                                                 default=True,
                                                 value=COPY(
                                                     "toolkit/chrome/mozapps/extensions/extensions.dtd",
                                                     "detail.showPreferencesUnix.accesskey"
                                                 )
                                             )
                                         ]
                                     )
@@ -330,25 +330,25 @@ legacy-extensions =
                             elements=[
                                 FTL.Placeable(
                                     expression=FTL.SelectExpression(
                                         selector=FTL.CallExpression(
                                             callee=FTL.Function("PLATFORM"),
                                         ),
                                         variants=[
                                             FTL.Variant(
-                                                key=FTL.VariantName("windows"),
+                                                key=FTL.Identifier("windows"),
                                                 default=False,
                                                 value=COPY(
                                                     "toolkit/chrome/mozapps/extensions/extensions.dtd",
                                                     "detail.showPreferencesWin.tooltip"
                                                 )
                                             ),
                                             FTL.Variant(
-                                                key=FTL.VariantName("other"),
+                                                key=FTL.Identifier("other"),
                                                 default=True,
                                                 value=COPY(
                                                     "toolkit/chrome/mozapps/extensions/extensions.dtd",
                                                     "detail.showPreferencesUnix.tooltip"
                                                 )
                                             )
                                         ]
                                     )
--- a/python/l10n/fluent_migrations/bug_1501900_aboutdevtools.py
+++ b/python/l10n/fluent_migrations/bug_1501900_aboutdevtools.py
@@ -4,17 +4,17 @@ from fluent.migrate.helpers import trans
 from fluent.migrate.helpers import VARIABLE_REFERENCE
 from fluent.migrate.helpers import TERM_REFERENCE
 from fluent.migrate.helpers import MESSAGE_REFERENCE
 from fluent.migrate import REPLACE
 from fluent.migrate import COPY
 from fluent.migrate import CONCAT
 
 def migrate(ctx):
-    """Bug 1501900 -  Migrate aboutdevtools to Fluent, part {index}"""
+    """Bug 1501900 -  Migrate about:devtools to Fluent, part {index}"""
 
     ctx.add_transforms(
         "devtools/startup/aboutDevTools.ftl",
         "devtools/startup/aboutDevTools.ftl",
         transforms_from(
 """
 head-title = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.headTitle")}
 enable-title = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.enable.title")}