-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: changed minimum of 2 locales to minimum of 1 #6406
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
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.
Thanks @dfdez, I'm concerned that we might rely of that array to contain more than 1 element in a few places in the codebase.
For example with this change the CMS crashes in EditorControlPane.js
Do you mind looking at the error?
Sure! |
Any news about this? @erezrokah |
@dfdez any reason why you closed this? This would be great to implement after we solve priority issues. |
I thought it was abandoned 🥲 but It can be reopened of course! |
Not abandoned, just in a long queue :D |
@dfdez can you solve merge conflicts, please? They appeared because packages and folders were renamed. |
* feat: changed minimum of 2 locales to minimum of 1 * feat: only show i18n editor toggle if there are multiple locales
* feat: changed minimum of 2 locales to minimum of 1 * feat: only show i18n editor toggle if there are multiple locales
* feat: changed minimum of 2 locales to minimum of 1 * feat: only show i18n editor toggle if there are multiple locales
Summary
I made these PR in order to be able to have only one locale, to cover some use cases in which we want to just have one.
Right now the only workaround is to just set
i18n: false
but this will change how the file / folder structure is generatedcloses #6263
Test plan
The only modification that I made is to set the
minItems
property oflocales
property from2
to1
.Also I added a test for check that fails when
locales
are less than1
(Previously there wasn't a test of this)Checklist
Please add a
x
inside each checkbox:yarn format
.yarn test
.A picture of a cute animal (not mandatory but encouraged)