updated -g to not replace jp translations
This commit is contained in:
parent
c15343b4b8
commit
b541f43804
1 changed files with 3 additions and 3 deletions
|
|
@ -52,7 +52,7 @@ def translate_file(file_in, tsv_out_dir, json_out_dir, is_global):
|
||||||
)
|
)
|
||||||
languages = ["jpn"]
|
languages = ["jpn"]
|
||||||
if is_global:
|
if is_global:
|
||||||
languages += ["enm", "zho", "kor"]
|
languages = ["enm", "zho", "kor"]
|
||||||
json_output_paths = {
|
json_output_paths = {
|
||||||
lang: os.path.join(
|
lang: os.path.join(
|
||||||
json_out_dir,
|
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:
|
if e.errno != errno.EEXIST:
|
||||||
raise
|
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:
|
try:
|
||||||
os.makedirs(os.path.dirname(json_output_paths["jpn"]))
|
os.makedirs(os.path.dirname(json_output_paths[languages[0]]))
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
if e.errno != errno.EEXIST:
|
if e.errno != errno.EEXIST:
|
||||||
raise
|
raise
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue