diff options
author | Brad Linden <brad@lindenlab.com> | 2024-06-10 16:22:12 -0700 |
---|---|---|
committer | Brad Linden <brad@lindenlab.com> | 2024-06-10 16:22:12 -0700 |
commit | 7c42711ca3a4e67b95473aa5129dce5ff19bea15 (patch) | |
tree | 593c0bedf07bffc79ec4640b157839edf61260f5 /scripts/code_tools/modified_strings.py | |
parent | e0e6e7fd747121442370fc811c84aa34ed612f64 (diff) | |
parent | 9f6b8484dfb7dfa981d8a8ac3693d3f68e32bc12 (diff) |
Merge remote-tracking branch 'origin/DRTVWR-600-maint-A' into project/gltf_development
Diffstat (limited to 'scripts/code_tools/modified_strings.py')
-rw-r--r-- | scripts/code_tools/modified_strings.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/code_tools/modified_strings.py b/scripts/code_tools/modified_strings.py index 20ed1b0555..c777fc8c0d 100644 --- a/scripts/code_tools/modified_strings.py +++ b/scripts/code_tools/modified_strings.py @@ -49,7 +49,7 @@ into google sheets. If the --rev revision already contains a translation for the text, it will be included in the spreadsheet for reference. - + Normally you would want --rev_base to be the last revision to have translations added, and --rev to be the tip of the current project. You can find the last commit with translation work using "git log --grep INTL- | head" @@ -242,7 +242,7 @@ def find_deletions(mod_tree, base_tree, lang, args, f): mod_filename = transl_filename.replace("/xui/{}/".format(lang), "/xui/{}/".format(args.base_lang)) #print("checking",transl_filename,"against",mod_filename) try: - mod_blob = mod_tree[mod_filename] + mod_blob = mod_tree[mod_filename] except: print(" delete file", transl_filename, file=f) continue @@ -257,7 +257,7 @@ def find_deletions(mod_tree, base_tree, lang, args, f): if not elt_key in mod_dict: if lines == 0: print(" in file", transl_filename, file=f) - lines += 1 + lines += 1 print(" delete element", elt_key, file=f) else: transl_elt = transl_dict[elt_key] @@ -266,14 +266,14 @@ def find_deletions(mod_tree, base_tree, lang, args, f): if not a in mod_elt.attrib: if lines == 0: print(" in file", transl_filename, file=f) - lines += 1 + lines += 1 print(" delete attribute", a, "from", elt_key, file=f) if transl_elt.text and (not mod_elt.text): if lines == 0: print(" in file", transl_filename, file=f) - lines += 1 + lines += 1 print(" delete text from", elt_key, file=f) - + def save_translation_file(per_lang_data, aux_data, outfile): langs = sorted(per_lang_data.keys()) @@ -310,12 +310,12 @@ def save_translation_file(per_lang_data, aux_data, outfile): # Reference info, not for translation for aux, data in list(aux_data.items()): - df = pd.DataFrame(data, columns = ["Key", "Value"]) + df = pd.DataFrame(data, columns = ["Key", "Value"]) df.to_excel(writer, index=False, sheet_name=aux) worksheet = writer.sheets[aux] worksheet.set_column('A:A', 50, bold_wrap_format) worksheet.set_column('B:B', 80, wrap_format) - + print("Writing", outfile) writer.save() |