Skip to content
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

make-pot pointing to raw JSX file, not built JS file #212

Closed
cliffordp opened this issue May 4, 2020 · 6 comments
Closed

make-pot pointing to raw JSX file, not built JS file #212

cliffordp opened this issue May 4, 2020 · 6 comments

Comments

@cliffordp
Copy link
Contributor

wp i18n make-pot . languages/rankbear.pot --include='dist,src' --exclude='*.jsx,*.map,*.svg,*.txt' --color'

Example built file (currently private project but will be public) in my dist directory:
image

Why does the .pot file point to the JSX file instead of the built JS file?
image

@ocean90
Copy link
Contributor

ocean90 commented May 5, 2020

Sounds like a duplicate of #185. To verify which files are parsed you can use the --debug (#183) command.

@cliffordp
Copy link
Contributor Author

Thanks, @ocean90. I tried --debug and EVERY file is still in there even though excluded. I assumed this meant it was able to find it but then it must have known to exclude it once found (such as excluded by file extension *.jsx).

If that's not what debug's output is telling me, then the exclude isn't working, I guess being overridden by include, which seems odd.

If that's the case, it's not quite the same as #185, since I don't have a wildcard include, only a wildcard exclude.

Thoughts?

@ocean90
Copy link
Contributor

ocean90 commented May 5, 2020

Unfortunately, include is broken too, see #186.

@cliffordp
Copy link
Contributor Author

Interesting. TYVM for the help.

Any idea how bugs in this CLI command affect ability to translate on .org, such as if my plugin has JSX that builds to JS and does not ship JSX files to .org, and I don't generate a .pot for .org, then things should still be translatable by .org's team because all they'd know about is the built JS files, right?

@ocean90
Copy link
Contributor

ocean90 commented May 5, 2020

Correct, the built files are what really matters. For testing you can use wp i18n make-pot . on the final plugin files and check that everything is included in the POT file.

On w.org we're still using 2.2.0 fwiw.

@cliffordp
Copy link
Contributor Author

gracias!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants