simbleau / chat-translator

Use Google Translate API to translate chat messages between over 100 languages in this RuneLite Plugin.
BSD 2-Clause "Simplified" License
8 stars 2 forks source link

Non-Latin Alphabet Characters are displayed as "?" #10

Closed Foxo444 closed 3 years ago

Foxo444 commented 3 years ago

When translating from English to a non-Latin based alphabet (IE Cyrillic) Letters are displayed as "???" MCpSABb7MA

simbleau commented 3 years ago

Thank you for bringing this to my attention. I'm not entirely sure if it's possible to translate then... :/ I believe this uses the RuneScape font, meaning that the glyphs must exist in the RuneScape font.

Are you able to write Cyrillic in RuneScape?

Foxo444 commented 3 years ago

Thank you for bringing this to my attention. I'm not entirely sure if it's possible to translate then... :/ I believe this uses the RuneScape font, meaning that the glyphs must exist in the RuneScape font.

Are you able to write Cyrillic in RuneScape?

Not typically no. I've only seen it done in private servers, so I would assume it's something that would require work on the server backend rather than client side. Attempting to type Cyrillic characters inputs nothing at all, as if you haven't pressed any keys on your keyboard.

However, When translating languages such as Russian and Arabic via Google Translate, there is a transliterated section that is returned as well. As I'm not familiar with the usage of the Google Translate API, I don't actually know if this data is returned on a translation request. This is how it appears on the Google Translate website. chrome_q5XiE5KJBz

Assuming one understands the English pronunciation of the Latin alphabet, this would be understood by someone who is fluent in the language, and would be an acceptable workaround assuming it's possible, as this is how many Russians communicate in their native language when limited to a Latin alphabet. Another option would be to replace characters to ones that are accepted by the RuneScape Client, however this could be much more difficult to read.

Ex: Привет, как Дела? (Hello, how are you?) becomes: npuBeT, KaK 9eJIa

Overall, I realize this is a very niche issue and wouldn't have any impact on not only near 100% of the standard playerbase, but likely 99% of the playerbase that actively uses this translation tool, as there simply aren't enough speakers of Slavic languages that play RuneScape to warrant a fix.

I appreciate your time looking into the issue however :)

Thank you, Спасибо)

simbleau commented 3 years ago

Such a task just isn't feasible when there's too many languages that fall in this category and too many rules for character conversion.

For that reason, I am sorry, I'll be denying this.

However, I would accept a pull request with the logic to translate Russian characters to Latin characters before the characters are pushed onto the chat-line, at your time expense.

Foxo444 commented 3 years ago

No problem at all, completely understood given the time spent vs reward.

Hopefully Jagex remedies these issues in the future by expanding the chat character set.