Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocorrect not properly applied to translations from certain networks #18

Open
AidanWelch opened this issue Oct 8, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@AidanWelch
Copy link
Owner

Certain networks require the X-Goog-BatchExecute-Bgr header to be sent on requests, or the autocorrect will not be applied to some translations(seemingly typos where a letter is dropped, such as "I spea Dutch!" instead of "I speak Dutch!").

The code for generating this header I believe is found in this static script.

I believe in xH.prototype.s()

This would likely take a while to fix.

@RipperTs
Copy link

Certain networks require the X-Goog-BatchExecute-Bgr header to be sent on requests, or the autocorrect will not be applied to some translations(seemingly typos where a letter is dropped, such as "I spea Dutch!" instead of "I speak Dutch!").

The code for generating this header I believe is found in this static script.

I believe in xH.prototype.s()

This would likely take a while to fix.

Hello, can you generate this request header parameter value based on this static script?

@AidanWelch
Copy link
Owner Author

@RipperTs As far as I know, yes, but I'm not certain.

@ttys3
Copy link

ttys3 commented Mar 6, 2023

no. that' s wrong.

xH.prototype.s=function(){var a=Swa([_.Ffa,_.Hfa,_.Ifa,_.Qr,_.Kfa,_.Rfa,_.Sfa,_.Tfa,_.Nk]); is just a feature id to request api endpoint map.

I debug and confirmed that. it has nothing to do with the header.

@ttys3
Copy link

ttys3 commented Mar 6, 2023

the real code is in the HTML page. and it is encrypted.

@ttys3
Copy link

ttys3 commented Mar 10, 2023

if you debug in dev tools, it may generate a wrong token like:

["FNL82,0,1,66,24095,60,24097",null,null,23879,987,null,null,0,"2"]

@AidanWelch
Copy link
Owner Author

I don't have the time to look into this more, but if someone can figure it out I would happily merge the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants