Created a slack integration that posts to the scratch-ops channel and ddded the token as ENV variable in travis.
Configured the slack notification to only post on failure.
* tx-pull-www: pull www translations from transifex
* validate-www: check www for correct placeholders
* add commands to pull and validate www to package.json
* add validating www to the test step
* add pulling www to the update-translations script for the cron job
* changed .tx/config to match the new folder names `scratch-website.<resource-slug>`, and added missing folders. This isn’t needed for the scripts, but it’s useful if you need to pull the translation for a single language/resource
The placeholder checking didn’t work if the translation’s grammar generated a different number of parsed elements.
E.g., in English:
something {placeholder} — two elements
translation
something {placeholder} something — three elements
I determined that placeholders are always array elements in the parsed array, so filter for Array elements and check that there are the same number of array elements.
* Add travis deploy step for cron job to update automatically.
* switch to reviewed translations
* make update script check for non-zero return codes from the update and test.
* bumped minor version
* added localeMap for converting between transifex locales and the ones used by Scratch (e.g., pt-br - pt_BR)
* using the transifex node package to automatically sync translations
* added scripts:
* sync_tx_src: uploads an en.json source file, for use by client packages
* sync_tx_translations: downloads gui translations, used by this repo, flattens Chrome i18n json into plain key-value json.
* sync_tx_blocks: same as above, but blocks need slightly different handling
* validate_translations: check the translation json files for basic translation errors
* tx_util - methods shared by sync and validate
* simplified build-data because jsons have already been flattened
* added new npm tasks