changeset d7429cc0a605 in /home/hg/repos/gajim

details:http://hg.gajim.org/gajim?cmd=changeset;node=d7429cc0a605
description: use po file rather than Gajim code to handle plural form. see #6794

diffstat:

 po/ru.po                     |  6 +-----
 src/conversation_textview.py |  7 ++-----
 2 files changed, 3 insertions(+), 10 deletions(-)

diffs (38 lines):

diff -r 63661010cab0 -r d7429cc0a605 po/ru.po
--- a/po/ru.po  Sun Mar 06 18:43:00 2011 +0300
+++ b/po/ru.po  Sun Mar 06 22:10:18 2011 +0100
@@ -6678,14 +6678,10 @@
 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 -r 63661010cab0 -r d7429cc0a605 src/conversation_textview.py
--- a/src/conversation_textview.py      Sun Mar 06 18:43:00 2011 +0300
+++ b/src/conversation_textview.py      Sun Mar 06 22:10:18 2011 +0100
@@ -1304,13 +1304,10 @@
                 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')
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to