No description
Find a file
2024-11-29 03:30:18 +00:00
.github ci: add signature assistant workflow 2024-11-25 07:57:44 -08:00
.husky chore: add husky hook for commitlint 2024-01-16 10:33:36 -08:00
.tx New scripts to support www in scratch-l10n 2019-02-12 10:50:43 +01:00
editor fix: pull new editor translations from Transifex 2024-10-17 03:27:35 +00:00
images Add contact-us-form screenshot 2020-05-28 14:11:31 -04:00
lib fix: only retry the actual download 2024-10-29 08:57:22 -07:00
scripts fix: stop trying to assign an array to process.exitCode 2024-10-30 13:02:42 -07:00
src fix: specify file extension for ./file.js imports 2024-11-01 15:29:06 -07:00
www fix: pull new editor translations from Transifex 2024-11-29 03:30:18 +00:00
.babelrc Add scripts for automation 2018-11-25 18:05:44 -05:00
.eslintignore Remove dependency on react-intl 2021-06-15 08:56:03 -04:00
.eslintrc.js fix: use es6 in eslint to avoid disabling linting on some lines 2022-09-26 15:16:18 -04:00
.gitattributes add .gitattributes 2021-06-11 14:06:08 -07: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
.nvmrc chore(deps): update dependency node to v20 2024-10-28 17:18:52 +00:00
CHANGELOG.md chore(release): 5.0.9 [skip ci] 2024-11-28 10:51:48 +00:00
commitlint.config.js chore: add commitlint 2024-01-16 10:33:36 -08:00
LICENSE chore!: set license to AGPL-3.0-only 2024-11-25 07:57:44 -08:00
package-lock.json chore(release): 5.0.9 [skip ci] 2024-11-28 10:51:48 +00:00
package.json chore(release): 5.0.9 [skip ci] 2024-11-28 10:51:48 +00:00
README.md docs: add basic conventional commit info to README.md 2024-01-16 10:33:36 -08:00
release.config.js ci: use semantic-release 2024-01-16 10:33:36 -08:00
renovate.json5 chore(deps): use js-lib-bundled Renovate config 2024-02-21 09:30:45 -08:00
TRADEMARK Include default Scratch License and TM files 2018-06-19 17:03:04 -04:00
webpack.config.js build: fix webpack build 2024-10-29 08:27:10 -07: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

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. Pulling new translations from Transifex is automated and will increase the patch version.

Deprecations

We are moving away from using the tx cli, so the .tx/config file will eventually be deprecated.

Committing

This project uses semantic release to ensure version bumps follow semver so that projects depending on it don't break unexpectedly.

In order to automatically determine version updates, semantic release expects commit messages to follow the conventional-changelog specification.

Here's a quick introduction:

  • Prefix your commit subject with fix: if it fixes a bug but doesn't add any new functionality and doesn't change the API.
  • Prefix your commit subject with feat: if it adds new functionality but maintains backwards compatibility.
  • Include BREAKING CHANGE: as a footer in your commit body, or add ! to the commit subject, if the change breaks compatibility with existing code.
  • Other prefixes, such as chore:, docs:, etc., are allowed but will not change the version or cause a new release. These should only be used for changes that do not affect functionality.

Example commit messages

For more examples, see the conventional commits documentation.

Fix

This will increase the z in Version x.y.z.

fix: fix typo in the sandwich-making instructions

Feature

This will increase the y in Version x.y.z and reset z to 0.

feat: add support for halloumi cheese

Breaking Change

Either of these will increase the x in Version x.y.z and reset y and z to 0.

fix: refine our definition of a sandwich

BREAKING CHANGE: support for hot dogs has been removed as we no longer consider them sandwiches
fix!: remove support for hot dogs as we no longer consider them sandwiches

Commitizen

You can use the commitizen CLI to make commits formatted in this way:

npm install -g commitizen@latest cz-conventional-changelog@latest

Now you're ready to make commits using git cz.