diff options
author | emkael <emkael@tlen.pl> | 2018-05-01 14:11:38 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-05-01 14:11:38 +0200 |
commit | b662da599a1cf673790648f5c0c7b6962e529bfa (patch) | |
tree | 2f3bf15119d944608164f2273144a6825c042ff2 | |
parent | ddf22911ae7e13f2070b164a060478f309ab09d7 (diff) |
Debug info for i18n
-rw-r--r-- | jfr_playoff/i18n.py | 9 |
1 files changed, 8 insertions, 1 deletions
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) |