Closed sanzeeb3 closed 2 years ago
When I created a pot file with wp i18n make-pot command, it doesn't look for strings in the build directory and only looks for source directory.
wp i18n make-pot
Currently, it only shows the string in the source directory. Example. src/edit.js:905, but not dist/index.js:1
src/edit.js:905
dist/index.js:1
#: assets/block/src/edit.js:905 msgid "General:" msgstr ""
instead of expected:
#: assets/block/dist/index.js:1 #: assets/block/src/edit.js:905 msgid "General:" msgstr ""
The build is created using 'wp-scripts'. Example:
"scripts": { "build": "wp-scripts build assets/block/src/index.js --output-path=assets/block/dist",
Here src is source dist is build. Is there anything else I should include or is it excluded by default?
src
dist
On debug, it does show:
Debug: Parsing file assets/block/dist/index.js (0.531s)
Found out I was on a lower version of wp-cli. Updating to the latest version fixed the issue.
When I created a pot file with
wp i18n make-pot
command, it doesn't look for strings in the build directory and only looks for source directory.Currently, it only shows the string in the source directory. Example.
src/edit.js:905
, but notdist/index.js:1
instead of expected:
The build is created using 'wp-scripts'. Example:
Here
src
is sourcedist
is build. Is there anything else I should include or is it excluded by default?On debug, it does show: