You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1abaf50
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/translating-dev.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,14 +32,14 @@ function getColorName(hex) {
32
32
33
33
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.
34
34
1. Add ``_t()`` to your string. (Don't forget curly braces when you assign an expression to JSX attributes in the render method). If the string is introduced at a point before the translation system has not yet been initialized, use `_td()` instead, and call `_t()` at the appropriate time.
35
-
1. Run `npm run i18n` to update ``src/i18n/strings/en_EN.json``
35
+
1. Run `yarn i18n` to update ``src/i18n/strings/en_EN.json``
36
36
1. If you added a string with a plural, you can add other English plural variants to ``src/i18n/strings/en_EN.json`` (remeber to edit the one in the same project as the source file containing your new translation).
37
37
38
38
## Editing existing strings
39
39
40
40
1. Edit every occurrence of the string inside `_t()` and `_td()` in the JSX files.
41
-
1. Run `npm run i18n` to update `src/i18n/strings/en_EN.json`. (Be sure to run this in the same project as the JSX files you just edited.)
42
-
1. Run `npm run prunei18n` to remove the old string from `src/i18n/strings/*.json`.
41
+
1. Run `yarn i18n` to update `src/i18n/strings/en_EN.json`. (Be sure to run this in the same project as the JSX files you just edited.)
42
+
1. Run `yarn prunei18n` to remove the old string from `src/i18n/strings/*.json`.
0 commit comments