Skip to content

Commit 601a315

Browse files
authored
the key just doesn't exist lol problem on 8-4's side
1 parent e1da520 commit 601a315

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

data.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ def load_textdata(self, scriptname: str) -> Dict[str, str]:
5454
matches = textdata_regex.match(line)
5555
if matches is not None:
5656
ret[matches[1]] = matches[3]
57-
else:
58-
print('Match failed for line:', line)
59-
print('Got %d lines' % len(ret))
6057
return ret
6158

6259
def load_enemies(self) -> List[str]:
@@ -113,9 +110,9 @@ def classify_junk(self, filename: Path) -> Optional[str]:
113110

114111
def get_localized_string_ch1(self, key: str) -> str:
115112
if self.lang is None:
116-
print('Initializing lang')
117113
self.lang = self.load_lang()
118-
print(len(self.lang), 'localization entries available in', self.game)
114+
if key not in self.lang: # Fail safe
115+
return key
119116
return self.lang[key]
120117

121118
def get_game_name(self) -> str:

0 commit comments

Comments
 (0)