lokinmodar / Echoglossian

FFXIV Dialogue text translator
60 stars 16 forks source link

ignore translation if text already contains target alphabet (chinese, russian, etc..) #71

Open kitsuniru opened 1 week ago

kitsuniru commented 1 week ago

greetings, thanks for your work!

i think described feature will be useful for people that uses custom localisation (not machinery) — xivrus, for example

At the moment we have a custom incomplete translation injected via penumbra, there's partially translated content and i want to ignore already translated content, cuz there's no meaning in translation between same languages

lokinmodar commented 1 week ago

Hello!

I currently do not see a way of supporting that in the plugin as this is a modification of the game's files.

In the plugin's logic, the translation is determined by the information regarding the language in use in the game and not the actual language of the texts being displayed. If you replace the game's files with other texts on your own, the game itself is still thinking you are using "english", "french", "deutsch" or "japanese" and that is the info my plugin will read to send to the translation engines.

There is no way i can make the plugin read the actual text line and determine which language it is written in a performant way and it is not a thing on my radar to be implemented as it is a really complex matter. Language detection is a costly process to do locally and the supported translation engines usually charge for language detection use...

The only thing i can suggest for now is to stop using the modded files for the actual texts and mod only the ingame native font to support your alphabet to be properly rendered (using Penumbra or other modding tool) and use this plugin translating the texts for you. In the future I intend to add curated translations for any language the players demand (curated by themselves and stored in a global database available to all).

kitsuniru commented 1 week ago

There is no way i can make the plugin read the actual text line

Are you sure in that? Look at this. there's a big sentence but "original part" (in dialogue box, translated via xivrus) and "translated via echoglossian part" in black overlay above is definitively same (cuz we trying to translate russian to russian), either in Google Translate or DeepL

image

lokinmodar commented 1 week ago

It can read the string from the game UI but cannot interpret what language the text is just by reading it. It reads the client original language configuration as the source language and passes it as a parameter to the translation engine. No way I canake the plugin take personal game files modifications into account because the mods installed can differ from one install from another, sadly

kitsuniru commented 1 week ago

Interpret kind of language is definitively hard job, but we talking about bunch of languages that doesn't uses latin alphabet, but already have in-game unofficial translation

I think it would be great to make an option like Skip translation if custom (non-latin) alphabet detected in UI strings

As a part of optimization, you can take just a first letter of sentence and check which alphabet it uses

lokinmodar commented 1 week ago

Interpret kind of language is definitively hard job, but we talking about bunch of languages that doesn't uses latin alphabet, but already have in-game unofficial translation

I think it would be great to make an option like Skip translation if custom (non-latin) alphabet detected in UI strings

As a part of optimization, you can take just a first letter of sentence and check which alphabet it uses

I'll leave this on hold for now. This demands ensuring ppl that use the clients in Japanese won't be affected. Also ppl are welcome to submit a pull request with this implementation if they want to contribute :)