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

[Bug]: Unable to translate from "special_langs" #797

Open
Kolyada opened this issue Dec 20, 2024 · 1 comment
Open

[Bug]: Unable to translate from "special_langs" #797

Kolyada opened this issue Dec 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Kolyada
Copy link
Contributor

Kolyada commented Dec 20, 2024

Issue

Translation in local mode always throw Translation does not contain target language characters reason for special_langs.

Config file is a example/config-example.json with only one change: translator.target_lang = "JPN"
Some for "ESP" language with deepl for example works fine.

Image is
001500

Command Line Arguments

docker run --network=host --rm -v /home/translate/images/:/app/images -v /home/translate/images-translated/:/app/images-translated -v /home/translate/fonts/:/app/fonts -v /home/translate/models/:/app/models zyddnys/manga-image-translator:main local --input=images --verbose --config-file=fonts/config-example.json


[local] Namespace(verbose=True, attempts=0, ignore_errors=False, model_dir=None, use_gpu=False, use_gpu_limited=False, font_path='', pre_dict=None, post_dict=None, kernel_size=3, mode='local', input=['images'], dest='', format=None, overwrite=False, skip_no_text=False, use_mtpe=False, save_text=False, save_text_file='', prep_manual=False, save_quality=100, config_file='fonts/config-example.json')

Console logs

[SugoiTranslator] Translating into Japanese
[SugoiTranslator] 0: MIKAN-CHAN IS REALLY GOOD AT STUDIES. => みかんちゃんは本当に勉強が得意です。
[SugoiTranslator] 1: SHE HAS WON THE GOLD PRIZE AT JJMO BEFORE. => She has won the GOLD Prize at JJMO before. (SHEは以前、ジェイモで金賞を受賞しました。
[SugoiTranslator] 2: AMA- But, ZING!! what's JJM0? => AMA- But, ZING!! JJM0とは?
[SugoiTranslator] 3: WELL, THAT'S AN OLD STORY. => まあ、それは古い話です。
[SugoiTranslator] 4: EVEN A-CHAN. (LITTLE SISTER) => EVEN A-CHAN. (LITTLE SISTER)
[SugoiTranslator] 5: SHE WON THE TOP PRIZE IN THE KOZO HAYASHI AWARD ESSAY CONTEST. RIGHT? => She won the Top Prize in The Kozo HAYASHI Award Essay Contest.
[SugoiTranslator] 6: IS SHE GOING TO PARTICIPATE IN THE ACADEMIC COMPETI- TION? => 教育競争に参加するつもりですか?
[SugoiTranslator] 7: RIGHT, AKARI IS AMAZING. => 右、あかりは素晴らしいです。
[SugoiTranslator] 8: MOST LIKELY SHE WILL. => 最も可能性が高いのはShe willです。
[SugoiTranslator] 9: I DON'T REALLY UNDERSTAND, BUT... => 私は本当に理解していない、しかし...
[SugoiTranslator] 10: WHAT AN IMPRESSIVE FAMILY LINEAGE. => 印象的な家族の系譜は何ですか。
[local] No post-translation replacements made.
[local] Filtered out: みかんちゃんは本当に勉強が得意です。
[local] Reason: Translation does not contain target language characters
[local] Filtered out: She has won the GOLD Prize at JJMO before. (SHEは以前、ジェイモで金賞を受賞しました。
[local] Reason: Translation does not contain target language characters
[local] Filtered out: AMA- But, ZING!! JJM0とは?
[local] Reason: Translation does not contain target language characters
[local] Filtered out: まあ、それは古い話です。
[local] Reason: Translation does not contain target language characters
[local] Filtered out: She won the Top Prize in The Kozo HAYASHI Award Essay Contest.
[local] Reason: Translation does not contain target language characters
[local] Filtered out: 教育競争に参加するつもりですか?
[local] Reason: Translation does not contain target language characters
[local] Filtered out: 右、あかりは素晴らしいです。
[local] Reason: Translation does not contain target language characters
[local] Filtered out: 最も可能性が高いのはShe willです。
[local] Reason: Translation does not contain target language characters
[local] Filtered out: 私は本当に理解していない、しかし...
[local] Reason: Translation does not contain target language characters
[local] Filtered out: 印象的な家族の系譜は何ですか。
[local] Reason: Translation does not contain target language characters
[local] Filtered out: EVEN A-CHAN. (LITTLE SISTER)
[local] Reason: Translation identical to original -one textine-
WARNING: [local] Text translator returned empty queries
@Kolyada Kolyada added the bug Something isn't working label Dec 20, 2024
@popcion
Copy link
Contributor

popcion commented Dec 20, 2024

You can delete 'JPN' from special_langs. This may be due to the Japanese language detection not being robust yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants