-
Notifications
You must be signed in to change notification settings - Fork 58
Translate title field from theme.json
#306
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
Translate title field from theme.json
#306
Conversation
name field from theme jsonname field from theme.json
name field from theme.jsontitle field from theme.json
|
@swissspidy this is ready for review. |
|
Change looks good, but note that Behat tests are now failing. Is it on someone's radar to update |
|
The functional tests are failing because they're using the schema pulled from |
|
WordPress |
|
The changes to the i18n schema in Gutenberg and WordPress |
|
https://develop.svn.wordpress.org/trunk/src/wp-includes/theme-i18n.json does have the |
Co-authored-by: Pascal Birchler <pascal.birchler@gmail.com>
Related #254 #292
In WordPress/gutenberg#39322 and WordPress/gutenberg#39715 the Gutenberg plugin has added a new translatable field to
theme.jsonfiles, which will be part of WordPress 6.0.This PR does a few things:
How to test
Automated tests:
composer behat -- features/makepot.featureManual test:
composer installThemeJsonExtractorclass, so the command uses the local backup file (assets/theme-i18n.json).foo-themethat contains atheme.jsonfile with the following contents:{ "title": "My style variation" }vendor/bin/wp i18n make-pot foo-themefoo-theme/foo-theme.potfile and that the "My style variation" string is present as well as its context "Style variation name". You should see something like: