[PATCH 03 of 10 seda] [views] Translate simplified facet

Sylvain Thenault sylvain.thenault at logilab.fr
Tue Mar 7 15:25:40 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 1025002a11d620bc89a9d358294faf19d7bc0428
# Parent  c96d938d899e33e91168b77ff3478d0768a429a5
[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