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
Blocks: Add support for
variations
inblock.json
file #1499Blocks: Add support for
variations
inblock.json
file #1499Changes from all commits
423bb78
549caab
b502e46
6d487f5
b0241ab
3cee73e
b3d33bb
109ae1e
3cf04e4
2c424a6
84781d2
0d0f084
d11f5dd
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.
This PR replaces the existing logic to translate
theme.json
so it would be great to confirm that everything works as before. All existing unit tests pass for processingtheme.json
are still green. New tests were added to cover new cases in the extracted general-purposetranslate_settings_using_i18n_schema
method (it works withblock.json
, too) that no longer use the intermediate step to runget_fields_to_translate
which collects an alist of fields to translate.@jorgefilipecosta and @nosolosw, I would appreciate your feedback.
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 tested theme.json translation and things are working well 👍 Nice work! We should probably also update plugin code right?
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 could update the plugin, although it works exactly the same so I consider it a low priority. I'll have to explore what is necessary to bring
variations
handling toblock.json
for older versions of WordPress supported by the Gutenberg plugin. If we need to polyfilltranslate_settings_using_i18n_schema
then we can refactor the logic fortheme.json
as well.