# HG changeset patch # User Sylvain Thénault # Date 1253183345 -7200 # Node ID 036cf5a2571403b662606a9c16cfa5a129f5a8f3 # Parent 29d561abe8a723a9f0a24d19eb4f504e24fdfabb ensure pgettext return unicode as well diff -r 29d561abe8a7 -r 036cf5a25714 schema.py --- a/schema.py Thu Sep 17 12:03:14 2009 +0200 +++ b/schema.py Thu Sep 17 12:29:05 2009 +0200 @@ -110,9 +110,9 @@ if form: key = key + '_' + form # ensure unicode - # added .lower() in case no translation are available - if context: - return req.pgettext(context, key).lower() + # .lower() in case no translation are available XXX done whatever a translation is there or not! + if context is not None: + return unicode(req.pgettext(context, key)).lower() else: return unicode(req._(key)).lower()