Skip to content

Commit

Permalink
feat(translate_apps): handle also updating translation description on…
Browse files Browse the repository at this point in the history
… existing files
  • Loading branch information
Psycojoker authored and Salamandar committed Sep 14, 2024
1 parent c7b3d90 commit e729dbd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions translate_apps/push_or_update_apps_on_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e729dbd

Please sign in to comment.