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

.forEach error of null #67

Closed
ArtanisTheOne opened this issue Feb 22, 2021 · 4 comments · Fixed by #68
Closed

.forEach error of null #67

ArtanisTheOne opened this issue Feb 22, 2021 · 4 comments · Fixed by #68

Comments

@ArtanisTheOne
Copy link

Please look at this issue for reference.

Essentially specific words trigger the .forEach error, not links as you said before

If you use the word "Good" and translate that to spanish from english the error shall be thrown and no translation shall be provided. These words or phrases which result in the dropping of the translation due to an empty value in the arrays is causing these issues and I have no possible idea as to why this would occur.

Any ideas on why and how to fix it? @vitalets @vkedwardli

@vkedwardli
Copy link

I'm not getting any error

translate('Good', {from: 'english', to: 'spanish'})

returns

{
  text: 'Bien',
  pronunciation: null,
  from: {
    language: { didYouMean: false, iso: 'en' },
    text: { autoCorrected: false, value: '', didYouMean: false }
  },
  raw: [
    [ null, null, null, [Array] ],
    [ [Array], 'es', 1, 'en', [Array] ]
  ]
}

@vkedwardli
Copy link

Ok turns out it is a bit random, when Google decided to use gender specific translation the error could be triggered

@ArtanisTheOne
Copy link
Author

Yeah, this happens a lot now. That's weird... Is there a possible fix or someway to tell Google not to use gender-specific translations?

@vkedwardli
Copy link

I don't know, but you can perform actions which is allowed in the Web UI

Screenshot 2021-02-23 at 2 05 26 AM

#68 now uses the first gender-specific result from Google

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

Successfully merging a pull request may close this issue.

2 participants