use correct function for plural forms translation
This commit is contained in:
parent
fcafab60a7
commit
b682cc1791
2 changed files with 9 additions and 8 deletions
|
@ -27,6 +27,7 @@ import gobject
|
||||||
|
|
||||||
import gtkgui_helpers
|
import gtkgui_helpers
|
||||||
from common import helpers
|
from common import helpers
|
||||||
|
from common import i18n
|
||||||
|
|
||||||
class AtomWindow:
|
class AtomWindow:
|
||||||
window = None
|
window = None
|
||||||
|
@ -106,9 +107,10 @@ class AtomWindow:
|
||||||
changed...'''
|
changed...'''
|
||||||
count = len(self.__class__.entries)
|
count = len(self.__class__.entries)
|
||||||
if count>0:
|
if count>0:
|
||||||
self.new_entry_label.set_text(
|
self.new_entry_label.set_text(i18n.ngettext(
|
||||||
_('You have received new entries (and %(count)d not displayed):') %\
|
'You have received new entries (and %d not displayed):',
|
||||||
{'count': count})
|
'You have received new entries (and %d not displayed):', count,
|
||||||
|
count, count))
|
||||||
self.next_button.set_sensitive(True)
|
self.next_button.set_sensitive(True)
|
||||||
else:
|
else:
|
||||||
self.new_entry_label.set_text(_('You have received new entry:'))
|
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 gajim
|
||||||
from common import helpers
|
from common import helpers
|
||||||
from common import latex
|
from common import latex
|
||||||
|
from common import i18n
|
||||||
from calendar import timegm
|
from calendar import timegm
|
||||||
from common.fuzzyclock import FuzzyClock
|
from common.fuzzyclock import FuzzyClock
|
||||||
|
|
||||||
|
@ -1270,12 +1271,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:
|
||||||
#the number is >= 2
|
#%i is day in year (1-365)
|
||||||
# %i is day in year (1-365), %d (1-31) we want %i
|
day_str = i18n.ngettext('Yesterday', '%i days ago', diff_day,
|
||||||
day_str = _('%i days ago') % diff_day
|
replace_plural=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')
|
||||||
|
|
Loading…
Add table
Reference in a new issue