mirror of
https://github.com/YunoHost/apps.git
synced 2024-09-03 20:06:07 +02:00
feat(translate_apps): handle also updating translation description on existing files
This commit is contained in:
parent
b694ee9c38
commit
b5771aeefc
1 changed files with 3 additions and 0 deletions
|
@ -107,6 +107,9 @@ def extract_strings_to_translate_from_apps(apps, translations_repository):
|
|||
else: # if it exists, only add keys that aren't already present
|
||||
language_file = json.loads(translations_repository.read_file(translations_path / f"{language}.json"))
|
||||
|
||||
if "description" in translated_strings and "description" not in language_file:
|
||||
language_file["description"] = translated_strings["description"]
|
||||
|
||||
for key, translated_string in translated_strings.items():
|
||||
if key not in language_file:
|
||||
language_file[key] = translated_string
|
||||
|
|
Loading…
Add table
Reference in a new issue