diff --git a/python/l10n/fluent_migrations/bug_1731353_commonDialog.py b/python/l10n/fluent_migrations/bug_1731353_commonDialog.py new file mode 100644 index 000000000000..74e9f17e89da --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1731353_commonDialog.py @@ -0,0 +1,30 @@ +# 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.helpers import transforms_from +from fluent.migrate.helpers import COPY + + +def migrate(ctx): + """Bug 1731353 - Migrate commonDialog strings from DTD to FTL, part {index}""" + + ctx.add_transforms( + "toolkit/toolkit/global/commonDialog.ftl", + "toolkit/toolkit/global/commonDialog.ftl", + transforms_from( + """ + +common-dialog-copy-cmd = + .label = { COPY(path1, "copyCmd.label") } + .accesskey = { COPY(path1, "copyCmd.accesskey") } +common-dialog-select-all-cmd = + .label = { COPY(path1, "selectAllCmd.label") } + .accesskey = { COPY(path1, "selectAllCmd.accesskey") } +""", + path1="toolkit/chrome/global/commonDialog.dtd", + ), + ) diff --git a/toolkit/components/prompts/content/commonDialog.xhtml b/toolkit/components/prompts/content/commonDialog.xhtml index ca35edf67b9b..f9e378adda38 100644 --- a/toolkit/components/prompts/content/commonDialog.xhtml +++ b/toolkit/components/prompts/content/commonDialog.xhtml @@ -8,7 +8,7 @@ - + diff --git a/toolkit/components/prompts/content/selectDialog.xhtml b/toolkit/components/prompts/content/selectDialog.xhtml index 3d1f0e740091..877e0e71403a 100644 --- a/toolkit/components/prompts/content/selectDialog.xhtml +++ b/toolkit/components/prompts/content/selectDialog.xhtml @@ -5,7 +5,7 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + diff --git a/toolkit/locales/en-US/chrome/global/commonDialog.dtd b/toolkit/locales/en-US/chrome/global/commonDialog.dtd index c5ceea07bfc3..daa6ac034180 100644 --- a/toolkit/locales/en-US/chrome/global/commonDialog.dtd +++ b/toolkit/locales/en-US/chrome/global/commonDialog.dtd @@ -4,7 +4,3 @@ - - - - diff --git a/toolkit/locales/en-US/toolkit/global/commonDialog.ftl b/toolkit/locales/en-US/toolkit/global/commonDialog.ftl index b76ec85a5a6d..1629a0d3330c 100644 --- a/toolkit/locales/en-US/toolkit/global/commonDialog.ftl +++ b/toolkit/locales/en-US/toolkit/global/commonDialog.ftl @@ -11,3 +11,10 @@ common-dialog-username = .value = Username common-dialog-password = .value = Password + +common-dialog-copy-cmd = + .label = Copy + .accesskey = C +common-dialog-select-all-cmd = + .label = Select All + .accesskey = A