mirror of
https://github.com/YunoHost/apps.git
synced 2024-09-03 20:06:07 +02:00
[enh] modify update_translations to handle translation separation
This commit is contained in:
parent
474d816a48
commit
8c57c44c78
1 changed files with 4 additions and 3 deletions
|
@ -3,9 +3,10 @@ import json
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
en = json.load(open("locales/en.json", "r"))
|
|
||||||
|
|
||||||
for builded_file in sys.argv[1:]:
|
for builded_file in sys.argv[1:]:
|
||||||
|
app_list = builded_file.split("-")[0]
|
||||||
|
en = json.load(open("locales-%s/en.json" % app_list, "r"))
|
||||||
|
|
||||||
builded_file = json.load(open(builded_file, "r"))
|
builded_file = json.load(open(builded_file, "r"))
|
||||||
|
|
||||||
for app, data in builded_file.items():
|
for app, data in builded_file.items():
|
||||||
|
@ -23,4 +24,4 @@ if __name__ == '__main__':
|
||||||
key = "%s_manifest_arguments_%s_help_%s" % (app, category, question["name"])
|
key = "%s_manifest_arguments_%s_help_%s" % (app, category, question["name"])
|
||||||
en[key] = question["help"]["en"]
|
en[key] = question["help"]["en"]
|
||||||
|
|
||||||
open("locales/en.json", "w").write(json.dumps(en, sort_keys=True, indent=4))
|
open("locales-%s/en.json" % app_list, "w").write(json.dumps(en, sort_keys=True, indent=4))
|
||||||
|
|
Loading…
Add table
Reference in a new issue