Skip to content

Commit

Permalink
Fix for translation feature in py3
Browse files Browse the repository at this point in the history
- Add pathlike state for TL input files
- fix confused TL filename
  • Loading branch information
madeddy authored and CensoredUsername committed Mar 11, 2024
1 parent 85090ef commit e21b973
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion unrpyc.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ def main():
'-t',
'--translation-file',
dest='translation_file',
type=Path,
action='store',
default=None,
help="Use the specified file to translate during decompilation")
Expand All @@ -287,6 +288,7 @@ def main():
'-T',
'--write-translation-file',
dest='write_translation_file',
type=Path,
action='store',
default=None,
help="Store translations in the specified file instead of decompiling")
Expand Down Expand Up @@ -411,7 +413,7 @@ def traverse(inpath):
good += 1
translated_dialogue.update(pickle_loads(result[0]))
translated_strings.update(result[1])
with args.translation_file.open('wb') as out_file:
with args.write_translation_file.open('wb') as out_file:
pickle_safe_dump((args.language, translated_dialogue, translated_strings), out_file)

else:
Expand Down

0 comments on commit e21b973

Please sign in to comment.