Skip to content
This repository has been archived by the owner on Aug 13, 2020. It is now read-only.

Commit

Permalink
update: patch ja text
Browse files Browse the repository at this point in the history
  • Loading branch information
atoring committed Jun 20, 2018
1 parent 6f86db2 commit caa35b0
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions frostpunk_mod/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,20 +167,28 @@ def read_csv(self, path, fix_func=_null_func, lang_idx=japanese_idx, idx_column=
return False

# check
flag = False
for idx in self.__text_list.keys():
if idx not in cl:
log("not found", idx)
# print("not found: %s" % idx)
flag = True
if flag:
return False
if True:
flag = False
for idx in self.__text_list.keys():
if idx not in cl:
log("not found", idx)
# print("not found: %s" % idx)
flag = True
if flag:
return False

# replacement
for idx in self.__text_list.keys():
str = cl[idx]
str = fix_func(str)
self.__text_list[idx].set_text(lang_idx, str)
if idx in cl:
text = self.__text_list[idx]
str = cl[idx]
if str != "":
str = fix_func(str)
text.set_text(lang_idx, str)
else:
en = text.get_text(english_idx)
if en is not None:
text.set_text(lang_idx, en)
return True

def write_csv(self, path, skip_ja=True):
Expand Down

0 comments on commit caa35b0

Please sign in to comment.