mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Add instructions for changing translated strings
Add instructions to the developer documentation for proper housekeeping of the translations when editing strings.
This commit is contained in:
parent
c8a3471135
commit
69bb020e5c
@ -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
|
||||
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user