Translate "description" field from theme.json#408
Merged
swissspidy merged 1 commit intowp-cli:mainfrom Jul 3, 2024
Merged
Conversation
Add expectation to existing behat tests
Contributor
|
I approved the core PR and this PR is also working well for me. I'll leave @swissspidy comment on this, but my understanding is that we should merge the core PR and right after merge this one. |
Member
|
Correct. Otherwise tests are failing, as you can see now :-) |
Contributor
|
The core PR has been merged as of WordPress/wordpress-develop@2930212 |
swissspidy
approved these changes
Jul 3, 2024
Contributor
Author
|
Thanks for the help, folks 🙇🏻 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR:
Important
A WordPress Core PR exists to add the "description" key to
src/wp-includes/theme-i18n.json. This has not yet been committed.TODO
Context
A "description" key was added to theme.json in WordPress/gutenberg#45242
The Gutenberg PR was synced to Core in WordPress/wordpress-develop#4687
Unfortunately, a corresponding entry to the theme.json i18n schema was not part of the change.
Core trac ticket: https://core.trac.wordpress.org/ticket/61543
Testing
Set up
Before running any of the test (manual or automatic), make sure to set the
THEME_JSON_SOURCEto '' (empty string) so theThemeJsonExtractorpicks the the local backup file with the changes atassets/theme-i18n.json.Automated tests:
Manual tests:
Create a new directory called
foo-themethat contains a theme.json file with the following contents:{ "description": "My style variation description" }Run
vendor/bin/wp i18n make-pot foo-themeVerify that there's a
foo-theme/foo-theme.potfile and that the "My style variation description" string is present as well as its context "Style variation description".You should see something like: