diff --git a/scripts/update_localization.py b/scripts/update_localization.py index 28674fc98..71a96fac0 100644 --- a/scripts/update_localization.py +++ b/scripts/update_localization.py @@ -72,14 +72,21 @@ def write_languagefile(outputfilename, l10n_src, old_l10n_data): JSON_KEY_OR: x, JSON_KEY_TR: translations.get(x, ""), } - for x in set_ + for x in sorted(set_) ] result[JSON_KEY_TRANSL] = to_transl(tsl_items) result[JSON_KEY_UNTRANSL] = to_transl(new_items) result[JSON_KEY_OLDTRANSL] = to_transl(old_items) - json.dump(result, open(outputfilename, 'w'), sort_keys=True, indent=2) + json.dump( + result, + open(outputfilename, 'w'), + ensure_ascii=False, + indent="\t", + separators=(',', ': '), + sort_keys=True, + ) print(format(outputfilename, len(num_items), len(new_items), len(old_items))) @@ -96,4 +103,3 @@ if __name__ == '__main__': except Exception as e: print("Failed on {0}, re-raising for traceback".format(filename)) raise -