2019-01-18 12:33:24 -05:00
### Resolves
- Resolves #
### Proposed Changes
_Describe what this Pull Request does_
## Checklist for updating translations
There are two situations in which we create manual PRs to update translations:
1. We don't want to wait for Travis's automatic weekly update; or,
2. We need to add a language that has become ready
### 1. Updating translations manually
2019-04-17 13:56:42 -04:00
* [ ] Pull editor translations from Transifex with `> npm run pull:editor`
* [ ] Pull www translations from Transifex with `> npm run pull:www`
2019-01-18 12:33:24 -05:00
* [ ] Test the result with `> npm run test`
* [ ] Confirm that you see changes to files like `editor/<resource>/<lang code>.json`
### Adding a language
* [ ] Edit `src/supported-locales.js` :
* [ ] Add entry for the language in the `locales` const
* [ ] Check if language is right-to-left. If so:
* Add entry in `rtlLocales`
2019-02-07 17:48:37 -05:00
* [ ] Check if the new language uses a country code
2019-02-11 14:29:40 -05:00
* Check [https://www.transifex.com/explore/languages ](https://www.transifex.com/explore/languages ). If the language has a country code:
2019-01-18 12:33:24 -05:00
* [ ] Edit `src/supported-locales.js` :
2019-02-11 14:29:40 -05:00
* Add new entry to `localeMap` . Format is `'<W3C HTML browser locale string>': '<Transifex ICU locale string>'`
2019-01-22 09:51:45 -05:00
* [ ] Edit `.tx/config` :
2019-02-11 14:29:40 -05:00
* Add to the `lang_map` list. Format is `<Transifex ICU locale string>:<W3C HTML browser locale string>`
2019-01-22 09:51:45 -05:00
* NOTE: we are moving away from using the `tx` cli; `.tx/config` will eventually be deprecated
2019-01-18 12:33:24 -05:00
* [ ] Edit `src/index.js` :
* [ ] Add 'import' line and export line
* [ ] Add entry in `localeData` array
2019-02-13 14:19:03 -05:00
* [ ] Check if locale is in `react-intl`
2019-01-18 12:33:24 -05:00
* Look in [https://unpkg.com/react-intl/locale-data/ ](https://unpkg.com/react-intl/locale-data/ )
* If not in `react-intl` :
* [ ] Edit `src/supported-locales.js` :
* In `customLocales` , add entry with parent set to a `react-intl` locale
* [ ] Edit `src/index.js` :
* In `localeData` , add entry for parent locale
2019-02-13 14:19:03 -05:00
* [ ] Update translations per the "Updating translations" section above
2019-01-18 12:33:24 -05:00
* [ ] Confirm that we see changes to:
* [ ] `src/supported-locales.js`
* [ ] `src/index.js`
* [ ] `.tx/config` (if language needed a new locale)
* [ ] Multiple files like `editor/<resource>/<lang code>.json`
2019-02-13 14:19:03 -05:00
* [ ] Bump minor version number in `package.json`
2019-04-24 11:09:24 -04:00
2019-04-25 17:16:58 -04:00
* [ ] **Update scratch-blocks dependency**
* scratch-blocks has its own translations. It will not pick up the new language unless the scratch-l10n dependency in `package.json` is updated to the new minor version.
* [ ] **Add language po files to scratchr2_translations**
* manually update `scratchr2_translations/legacy` with `tx pull -l <locale>` and check in changes
* [ ] **Add language to scratchr2 settings**
* manually update `settings/base.py` with the new language