bbepis / XUnity.AutoTranslator

MIT License
1.99k stars 293 forks source link

Has "html tag issue" been solved? #456

Open JoshuaHaminYang opened 11 months ago

JoshuaHaminYang commented 11 months ago

Hi, first of all, thank you for your effort, Bepis. Your auto translator program saves millions of people suffering from language issue for playing game.

Yet I wonder one thing: Has "html tag issue" been solved so far?

When I am saying "html tag issue", it refers to similar problems mentioned in issues #99 , #188 , #396 , #346 , and so on.

Which is: Is there a settled guideline/solution to 1) eliminate html tags before translation 2) then revive the tags so that tags like <link>, <color>... to work properly after the translation.

To be more specific, let me bring my example.

The example sentence is:

If the wearer's <color\=#6C4900><link\="Encyclopedia:Range">ranged attack <color\=#6C4900><link\="Encyclopedia:HitSequenceGlossary">hits an enemy, the wearer gains a +5% <color\=#6C4900><link\="Encyclopedia:Bonus">bonus to <color\=#6C4900><link\="Encyclopedia:CritChancesAndCritDamageGlossary">critical hit chance for the next ranged attack against the same enemy. Does not stack.=착용자가 <color\=#6C4900><link\="Encyclopedia:Range">원거리 공격 <color\=#6C4900><link\="Encyclopedia:HitSequenceGlossary">조회수 적을 공격하면 착용자는 +5%를 얻습니다. <color\=#6C4900><link\="Encyclopedia:Bonus">보너스<color\=#6C4900><link\="Encyclopedia:CritChancesAndCritDamageGlossary">치명타 확률 을 증가시켜 같은 적에 대한 다음 원거리 공격에 사용할 수 있습니다. 중첩되지 않습니다.

For those who do not know Korean language- the problem shown above is that, the translator treat each sections seperated by html tags as a single sentence, so that the original whole sentence is fragmented into pieces.

As I read issue #188 , it seemed it was impossible to 1) ignore html tags beforehand, 2) then recover the tags afterhand by back then.

Is this issue solved now?

I digged into several ways but none of them worked: 1) editing pre/proprocessor files 2) setting HandleRichText=True->False In this case, sentences are well translated but html tags are gone, so values such as color, link... do not work

Atamg1994 commented 11 months ago

install node google translate server, he also does other things, https://github.com/bbepis/XUnity.AutoTranslator/issues/396 it will do exactly what you are talking about. removes tags and then puts them back in place

JoshuaHaminYang commented 11 months ago

Thank you and appreciate for your help. I already have read your article (#396 ) and I know your work with node js

The problem is, though, I want to keep using DeepL translator, not Google, since Google performs really bad with Korean while DeepL is much better.

It would've been awesome if there had been DeepL version of your js 😢

Many people are saying DeepL does not have much problem with html tags while Google has much trouble, but that is not the case for me I guess..

Atamg1994 commented 11 months ago

DeepL Translate is paid if you have purchased the version and have DeepL API I will provide you with code that should work with this translator

JoshuaHaminYang commented 11 months ago

As far as I know, the current version of Xunity Autotranslator is not compatible for DeepL Pro, isnt it?

I subscribed DeepL Pro API but has downgraded it as free version (but it still gives api and im working with DeepLTranslateLegitimate with the key-)

Everything works well except for html issue 😭

Atamg1994 commented 11 months ago

node_GoogleTranslator_server.zip The installation is the same https://github.com/bbepis/XUnity.AutoTranslator/issues/396, only the only thing you need to do is register your API key in the file DeepLTranslator_server.js line const DeepLTranslator_apiKey = ""; // you api key

check and let me know the results because in my country I can't buy DeepL Translate that's why I can't check

JoshuaHaminYang commented 11 months ago

It is not working and I have two questions:

1) The reason it is not working could possibly because I already have installed Google version of your patch before I install DeepL version- How can I clearly delete the previous (Google) version ane reinstall DeepL version? Presumably by modifying registry?

2) Since I found DeepL free api has 0.5 million words limit for translation per month, I am thinking of use DeepLTranslate on behalf of DeepLTranslateLegitimate, which means, not using api- is your DeepL version patch still applicable then?

Atamg1994 commented 11 months ago

no, just replace the folder and that’s it. oh well, if I had this free key, then maybe I could search and try to do something, but unfortunately I can’t get it in my country

Atamg1994 commented 11 months ago

2. use DeepLTranslate on behalf of DeepLTranslateLegitimate,

can you send me your config file? Based on these lines, it seems to me that you are not using my patch but are using something else

lIllIIlI commented 11 months ago
JoshuaHaminYang commented 11 months ago

Thank you so much for your help. Here's my config file. Config.zip

Yeah I applied the solution on #431 and it works fine with the normal DeepLTranslate (but not with your hotfix yet though)

Atamg1994 commented 11 months ago

Thank you so much for your help. Here's my config file. Config.zip

Yeah I applied the solution on #431 and it works fine with the normal DeepLTranslate (but not with your hotfix yet though)

node_GoogleTranslator_server.zip Here you go, checked everything works Don't forget to register the API key the only thing you need to do is register your API key in a line in the DeepLTranslator_server.js file. const DeepLTranslator_apiKey = ""; // your API key

JoshuaHaminYang commented 11 months ago

Thank you so much for your help. Here's my config file. Config.zip Yeah I applied the solution on #431 and it works fine with the normal DeepLTranslate (but not with your hotfix yet though)

node_GoogleTranslator_server.zip Here you go, checked everything works Don't forget to register the API key the only thing you need to do is register your API key in a line in the DeepLTranslator_server.js file. const DeepLTranslator_apiKey = ""; // your API key

It is not working... but thank you for your effort I'd rather give it up 😢

Atamg1994 commented 11 months ago

Thank you so much for your help. Here's my config file. Config.zip Yeah I applied the solution on #431 and it works fine with the normal DeepLTranslate (but not with your hotfix yet though)

node_GoogleTranslator_server.zip Here you go, checked everything works Don't forget to register the API key the only thing you need to do is register your API key in a line in the DeepLTranslator_server.js file. const DeepLTranslator_apiKey = ""; // your API key

It is not working... but thank you for your effort I'd rather give it up 😢

There's only one problem here You won't be able to configure it and I'm not your help here) I specifically received the API through a friend, checked it, everything works and translated it. and the html worked fine. in general, your problems)

lIllIIlI commented 11 months ago

So none of these solutions apply to the free, non-API endpoints?

Atamg1994 commented 11 months ago

So none of these solutions apply to the free, non-API endpoints?

Google version works for free. read carefully !