From 0b8ead03e60bf248112d0834ffd064b5ce8ef875 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Sat, 2 Jan 2021 22:43:18 +0100 Subject: [PATCH] Use case-insensitive term for translation (#552) --- bin/proxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/proxy.py b/bin/proxy.py index 09c24c2..95809e0 100755 --- a/bin/proxy.py +++ b/bin/proxy.py @@ -68,7 +68,7 @@ def load_translations(): orig = orig.strip() translation[orig] = trans - translations[lang] = translation + translations[lang.lower()] = translation return translations TRANSLATIONS = load_translations() @@ -128,7 +128,7 @@ def translate(text, lang): """ Translate `text` into `lang` """ - translated = TRANSLATIONS.get(lang, {}).get(text, text) + translated = TRANSLATIONS.get(lang, {}).get(text.lower(), text) if text == translated: print("%s: %s" % (lang, text)) return translated