From 69bb020e5c9a001bc5d2b75e31fd580a8e42a237 Mon Sep 17 00:00:00 2001 From: Aidan Gauland Date: Sun, 15 Apr 2018 22:42:58 +1200 Subject: [PATCH] Add instructions for changing translated strings Add instructions to the developer documentation for proper housekeeping of the translations when editing strings. --- docs/translating-dev.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/translating-dev.md b/docs/translating-dev.md index 3209f1e400..b72c902b51 100644 --- a/docs/translating-dev.md +++ b/docs/translating-dev.md @@ -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.