diff --git a/core/translations/cli.py b/core/translations/cli.py index 7da7a3dbde..f59c038259 100755 --- a/core/translations/cli.py +++ b/core/translations/cli.py @@ -124,11 +124,11 @@ class TranslationsDir: def _lang_path(self, lang: str) -> Path: return self.path / f"{lang}.json" - def load_lang(self, lang: str) -> translations.JsonDef: + def load_lang(self, lang: str, model_groups: bool = True) -> translations.JsonDef: json_def = json.loads(self._lang_path(lang).read_text()) # special-case for T2B1 and T3B1, so that we keep the info in one place instead # of duplicating it in two entries, risking a desync - if (fonts_safe3 := json_def.get("fonts", {}).get("##Safe3")) is not None: + if model_groups and (fonts_safe3 := json_def.get("fonts", {}).get("##Safe3")) is not None: json_def["fonts"]["T2B1"] = fonts_safe3 json_def["fonts"]["T3B1"] = fonts_safe3 return json_def @@ -150,7 +150,7 @@ class TranslationsDir: def update_version_from_h(self, check: bool = False) -> VersionTuple: version = _version_from_version_h() for lang in self.all_languages(): - blob_json = self.load_lang(lang) + blob_json = self.load_lang(lang, model_groups=False) blob_version = translations.version_from_json( blob_json["header"]["version"] )