Add new field to translate in theme.json
#292
Merged
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.
Depends on WordPress/gutenberg#37038
In WordPress/gutenberg#37038 Gutenberg is adding a new field to translate for the font sizes stored within a
theme.json
. This PR adds it to the i18n command.Setup
sudo apt install jq mysql-server mysql-client php-mysql
composer install && composer behat
=> it didn't setup the database for me (mysql 8) so I did;sudo mysql -u root
CREATE DATABASE IF NOT EXISTS
wp_cli_test;
CREATE USER 'wp_cli_test'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password1';
GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost"
How to test
composer install
ThemeJsonExtractor.php
by substituting the line 148$json = self::remote_get( self::THEME_JSON_SOURCE );
by$json = '';
.foo-theme
and create atheme.json
file within with the following contents:vendor/bin/wp i18n make-pot foo-theme
foo-theme/foo-theme.pot
file and that it has the name and alias strings: