Skip to content
Snippets Groups Projects
Commit b682cc17 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

use correct function for plural forms translation

parent fcafab60
No related branches found
No related tags found
No related merge requests found
......@@ -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:'))
......
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment