bbepis / XUnity.AutoTranslator

MIT License
1.98k stars 292 forks source link

AutoTranslator translating manually translated text from another translator #215

Closed Bigstrong-ZTJ closed 3 years ago

Bigstrong-ZTJ commented 3 years ago

Hi!

I am using AutoTranslator together with another translator plugin that redirects original game scripts to prepackaged manual translations. The other translator does not cover the entire game, so I use AutoTranslator to translate whatever is left untranslated. However, the AutoTranslator still translate the entire game including translating the manual translations again. Is there a possible solution for this? Or is there a way that I can tell the AutoTranslator to avoid translating texts that are from the other translator?

I truly appreciate any help in solving this issue and thank you for making such a handy plugin that lowers the language requirements for a lot of games.

Just in case you need more specific information regarding this issue, the game that I am playing is COM3d2 by KISS, and the other translator plugin that I use is COM3D2.i18nEx, and I am translating from Japanese to Chinese (which I think maybe one of the reasons why AutoTranslator pickup manual translations).

gravydevsupreme commented 3 years ago

This problem also exists in ILLUSION titles that this plugin is used in. The problem becomes particularly noticeable when the source and target language (partially) shares the same character set.

It's solved in ILLUSION titles by this plugin also handling "resource translations" (redirected resources), which allows it to mark them as already being translated. Marking them in this sense simply means appending a special character to the translated texts so the automated part of the plugin knows it should not perform any automated translations on those texts and instead just remove whatever was appended onto the text (slightly simplified version).

Could it be solved with with i18nEx? Frankly, it probably could. All that would have to be done is for i18nEx to call string LanguageHelper.MakeRedirected( string text ) on texts it has translated and display whatever that returns to the user instead.

It would probably have to be heavily tested, though, since such a thing would require texts to be handled by both plugins every time anything is displayed.

It would also require as a minimum for i18nEx to take soft dependency on this plugin.

I'm sure @ghorsington would have an opinion on something like that, though.

I'm a bit surprised this has never been mentioned before. Perhaps the combination of XUAT, i18nEx and Chinese translation of COM3D2 basically does not exist.

Bigstrong-ZTJ commented 3 years ago

Thank you.

I guess there is no quick fix to this problem unless I make some modifications to the source code of i18nEx. Sadly, I don't have enough programming knowledge to do this, so I will try to see if @ghorsington is willing to help out. Thanks anyways.

gravydevsupreme commented 3 years ago

Seems this was solved. :)