Commit graph

5 commits

Author SHA1 Message Date
chrisgarrity
9dfe7efab8 fixing jsdoc 2018-06-25 11:52:22 -04:00
chrisgarrity
eca1eec39c Add function to support translation of dynamic menus
Dynamic menus are constructed in the VM. Add a function to ScratchMsgs that it can use to look up localized strings for jsonInit. Add missing strings for dynamic menus.
2018-06-24 18:15:46 -04:00
chrisgarrity
4f146fbcce Update ScratchMsgs export
- Update shims to make sure `msg/scratch_msg.js` is included
- Add missing empty `locales` to ScratchMsgs
2018-06-21 15:13:12 -04:00
chrisgarrity
5cb1651e56 Clarifications and consistency
*  removed all the generated files (<locale>.json, <locale>.js) except for ‘en’ versions and added them to git ignore.
* updated cleanup.sh to use our messages.
* added validation check to fail if any translations include newlines
* skip generating js files other than ‘en’ as we don’t use them
* Revised messages.js to use _single_ quoted strings instead of double (consistent with Blockly - if we need to import more strings), and switch the validations to check for single not double quotes.
* additional small changes for simplicity and ergonomics

Not handling category menu at this time as it’s managed differently in scratch-gui.
2018-06-13 10:50:20 -04:00
chrisgarrity
aa4ecd7e2e * Added Blockly.ScratchMsgs
* Added script to create combined locales `Blockly.ScratchMsgs.locales`
* Regenerated en.json after changing single quoted strings in messages.js to double quoted strings.
* Include `create_scratch_msgs.js` in `npm run translate`
locale=<locale-string>` to the URL.
* Added assertions so translate fails if `messages.js` has incorrect strings, or if any of the downloaded locale json files have errors in the translations.
* Playground will load different locales.
2018-06-08 13:58:59 -04:00