-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Localization
The file msg/messages.js
defines all the messages used by scratch-blocks.
The file msg/scratch_msgs.js
contains all the translations for scratch-blocks. It is generated from translations in the Scratch translation service Transifex.
The tests ensure that the translations are consistent with the definitions. So adding messages or changing message placeholders require developer access to the Scratch project on Transifex.
If you submit a PR that changes messages.js
and you are not a Scratch Team member, the translation tests should fail. Make sure you check the 'Allow edits from maintainers' option on your PR, and then tag a Scratch Team member to push a commit to your branch that includes translations. All the tests other than test:messages
should run correctly before you submit the PR.
When languages are added in scratch-l10n, the dependency in scratch-blocks needs to be updated, and the new translations downloaded.
- Edit the
package.json
to refer to the version of scratch-l10n that includes the new languages. - Run
npm i scratch-l10n
to install the new version - Run
npm run translate:sync:translations
to download new translations. Make sure there are translations for the new languages.