sayonari / twitchTransFreeNext

MIT License
222 stars 104 forks source link

Incorrect translation of numbers and symbols #60

Open deatherz192 opened 1 year ago

deatherz192 commented 1 year ago

I'm using this bot for "En, Es, Fr, etc. -> Ru" translation. And when I send numbers or symbols, it translates them exactly the same way. Is there any way to ignore such messages? image1 And if I write some Russian text and there is a time in this message, it will translate it into English for some reason. Example: "some text in Russian 12:30" it will translate it as "some text translated into English 12:30 (ru -> )". I.e. it translates from Russian to nothing, but it outputs English. image2 And I have deepL, but for some reason it translates such messages through Google.

didotb commented 1 year ago

I'm using this bot for "En, Es, Fr, etc. -> Ru" translation. And when I send numbers or symbols, it translates them exactly the same way. Is there any way to ignore such messages?

Unfortunately, numbers cannot be ignored and will be translated. At least for now

I.e. it translates from Russian to nothing, but it outputs English.

Read the documentation carefully for config.py regarding lang_TransToHome and lang_HomeToOther. lang_TransToHome will be the Default, and lang_HomeToOther will be the translation if the message sent was in the language of lang_TransToHome

And I have deepL, but for some reason it translates such messages through Google.

DeepL Translator does have an entry for ru but it seems like you have a misconfigured config.py so make sure that file is correct.

deatherz192 commented 1 year ago

I'm using this bot for "En, Es, Fr, etc. -> Ru" translation. And when I send numbers or symbols, it translates them exactly the same way. Is there any way to ignore such messages?

Unfortunately, numbers cannot be ignored and will be translated. At least for now

I.e. it translates from Russian to nothing, but it outputs English.

Read the documentation carefully for config.py regarding lang_TransToHome and lang_HomeToOther. lang_TransToHome will be the Default, and lang_HomeToOther will be the translation if the message sent was in the language of lang_TransToHome

And I have deepL, but for some reason it translates such messages through Google.

DeepL Translator does have an entry for ru but it seems like you have a misconfigured config.py so make sure that file is correct.

deepL has Russian language and bot's working not bad at all, but numbers that just copying annoying sometimes image image

didotb commented 1 year ago

could you show your config.py file

deatherz192 commented 1 year ago

Twitch_Channel = 'ditugga'

Trans_Username = 'ditugga_bot' Trans_OAUTH = 'hidden'

Trans_TextColor = 'HotPink'

lang_TransToHome = 'ru' lang_HomeToOther = ''

Show_ByName = True Show_ByLang = True

Ignore_Lang = ["tt", "af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "ny", "zh-CN", "zh-TW", "co", "hr", "cs", "da", "nl", "eo", "et", "tl", "fi", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "iw", "hi", "hmn", "hu", "is", "ig", "id", "ga", "ja", "jw", "kn", "kk", "km", "ko", "ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ps", "fa", "pl", "pt", "ma", "ro", "ru", "sm", "gd", "sr", "st", "sn", "sd", "si", "sk", "sl", "so", "su", "sw", "sv", "tg", "ta", "te", "th", "tr", "uk", "ur", "uz", "vi", "cy", "xh", "yi", "yo", "zu"] Ignore_Users = ['Nightbot', 'ditugga_bot'] Ignore_Line = ['http', '.com', '.ru' '⣿', '░', '▓'] Delete_Words = ['ditugga']

TTS_In = False TTS_Out = False TTS_Kind = " " # You can choice "CeVIO" if you want to use CeVIO as TTS.

Translator = 'deepl'

GAS_URL = ''

GoogleTranslate_suffix = 'com'

Debug = True

didotb commented 1 year ago

I suggest you add lang_HomeToOther = 'ru' as well. this will prevent the bot from sending a translation to english even when it's empty. This is Google Translate's fault and cannot be changed on the bot's side.

Regarding the messages being sent back and annoying you, unfortunately there's no way to change that for now. But I'm looking into adding a filter for that on my own fork. Go ahead and look for other people's forks as well in-case it was done already. If it is, do tell us here as well.

deatherz192 commented 1 year ago

I suggest you add lang_HomeToOther = 'ru' as well. this will prevent the bot from sending a translation to english even when it's empty. This is Google Translate's fault and cannot be changed on the bot's side.

Regarding the messages being sent back and annoying you, unfortunately there's no way to change that for now. But I'm looking into adding a filter for that on my own fork. Go ahead and look for other people's forks as well in-case it was done already. If it is, do tell us here as well.

Okay thanks for the information, I'll give it a try. Also I took your fork and it's not bad, so good luck with that

deatherz192 commented 1 year ago

I suggest you add lang_HomeToOther = 'ru' as well. this will prevent the bot from sending a translation to english even when it's empty. This is Google Translate's fault and cannot be changed on the bot's side.

It works, thx