Skip to content

Commit

Permalink
Merge pull request #12 from Ydrasil/display-unknown-message
Browse files Browse the repository at this point in the history
Display unknown message
  • Loading branch information
Vincent Agnano authored Jun 9, 2017
2 parents 6f3d548 + 9474ae6 commit c923999
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions tcii18n/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions test/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

0 comments on commit c923999

Please sign in to comment.