Skip to content

Commit 1b96f5f

Browse files
committed
Refine the --exclude option for make-pot
This adds the `node_modules` and `wordpress` directories to the exclude list for the `make-pot` command. Because WordPress is installed as a Composer dependency, the strings in WordPress Core could unintentionally be included in translation files when a text domain is missing. There should not be any strings that need translating in these directories, so excluding them saves time and is more performant.
1 parent 15c55b6 commit 1b96f5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"i18n-mo": "vendor/bin/wp i18n make-mo ./languages",
7070
"i18n-php": "vendor/bin/wp --allow-root i18n make-php ./languages",
7171
"i18n-po": "vendor/bin/wp i18n update-po ./languages/wp-module-performance.pot ./languages",
72-
"i18n-pot": "vendor/bin/wp i18n make-pot . ./languages/wp-module-performance.pot --domain=wp-module-performance --headers='{\"Report-Msgid-Bugs-To\":\"https://github.com/newfold-labs/wp-module-performance/issues\",\"POT-Creation-Date\":null}' --exclude=src,tests,vendor,assets --include=build/*.min.js",
72+
"i18n-pot": "vendor/bin/wp i18n make-pot . ./languages/wp-module-performance.pot --domain=wp-module-performance --headers='{\"Report-Msgid-Bugs-To\":\"https://github.com/newfold-labs/wp-module-performance/issues\",\"POT-Creation-Date\":null}' --exclude=src,tests,vendor,assets,node_modules,wordpress --include=build/*.min.js",
7373
"test": [
7474
"phpunit --bootstrap tests/phpunit/bootstrap.php",
7575
"codecept run wpunit"

0 commit comments

Comments
 (0)