Bug 1821779 - Move migrationWizard.ftl out from locales-preview into the locales folder. r=flod,fluent-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D174482
This commit is contained in:
Mike Conley 2023-04-03 17:25:18 +00:00
parent afd9c3eee4
commit a46819cdb9
6 changed files with 43 additions and 6 deletions

View File

@ -11,7 +11,7 @@ const lazy = {};
XPCOMUtils.defineLazyGetter(lazy, "gFluentStrings", function() {
return new Localization([
"branding/brand.ftl",
"locales-preview/migrationWizard.ftl",
"browser/migrationWizard.ftl",
]);
});

View File

@ -193,9 +193,7 @@ export class MigrationWizard extends HTMLElement {
if (window.MozXULElement) {
window.MozXULElement.insertFTLIfNeeded("branding/brand.ftl");
window.MozXULElement.insertFTLIfNeeded(
"locales-preview/migrationWizard.ftl"
);
window.MozXULElement.insertFTLIfNeeded("browser/migrationWizard.ftl");
}
document.l10n.connectRoot(shadow);

View File

@ -36,7 +36,7 @@ migration-wizard-migrator-display-name-chromium-360se = 360 Secure Browser
migration-wizard-migrator-display-name-chromium-edge = Microsoft Edge
migration-wizard-migrator-display-name-chromium-edge-beta = Microsoft Edge Beta
migration-wizard-migrator-display-name-edge-legacy = Microsoft Edge Legacy
migration-wizard-migrator-display-name-firefox = { -brand-product-name }
migration-wizard-migrator-display-name-firefox = Firefox
migration-wizard-migrator-display-name-ie = Microsoft Internet Explorer
migration-wizard-migrator-display-name-opera = Opera
migration-wizard-migrator-display-name-opera-gx = Opera GX

View File

@ -13,7 +13,6 @@
preview/interventions.ftl (../components/urlbar/content/interventions.ftl)
preview/firefoxSuggest.ftl (../components/urlbar/content/firefoxSuggest.ftl)
preview/identityCredentialNotification.ftl (../components/credentialmanager/identityCredentialNotification.ftl)
locales-preview/migrationWizard.ftl (../locales-preview/migrationWizard.ftl)
locales-preview/translations.ftl (../locales-preview/translations.ftl)
browser (%browser/**/*.ftl)

View File

@ -0,0 +1,38 @@
# 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
def migrate(ctx):
"""Bug 1821779 - Move existing browser names to migrationWizard.ftl, part {index}."""
ctx.add_transforms(
"browser/browser/migrationWizard.ftl",
"browser/browser/migrationWizard.ftl",
transforms_from(
"""
migration-wizard-migrator-display-name-brave = {COPY_PATTERN(from_path, "import-from-brave.label")}
migration-wizard-migrator-display-name-canary = {COPY_PATTERN(from_path, "import-from-canary.label")}
migration-wizard-migrator-display-name-chrome = {COPY_PATTERN(from_path, "import-from-chrome.label")}
migration-wizard-migrator-display-name-chrome-beta = {COPY_PATTERN(from_path, "import-from-chrome-beta.label")}
migration-wizard-migrator-display-name-chrome-dev = {COPY_PATTERN(from_path, "import-from-chrome-dev.label")}
migration-wizard-migrator-display-name-chromium = {COPY_PATTERN(from_path, "import-from-chromium.label")}
migration-wizard-migrator-display-name-chromium-360se = {COPY_PATTERN(from_path, "import-from-360se.label")}
migration-wizard-migrator-display-name-chromium-edge = {COPY_PATTERN(from_path, "import-from-edge.label")}
migration-wizard-migrator-display-name-chromium-edge-beta = {COPY_PATTERN(from_path, "import-from-edge-beta.label")}
migration-wizard-migrator-display-name-edge-legacy = {COPY_PATTERN(from_path, "import-from-edge-legacy.label")}
migration-wizard-migrator-display-name-firefox = {COPY_PATTERN(from_path, "import-from-firefox.label")}
migration-wizard-migrator-display-name-ie = {COPY_PATTERN(from_path, "import-from-ie.label")}
migration-wizard-migrator-display-name-opera = {COPY_PATTERN(from_path, "import-from-opera.label")}
migration-wizard-migrator-display-name-opera-gx = {COPY_PATTERN(from_path, "import-from-opera-gx.label")}
migration-wizard-migrator-display-name-safari = {COPY_PATTERN(from_path, "import-from-safari.label")}
migration-wizard-migrator-display-name-vivaldi = {COPY_PATTERN(from_path, "import-from-vivaldi.label")}
""",
from_path="browser/browser/migration.ftl",
),
)

View File

@ -150,6 +150,8 @@ CO01:
- identity-description-custom-root
# browser/locales/en-US/browser/migration.ftl
- import-from-firefox
# browser/locales/en-US/browser/migrationWizard.ftl
- migration-wizard-migrator-display-name-firefox
# browser/locales/en-US/browser/newtab/onboarding.ftl
- mr1-onboarding-welcome-image-caption
- mr2022-onboarding-gratitude-subtitle