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
Update scripts and docs to use yarn where appropriate
Most `npm` operations are replaced with `yarn`, which generally has better
behavior. However, steps like publish that write to the NPM registry are left to
`npm`, which currently handles these tasks best.
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`.
"start:js-sdk": "node scripts/npm-sub.js matrix-js-sdk run start:watch",
50
-
"start:js-sdk:prod": "cross-env NODE_ENV=production node scripts/npm-sub.js matrix-js-sdk run start:watch",
51
-
"start:react-sdk": "node scripts/npm-sub.js matrix-react-sdk run start:all",
52
-
"start:react-sdk:prod": "cross-env NODE_ENV=production node scripts/npm-sub.js matrix-react-sdk run start:all",
53
-
"start": "npm run build:js-sdk && npm run build:react-sdk && concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n js-sdk,react-sdk,reskindex,res,riot-js \"npm run start:js-sdk\"\"npm run start:react-sdk\"\"npm run reskindex:watch\"\"npm run start:res\"\"npm run start:js\"",
54
-
"start:prod": "npm run build:js-sdk && npm run build:react-sdk && concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n js-sdk,react-sdk,reskindex,res,riot-js \"npm run start:js-sdk:prod\"\"npm run start:react-sdk:prod\"\"npm run reskindex:watch\"\"npm run start:res\"\"npm run start:js:prod\"",
0 commit comments