mozilla/fxa-content-server — pull request #592 by pdehaan (2014-02-20 22:54:38+00:00)
Title: .po file linting!

In my efforts to better understand Grunt file I/O, I give you .po file linting against a .pot file schema!

It should verify that the values in the app/i18n/**/*.json files contain key values and all the required properties from the .POT files. Based on my testing it will fail the build/task if the locale JSON file values aren't string values or if required properties from the .POT files are missing. (But it won't complain if you add extra keys to the JSON files.)

1. Converts the `/locale/templates/LC_MESSAGES/{client,server}.pot` files to `/.tmp/i18n/templates/{client,server}.pot.json` (via the existing **po2json** task).
2. Converts the `{client,server}.pot.json` files to z-schema happy schemas (via the new **localeschema** Grunt task).
3. Lints the `/app/i18n/**/{client,server}.json` files against the proper schemas created in step 2 (via the new **zschema** task and grunt-z-schema module).

This is triggered by running the existing lint task (`$ grunt lint` -- with all the other linters) or more directly via `$ grunt polint`, which is an alias for `['po2json:template', 'localeschema', 'zschema']`.

Sure, possibly/probably useless, so feel free to kick to the curb and attach a whimsical GIF.