[PATCH 3 of 9 seda] [views] Translate simplified facet

Sylvain Thenault sylvain.thenault at logilab.fr
Wed Mar 1 12:31:45 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1488317932 -3600
#      Tue Feb 28 22:38:52 2017 +0100
# Node ID 6702fe186f21d204da135964c2a1cee64b933038
# Parent  2eb73ad8832b408c0307d1a416c08050362e0309
[views] Translate simplified facet

so one see yes/no instead of True/False.

diff --git a/cubicweb_seda/views/facets.py b/cubicweb_seda/views/facets.py
--- a/cubicweb_seda/views/facets.py
+++ b/cubicweb_seda/views/facets.py
@@ -21,5 +21,9 @@ from cubicweb.web.facet import Attribute
 
 class SimplifiedProfileFacet(AttributeFacet):
     __regid__ = 'seda.profile.simplified'
     __select__ = AttributeFacet.__select__ & is_instance('SEDAArchiveTransfer')
     rtype = 'simplified_profile'
+
+    def vocabulary(self):
+        __ = self._cw.__
+        return [(__('yes'), True), (__('no'), False)]


More information about the saem-devel mailing list