diff --git a/src/atom_window.py b/src/atom_window.py index e99d4d1d2..56449846f 100644 --- a/src/atom_window.py +++ b/src/atom_window.py @@ -27,6 +27,7 @@ import gobject import gtkgui_helpers from common import helpers +from common import i18n class AtomWindow: window = None @@ -106,9 +107,10 @@ class AtomWindow: changed...''' count = len(self.__class__.entries) if count>0: - self.new_entry_label.set_text( - _('You have received new entries (and %(count)d not displayed):') %\ - {'count': count}) + self.new_entry_label.set_text(i18n.ngettext( + 'You have received new entries (and %d not displayed):', + 'You have received new entries (and %d not displayed):', count, + count, count)) self.next_button.set_sensitive(True) else: self.new_entry_label.set_text(_('You have received new entry:')) diff --git a/src/conversation_textview.py b/src/conversation_textview.py index 3af295cbb..f4d4a2804 100644 --- a/src/conversation_textview.py +++ b/src/conversation_textview.py @@ -43,6 +43,7 @@ import gtkgui_helpers from common import gajim from common import helpers from common import latex +from common import i18n from calendar import timegm from common.fuzzyclock import FuzzyClock @@ -1270,12 +1271,10 @@ class ConversationTextview(gobject.GObject): int(timegm(tim)) / 86400 if diff_day == 0: day_str = '' - elif diff_day == 1: - day_str = _('Yesterday') else: - #the number is >= 2 - # %i is day in year (1-365), %d (1-31) we want %i - day_str = _('%i days ago') % diff_day + #%i is day in year (1-365) + day_str = i18n.ngettext('Yesterday', '%i days ago', diff_day, + replace_plural=diff_day) if day_str: format += day_str + ' ' timestamp_str = gajim.config.get('time_stamp')