Closed justechn closed 5 years ago
Nevermind. I guess Google linked me to the russian version
The url you posted is Russian, seems to work like it should? If you want English, go to https://jestjs.io/docs/en/using-matchers or use the language selector next to the search.
There might be a bug here though - how did you end up on that url?
I got to that page from Google
Huh. I don't think there's much we can do with google indexing
Looks like Google does support multilingual websites https://support.google.com/webmasters/answer/182192?hl=en
And you should use hreflang or sitemaps for language- or region-specific pages https://support.google.com/webmasters/answer/189077
Sorry to bump an old issue, but this just happened for me as well via a Google search - https://jestjs.io/docs/uk/troubleshooting. I was searching for "speed up react testing library tests" but I think Google results are somewhat personalised so that might not be much use.
That Google indexing idea sounds like a good solution - would fix the problem at the source, and avoid penalties for duplicate content (I can see only part of the Troubleshooting has been translated, most is in English and presumably a dupe of the English version in Google's eyes).
Another possible solution - looking at my request for the page, my browser sent this header:
Accept-Language: en-GB,en;q=0.5
Whilst immedietly changing the language of the URL wouldn't be ideal (e.g. if I was trying to send a link to someone in their native language), perhaps there could be a feature to detect people who may be on the wrong language and highlight the language selector with some copy in the 'Accept-Language' language? It was described in Ukrainian on that page, which makes sense but went totally over my head :grin:
If this feature sounds like a worthwhile idea, and not too complicated to pull off, I'd be up for giving it a go with some guidance.
Definitely sounds useful @MattTennison! We're currently migrating to Docusarus 2, so website changes like this has a good timing (https://jestjs.netlify.app/). @slorber is the issue @MattTennison mentions something docusarus 2 does something about?
In Docusaurus 2 i18n and the new Jest website, we have setup lang HTML meta and hreflang SEO headers so that Google understand the page exist in multiple locales, and theorrically it should give you search results in your language in priority.
there could be a feature to detect people who may be on the wrong language and highlight the language selector with some copy in the 'Accept-Language' language? It was described in Ukrainian on that page, which makes sense but went totally over my head 😁
https://v2.docusaurus.io/docs/next/i18n/introduction#i18n-non-goals
I think doing a redirect to the correct language is better done server-side and is something you configure directly on your hosting solution.
However we could implement some kind of client-side UX to suggest the user to redirect another language, but it should rather be a proposal for Docusaurus itself than Jest.
Can you test a bit the website in a few days (once Google has correctly updated his indexes) and see if you still think it's needed?
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
Sorry if this is the wrong place to put this report. This is not a bug with Jest, but with the documentation. When I view the documentation I am seeing multiple languages. Chrome will open a dialog offering to translate the text.
I have checked my language settings in Chrome
and on MacOS
All I have is English selected
To Reproduce
Steps to reproduce the behavior: go to this page https://jestjs.io/docs/ru/using-matchers
Expected behavior
A clear and concise description of what you expected to happen. If you are using internationalization then it should show the correct language.
Link to repl or repo (highly encouraged)
Please provide either a repl.it demo or a minimal repository on GitHub.
Issues without a reproduction link are likely to stall.
Run
npx envinfo --preset jest
Paste the results here: