-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[docs] Don't redirect on deploy preview #32399
[docs] Don't redirect on deploy preview #32399
Conversation
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.
Woof... this always bothered me too!
Kinda glad you got bothered enough to fix it 😅 Nice one!
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.
👍 Glad we have this fix.
@@ -55,7 +55,7 @@ function LanguageNegotiation() { | |||
acceptLanguage.get(navigator.language) || | |||
userLanguage; |
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 redirect to translated page if navigator language is not English though?
Given that content is not translated, I would argue that we should only redirect if user explicitly selected different language
const preferedLanguage =
LANGUAGES.find((lang) => lang === getCookie('userLanguage')) ||
- acceptLanguage.get(navigator.language) ||
userLanguage;
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.
The pages for the data grid are not translated, but the pages for the core components are. Speaking about Portuguese, the core docs is around 35% translated. I think as soon as one single string is translated we'll need to redirect the docs. BTW, the button to send contributions doesn't work on X. I'll open an issue for that.
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.
I think as soon as one single string is translated we'll need to redirect the docs.
Interesting, what is the motivation behind this?
I would argue that partially translated (even >50%) page is more disappointing than helpful. Especially for technical documentation (landing pages and pricing page are English-only)
Preview with the fix: https://deploy-preview-32399--material-ui.netlify.app/material-ui/getting-started/installation/
Preview to test the bug: https://deploy-preview-32458--material-ui.netlify.app/material-ui/getting-started/installation/
My cellphone is in Portuguese. When I open any deploy preview, it tries to redirect me to the translated page, but only the English language is included in the preview, so I see a 404 page. This PR disables the redirect for previews. To test the fix, you can add the Portuguese language to a browser and open the link above. In this PR it won't redirect, but with any other preview it should display a 404 error. Once approved I'll also fix this in MUI X.