File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1515# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717#
18- # $Id: i18n.py,v 1.5 2004-05-14 10:40 :47 a1s Exp $
18+ # $Id: i18n.py,v 1.6 2004-05-18 19:20 :47 a1s Exp $
1919
2020"""
2121RoundUp Internationalization (I18N)
4343 import gettext
4444except ImportError :
4545 # fall-back to dummy on errors (returning the english text)
46- _ = lambda text : text
46+ _ = gettext = lambda text : text
47+ def ngettext (singular , plural , count ):
48+ if count == 1 : return singular
49+ return plural
4750else :
4851 # use roundup messages
4952 gettext .textdomain ("roundup" )
50- # export gettext function
51- _ = gettext .gettext
53+ # export gettext functions
54+ ngettext = gettext .ngettext
55+ _ = gettext = gettext .gettext
5256
5357# vim: set filetype=python ts=4 sw=4 et si
You can’t perform that action at this time.
0 commit comments