From ebdad3f7c7cec2ea3c90723366e722822ab5a17f Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Fri, 16 Jun 2023 20:59:06 +0100 Subject: [PATCH] scripts: fix langmover for non-ascii chars --- scripts/langmover/langmover.py | 4 ++-- scripts/langmover/login.json | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 scripts/langmover/login.json diff --git a/scripts/langmover/langmover.py b/scripts/langmover/langmover.py index 3e3ceef..b0fa92d 100644 --- a/scripts/langmover/langmover.py +++ b/scripts/langmover/langmover.py @@ -102,10 +102,10 @@ def generate(templ: Path, source: Path, output: Path, extract: bool, tree): if extract and val != "": with open(source / folder / lang, "w") as f: - json.dump(modifiedTree[folder], f, indent=4) + json.dump(modifiedTree[folder], f, indent=4, ensure_ascii=False) with open(output / Path(lang), "w") as f: - json.dump(out, f, indent=4) + json.dump(out, f, indent=4, ensure_ascii=False) diff --git a/scripts/langmover/login.json b/scripts/langmover/login.json new file mode 100644 index 0000000..568e8a9 --- /dev/null +++ b/scripts/langmover/login.json @@ -0,0 +1,33 @@ +{ + "meta": {}, + "strings": { + "username": "common", + "password": "common", + "emailAddress": "common", + "name": "common", + "submit": "common", + "send": "common", + "success": "common", + "continue": "common", + "error": "common", + "copy": "common", + "copied": "common", + "time24h": "common", + "time12h": "common", + "linkTelegram": "common", + "contactEmail": "common", + "contactTelegram": "common", + "linkDiscord": "common", + "linkMatrix": "common", + "contactDiscord": "common", + "theme": "common", + "refresh": "common", + "required": "common" + }, + "notifications": { + "errorLoginBlank": "admin", + "errorConnection": "admin", + "errorUnknown": "admin", + "error401Unauthorized": "admin" + } +}