Merge lp:~kkapp/lernid/bugfix-lp-533988 into lp:lernid

Status: Merged
Merge reported by: Michael Budde
Merged at revision: not available
Proposed branch: lp:~kkapp/lernid/bugfix-lp-533988
Merge into: lp:lernid
Diff against target: 21 lines (+2/-2)
1 file modified
bin/lernid (+2/-2)
To merge this branch: bzr merge lp:~kkapp/lernid/bugfix-lp-533988
Reviewer Review Type Date Requested Status
Michael Budde Pending
Review via email: mp+20874@code.launchpad.net

Description of the change

lernid uses ngettext() function to internationalize chatroom users count. Install it.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/lernid'
2--- bin/lernid 2010-03-06 14:30:14 +0000
3+++ bin/lernid 2010-03-07 20:54:27 +0000
4@@ -42,7 +42,7 @@
5
6 # Set up translations
7 locale.setlocale(locale.LC_ALL, '')
8-gettext.install('lernid', unicode=True)
9+gettext.install('lernid', unicode=True, names=['ngettext'])
10
11 # Check if we are working in the source tree or from the installed
12 # package and mangle the python path accordingly
13@@ -223,7 +223,7 @@
14 mcount_label = self.builder.get_object(prefix+'chatroom_mcount')
15 def update_user_count(chat, members):
16 n = len(members)
17- mcount_label.set_label(gettext.ngettext('({0} user)', '({0} users)', n).format(n))
18+ mcount_label.set_label(ngettext('({0} user)', '({0} users)', n).format(n))
19 self._chatroom.connect('members-changed', update_user_count)
20 def clear_user_count(em, event):
21 mcount_label.set_label('')

Subscribers

People subscribed via source and target branches