Invidious is an alternative front-end to YouTube
i18n: return 'key' if 'key' is not in locales files
Samantaz Fox2ea0590b032c
diff --git a/src/invidious/helpers/i18n.cr b/src/invidious/helpers/i18n.crindex ab959c13..6e29b498 100644--- a/src/invidious/helpers/i18n.cr+++ b/src/invidious/helpers/i18n.cr@@ -65,9 +65,11 @@ def load_all_localesenddef translate(locale : String?, key : String, text : String | Nil = nil) : String- # Log a warning if "key" doesn't exist in en-US locale+ # Log a warning if "key" doesn't exist in en-US locale and return+ # that key as the text, so this is more or less transparent to the user.if !LOCALES["en-US"].has_key?(key)LOGGER.warn("i18n: Missing translation key \"#{key}\"")+ return keyend# Default to english, whenever the locale doesn't exist,