-
Notifications
You must be signed in to change notification settings - Fork 800
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: move localizable strings out of the metadata attributes field #36724
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped. Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
@@ -50,22 +50,6 @@ | |||
"isPremiumContentChild": "isPremiumContentChild" | |||
}, | |||
"attributes": { | |||
"newPlanName": { |
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.
These attributes are not used anywhere any more. Removing them doesn't break backward compatibility.
@@ -60,88 +60,6 @@ function register_block() { | |||
), | |||
'align' => array( 'wide', 'full' ), | |||
), | |||
'attributes' => array( |
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.
Attributes were added back to server-side registration as a temporary workaround (#36695).
@@ -1 +1 @@ | |||
<!-- wp:jetpack/subscriptions /--> | |||
<!-- wp:jetpack/subscriptions {"submitButtonText":"Subscribe"} /--> |
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've followed how failing tests were fixed in previous similar situations: #27443.
@@ -1,3 +1,3 @@ | |||
<!-- wp:jetpack/mailchimp --> |
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've followed how failing tests were fixed in previous similar situations: #27443.
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.
@jeherve, updating the translations should fix this. |
Thanks! For some reason I had updated the translations, but needed to do once again. ¯_(ツ)_/¯ It works well now. |
…#36724) * Blocks: move localizable strings out of the metadata attributes field * Fix Goodreads block tests * Update Subscriptions block test fixtures * Update Mailchimp block test fixtures
Fixes #36649
Proposed changes:
Block attributes defined in the metadata
block.json
file are not localizable (see the WordPress.org documentation). This PR updates the following blocks to remove translatable strings from this file:The approach is to remove default strings from the
block.json
files, define them in a JS file instead, and use them as a fallback when reading the attributes.Other information:
Jetpack product discussion
Project thread: pf5801-Aw-p2
Does this pull request change what data or activity we track or use?
No.
Testing instructions:
For each block above, verify that it still works as expected in the editor and in the site (the Cookie Consent block may only be added in the site editor). Ideally, change the language to a language other than English and check that all UI elements are displayed in that language.
Note: if you can't see the text in the language you chose, make sure to update the latest translations in the Update page. You can also check if the translation exists with this tool.