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

Add auto-i18n action for writing strings in .pot file #27

Open
hearvox opened this issue Jan 24, 2020 · 3 comments
Open

Add auto-i18n action for writing strings in .pot file #27

hearvox opened this issue Jan 24, 2020 · 3 comments
Labels
help wanted Extra attention is needed type:enhancement New feature or request.

Comments

@hearvox
Copy link

hearvox commented Jan 24, 2020

Consider adding a way to automatically update the plugin's .pot file. If you decide to pursue this, of possible help are these Grunt tasks that scan a plugin's files for translation functions, then write their locations, internationalized strings, and accompanying messages (if any) in the .pot:
https://www.npmjs.com/package/grunt-wp-i18n
https://www.npmjs.com/package/grunt-pot

And here's a GitHub Action that may do the same:
WP Pot Generator
https://github.com/marketplace/actions/wp-pot-generator

Thanks.

@hearvox hearvox added the type:enhancement New feature or request. label Jan 24, 2020
@hearvox hearvox changed the title Add auto-i18n action for writing string in .pot file Add auto-i18n action for writing strings in .pot file Jan 24, 2020
@jeffpaul
Copy link
Member

The POT generator makes a ton of sense, especially as that allows us to pull that step from our manual release process (example) and ensure it's handled automatically. The existing POT generator may be sufficient, though I can see where adding that into our plugin deploy action could be nice.

@helen
Copy link
Collaborator

helen commented Mar 4, 2020

The existing Action looks like it may work just fine, it does seem like using the wp-cli command is correct because that actually picks up translations in JS files. I think the correct next step here is to test it (any takers?) and if it works as advertised, add that to an example workflow file.

@jeffpaul jeffpaul added the help wanted Extra attention is needed label Mar 6, 2020
@varunsridharan
Copy link

@jeffpaul @helen
I am the author of WP Pot Generator and yes it uses WP-Cli to generate POT File.
But to be honest i haven't tested anything with Javascript file. i would be happy to update my action if it does not work with JS

@jeffpaul jeffpaul added this to the Future Release milestone May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed type:enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

4 participants