Failed to translate from Chinese to Korean
Closed this issue · 1 comments
HeavySnowJakarta commented
>>> t = tr(from_lang="zh", to_lang="kr")
>>> t.translate("你好")
Traceback (most recent call last):
File "C:\pyenv\pyenv-win\versions\3.10.5\lib\site-packages\translate\translate.py", line 45, in <genexpr>
return ' '.join(self.provider.get_translation(text_wraped) for text_wraped in text_list)
File "C:\pyenv\pyenv-win\versions\3.10.5\lib\site-packages\translate\providers\mymemory_translated.py", line 49, in get_translation
next_best_match = next(match for match in matches)
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\pyenv\pyenv-win\versions\3.10.5\lib\site-packages\translate\translate.py", line 45, in translate
return ' '.join(self.provider.get_translation(text_wraped) for text_wraped in text_list)
RuntimeError: generator raised StopIteration
>>>
HeavySnowJakarta commented
I was wrong. For Korean it should be ko
instead of kr
.