From 8447d1501306b9dfbd92b08f5e4abb26d323e68a Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 24 Oct 2017 14:26:30 +0100 Subject: [PATCH] Don't include the |other in the translation value --- scripts/gen-i18n.js | 11 ++++++++--- src/i18n/strings/en_EN.json | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/gen-i18n.js b/scripts/gen-i18n.js index 52c16d25cd..dd990b5210 100755 --- a/scripts/gen-i18n.js +++ b/scripts/gen-i18n.js @@ -232,9 +232,14 @@ for (const path of SEARCH_PATHS) { const trObj = {}; for (const tr of translatables) { - trObj[tr] = tr; - if (tr.includes("|") && inputTranslationsRaw[tr]) { - trObj[tr] = inputTranslationsRaw[tr]; + if (tr.includes("|")) { + if (inputTranslationsRaw[tr]) { + trObj[tr] = inputTranslationsRaw[tr]; + } else { + trObj[tr] = tr.split("|")[0]; + } + } else { + trObj[tr] = tr; } } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b1f457f375..492113989b 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -154,7 +154,7 @@ "Message Pinning": "Message Pinning", "%(displayName)s is typing": "%(displayName)s is typing", "%(names)s and one other are typing": "%(names)s and one other are typing", - "%(names)s and %(count)s others are typing|other": "%(names)s and %(count)s others are typing|other", + "%(names)s and %(count)s others are typing|other": "%(names)s and %(count)s others are typing", "%(names)s and %(lastPerson)s are typing": "%(names)s and %(lastPerson)s are typing", "Failure to create room": "Failure to create room", "Server may be unavailable, overloaded, or you hit a bug.": "Server may be unavailable, overloaded, or you hit a bug.", @@ -564,7 +564,7 @@ "Custom level": "Custom level", "Room directory": "Room directory", "Start chat": "Start chat", - "And %(count)s more...|other": "And %(count)s more...|other", + "And %(count)s more...|other": "And %(count)s more...", "ex. @bob:example.com": "ex. @bob:example.com", "Add User": "Add User", "Something went wrong!": "Something went wrong!",