Artikash / Textractor

Extracts text from video games and visual novels. Highly extensible.
GNU General Public License v3.0
2k stars 201 forks source link

Error while translating (code=12175)" since Deepl tries to translate JP as English>JP every single time and adds the error code to it as well #1266

Open VNgamesacc opened 3 months ago

VNgamesacc commented 3 months ago

My settings are all set up correctly, to English, from Japanese, but for some reason each time it sends the request to Deepl, it is autodetected as English. Every single line sent to Deepl, whether Google Translate is in the extensions list or not, is " followed by Error while translating (code=12175)".

So for some reason, Textractor sends the JP text+"Error while translating (code=12)" to Deepl, and even if I switch the language to JP in Chrome, on the next line it automatically translates it as English->JP again. If I manually press detect language or swap them, it works, but I don't want to do it manually for every single line. And on the very first time it selects ENG->GER, so I have to switch them, and then it keeps doing ENG->JP, no matter how many times I change it (in both Deepl boxes it's set as JP->ENG).

I was able to get it working the first time, when I had Google Translate in the extensions by default and added Deepl into the list and moved it around a bit, and Deepl was below GT in the list order, however I do not remember the exact order - but it somehow worked, as I checked the translation and I was getting Deepl in the text box, not the GT one (despite GT being above Deepl). However if I moved Deepl above GT, it would stop and I'd get only error+JP text in the box instead of the translation, so somehow moving GT up above Deepl fixed it (and it wasn't GT, since I knew which phrases were used by GT/Deepl, and whenever Chrome was turned off, it'd switch back to GT, but with Chrome on it'd start using the Deepl one).

But when I relaunched the game later, I had the "you exceeded the limit" message, probably since I skipped through some text - or I'm not sure, I just know I got the error, I tried to fix it by restarting the app and then reinstalling it, since I noticed that deepl would work in the browser, but in the app it'd still have the same error about exceeding the rate, so I reinstalled and that fixed it, but that messed up the extensions list and now I can't get it working and constantly get Deepl tryign to translate the text as ENG to JP.

Is there a way to bruteforce it to translate everything as Japanese? Why does it keep trying to send the request as an English text?

When it worked, I remember Deepl Dev tools where at the very bottom of the list, and GT had Deepl below it.

I'm using the hook TextoutA, since ExtTextoutW has only boxes instead of letter, and if I right click and open font and select Japanese, it never gets saved. I don't have Japanese locale installed, but the text box is correctly getting all text and it works with GT, but I'd like to use Deepl again, but I can't figure out how to set it up to work again. I know I managed to make it work by having extensions in certain order and ticking some more boxes in Deepl, but even with all of them ticked, I could't figure out how to make it work again, since befoe it was detecing the text as JP correctly. I'm using W7 64-bit if it helps.

Also anytime I restart the program, I need to skip the "welcome to chrome" setup, since it never opens my browser where I'm logged in (and have several accounts), but instead it opens a fourth window where I'm not logged into Google. Since I've already spent 3+ hours troubleshooting it, I'll try and see tomorrow if logging in fixes the welcome screen or if I'll need to login every single time, so there's not point in doing it.

Blu3train commented 3 months ago

Put a screenshot of the extensions list. Have you downloaded the latest version of DevTools DeepL here? https://github.com/Artikash/Textractor/issues/868#issuecomment-1439128738

VNgamesacc commented 3 months ago

I accidentally closed the thread.

Put a screenshot of the extensions list. Have you downloaded the latest version of DevTools DeepL here? #868 (comment)

Thanks, I've downloaded it and it fixes the issue with the wrong language output, so it correctly translates everything in the Chrome browser, but it still has the issue I had originally (which I had managed to fix before doing the reinstall, and now can't get it back as I forgot the order of the extensions). Since the latest version says it "moves the fix to W7", does that mean it fixes or bugs W7 (which I have)?

image

image

So now, although I can see the text being translated in Chrome, in the output, if Deepl is above GT (or if GT is removed from the extensions), it shows the error again in the extra window, despite the translation being up there in the Chrome, so it works, but Textractor isn't putting it into the extra window back. And if GT is in the extensions lists and above Deepl, the extra window shows the GT translation and Chrome Deepl once again has both the error and correct translations. Like this : image

image

And every single time I start the devtools, I get this, is there a way to fix this? It's opening it as new user 1, despite already having Chrome with me logged in. image

If I put GT under it, the extra box only shows error, despite the Deepl translation working in Chrome, as if the extra box wasn't able to fish it out (which I somehow fixed by rearranging the extension order before). And if I remove GT, it's the same minus the GT translation in Chrome.

VNgamesacc commented 3 months ago

Making a comment to reopen the issue, since I accidentally closed it.

Put a screenshot of the extensions list. Have you downloaded the latest version of DevTools DeepL here? #868 (comment)

Blu3train commented 3 months ago

Textractor does not handle multiple translators. You have to choose which one to use and only use one. Following the list of extensions you have in the image, reducing it to have Devtools DeepL becomes like this: image

VNgamesacc commented 3 months ago

Thank you, it works great! I thought you needed both Deepl and the dev tools, so the Deepl standalone one is outdated and not supposed to be used at all?

Is there a way to switch between GT and Deepl on the fly, or the fastest option is to just copy paste the text into GT myself?

Also for anyone who googles this, there's no need to go through the "welcome to chrome" startup message, and it works perfectly well even if it's not done, so I just click on "hide chrome" now.

Tekirezz commented 3 months ago

Hi there, I have no issues and everything working fine I just wanna ask if everything will work fine if I don't have the Pro version of the deepl, because there it seems to be limited to 1500 characters or something like that.