Closed oandregal closed 2 years ago
Thanks for the PR, @oandregal !
ok, that was fast :sweat_smile: I was about to push a tweak to the behat tests to include this case. Also, I was waiting until the Gutenberg PR that uses it at https://github.com/WordPress/gutenberg/pull/37038 was merged, to be 100% certain this was a change we needed.
If we're aiming to release 2.5.1 these days, I guess is fine to go ahead with this change. In the worst-case scenario (Gutenberg PR doesn't get merged), we'd need to remove this key in the future, but with no urgency as everything will work as expected.
Depends on https://github.com/WordPress/gutenberg/pull/37038
In https://github.com/WordPress/gutenberg/pull/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: