From 6d74d5f8b7d11259d71246614392bbb40072056a Mon Sep 17 00:00:00 2001 From: Aidan Gauland Date: Sat, 21 Apr 2018 21:36:41 +1200 Subject: [PATCH] Correct instructions to use the i18n scripts As per code review feedback, we should use the npm run scripts i18n and i18n-prune instead of editing the i18n JSON files directly. --- docs/translating-dev.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/translating-dev.md b/docs/translating-dev.md index b72c902b..c2ad0986 100644 --- a/docs/translating-dev.md +++ b/docs/translating-dev.md @@ -28,8 +28,9 @@ 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. +1. Edit every occurrence of the string inside `_t()` and `_td()` in the JSX files. +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.) +1. Run `npm run i18n-prune` to remove the old string from `src/i18n/strings/*.json`. ## Adding new strings