-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yarn translate:pot
failing if public folder is generated
#2672
Comments
Ok apparently, So my final {
...
"scripts": {
...
"translate:pot": "wp acorn view:cache && wp i18n make-pot . ./resources/lang/sage.pot --ignore-domain --include=\"app,resources,storage\" --exclude=\"public\"",
...
},
...
} Sidenotes:
|
yarn translate:pot
failing if public folder is generated
Following the duplicate bug I posted, to generate the pot file in the beta-2 (where cached views were moved to wp-content/cache/acorn/views) I used the following command:
The only problem is having to update the theme_folder for every project, but it works ok. Now is the only way to do it as plugins normally scan the theme folder only. |
@SergiArias I've used |
@StudioRATATA why wp i18n doesn't play well in beta2? It works flawlessly for me. I tried also the way you recommend in the official documentation and it works except for one thing: In the "content-type" line of the pot file instead of UTF-8 it gives CHARSET. Does it happen to you as well? Unfortunately I don't understand very well this command to propose a solution. |
Description
There is an issue with the WP-CLI dependency, Peast (used to parse ES code). Anyhow the following error is thrown when parsing the content from
public/script/app.js
.I don't believe it's a Sage issue in itself, but more a conflic between mck89/peast and the way Laravel Mix compile JS files.
Also we can get around it by temporarly removing the
public
folder, but a more robust workaround would be to ignore thepublic
folder by adding the--exclude=\"public\"
option in the yarn/npm scriptSteps to reproduce
yarn build
oryarn build:production
yarn translate:pot
Expected behavior: Should generate a .pot file in
resources/lang/
Actual behavior: WP-CLI throw an error and the process exits with the code 255
Reproduces how often: 100%
Versions
Sage: 10.0.0-beta.1: TBA
OS: macOS 11.2.3
The text was updated successfully, but these errors were encountered: