manga-translator / utils /translate_manga.py
DenisT's picture
refactor based on changes on the github project
efddbeb
raw
history blame contribute delete
391 Bytes
"""
This module is used to translate manga from Japanese to English.
"""
from deep_translator import GoogleTranslator
def translate_manga(text: str) -> str:
"""
Translate manga from Japanese to English.
"""
translated_text = GoogleTranslator(source="ja", target="en").translate(text)
print("Original text:", text)
print("Translated text:", translated_text)
return translated_text