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

Update WP-CLI invocation of i18n make-pot #1327

Closed
westonruter opened this issue Aug 9, 2018 · 3 comments
Closed

Update WP-CLI invocation of i18n make-pot #1327

westonruter opened this issue Aug 9, 2018 · 3 comments
Labels
Milestone

Comments

@westonruter
Copy link
Member

@westonruter westonruter commented Aug 9, 2018

WP-CLI 2.0 includes built-in support for wp i18n make-pot: https://make.wordpress.org/cli/2018/08/08/wp-cli-v2-0-0-release-notes/

We make available a Grunt command for this:

https://github.com/Automattic/amp-wp/blob/d2ad9d61fc0607334b6f282e7c14844330c8e1b2/Gruntfile.js#L51-L52

I assume the performance issues with make-pot have been resolved so we can eliminate the dedicated build-release command in favor of re-generating the translation files when doing a regular build:

https://github.com/Automattic/amp-wp/blob/d2ad9d61fc0607334b6f282e7c14844330c8e1b2/Gruntfile.js#L181-L185

We can eliminate the instructions to install the i18n package from contributing.md (see cc636ce).

@westonruter westonruter added this to the v1.0 milestone Aug 9, 2018
@westonruter
Copy link
Member Author

@westonruter westonruter commented Aug 9, 2018

@swissspidy
Copy link
Collaborator

@swissspidy swissspidy commented Aug 9, 2018

Let me know if I can help with anything.

For best performance you can use the --exclude argument to further tweak the default settings. The following files and folders are always excluded: node_modules, .git, .svn, .CVS, .hg, vendor, *.min.js.

@westonruter
Copy link
Member Author

@westonruter westonruter commented Aug 9, 2018

@swissspidy Thank you for the offer. We'd benefit a lot from an audit of how i18n is being handled. I've opened a PR to try to update things to use the latest WP-CLI tooling. Would you please review #1329 and comment on whether it is being effective? I've added some questions in the description. I'm also not clear on whether the JS i18n is actually working, but I am seeing the POT file include the JS strings.

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

Successfully merging a pull request may close this issue.

None yet
2 participants