Improve error messages from translation script (#102098)

Co-authored-by: Robert Resch <robert@resch.dev>
This commit is contained in:
Erik Montnemery
2023-10-22 23:45:27 +02:00
committed by GitHub
parent bc45de627a
commit 164872e1af
8 changed files with 59 additions and 24 deletions

View File

@@ -4,7 +4,7 @@ import json
from .const import FRONTEND_DIR
from .download import DOWNLOAD_DIR, run_download_docker
from .util import get_base_arg_parser
from .util import get_base_arg_parser, load_json_from_path
FRONTEND_BACKEND_TRANSLATIONS = FRONTEND_DIR / "translations/backend"
@@ -29,7 +29,7 @@ def run():
run_download_docker()
for lang_file in DOWNLOAD_DIR.glob("*.json"):
translations = json.loads(lang_file.read_text())
translations = load_json_from_path(lang_file)
to_write_translations = {"component": {}}