Commit graph

3 commits

Author SHA1 Message Date
chrisgarrity
50761ad970 New scripts to support www in scratch-l10n
* 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
2019-02-12 10:50:43 +01:00
chrisgarrity
7d38349a59 Fix placeholder checking
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.
2019-01-10 11:51:22 -05:00
chrisgarrity
1646441f4a rename files for clarity
also made the naming convention consistent (dashes not underscore)
2018-11-27 11:36:37 -05:00
Renamed from scripts/tx_util.js (Browse further)