Add instructions for changing translated strings

Add instructions to the developer documentation for proper housekeeping of the
translations when editing strings.
pull/6528/head
Aidan Gauland 2018-04-15 22:42:58 +12:00
parent c8a3471135
commit 69bb020e5c
1 changed files with 5 additions and 0 deletions

View File

@ -26,6 +26,11 @@ function getColorName(hex) {
} }
``` ```
## Editing existing strings
1. Edit every occurrence of the string in `src/i18n/strings/en_EN.json` and inside `_t()` and `_td()` in the JSX files.
1. Remove every translation of this string from `src/i18n/strings/*.json`, _except_ for `src/i18n/strings/en_EN.json`, as that string no longer exists.
## Adding new strings ## Adding new strings
1. Check if the import ``import { _t } from 'matrix-react-sdk/lib/languageHandler';`` is present. If not add it to the other import statements. Also import `_td` if needed. 1. Check if the import ``import { _t } from 'matrix-react-sdk/lib/languageHandler';`` is present. If not add it to the other import statements. Also import `_td` if needed.