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

res.from.language.didYouMean is always true #45

Open
funnel20 opened this issue Jun 13, 2024 · 1 comment
Open

res.from.language.didYouMean is always true #45

funnel20 opened this issue Jun 13, 2024 · 1 comment

Comments

@funnel20
Copy link

When I use the Google Translate website from English to Dutch, and enter the Dutch word "Kaartspel" in the English from box, it shows "Translate from: Dutch":

Screenshot 2024-06-13 at 11 18 32

See: https://translate.google.com/?sl=en&tl=nl&text=Kaartspel&op=translate

When I use this API:

const res = await translate('Kaartspel', { from: 'en', to: 'nl', autoCorrect: true, requestFunction: fetch});
console.log(res.from.language.didYouMean);
console.log(res.from.language.iso);

It prints:

true
nl

This is correct ✅

Repeat with a correct English "Card game", there is no warning in the portal:

Screenshot 2024-06-13 at 11 24 08

See: https://translate.google.com/?sl=en&tl=nl&text=Card%20game&op=translate

When I use this API:

const res = await translate('Card game', { from: 'en', to: 'nl', autoCorrect: true, requestFunction: fetch});
console.log(res.from.language.didYouMean);
console.log(res.from.language.iso);

It prints:

true
en

Although res.from.language.iso changed correctly to "en", res.from.language.didYouMean is still true.
This is incorrect ❌

@AidanWelch
Copy link
Owner

Will investigate when I get the chance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants