diff options
| author | Jules Aguillon | 2025-03-08 12:08:57 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2025-03-08 12:08:57 +0100 |
| commit | 06fbc83c9cd31e757b8af7cb6f18ae5227ce21f1 (patch) | |
| tree | fd137de1696c43d8842b8c707c825e2bdfa1283b | |
| parent | a123810247d867a44e4be066d1d88f71b71fdc3f (diff) | |
| download | unexpected-keyboard-06fbc83c9cd31e757b8af7cb6f18ae5227ce21f1.tar.gz unexpected-keyboard-06fbc83c9cd31e757b8af7cb6f18ae5227ce21f1.zip | |
sync_translations.py: Handle '\n' in store descriptions
These are added by Weblate.
| -rw-r--r-- | sync_translations.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sync_translations.py b/sync_translations.py index cc717aa..6703f66 100644 --- a/sync_translations.py +++ b/sync_translations.py @@ -74,7 +74,11 @@ def sync_metadata(value_dir, strings): os.makedirs(meta_dir) txt_file = os.path.join(meta_dir, fname) with open(txt_file, "w", encoding="utf-8") as out: - out.write(string.text.removeprefix('"').removesuffix('"')) + out.write(string.text + .replace("\\n", "\n") + .replace("\\'", "'") + .removeprefix('"') + .removesuffix('"')) out.write("\n") sync_meta_file("title.txt", ("app_name_release", None)) sync_meta_file("short_description.txt", ("short_description", None)) |
