From b662da599a1cf673790648f5c0c7b6962e529bfa Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 1 May 2018 14:11:38 +0200 Subject: Debug info for i18n --- jfr_playoff/i18n.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jfr_playoff/i18n.py b/jfr_playoff/i18n.py index e22a563..c4134a9 100644 --- a/jfr_playoff/i18n.py +++ b/jfr_playoff/i18n.py @@ -2,6 +2,8 @@ import re +from jfr_playoff.logger import PlayoffLogger + PLAYOFF_I18N_DEFAULTS = { 'SCORE': 'wynik', 'FINAL_STANDINGS': 'klasyfikacja koĊ„cowa', @@ -27,5 +29,10 @@ class PlayoffI18N(object): def __get_translation(self, string): for dictionary in [self.settings, PLAYOFF_I18N_DEFAULTS]: if string in dictionary: - return dictionary[string].decode('utf8') + translation = dictionary[string].decode('utf8') + PlayoffLogger.get('i18n').info( + 'translation for %s: %s', string, translation) + return translation + PlayoffLogger.get('i18n').info( + 'translation for %s not found', string) return '{{%s}}' % (string) -- cgit v1.2.3