From 2aa308dd19fb36d41580821903fd4c3a1c711bc9 Mon Sep 17 00:00:00 2001 From: Rob Lemley Date: Wed, 31 Jul 2024 18:23:13 +0000 Subject: [PATCH] Bug 1905803 - Use Github thunderbird-l10n for strings. r=dandarnell Differential Revision: https://phabricator.services.mozilla.com/D215459 --HG-- extra : moz-landing-system : lando --- python/l10n/l10n_clone/l10n_clone.py | 9 ++++----- python/l10n/tbxchannel/l10n_merge.py | 1 + taskcluster/comm_taskgraph/actions.py | 2 +- taskcluster/kinds/merge-automation/kind.yml | 3 ++- .../configs/single_locale/thunderbird_split_l10n.py | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/python/l10n/l10n_clone/l10n_clone.py b/python/l10n/l10n_clone/l10n_clone.py index ad84da5a71..31ca0ccb76 100644 --- a/python/l10n/l10n_clone/l10n_clone.py +++ b/python/l10n/l10n_clone/l10n_clone.py @@ -19,7 +19,6 @@ from mozpack.copier import FileCopier from mozpack.files import FileFinder from mozversioncontrol import get_tool_path from mozversioncontrol.repoupdate import update_git_repo as clone_git_repo -from mozversioncontrol.repoupdate import update_mercurial_repo COMM_PATH = (Path(__file__).parent / "../../..").resolve() GECKO_PATH = COMM_PATH.parent @@ -27,10 +26,10 @@ COMM_PYTHON_L10N = os.path.join(COMM_PATH, "python/l10n") sys.path.insert(1, COMM_PYTHON_L10N) from tbxchannel.l10n_merge import ( - COMM_L10N, COMM_STRINGS_PATTERNS, FIREFOX_L10N, GECKO_STRINGS_PATTERNS, + THUNDERBIRD_L10N, ) ALL_LOCALES = [l.rstrip() for l in (COMM_PATH / "mail/locales/all-locales").open().readlines()] @@ -74,9 +73,9 @@ def get_strings_repos(locale, destination): central_revision = get_revision("browser", locale) update_git_repo(FIREFOX_L10N, firefox_l10n_path, revision=central_revision) - comm_l10n = Path(tmproot) / "comm-l10n" + thunderbird_l10n_path = Path(tmproot) / "thunderbird-l10n" comm_revision = get_revision("mail", locale) - update_mercurial_repo(COMM_L10N, comm_l10n, revision=comm_revision) + update_git_repo(THUNDERBIRD_L10N, thunderbird_l10n_path, revision=comm_revision) file_copier = FileCopier() @@ -87,7 +86,7 @@ def get_strings_repos(locale, destination): file_copier.add(_filepath, _fileobj) add_to_registry(firefox_l10n_path, GECKO_STRINGS_PATTERNS) - add_to_registry(comm_l10n, COMM_STRINGS_PATTERNS) + add_to_registry(thunderbird_l10n_path, COMM_STRINGS_PATTERNS) file_copier.copy(str(destination)) diff --git a/python/l10n/tbxchannel/l10n_merge.py b/python/l10n/tbxchannel/l10n_merge.py index 7c27360e91..3e6b84cdec 100644 --- a/python/l10n/tbxchannel/l10n_merge.py +++ b/python/l10n/tbxchannel/l10n_merge.py @@ -3,6 +3,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. FIREFOX_L10N = "https://github.com/mozilla-l10n/firefox-l10n" +THUNDERBIRD_L10N = "https://github.com/thunderbird/thunderbird-l10n" COMM_L10N = "https://hg.mozilla.org/projects/comm-l10n" COMM_L10N_PUSH = f"ssh{COMM_L10N[5:]}" COMM_STRINGS_QUARANTINE = "https://hg.mozilla.org/projects/comm-strings-quarantine" diff --git a/taskcluster/comm_taskgraph/actions.py b/taskcluster/comm_taskgraph/actions.py index a5649f1a94..e290d78398 100644 --- a/taskcluster/comm_taskgraph/actions.py +++ b/taskcluster/comm_taskgraph/actions.py @@ -31,7 +31,7 @@ def l10n_bump_action(parameters, graph_config, _input, task_group_id, task_id): """ Runs the 'l10n_bump' task. """ - decision_task_id, full_task_graph, label_to_taskid = fetch_graph_and_labels( + decision_task_id, full_task_graph, label_to_taskid, label_to_taskids = fetch_graph_and_labels( parameters, graph_config ) to_run = [label for label, entry in full_task_graph.tasks.items() if "l10n-bump" in entry.kind] diff --git a/taskcluster/kinds/merge-automation/kind.yml b/taskcluster/kinds/merge-automation/kind.yml index 6f37ab3a91..0cb3a1dcd5 100644 --- a/taskcluster/kinds/merge-automation/kind.yml +++ b/taskcluster/kinds/merge-automation/kind.yml @@ -35,7 +35,8 @@ tasks: - name: Thunderbird l10n changesets path: mail/locales/l10n-changesets.json version-path: mail/config/version.txt - l10n-repo-url: "https://hg.mozilla.org/projects/comm-l10n/json-pushes?version=2&tipsonly=1" + l10n-repo-url: "https://github.com/thunderbird/thunderbird-l10n" + l10n-repo-target-branch: main ignore-config: ja: - macosx64 diff --git a/testing/mozharness/configs/single_locale/thunderbird_split_l10n.py b/testing/mozharness/configs/single_locale/thunderbird_split_l10n.py index 46559f2355..c9cabbe44e 100644 --- a/testing/mozharness/configs/single_locale/thunderbird_split_l10n.py +++ b/testing/mozharness/configs/single_locale/thunderbird_split_l10n.py @@ -13,7 +13,7 @@ config = { # URL of comm-l10n monorepo "hg_comm_l10n_repo": "https://hg.mozilla.org/projects/comm-l10n", # If set, takes precedence over `hg_comm_l10n_repo` - "comm_git_repository": "", + "comm_git_repository": "https://github.com/thunderbird/thunderbird-l10n", "locales_dir": "comm/mail/locales", "ignore_locales": ["en-US"], "bootstrap_env": {