use po file rather than Gajim code to handle plural form. see #6794

This commit is contained in:
Yann Leboulanger 2011-03-06 22:10:18 +01:00
parent a3556efaf9
commit 0aefaa1fd3
2 changed files with 3 additions and 10 deletions

View File

@ -6678,14 +6678,10 @@ msgstr "_Поиск по Web"
msgid "Open as _Link" msgid "Open as _Link"
msgstr "Открыть как _ссылку" msgstr "Открыть как _ссылку"
#: ../src/conversation_textview.py:1308
msgid "Yesterday"
msgstr "Вчера"
#. %i is day in year (1-365) #. %i is day in year (1-365)
#: ../src/conversation_textview.py:1311 #: ../src/conversation_textview.py:1311
#, python-format #, python-format
msgid "%(nb_days)i day ago" msgid "Yesterday"
msgid_plural "%(nb_days)i days ago" msgid_plural "%(nb_days)i days ago"
msgstr[0] "%(nb_days)i день назад" msgstr[0] "%(nb_days)i день назад"
msgstr[1] "%(nb_days)i дня назад" msgstr[1] "%(nb_days)i дня назад"

View File

@ -1304,13 +1304,10 @@ class ConversationTextview(gobject.GObject):
int(timegm(tim)) / 86400 int(timegm(tim)) / 86400
if diff_day == 0: if diff_day == 0:
day_str = '' day_str = ''
elif diff_day == 1:
day_str = _('Yesterday')
else: else:
#%i is day in year (1-365) #%i is day in year (1-365)
day_str = i18n.ngettext('%(nb_days)i day ago', day_str = i18n.ngettext('Yesterday', '%(nb_days)i days ago',
'%(nb_days)i days ago', diff_day, {'nb_days': diff_day}, diff_day, replace_plural={'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')