updated -g to not replace jp translations

This commit is contained in:
argoneus 2020-05-16 13:15:58 +02:00
parent c15343b4b8
commit b541f43804

View file

@ -52,7 +52,7 @@ def translate_file(file_in, tsv_out_dir, json_out_dir, is_global):
)
languages = ["jpn"]
if is_global:
languages += ["enm", "zho", "kor"]
languages = ["enm", "zho", "kor"]
json_output_paths = {
lang: os.path.join(
json_out_dir,
@ -70,9 +70,9 @@ def translate_file(file_in, tsv_out_dir, json_out_dir, is_global):
if e.errno != errno.EEXIST:
raise
if not os.path.exists(os.path.dirname(json_output_paths["jpn"])):
if not os.path.exists(os.path.dirname(json_output_paths[languages[0]])):
try:
os.makedirs(os.path.dirname(json_output_paths["jpn"]))
os.makedirs(os.path.dirname(json_output_paths[languages[0]]))
except OSError as e:
if e.errno != errno.EEXIST:
raise