grunt-wp-i18n icon indicating copy to clipboard operation
grunt-wp-i18n copied to clipboard

Make PO task

Open GaryJones opened this issue 10 years ago • 6 comments

The grunt-potomo task is useful for creating a .mo from a .po, but the missing link is being able to create a .po file from a .pot file and having saved to a custom directory.

Is that something this package could do? Dependency on grunt copy package, perhaps accepting a command line arg for the language-locale? e.g. grunt makepo en_GB

GaryJones avatar Oct 09 '14 09:10 GaryJones

Aside from copying and renaming the file, is there anything else this task would need to accomplish?

bradyvercher avatar Oct 14 '14 00:10 bradyvercher

:+1: GaryJones. If there needed features for grunt-potomo then you can sumbit the PR :)

shivapoudel avatar Oct 14 '14 05:10 shivapoudel

@shivapoudel I'm not worried if it's a task in wp-i18n or potomo or in a standalone (little more than a wrapper around grunt-contrib-copy) task that can take the src of a .pot, and copy it to a dest, renamed, and have any headers updated for it.

I guess a comparison of WP core .pot vs en_GB (or another language) .po would reveal what, if any, changes in headers there were.

If I'm writing a plugin, and someone new clones it and wants to write me a French translation, I want them to be able to do something like grunt makepo fr_FR, and have the .po setup in the location I've determined, ready for them to work on it.

Does that make sense?

GaryJones avatar Oct 14 '14 13:10 GaryJones

I put together a quick task for doing this in the feature-makepo branch. It'll be awhile before I have time to wrap up the tests and docs, so feel free to submit PRs or suggest improvements.

bradyvercher avatar Oct 17 '14 15:10 bradyvercher

@bradyvercher when will this ship to the users. I think now we have to merge feature-makepo branch.

shivapoudel avatar Nov 03 '14 10:11 shivapoudel

It's on my list to test this branch. Got distracted last night but will try this week.

GaryJones avatar Nov 03 '14 13:11 GaryJones