--- a/dbapi.py Wed Sep 16 21:23:35 2009 +0200
+++ b/dbapi.py Wed Sep 16 21:29:17 2009 +0200
@@ -214,10 +214,13 @@
self.lang = 'en'
# use req.__ to translate a message without registering it to the catalog
try:
- self._ = self.__ = self.translations[self.lang]
+ gettext, pgettext = self.translations[self.lang]
+ self._ = self.__ = gettext
+ self.pgettext = pgettext
except KeyError:
# this occurs usually during test execution
self._ = self.__ = unicode
+ self.pgettext = lambda x,y: y
self.debug('request default language: %s', self.lang)
def decorate_rset(self, rset):