Commit graph

15 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
7d3a81799f fix bad condition and add auth
And commit to master
2018-12-10 09:18:27 -05:00
chrisgarrity
a591ea9212 [WIP] conditions for cron job on travis 2018-12-07 08:40:46 -05:00
chrisgarrity
65b5158149 Add clarifying comment 2018-12-06 13:44:47 -05:00
chrisgarrity
475aee4a65 Automate and switch to reviewed
* 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.
2018-12-06 11:45:45 -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
chrisgarrity
0f1dafef0e Add bash script for committing sync updates
Also fix copy/paste typo in package.json
2018-11-27 07:32:34 -05:00
chrisgarrity
c286f62d69 Add scripts for automation
* 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
2018-11-25 18:05:44 -05:00
chrisgarrity
dbd31a4d36 Exclude blocks messages from the combined file
Scratch-blocks includes the blocks messages. Excluding them from the editor-msgs file will save >500kb
2018-07-25 15:16:23 -04:00
chrisgarrity
73f9b8619e Refactor data exported for GUI
Create editor folder for all the editor components:
* blocks - from scratch-blocks
* extensions - from scratch-vm
* interface - from scratch-gui
* paint-editor - from scratch-paint.

Update the transifex config, initilaize with the english sources.

Export a combined editor-msgs.js in addition to individual files.

Renamed paint to paint-editor to match the name in transifex.
2018-05-21 09:42:53 -04:00
chrisgarrity
5eaf5ecefe Add pen extension
Add the pen extension and update all the translations.
2017-11-13 11:29:29 -05:00
chrisgarrity
12a43c94d3 Add script for building en.json
Add dependency on babel-cli and the intl plugins for extracting strings from source.

Include script for combining extracted strings into a single source chrome-i18n file as a binary from this package.
2017-10-31 12:31:29 -04:00
chrisgarrity
0cb13cbaee Add scratch-paint
Breaking change - bumped major version to 2.

Restructured to support multiple components. Package default is just localeData for currently supported locales including the name for each language.

messages for each component are exported as separate files in locales. Clients of l10n will need to import messages for each of the compents used and combine them.
2017-10-17 13:28:24 -04:00
chrisgarrity
4a9cdc7f4a L10n packaging (#1)
* Initial version of scratch-l10n package
2017-09-21 11:54:41 -04:00