mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-06-21 02:09:09 +02:00
sync_translations.py: Handle '\n' in store descriptions
These are added by Weblate.
This commit is contained in:
parent
a123810247
commit
06fbc83c9c
@ -74,7 +74,11 @@ def sync_metadata(value_dir, strings):
|
|||||||
os.makedirs(meta_dir)
|
os.makedirs(meta_dir)
|
||||||
txt_file = os.path.join(meta_dir, fname)
|
txt_file = os.path.join(meta_dir, fname)
|
||||||
with open(txt_file, "w", encoding="utf-8") as out:
|
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")
|
out.write("\n")
|
||||||
sync_meta_file("title.txt", ("app_name_release", None))
|
sync_meta_file("title.txt", ("app_name_release", None))
|
||||||
sync_meta_file("short_description.txt", ("short_description", None))
|
sync_meta_file("short_description.txt", ("short_description", None))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user