-
Notifications
You must be signed in to change notification settings - Fork 653
Conversation
This should make it easier for us to diagnose issues during our upcoming call with the Crowdin team |
test/index.js
Outdated
$('body').text().should.not.include('fenêtres') | ||
|
||
$ = await get('/docs/api/browser-window?language=fr-FR') | ||
$('body').text().should.include('fenêtres') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we swap the order of these two tests, so we know the ?language=fr-FR
param isn't affecting the language stored in the cookies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small suggestion wrt tests, but feel free to 🚢 as you wish.
Oops. The query param is persisting in the cookie. Turns out this is a feature of I guess that shows that this testing strategy doesn't account for user state. Working on a fix. |
This PR allows a
?language=
query param to be added to any URL to view that URL in the target language. This does not have an effect on the visitor's language settings (or lack thereof). In other words, if my language is English and I view/docs/api/app?language=fr-FR
, I will only see that one page in French. If I click any links or remove the query param from the URL, content will still be displayed in English.