# HG changeset patch # User Sylvain Thénault # Date 1274087092 -7200 # Node ID 4fcb0c13209882a7992388d1aa9fcc0c2337e42f # Parent c4eee9921e19a53ea332cdb79037da808cf53fb1 [facet] control i18nization of values on AttributeFacet diff -r c4eee9921e19 -r 4fcb0c132098 web/facet.py --- a/web/facet.py Sun May 16 19:00:07 2010 +0200 +++ b/web/facet.py Mon May 17 11:04:52 2010 +0200 @@ -467,6 +467,7 @@ attrtype = 'String' # type of comparison: default is an exact match on the attribute value comparator = '=' # could be '<', '<=', '>', '>=' + i18nable = True def vocabulary(self): """return vocabulary for this facet, eg a list of 2-uple (label, value) @@ -491,7 +492,10 @@ return rset and self.rset_vocabulary(rset) def rset_vocabulary(self, rset): - _ = self._cw._ + if self.i18nable: + _ = self._cw._ + else: + _ = unicode return [(_(value), value) for value, in rset] def support_and(self):