From f712804018cc28d7a43cf6d8da95cd134bbdf9d7 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 19 Oct 2017 11:13:42 +0100 Subject: [PATCH] Add note about it apparently segfaulting on node 6 --- docs/translating-dev.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/translating-dev.md b/docs/translating-dev.md index 77178c7d4a..b4682be136 100644 --- a/docs/translating-dev.md +++ b/docs/translating-dev.md @@ -30,7 +30,7 @@ function getColorName(hex) { 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. 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. - 1. Run `npm run i18n` to update ``src/i18n/strings/en_EN.json`` (if it fails because it can't find the script, your dev environment predates the script, so reinstall/link react-sdk with `npm link ../matrix-react-sdk`). + 1. Run `npm run i18n` to update ``src/i18n/strings/en_EN.json`` (if it fails because it can't find the script, your dev environment predates the script, so reinstall/link react-sdk with `npm link ../matrix-react-sdk`). If it segfaults, you may be on Node 6, so try a newer version of node. 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). ## Adding variables inside a string.