From a94746e4aa129316a0ee46c53bcfdac76fe9b838 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 4 Feb 2020 17:37:35 -0300 Subject: [PATCH 1/5] Use WP-CLI to generate .pot file --- composer.json | 9 +- composer.lock | 581 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 588 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 3f26d2f795f..1134dc91858 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ }, "require-dev": { "phpunit/phpunit": "7.5.20", - "woocommerce/woocommerce-sniffs": "0.0.9" + "woocommerce/woocommerce-sniffs": "0.0.9", + "wp-cli/i18n-command": "^2.2" }, "config": { "platform": { @@ -57,6 +58,12 @@ ], "phpcbf": [ "phpcbf -p" + ], + "makepot-audit": [ + "wp i18n make-pot . --exclude=\".github,.wordpress-org,bin,sample-data,node_modules,tests\"" + ], + "makepot": [ + "@makepot-audit --skip-audit" ] }, "extra": { diff --git a/composer.lock b/composer.lock index c0b7cb68c9c..1e48b533544 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d2f5085db8a002bfb5349dca8dc82878", + "content-hash": "ed4834a9b8ed1cc836e87dee61106bc7", "packages": [ { "name": "automattic/jetpack-autoloader", @@ -338,6 +338,50 @@ } ], "packages-dev": [ + { + "name": "cweagans/composer-patches", + "version": "1.6.7", + "source": { + "type": "git", + "url": "https://github.com/cweagans/composer-patches.git", + "reference": "2e6f72a2ad8d59cd7e2b729f218bf42adb14f590" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/2e6f72a2ad8d59cd7e2b729f218bf42adb14f590", + "reference": "2e6f72a2ad8d59cd7e2b729f218bf42adb14f590", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0", + "php": ">=5.3.0" + }, + "require-dev": { + "composer/composer": "~1.0", + "phpunit/phpunit": "~4.6" + }, + "type": "composer-plugin", + "extra": { + "class": "cweagans\\Composer\\Patches" + }, + "autoload": { + "psr-4": { + "cweagans\\Composer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Cameron Eagans", + "email": "me@cweagans.net" + } + ], + "description": "Provides a way to patch Composer packages.", + "time": "2019-08-29T20:11:49+00:00" + }, { "name": "dealerdirect/phpcodesniffer-composer-installer", "version": "v0.5.0", @@ -460,6 +504,220 @@ ], "time": "2019-10-21T16:45:58+00:00" }, + { + "name": "gettext/gettext", + "version": "v4.8.2", + "source": { + "type": "git", + "url": "https://github.com/php-gettext/Gettext.git", + "reference": "e474f872f2c8636cf53fd283ec4ce1218f3d236a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/e474f872f2c8636cf53fd283ec4ce1218f3d236a", + "reference": "e474f872f2c8636cf53fd283ec4ce1218f3d236a", + "shasum": "" + }, + "require": { + "gettext/languages": "^2.3", + "php": ">=5.4.0" + }, + "require-dev": { + "illuminate/view": "*", + "phpunit/phpunit": "^4.8|^5.7|^6.5", + "squizlabs/php_codesniffer": "^3.0", + "symfony/yaml": "~2", + "twig/extensions": "*", + "twig/twig": "^1.31|^2.0" + }, + "suggest": { + "illuminate/view": "Is necessary if you want to use the Blade extractor", + "symfony/yaml": "Is necessary if you want to use the Yaml extractor/generator", + "twig/extensions": "Is necessary if you want to use the Twig extractor", + "twig/twig": "Is necessary if you want to use the Twig extractor" + }, + "type": "library", + "autoload": { + "psr-4": { + "Gettext\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Oscar Otero", + "email": "oom@oscarotero.com", + "homepage": "http://oscarotero.com", + "role": "Developer" + } + ], + "description": "PHP gettext manager", + "homepage": "https://github.com/oscarotero/Gettext", + "keywords": [ + "JS", + "gettext", + "i18n", + "mo", + "po", + "translation" + ], + "time": "2019-12-02T10:21:14+00:00" + }, + { + "name": "gettext/languages", + "version": "2.6.0", + "source": { + "type": "git", + "url": "https://github.com/php-gettext/Languages.git", + "reference": "38ea0482f649e0802e475f0ed19fa993bcb7a618" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-gettext/Languages/zipball/38ea0482f649e0802e475f0ed19fa993bcb7a618", + "reference": "38ea0482f649e0802e475f0ed19fa993bcb7a618", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.16.0", + "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.5 || ^8.4" + }, + "bin": [ + "bin/export-plural-rules" + ], + "type": "library", + "autoload": { + "psr-4": { + "Gettext\\Languages\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michele Locati", + "email": "mlocati@gmail.com", + "role": "Developer" + } + ], + "description": "gettext languages with plural rules", + "homepage": "https://github.com/php-gettext/Languages", + "keywords": [ + "cldr", + "i18n", + "internationalization", + "l10n", + "language", + "languages", + "localization", + "php", + "plural", + "plural rules", + "plurals", + "translate", + "translations", + "unicode" + ], + "time": "2019-11-13T10:30:21+00:00" + }, + { + "name": "mck89/peast", + "version": "v1.10.1", + "source": { + "type": "git", + "url": "https://github.com/mck89/peast.git", + "reference": "461fbe96212ac1b511f527fd11b942e976429398" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mck89/peast/zipball/461fbe96212ac1b511f527fd11b942e976429398", + "reference": "461fbe96212ac1b511f527fd11b942e976429398", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10.1-dev" + } + }, + "autoload": { + "psr-4": { + "Peast\\": "lib/Peast/", + "Peast\\test\\": "test/Peast/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco MarchiĆ²", + "email": "marco.mm89@gmail.com" + } + ], + "description": "Peast is PHP library that generates AST for JavaScript code", + "time": "2019-12-22T16:46:42+00:00" + }, + { + "name": "mustache/mustache", + "version": "v2.13.0", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/mustache.php.git", + "reference": "e95c5a008c23d3151d59ea72484d4f72049ab7f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/e95c5a008c23d3151d59ea72484d4f72049ab7f4", + "reference": "e95c5a008c23d3151d59ea72484d4f72049ab7f4", + "shasum": "" + }, + "require": { + "php": ">=5.2.4" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~1.11", + "phpunit/phpunit": "~3.7|~4.0|~5.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Mustache": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "A Mustache implementation in PHP.", + "homepage": "https://github.com/bobthecow/mustache.php", + "keywords": [ + "mustache", + "templating" + ], + "time": "2019-11-23T21:40:31+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.9.5", @@ -1320,6 +1578,55 @@ ], "time": "2020-01-08T08:45:45+00:00" }, + { + "name": "rmccue/requests", + "version": "v1.7.0", + "source": { + "type": "git", + "url": "https://github.com/rmccue/Requests.git", + "reference": "87932f52ffad70504d93f04f15690cf16a089546" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rmccue/Requests/zipball/87932f52ffad70504d93f04f15690cf16a089546", + "reference": "87932f52ffad70504d93f04f15690cf16a089546", + "shasum": "" + }, + "require": { + "php": ">=5.2" + }, + "require-dev": { + "requests/test-server": "dev-master" + }, + "type": "library", + "autoload": { + "psr-0": { + "Requests": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Ryan McCue", + "homepage": "http://ryanmccue.info" + } + ], + "description": "A HTTP library written in PHP, for human beings.", + "homepage": "http://github.com/rmccue/Requests", + "keywords": [ + "curl", + "fsockopen", + "http", + "idna", + "ipv6", + "iri", + "sockets" + ], + "time": "2016-10-13T00:11:37+00:00" + }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", @@ -1937,6 +2244,55 @@ ], "time": "2020-01-30T22:20:29+00:00" }, + { + "name": "symfony/finder", + "version": "v3.4.37", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "a90a9d3b9f458a5cdeabfa4090b20c000ca3962f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/a90a9d3b9f458a5cdeabfa4090b20c000ca3962f", + "reference": "a90a9d3b9f458a5cdeabfa4090b20c000ca3962f", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2020-01-01T11:03:25+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.13.1", @@ -2123,6 +2479,229 @@ ], "time": "2019-11-11T15:48:34+00:00" }, + { + "name": "wp-cli/i18n-command", + "version": "v2.2.1", + "source": { + "type": "git", + "url": "https://github.com/wp-cli/i18n-command.git", + "reference": "6a0582103ecf4a28b3086eac55a9fe590bd3dc96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/6a0582103ecf4a28b3086eac55a9fe590bd3dc96", + "reference": "6a0582103ecf4a28b3086eac55a9fe590bd3dc96", + "shasum": "" + }, + "require": { + "gettext/gettext": "^4.8", + "mck89/peast": "^1.8", + "wp-cli/wp-cli": "^2" + }, + "require-dev": { + "wp-cli/scaffold-command": "^1.2 || ^2", + "wp-cli/wp-cli-tests": "^2.1.3" + }, + "type": "wp-cli-package", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + }, + "bundled": true, + "commands": [ + "i18n", + "i18n make-pot", + "i18n make-json" + ] + }, + "autoload": { + "psr-4": { + "WP_CLI\\I18n\\": "src/" + }, + "files": [ + "i18n-command.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Pascal Birchler", + "homepage": "https://pascalbirchler.com/" + } + ], + "description": "Provides internationalization tools for WordPress projects.", + "homepage": "https://github.com/wp-cli/i18n-command", + "time": "2019-11-12T06:57:35+00:00" + }, + { + "name": "wp-cli/mustangostang-spyc", + "version": "0.6.3", + "source": { + "type": "git", + "url": "https://github.com/wp-cli/spyc.git", + "reference": "6aa0b4da69ce9e9a2c8402dab8d43cf32c581cc7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wp-cli/spyc/zipball/6aa0b4da69ce9e9a2c8402dab8d43cf32c581cc7", + "reference": "6aa0b4da69ce9e9a2c8402dab8d43cf32c581cc7", + "shasum": "" + }, + "require": { + "php": ">=5.3.1" + }, + "require-dev": { + "phpunit/phpunit": "4.3.*@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5.x-dev" + } + }, + "autoload": { + "psr-4": { + "Mustangostang\\": "src/" + }, + "files": [ + "includes/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "mustangostang", + "email": "vlad.andersen@gmail.com" + } + ], + "description": "A simple YAML loader/dumper class for PHP (WP-CLI fork)", + "homepage": "https://github.com/mustangostang/spyc/", + "time": "2017-04-25T11:26:20+00:00" + }, + { + "name": "wp-cli/php-cli-tools", + "version": "v0.11.11", + "source": { + "type": "git", + "url": "https://github.com/wp-cli/php-cli-tools.git", + "reference": "fe9c7c44a9e1bf2196ec51dc38da0593dbf2993f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wp-cli/php-cli-tools/zipball/fe9c7c44a9e1bf2196ec51dc38da0593dbf2993f", + "reference": "fe9c7c44a9e1bf2196ec51dc38da0593dbf2993f", + "shasum": "" + }, + "require": { + "php": ">= 5.3.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "cli": "lib/" + }, + "files": [ + "lib/cli/cli.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "James Logsdon", + "email": "jlogsdon@php.net", + "role": "Developer" + }, + { + "name": "Daniel Bachhuber", + "email": "daniel@handbuilt.co", + "role": "Maintainer" + } + ], + "description": "Console utilities for PHP", + "homepage": "http://github.com/wp-cli/php-cli-tools", + "keywords": [ + "cli", + "console" + ], + "time": "2018-09-04T13:28:00+00:00" + }, + { + "name": "wp-cli/wp-cli", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/wp-cli/wp-cli.git", + "reference": "74c949c74708e3a88ad0add70f3236c8675dfd85" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/74c949c74708e3a88ad0add70f3236c8675dfd85", + "reference": "74c949c74708e3a88ad0add70f3236c8675dfd85", + "shasum": "" + }, + "require": { + "cweagans/composer-patches": "^1.6", + "ext-curl": "*", + "mustache/mustache": "~2.4", + "php": "^5.4 || ^7.0", + "rmccue/requests": "~1.6", + "symfony/finder": ">2.7", + "wp-cli/mustangostang-spyc": "^0.6.3", + "wp-cli/php-cli-tools": "~0.11.2" + }, + "require-dev": { + "roave/security-advisories": "dev-master", + "wp-cli/db-command": "^1.3 || ^2", + "wp-cli/entity-command": "^1.2 || ^2", + "wp-cli/extension-command": "^1.1 || ^2", + "wp-cli/package-command": "^1 || ^2", + "wp-cli/wp-cli-tests": "^2.1" + }, + "suggest": { + "ext-readline": "Include for a better --prompt implementation", + "ext-zip": "Needed to support extraction of ZIP archives when doing downloads or updates" + }, + "bin": [ + "bin/wp", + "bin/wp.bat" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4.x-dev" + }, + "patches": { + "mustache/mustache": { + "Avoid notices on PHP 7.4+": "https://patch-diff.githubusercontent.com/raw/bobthecow/mustache.php/pull/349.patch" + } + } + }, + "autoload": { + "psr-0": { + "WP_CLI": "php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "WP-CLI framework", + "homepage": "https://wp-cli.org", + "keywords": [ + "cli", + "wordpress" + ], + "time": "2019-11-12T15:26:05+00:00" + }, { "name": "wp-coding-standards/wpcs", "version": "2.2.0", From 24fd993dedcd28ec01dc99f95280c4dba17ab9be Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 4 Feb 2020 17:44:20 -0300 Subject: [PATCH 2/5] Included descriptions for scripts --- composer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1134dc91858..a0afc8990e0 100644 --- a/composer.json +++ b/composer.json @@ -75,7 +75,9 @@ "scripts-description": { "test": "Run unit tests", "phpcs": "Analyze code against the WordPress coding standards with PHP_CodeSniffer", - "phpcbf": "Fix coding standards warnings/errors automatically with PHP Code Beautifier" + "phpcbf": "Fix coding standards warnings/errors automatically with PHP Code Beautifier", + "makepot-audit": "Generate i18n/langauges/woocommerce.pot file and run audit", + "makepot": "Generate i18n/langauges/woocommerce.pot file" } } } From f9e01370686f91c84c6b2bb3daa8570de622dacd Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 4 Feb 2020 17:44:32 -0300 Subject: [PATCH 3/5] Removed old grunt tasks and packages related to i18n --- Gruntfile.js | 64 +--------------------------------- package-lock.json | 89 ----------------------------------------------- package.json | 6 ++-- 3 files changed, 3 insertions(+), 156 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index b2c0fdbd37b..00eea59b170 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -201,62 +201,6 @@ module.exports = function( grunt ) { } }, - // Generate POT files. - makepot: { - options: { - type: 'wp-plugin', - domainPath: 'i18n/languages', - potHeaders: { - 'report-msgid-bugs-to': 'https://github.com/woocommerce/woocommerce/issues', - 'language-team': 'LANGUAGE ' - } - }, - dist: { - options: { - potFilename: 'woocommerce.pot', - exclude: [ - 'vendor/.*', - 'tests/.*', - 'tmp/.*' - ] - } - } - }, - - // Check textdomain errors. - checktextdomain: { - options:{ - text_domain: 'woocommerce', - keywords: [ - '__:1,2d', - '_e:1,2d', - '_x:1,2c,3d', - 'esc_html__:1,2d', - 'esc_html_e:1,2d', - 'esc_html_x:1,2c,3d', - 'esc_attr__:1,2d', - 'esc_attr_e:1,2d', - 'esc_attr_x:1,2c,3d', - '_ex:1,2c,3d', - '_n:1,2,4d', - '_nx:1,2,4c,5d', - '_n_noop:1,2,3d', - '_nx_noop:1,2,3c,4d' - ] - }, - files: { - src: [ - '**/*.php', // Include all files - '!node_modules/**', // Exclude node_modules/ - '!tests/**', // Exclude tests/ - '!vendor/**', // Exclude vendor/ - '!tmp/**', // Exclude tmp/ - '!packages/*/vendor/**' // Exclude packages/*/vendor - ], - expand: true - } - }, - // Exec shell commands. shell: { options: { @@ -306,6 +250,7 @@ module.exports = function( grunt ) { } } }, + // PHP Code Sniffer. phpcs: { options: { @@ -346,8 +291,6 @@ module.exports = function( grunt ) { grunt.loadNpmTasks( 'grunt-rtlcss' ); grunt.loadNpmTasks( 'grunt-postcss' ); grunt.loadNpmTasks( 'grunt-stylelint' ); - grunt.loadNpmTasks( 'grunt-wp-i18n' ); - grunt.loadNpmTasks( 'grunt-checktextdomain' ); grunt.loadNpmTasks( 'grunt-contrib-jshint' ); grunt.loadNpmTasks( 'grunt-contrib-uglify' ); grunt.loadNpmTasks( 'grunt-contrib-cssmin' ); @@ -400,11 +343,6 @@ module.exports = function( grunt ) { 'default' ]); - grunt.registerTask( 'i18n', [ - 'checktextdomain', - 'makepot' - ]); - grunt.registerTask( 'e2e-tests', [ 'shell:e2e_tests' ]); diff --git a/package-lock.json b/package-lock.json index 306082a4425..a5c578cba7b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9182,34 +9182,6 @@ } } }, - "grunt-checktextdomain": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/grunt-checktextdomain/-/grunt-checktextdomain-1.0.1.tgz", - "integrity": "sha1-slTQHh3pEwBdTbHFMD2QI7mD4Zs=", - "dev": true, - "requires": { - "chalk": "~0.2.1", - "text-table": "~0.2.0" - }, - "dependencies": { - "ansi-styles": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-0.2.0.tgz", - "integrity": "sha1-NZq0sV3NZLptdHNLcsNjYKmvLBk=", - "dev": true - }, - "chalk": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.2.1.tgz", - "integrity": "sha1-dhPhV1FFshOGSD9/SFql/6jL0Qw=", - "dev": true, - "requires": { - "ansi-styles": "~0.2.0", - "has-color": "~0.1.0" - } - } - } - }, "grunt-contrib-clean": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-2.0.0.tgz", @@ -9730,16 +9702,6 @@ "chalk": "^2.4.2" } }, - "grunt-wp-i18n": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/grunt-wp-i18n/-/grunt-wp-i18n-1.0.3.tgz", - "integrity": "sha512-CJNbEKeBeOSAPeaJ9B8iCgSwtaG63UR9/uT46a4OsIqnFhOJpeAi138JTlvjfIbnDVoBrzvdrKJe1svveLjUtA==", - "dev": true, - "requires": { - "grunt": "^1.0.3", - "node-wp-i18n": "^1.2.2" - } - }, "gzip-size": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-3.0.0.tgz", @@ -9800,12 +9762,6 @@ } } }, - "has-color": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", - "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=", - "dev": true - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -14080,51 +14036,6 @@ } } }, - "node-wp-i18n": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/node-wp-i18n/-/node-wp-i18n-1.2.3.tgz", - "integrity": "sha512-YMzMcsjXbGYDB9vHyb289CYXAGmXhcNLbeTlOnWgPNkZd9xrovcbRd7cQyKd9BQHOjS7Nw8WCbJ7nvtR7rc0rg==", - "dev": true, - "requires": { - "bluebird": "^3.4.1", - "gettext-parser": "^3.1.0", - "glob": "^7.0.5", - "lodash": "^4.14.2", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "tmp": "^0.0.33" - }, - "dependencies": { - "gettext-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/gettext-parser/-/gettext-parser-3.1.1.tgz", - "integrity": "sha512-vNhWcqXEtZPs5Ft1ReA34g7ByWotpcOIeJvXVy2jF3/G2U9v6W0wG4Z4hXzcU8R//jArqkgHcVCGgGqa4vxVlQ==", - "dev": true, - "requires": { - "encoding": "^0.1.12", - "readable-stream": "^3.2.0", - "safe-buffer": "^5.1.2" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "readable-stream": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", - "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", diff --git a/package.json b/package.json index 10999ee293a..2318b2ad736 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "lint:js": "eslint assets/js --ext=js", "test:e2e": "./tests/bin/e2e-test-integration.js", "test:e2e-dev": "./tests/bin/e2e-test-integration.js --dev", - "makepot": "grunt makepot", + "makepot": "composer run-script makepot", "git:update-hooks": "rm -r .git/hooks && mkdir -p .git/hooks && node ./node_modules/husky/husky.js install" }, "devDependencies": { @@ -30,14 +30,13 @@ "chai": "4.2.0", "chai-as-promised": "7.1.1", "commander": "4.1.0", - "eslint-plugin-jest": "23.6.0", "config": "3.2.5", "cross-env": "6.0.3", "eslint": "6.8.0", "eslint-config-wpcalypso": "5.0.0", + "eslint-plugin-jest": "23.6.0", "github-contributors-list": "https://github.com/woocommerce/github-contributors-list/tarball/master", "grunt": "1.0.4", - "grunt-checktextdomain": "1.0.1", "grunt-contrib-clean": "2.0.0", "grunt-contrib-concat": "1.0.1", "grunt-contrib-copy": "1.0.0", @@ -52,7 +51,6 @@ "grunt-sass": "3.1.0", "grunt-shell": "3.0.1", "grunt-stylelint": "0.13.0", - "grunt-wp-i18n": "1.0.3", "husky": "4.2.1", "istanbul": "1.0.0-alpha.2", "jest": "25.1.0", From fe3a38b6fb93c6879e0b7edaac7bb7b795e1628f Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 5 Feb 2020 10:42:49 -0300 Subject: [PATCH 4/5] Replaced old "i18n" grunt task with new makepot script --- Gruntfile.js | 3 +-- package.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 00eea59b170..bb38d5151fc 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -303,8 +303,7 @@ module.exports = function( grunt ) { // Register tasks. grunt.registerTask( 'default', [ 'js', - 'css', - 'i18n' + 'css' ]); grunt.registerTask( 'js', [ diff --git a/package.json b/package.json index 2318b2ad736..19d69d6c777 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "license": "GPL-3.0+", "main": "Gruntfile.js", "scripts": { - "build": "grunt", + "build": "grunt && npm run makepot", "build-watch": "grunt watch", "lint:js": "eslint assets/js --ext=js", "test:e2e": "./tests/bin/e2e-test-integration.js", From a438c3548e8d8a08ed91d29b448be9677e55019b Mon Sep 17 00:00:00 2001 From: Peter Fabian Date: Wed, 5 Feb 2020 17:16:00 +0100 Subject: [PATCH 5/5] Install i18n during e2e tests This should make npm run build succeed again. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index a6773e3b3a7..961033c52c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,6 +38,7 @@ matrix: - name: "E2E tests" php: 7.4 script: + - composer require wp-cli/i18n-command - npm run build - docker-compose up --build -d - bash tests/bin/run-e2e-CI.sh