Bug 1922168 - Update fluent.migratetb to v0.13.1.2. r=aleca
Updated the fork of fluent.migrate on Github, imported here. It's essentially fluent.migrate 0.13.1 renamed to fluent.migratetb and the addition of the ability to use REPLACE in ctx.add_transforms like before. Differential Revision: https://phabricator.services.mozilla.com/D224277 --HG-- extra : amend_source : eb05cbecae08787cc4f11ec980e72ad1f239804f
This commit is contained in:
Родитель
c77d095c79
Коммит
99d489c824
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 2.1
|
||||
Name: fluent.migratetb
|
||||
Version: 0.13.0.1
|
||||
Version: 0.13.1.2
|
||||
Summary: Toolchain to migrate legacy translation to Fluent. (Thunderbird fork)
|
||||
Home-page: https://github.com/jfx2006/tb-fluent-migrate/
|
||||
Author: Mozilla
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 2.1
|
||||
Name: fluent.migratetb
|
||||
Version: 0.13.0.1
|
||||
Version: 0.13.1.2
|
||||
Summary: Toolchain to migrate legacy translation to Fluent. (Thunderbird fork)
|
||||
Home-page: https://github.com/jfx2006/tb-fluent-migrate/
|
||||
Author: Mozilla
|
||||
|
|
|
@ -26,14 +26,15 @@ def git(root: str, *args: str) -> str:
|
|||
class RepoClient:
|
||||
def __init__(self, root: str):
|
||||
self.root = root
|
||||
if isdir(join(root, "../.hg")):
|
||||
self.hgclient = hglib.open(join(root, ".."), "utf-8")
|
||||
elif isdir(join(root, ".git")):
|
||||
self.hgclient = None
|
||||
stdout = git(self.root, "rev-parse", "--is-inside-work-tree")
|
||||
if stdout != "true\n":
|
||||
raise Exception("git rev-parse failed")
|
||||
if isdir(join(root, ".hg")):
|
||||
self.hgclient = hglib.open(root, "utf-8")
|
||||
else:
|
||||
self.hgclient = None
|
||||
try:
|
||||
stdout = git(self.root, "rev-parse", "--is-inside-work-tree")
|
||||
except Exception:
|
||||
stdout = ""
|
||||
if stdout != "true\n":
|
||||
raise Exception(f"Unsupported repository: {root}")
|
||||
|
||||
def close(self):
|
||||
|
|
|
@ -30,8 +30,7 @@ class Migrator:
|
|||
):
|
||||
self.locale = locale
|
||||
self.reference_dir = reference_dir
|
||||
self.localization_repo = localization_dir
|
||||
self.localization_dir = os.path.join(localization_dir, locale)
|
||||
self.localization_dir = localization_dir
|
||||
self.dry_run = dry_run
|
||||
self._client = None
|
||||
|
||||
|
|
|
@ -464,7 +464,7 @@ class PLURALS(LegacySource):
|
|||
# variant.
|
||||
default_key = [key for key in reversed(self.DEFAULT_ORDER) if key in keys][0]
|
||||
|
||||
# Match keys to legacy forms in the order they are defined in Gecko's
|
||||
# Match keys to legacy forms in the order they are defined in Comm's
|
||||
# PluralForm.sys.mjs. Filter out empty forms.
|
||||
pairs = [(key, var) for key, var in zip(keys, forms) if var.value]
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ from itertools import zip_longest
|
|||
from fluent.migratetb import transforms
|
||||
from fluent.migratetb.errors import MigrationError
|
||||
from fluent.migratetb.helpers import transforms_from
|
||||
from fluent.syntax import ast as FTL
|
||||
from fluent.syntax.visitor import Visitor
|
||||
from compare_locales import mozpath
|
||||
|
||||
|
|
|
@ -20,7 +20,9 @@ origin:
|
|||
|
||||
# Revision to pull in
|
||||
# Must be a long or short commit SHA (long preferred)
|
||||
revision: v0.13.0.1
|
||||
revision: v0.13.1.2
|
||||
|
||||
release: v0.13.1.2 (2024-10-03T18:17:33-04:00).
|
||||
|
||||
# The package's license, where possible using the mnemonic from
|
||||
# https://spdx.org/licenses/
|
||||
|
@ -47,7 +49,7 @@ vendoring:
|
|||
# Valid values are 'gitlab', 'github', googlesource
|
||||
source-hosting: github
|
||||
tracking: tag
|
||||
release-artifact: "fluent.migratetb-{tag}.tar.gz"
|
||||
release-artifact: "fluent_migratetb-{tag}.tar.gz"
|
||||
|
||||
skip-vendoring-steps:
|
||||
- hg-add
|
||||
|
|
|
@ -4,7 +4,7 @@ from setuptools import setup
|
|||
|
||||
setup(
|
||||
name="fluent.migratetb",
|
||||
version="0.13.0.1",
|
||||
version="0.13.1.2",
|
||||
description="Toolchain to migrate legacy translation to Fluent. (Thunderbird fork)",
|
||||
author="Mozilla",
|
||||
author_email="tb-builds@thunderbird.net",
|
||||
|
|
Загрузка…
Ссылка в новой задаче