cedaro / grunt-wp-i18n

Internationalize WordPress themes and plugins with Grunt.
MIT License
160 stars 25 forks source link

Make PO task #39

Closed GaryJones closed 1 year ago

GaryJones commented 9 years ago

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

bradyvercher commented 9 years ago

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

shivapoudel commented 9 years ago

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

GaryJones commented 9 years ago

@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?

bradyvercher commented 9 years ago

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.

shivapoudel commented 9 years ago

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

GaryJones commented 9 years ago

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