diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /python/l10n/fluent_migrations/bug_1881582_autocomplete_merge.py | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'python/l10n/fluent_migrations/bug_1881582_autocomplete_merge.py')
-rw-r--r-- | python/l10n/fluent_migrations/bug_1881582_autocomplete_merge.py | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/python/l10n/fluent_migrations/bug_1881582_autocomplete_merge.py b/python/l10n/fluent_migrations/bug_1881582_autocomplete_merge.py new file mode 100644 index 0000000000..3a013cf82b --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1881582_autocomplete_merge.py @@ -0,0 +1,63 @@ +# 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 1881582 - Merge form autofill autocomplete items into normal autocomplete UI part {index}.""" + + propertiesSource = "browser/extensions/formautofill/formautofill.properties" + target = "toolkit/toolkit/formautofill/formAutofill.ftl" + ctx.add_transforms( + target, + target, + [ + FTL.Message( + id=FTL.Identifier("autofill-clear-form-label"), + value=COPY(propertiesSource, "clearFormBtnLabel2"), + ), + FTL.Message( + id=FTL.Identifier("autofill-category-address"), + value=COPY(propertiesSource, "category.address"), + ), + FTL.Message( + id=FTL.Identifier("autofill-category-name"), + value=COPY(propertiesSource, "category.name"), + ), + FTL.Message( + id=FTL.Identifier("autofill-category-organization"), + value=COPY(propertiesSource, "category.organization2"), + ), + FTL.Message( + id=FTL.Identifier("autofill-category-tel"), + value=COPY(propertiesSource, "category.tel"), + ), + FTL.Message( + id=FTL.Identifier("autofill-category-email"), + value=COPY(propertiesSource, "category.email"), + ), + FTL.Message( + id=FTL.Identifier("autofill-phishing-warningmessage-extracategory"), + value=REPLACE( + propertiesSource, + "phishingWarningMessage", + { + "%1$S": VARIABLE_REFERENCE("categories"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("autofill-phishing-warningmessage"), + value=REPLACE( + propertiesSource, + "phishingWarningMessage2", + { + "%1$S": VARIABLE_REFERENCE("categories"), + }, + ), + ), + ], + ) |