From d7ba814d35f949dcb3c3d2bd79580c6fa6f46d41 Mon Sep 17 00:00:00 2001 From: dkanada Date: Sun, 17 May 2020 22:41:23 +0900 Subject: [PATCH] update translation utilities --- scripts/scdup.py | 11 +++++++++++ scripts/scgen.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/scdup.py b/scripts/scdup.py index 468e31f14..9b9ddf646 100644 --- a/scripts/scdup.py +++ b/scripts/scdup.py @@ -15,6 +15,8 @@ print(langlst) input('press enter to continue') keysus = [] +missing = [] + with open(langdir + '/' + 'en-us.json') as en: langus = json.load(en) for key in langus: @@ -32,10 +34,19 @@ for lang in langlst: for key in langjson: if key in keysus: langjnew[key] = langjson[key] + elif key not in missing: + missing.append(key) f.seek(0) f.write(json.dumps(langjnew, indent=inde, sort_keys=False, ensure_ascii=False)) f.write('\n') f.truncate() f.close() +print(missing) +print('LENGTH: ' + str(len(missing))) +with open('missing.txt', 'w') as out: + for item in missing: + out.write(item + '\n') + out.close() + print('DONE') diff --git a/scripts/scgen.py b/scripts/scgen.py index 0d831426e..12af27320 100644 --- a/scripts/scgen.py +++ b/scripts/scgen.py @@ -34,7 +34,7 @@ for lang in langlst: print(dep) print('LENGTH: ' + str(len(dep))) -with open('scout.txt', 'w') as out: +with open('unused.txt', 'w') as out: for item in dep: out.write(item + '\n') out.close()