summaryrefslogtreecommitdiffstats
path: root/python/l10n/fluent_migrations/bug_1791178_nsContextMenu_saveHelper.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/l10n/fluent_migrations/bug_1791178_nsContextMenu_saveHelper.py')
-rw-r--r--python/l10n/fluent_migrations/bug_1791178_nsContextMenu_saveHelper.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/python/l10n/fluent_migrations/bug_1791178_nsContextMenu_saveHelper.py b/python/l10n/fluent_migrations/bug_1791178_nsContextMenu_saveHelper.py
new file mode 100644
index 0000000000..d12533be9a
--- /dev/null
+++ b/python/l10n/fluent_migrations/bug_1791178_nsContextMenu_saveHelper.py
@@ -0,0 +1,39 @@
+# Any copyright is dedicated to the Public Domain.
+# http://creativecommons.org/publicdomain/zero/1.0/
+
+import fluent.syntax.ast as FTL
+from fluent.migrate.helpers import VARIABLE_REFERENCE
+from fluent.migrate.transforms import COPY, REPLACE
+
+
+def migrate(ctx):
+ """Bug 1791178 - Convert nsContextMenu saveHelper() localization to Fluent, part {index}."""
+
+ source = "toolkit/chrome/mozapps/downloads/downloads.properties"
+ target = "browser/browser/downloads.ftl"
+ ctx.add_transforms(
+ target,
+ target,
+ [
+ FTL.Message(
+ id=FTL.Identifier("downloads-error-alert-title"),
+ value=COPY(source, "downloadErrorAlertTitle"),
+ ),
+ FTL.Message(
+ id=FTL.Identifier("downloads-error-blocked-by"),
+ value=REPLACE(
+ source,
+ "downloadErrorBlockedBy",
+ {"%1$S": VARIABLE_REFERENCE("extension")},
+ ),
+ ),
+ FTL.Message(
+ id=FTL.Identifier("downloads-error-extension"),
+ value=COPY(source, "downloadErrorExtension"),
+ ),
+ FTL.Message(
+ id=FTL.Identifier("downloads-error-generic"),
+ value=COPY(source, "downloadErrorGeneric"),
+ ),
+ ],
+ )