No description
Find a file
chrisgarrity 7bf6affd85 update translations for added languages
Also pick up some hungarian changes (a reviewer must be working this morning).
2019-01-16 09:57:10 -05:00
.tx sync translations from Transifex 2018-09-26 15:43:18 -04:00
editor update translations for added languages 2019-01-16 09:57:10 -05:00
scripts Fix placeholder checking 2019-01-10 11:51:22 -05:00
src Add fully reviewed languages 2019-01-16 09:45:13 -05:00
www Add www resources 2018-03-13 11:46:37 -04:00
.babelrc Add scripts for automation 2018-11-25 18:05:44 -05:00
.eslintignore L10n packaging (#1) 2017-09-21 11:54:41 -04:00
.eslintrc.js Add www resources 2018-03-13 11:46:37 -04:00
.gitignore L10n packaging (#1) 2017-09-21 11:54:41 -04:00
.jshintrc Add www resources 2018-03-13 11:46:37 -04:00
.npmignore Add www resources 2018-03-13 11:46:37 -04:00
.travis.yml fix bad condition and add auth 2018-12-10 09:18:27 -05:00
LICENSE Include default Scratch License and TM files 2018-06-19 17:03:04 -04:00
package-lock.json push/pull scripts need transifex as a dependency 2018-11-29 17:02:00 -05:00
package.json Automate and switch to reviewed 2018-12-06 11:45:45 -05:00
README.md Update README.md 2018-11-27 18:34:22 -05:00
TRADEMARK Include default Scratch License and TM files 2018-06-19 17:03:04 -04:00
webpack.config.js Add scripts for automation 2018-11-25 18:05:44 -05:00

scratch-l10n

Translation of all Scratch projects is managed on the Transifex service: https://www.transifex.com/llk/public

This repository collects translations submitted to the Scratch projects on Transifex. Please do not submit PRs. If you would like to contribute translations, please sign up to translate on Transifex.

Using scratch-l10n in development

Installation

npm install --save-dev scratch-l10n

Basic Use

import locales, {localeData, isRtl} from 'scratch-l10n';
import editorMessages from 'scratch-l10n/locales/editor-messages';
  • locales: currently supported locales for the Scratch project
  • isRtl: function that returns true if the locale is one that is written right-to-left
  • localeData: locale data for the supported locales, in the format accepted by addLocaleData required by react-intl
  • editorMessages: the actual message strings for all supported locales for a particular resource. editorMessages collects all the strings for the interface, extensions and paint-editor.

Useful Scripts

scratch-l10n provides:

  • build-i18n-src: script that uses babel and plugins to extract all FormattedMessage strings for translation. Combines the message from all the source files into one en.json
  • tx-push-src: script to push the en.json file to Transifex. Requires that the environment variable TX_TOKEN is set with a value that has developer access to the Scratch projects on Transifex (i.e. Scratch Team only)

Versioning

scratch-l10n uses semantic versioning - breaking changes will increment the major version number, and new features (e.g. a new language) will increment the minor version number. However, the patch number is actually a datetime string. That way it's easy to see how recently the translations were updated.

In general, changes that require a PR (new functionality, new language) should increment the minor version. Pulling new translations from Transifex is automated and will commit to master directly.