-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
fix(i18n): data is not duplicated for default value setting #4463
fix(i18n): data is not duplicated for default value setting #4463
Conversation
simple_workflow_spec_proxy_git_backend.js failed, it seems not releted to the code change. running local and passing For i18n_simple_workflow_spec_proxy_fs_backend.js
Not sure what we are expecting this test... |
Seems we are expecting template: post all locales. |
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.
Thank you for jumping on this @blackb1rd.
The tests were failing since this fix will result in any field with a default value to be a part of the i18n
entries (even if they are not configured as ones).
With this fix the template
field is written to the i18n
entries:
https://github.com/netlify/netlify-cms/blob/736ca57d6edfa0c7520db6be7978c3352463b839/dev-test/backends/proxy/config.yml#L21
and it shouldn't.
We'll need to duplicate only fields that has i18n
as translate
or duplicate
set on them.
05e4a47
to
7ba3e3f
Compare
@erezrokah done as your requested. |
7ba3e3f
to
22d06f2
Compare
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 @blackb1rd, I added another commit with some code cleanup - mostly to extract the i18n
specific logic from createEmptyDraftData
@erezrokah awesome 😀 and waiting for release version with this fix 😘 |
This is now released https://github.com/netlify/netlify-cms/releases |
Closes #4356
I'm not familar with React if any going wrong let me know.