Skip to content

Commit

Permalink
deepl fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zyddnys committed Dec 11, 2021
1 parent 3709d01 commit 0e7f2fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion translators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
'CHS': 'ZH',
'CHT': 'ZH',
'JPN': "JA",
'ENG': 'EN',
'ENG': 'EN-US',
'KOR': 'NONE',
'VIN': 'NONE',
'CSY': 'CS',
Expand Down
2 changes: 1 addition & 1 deletion translators/deepl.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ def __init__(self):
self.translator = deepl.Translator(DEEPL_AUTH_KEY)

async def translate(self, from_lang, to_lang, query_text) :
return self.translator.translate_text(query_text, target_lang = to_lang)
return self.translator.translate_text(query_text, target_lang = to_lang).text.split('\n')


0 comments on commit 0e7f2fe

Please sign in to comment.