Changeset bc05d42a6ee1…
Parent 898510895102…
by
Changes to 2 files · Browse files at bc05d42a6ee1 Showing diff from parent 898510895102 Diff from another changeset...
@@ -6,11 +6,15 @@ # GNU General Public License version 2, incorporated herein by reference.
from tortoisehg.util.i18n import _ as _gettext
+from tortoisehg.util.i18n import ngettext as _ngettext
from tortoisehg.util.i18n import agettext
def _(message, context=''):
return unicode(_gettext(message, context), 'utf-8')
+def ngettext(singular, plural, n):
+ return unicode(_ngettext(singular, plural, n), 'utf-8')
+
class localgettext(object):
def _(self, message, context=''):
return agettext(message, context='')
|
@@ -60,6 +60,9 @@ return tmsg
return t.gettext(message)
+def ngettext(singular, plural, n):
+ return t.ngettext(singular, plural, n)
+
def agettext(message, context=''):
"""Translate message and convert to local encoding
such as 'ascii' before being returned.
|
Loading...