Translate title field from theme.json#306
Translate title field from theme.json#306swissspidy merged 8 commits intowp-cli:mainfrom oandregal:add/name-field-to-theme-json
title field from theme.json#306Conversation
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: