use ngettext to translate plural form for languages that have several plural forms. see #6794

This commit is contained in:
Yann Leboulanger 2011-03-06 14:06:39 +01:00
parent 85d6cb7b9c
commit 4237bb82d4
1 changed files with 3 additions and 1 deletions

View File

@ -1308,7 +1308,9 @@ class ConversationTextview(gobject.GObject):
day_str = _('Yesterday') day_str = _('Yesterday')
else: else:
#%i is day in year (1-365) #%i is day in year (1-365)
day_str = _('%i days ago') % diff_day day_str = i18n.ngettext('%(nb_days)i day ago',
'%(nb_days)i days ago', diff_day, {'nb_days': diff_day},
{'nb_days': diff_day})
if day_str: if day_str:
format_ += day_str + ' ' format_ += day_str + ' '
timestamp_str = gajim.config.get('time_stamp') timestamp_str = gajim.config.get('time_stamp')