-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Broken loop in WP_Theme_JSON_Resolver #33552
Comments
Yes, good catch. It’s an obvious bug from #28246 that I didn’t catch only because we had only one field used for all translatable paths 😅 gutenberg/packages/blocks/src/api/i18n-block.json Lines 10 to 16 in d361e91
At some point, we could also unify the logic that applies translations based on i18n schemas. |
Related issue in Gutenberg: WordPress/gutenberg#33552 The loop in WP_Theme_JSON_Resolver to extract translatable paths was broken, as it contained an immediate and unconditional return. This caused the loop to immediately exit again after the first iteration, thus never actually looping. Follow-up to [50959]. Props schlessera. git-svn-id: https://develop.svn.wordpress.org/trunk@51472 602fd350-edb4-49c9-b593-d223f7449a82
Related issue in Gutenberg: WordPress/gutenberg#33552 The loop in WP_Theme_JSON_Resolver to extract translatable paths was broken, as it contained an immediate and unconditional return. This caused the loop to immediately exit again after the first iteration, thus never actually looping. Follow-up to [50959]. Props schlessera. git-svn-id: https://develop.svn.wordpress.org/trunk@51472 602fd350-edb4-49c9-b593-d223f7449a82
Related issue in Gutenberg: WordPress/gutenberg#33552 The loop in WP_Theme_JSON_Resolver to extract translatable paths was broken, as it contained an immediate and unconditional return. This caused the loop to immediately exit again after the first iteration, thus never actually looping. Follow-up to [50959]. Props schlessera. Built from https://develop.svn.wordpress.org/trunk@51472 git-svn-id: http://core.svn.wordpress.org/trunk@51083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
It was also backported to WordPress core: WordPress/wordpress-develop@3f83b50. |
Related issue in Gutenberg: WordPress/gutenberg#33552 The loop in WP_Theme_JSON_Resolver to extract translatable paths was broken, as it contained an immediate and unconditional return. This caused the loop to immediately exit again after the first iteration, thus never actually looping. Follow-up to [50959]. Props schlessera. Built from https://develop.svn.wordpress.org/trunk@51472 git-svn-id: https://core.svn.wordpress.org/trunk@51083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Related issue in Gutenberg: WordPress/gutenberg#33552. The loop in `WP_Theme_JSON_Resolver` to extract translatable paths was broken, as it contained an immediate and unconditional return. This caused the loop to immediately exit again after the first iteration, thus never actually looping. Follow-up to [50959]. Props schlessera. Merges [51472] to the 5.8 branch. Fixes #53738. git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51515 602fd350-edb4-49c9-b593-d223f7449a82
Related issue in Gutenberg: WordPress/gutenberg#33552. The loop in `WP_Theme_JSON_Resolver` to extract translatable paths was broken, as it contained an immediate and unconditional return. This caused the loop to immediately exit again after the first iteration, thus never actually looping. Follow-up to [50959]. Props schlessera. Merges [51472] to the 5.8 branch. Fixes #53738. Built from https://develop.svn.wordpress.org/branches/5.8@51515 git-svn-id: http://core.svn.wordpress.org/branches/5.8@51126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Related issue in Gutenberg: WordPress/gutenberg#33552. The loop in `WP_Theme_JSON_Resolver` to extract translatable paths was broken, as it contained an immediate and unconditional return. This caused the loop to immediately exit again after the first iteration, thus never actually looping. Follow-up to [50959]. Props schlessera. Merges [51472] to the 5.8 branch. Fixes #53738. Built from https://develop.svn.wordpress.org/branches/5.8@51515 git-svn-id: https://core.svn.wordpress.org/branches/5.8@51126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Related issue in Gutenberg: WordPress/gutenberg#33552. The loop in `WP_Theme_JSON_Resolver` to extract translatable paths was broken, as it contained an immediate and unconditional return. This caused the loop to immediately exit again after the first iteration, thus never actually looping. Follow-up to [50959]. Props schlessera. Merges [51472] to the 5.8 branch. Fixes #53738. Built from https://develop.svn.wordpress.org/branches/5.8@51515 git-svn-id: http://core.svn.wordpress.org/branches/5.8@51126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Related issue in Gutenberg: WordPress/gutenberg#33552. The loop in `WP_Theme_JSON_Resolver` to extract translatable paths was broken, as it contained an immediate and unconditional return. This caused the loop to immediately exit again after the first iteration, thus never actually looping. Follow-up to [50959]. Props schlessera. Merges [51472] to the 5.8 branch. Fixes #53738. Built from https://develop.svn.wordpress.org/branches/5.8@51515
Related issue in Gutenberg: WordPress/gutenberg#33552. The loop in `WP_Theme_JSON_Resolver` to extract translatable paths was broken, as it contained an immediate and unconditional return. This caused the loop to immediately exit again after the first iteration, thus never actually looping. Follow-up to [50959]. Props schlessera. Merges [51472] to the 5.8 branch. Fixes #53738. Built from https://develop.svn.wordpress.org/branches/5.8@51515 git-svn-id: http://core.svn.wordpress.org/branches/5.8@51126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The loop in
WP_Theme_JSON_Resolver
to extract translatable paths is broken, as it contains an immediate and unconditionalreturn
. This causes the loop to immediately exit again after the first iteration, thus never actually looping.gutenberg/lib/class-wp-theme-json-resolver-gutenberg.php
Lines 129 to 137 in f76d127
This means that the extraction only works where there's only a single item in the array of translatable strings per section (i.e. the
'name'
field).The suggested code would be:
The text was updated successfully, but these errors were encountered: