Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在对话内存在Emoji时可以正常识别,但无法进行翻译 #672

Open
HatsuneDean opened this issue Dec 5, 2024 · 2 comments
Open

Comments

@HatsuneDean
Copy link

翻译报断言失败:
Traceback (most recent call last):
File "父路径\BallonsTranslator_dev_src_with_gitpython\ui\module_manager.py", line 467, in run
self.job()
File "父路径\BallonsTranslator_dev_src_with_gitpython\ui\module_manager.py", line 307, in
self.job = lambda : self._blktrans_pipeline(blk_list, tgt_img, mode, blk_ids)
File "父路径\BallonsTranslator_dev_src_with_gitpython\ui\module_manager.py", line 315, in _blktrans_pipeline
self.translate_thread.module.translate_textblk_lst(blk_list)
File "父路径\BallonsTranslator_dev_src_with_gitpython\modules\translators\base.py", line 198, in translate_textblk_lst
_translations = self.translate(text_list)
File "父路径\BallonsTranslator_dev_src_with_gitpython\modules\translators\base.py", line 159, in translate
assert len(text_trans) == len(text)
AssertionError
经核实是软件识别了Emoji / ASCII字符 "☆"
可以识别,但是导致翻译时出现错误
(感觉解决起来会比较麻烦,不如直接把emoji屏蔽掉或无脑加在句尾)

@HatsuneDean
Copy link
Author

另外,画面中的星星(黄色)也被识别成ASCII字符 "★"
同样导致翻译失败

@dmMaze
Copy link
Owner

dmMaze commented Dec 7, 2024

换一个能处理特殊符号的翻译器,或者在替换原文关键词里把这些符号删掉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants