update desktop_l10n.py to support l10n target string repo in github
Categories
(Release Engineering :: Release Automation: L10N, enhancement)
Tracking
(firefox-esr115 fixed, firefox128 fixed)
People
(Reporter: bhearsum, Assigned: bhearsum)
References
(Blocks 1 open bug)
Details
Attachments
(8 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr115+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr115+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr115+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr115+
|
Details | Review |
We will be migrating away from the current l10n-central mercurial repositories, and into a single target
repository in GitHub. As part of this, we'll need to update our l10n repack scripts (desktop_l10n.py
and its dependencies) to support fetching localized strings from there instead of mercurial. It looks like this is largely isolated in locales.py.
We need to support both methods of cloning at the same time to ensure that it's possible to rollback if needed. This most likely means some additional config or command line flag that we can switch off of.
One thing to watch out for is that we need to ensure that the directory layout is the same before we pass off to the build system - otherwise that is likely to fail, or produce incorrect builds.
Assignee | ||
Comment 1•7 months ago
|
||
https://github.com/mozilla-l10n/firefox-l10n/tree/cthulhu is set up in the same way the final target
repo will be. We can use it to test against while working on this bug.
Assignee | ||
Updated•4 months ago
|
Assignee | ||
Comment 2•4 months ago
|
||
I didn't do archaeology on these, but I checked the current tree for usages of the underscored and hyphenated versions of these. There are a handful of places where they get passed around, but I was unable to find anywhere that actually sets them.
Assignee | ||
Comment 3•4 months ago
|
||
Ideally we should drop these obfuscated embedded modules, but I would prefer not to block on that for the moment. So in the meantime, here is the raw diff of the decoded version:
--- old.git.py 2024-05-27 15:06:58.352627967 -0400
+++ git.py 2024-05-27 13:58:50.365958418 -0400
@@ -1,7 +1,7 @@
"""Functions for interacting with hg"""
import os
import subprocess
-import urllib
+import urllib.parse
import re
from util.commands import run_cmd, remove_path, run_quiet_cmd
@@ -28,8 +28,8 @@
def get_repo_name(repo):
bits = urllib.parse.urlsplit(repo)
- host = urllib.quote(bits.netloc, "")
- path = urllib.quote(bits.path.lstrip("/"), "")
- host = urllib.parse.quote(bits.netloc, "")
- path = urllib.parse.quote(bits.path.lstrip("/"), "")
return os.path.join(host, path)
Assignee | ||
Comment 4•4 months ago
|
||
Assignee | ||
Comment 5•4 months ago
|
||
This turned out to be quite straightforward and boring. Aside from the plumbing required to allow the git repo in the config and make gittool.py
available, the actual changes to the code are a simple fork that clone the git repository if it's there, and fall back to the old repo (and logic) if it's not.
Because the git repository is laid out the same way as the directory we clone the current Mercurial repositories into, everything else Just Works (tm).
I did two simple tests of this on try:
Comment 7•4 months ago
|
||
Comment 9•4 months ago
|
||
bugherder |
Assignee | ||
Updated•4 months ago
|
Assignee | ||
Comment 10•3 months ago
|
||
Updated•3 months ago
|
Assignee | ||
Comment 11•3 months ago
|
||
Updated•3 months ago
|
Assignee | ||
Comment 12•3 months ago
|
||
Updated•3 months ago
|
Assignee | ||
Comment 13•3 months ago
|
||
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Comment 14•3 months ago
|
||
uplift |
Updated•3 months ago
|
Description
•