Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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] Disable translations #34820
[docs] Disable translations #34820
Changes from 3 commits
6882659
a8bdc0a
e8557fe
9c5857c
1f9ceff
b861c0d
f3b9064
5f6bd10
db2336b
f28bbdc
17d66c3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
We should do the same in MUI X and synchronize docs deployment to production to avoid redirect loop for users that previously selected language different than
en
.Here's what happens on preview deployment when user has
userLanguage=pt
cookie:Screen.Recording.2022-10-19.at.11.17.20.mov
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'll open a PR
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.
Nice catch, let's keep this in mind.
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.
mui/mui-x#6560
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.
We can do this instead to avoid #34820 (comment) and keep
/x
redirects independent.This will allow us to disable translations in MUI X in our own pace.
What do you think?
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.
Makes sense 👍 Would the translation on x still work if this PR gets merged tough?
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.
BTW now that this is committed, make sure to add the redirects in mui/mui-x#6560
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 so - we still have
LanguageNegotiation
in our docs.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.
cc @bharatkashyap should we do something similar for toolpad? Is there support for translations there as well?
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.
No, @mnajdova, there's no need for this in Toolpad since we don't have translations at the moment.
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.
@bharatkashyap
I would suggest removing
LanguageNegotiation
in Toolpad docs then:https://github.com/mui/mui-toolpad/blob/3dccbbe1d4cb992acee77c775c73159beb785b4d/docs/pages/_app.js#L200
Because if you go to
https://mui.com/toolpad/getting-started/overview/
and change language - you'll get 404:https://mui.com/pt/toolpad/getting-started/overview/
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.
Do we need these constants? They're used in
next.config.js
, but maybe we should remove translation logic there as well?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.
We discussed that we want to keep the infrastructure around the translations so that we can easily add it back if we decide in the future, this is why I decided to left these constants and not do any changes in the
next.config.js
, but I don't mind removing the logic there as well. cc @siriwatknp what do you think?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.
Let's remove them too.There are many places that useLANGUAGES
, so I think let's keep them there, otherwise it will be a lot more work. The changes are sufficient.