From 46e9d4197a621b7a735040913544977167bf8672 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 24 Oct 2017 10:21:41 +0100 Subject: [PATCH] Use the 'and' feature! --- scripts/gen-i18n.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/gen-i18n.js b/scripts/gen-i18n.js index cbef54ba9c..670089ba63 100755 --- a/scripts/gen-i18n.js +++ b/scripts/gen-i18n.js @@ -176,10 +176,8 @@ for (const path of SEARCH_PATHS) { const trObj = {}; for (const tr of translatables) { trObj[tr] = tr; - if (tr.includes("|")) { - if (inputTranslationsRaw[tr]) { - trObj[tr] = inputTranslationsRaw[tr]; - } + if (tr.includes("|") && inputTranslationsRaw[tr]) { + trObj[tr] = inputTranslationsRaw[tr]; } }