From 0aefaa1fd346ab920bed5b31b710dae5720593d5 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 6 Mar 2011 22:10:18 +0100 Subject: [PATCH] use po file rather than Gajim code to handle plural form. see #6794 --- po/ru.po | 6 +----- src/conversation_textview.py | 7 ++----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/po/ru.po b/po/ru.po index 5c6a89639..edd02f5e0 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6678,14 +6678,10 @@ msgstr "_Поиск по Web" msgid "Open as _Link" msgstr "Открыть как _ссылку" -#: ../src/conversation_textview.py:1308 -msgid "Yesterday" -msgstr "Вчера" - #. %i is day in year (1-365) #: ../src/conversation_textview.py:1311 #, python-format -msgid "%(nb_days)i day ago" +msgid "Yesterday" msgid_plural "%(nb_days)i days ago" msgstr[0] "%(nb_days)i день назад" msgstr[1] "%(nb_days)i дня назад" diff --git a/src/conversation_textview.py b/src/conversation_textview.py index fa1604fe5..700723e2d 100644 --- a/src/conversation_textview.py +++ b/src/conversation_textview.py @@ -1304,13 +1304,10 @@ class ConversationTextview(gobject.GObject): int(timegm(tim)) / 86400 if diff_day == 0: day_str = '' - elif diff_day == 1: - day_str = _('Yesterday') else: #%i is day in year (1-365) - day_str = i18n.ngettext('%(nb_days)i day ago', - '%(nb_days)i days ago', diff_day, {'nb_days': diff_day}, - {'nb_days': diff_day}) + day_str = i18n.ngettext('Yesterday', '%(nb_days)i days ago', + diff_day, replace_plural={'nb_days': diff_day}) if day_str: format_ += day_str + ' ' timestamp_str = gajim.config.get('time_stamp')