Skip to content

Commit

Permalink
Merge branch 'zyddnys:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
My12123 authored Nov 29, 2023
2 parents 2564903 + 5e2c7aa commit 1c2d724
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manga_translator/manga_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ async def _translate_file(self, path: str, dest: str, ctx: Context):
img_path = os.path.join(os.path.dirname(dest), img_filename)
img.save(img_path, quality=ctx.save_quality)
if ctx.text_regions:
self._save_text_to_file(dest, ctx)
self._save_text_to_file(path, ctx)
return True
return False

Expand Down Expand Up @@ -628,7 +628,7 @@ def identify_colors(fg_rgb: List[int]):

text_output_file = ctx.text_output_file
if not text_output_file:
text_output_file = os.path.join(os.path.dirname(image_path), '_translations.txt')
text_output_file = os.path.splitext(image_path)[0] + '_translations.txt'

with open(text_output_file, 'a', encoding='utf-8') as f:
f.write(s)
Expand Down

0 comments on commit 1c2d724

Please sign in to comment.