diff --git a/tcii18n/translator.py b/tcii18n/translator.py index d6ff9e9..5a3f4ee 100644 --- a/tcii18n/translator.py +++ b/tcii18n/translator.py @@ -13,3 +13,4 @@ def translate(self, sentence, **kwargs): for key, value in kwargs.items(): row[1] = row[1] % {key: value} return row[1] + return sentence diff --git a/test/i18n.py b/test/i18n.py index 3c0697d..877b03d 100644 --- a/test/i18n.py +++ b/test/i18n.py @@ -21,3 +21,6 @@ def test_switch_language(self): self.assertEqual(self.trans_it('TCI title'), 'ITC titolo') self.assertEqual(self.trans_it('Welcome %(user)s!', user='John'), 'Benvenuto John!') + + def test_display_unknown_message(self): + self.assertEqual(self.trans('Unknown message'), 'Unknown message')