Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Convert bash scripts into grunt tasks #28

kaareal opened this Issue · 8 comments

3 participants


Seems a bit old fashioned to use bash.
Specially when all the bash script does is to pass along some arguments to .js file.


I'm working on a grunt plugin grunt-jsxgettext. [1]

It already handles extraction via jsxgettext but I'm thinking I'm going to add the additional wrappers for the gettext tools too so:

  • locale creation
  • locale merging
  • compilation

This should have the net result of providing grunt support for most of the existing scripts.



Ok this is now updated with all of the above. Still early days but please take a look and kick the tyres. Patches/Tweaks/Fixes welcome :)


@ozten I'm thinking I'd like to rename grunt-jsxgettext -> grunt-i18n-abide (Fwiw: we're going to be using this here: which provides a good opportunity to find/fix any bugs in the grunt tasks.) Would you be in favour of that in principle?


This is awesome! I'm traveling, but should be back in a day with focus to check this out.


@muffinresearch I've not used grunt, as I'm from the 1800s.

This looks really cool. The main customer of the bash scripts, is L10n wranglers like mathjazz from Mozilla.

I guess what I'm wondering is if
1) grunt-cli or whatever dependencies could be included in i18n-abide's package.json
2) We could update the docs with grunt commands

The goal is that mathjazz does npm install and then, after reading the updated docs, just does abideExtract instead of extract-pot, etc. This wouldn't be a huge disruption to his workflow.

Is it that easy or is it more involved?

Can you make a pull request with these changes? I'm happy to adopt grunt-i18n-abide under those conditions.

Thanks again!


@ozten I'm fairly new to grunt too but having used it on Zippy - I'm a convert. It's ideal for node projects as with a small amount of config and some added grunt plugin deps you can quickly automate everything from minification tools / jshint / css preprocessors to running things like nodemon to reload your server when code changes.

Currently I'm about to integrate the grunt-i18n-abide commands into our flow. So if I do that first and let that be the guinea pig - I can then bugfix the grunt stuff as I work through it. It's going to be an end to end thing so it should be making use of everything in grunt-i1a8n-abide.

Then once that's good this is what I propose:

  • I'll put this in npm
  • Move it to a Moz repo

Once this is all up and running I'll be happy to add docs as to how to use this which can provide a pretty much cut and pastable gruntfile config.

The consumer of i18n-abide and grunt-i18n-abide would just need to add this config to their project's gruntfile and once they have this running.

grunt abideExtract etc should do the same job as the bash scripts.

I'll update this issue when I start pulling this together.


Excellent, looking forward to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.