# HG changeset patch # User Katia Saurfelt <katia.saurfelt@logilab.fr> # Date 1487265052 -3600 # Thu Feb 16 18:10:52 2017 +0100 # Node ID 9e14ba160e9c78afc71c8cc2149e52466b7c5cdf # Parent a26b16bb6ec53907175b1c3b49d62ba250d6fe7b [views] add a title for esearch view diff --git a/i18n/en.po b/i18n/en.po --- a/i18n/en.po +++ b/i18n/en.po @@ -1,9 +1,11 @@ msgid "" msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: pygettext.py 1.5\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" +msgid "Search" +msgstr "" diff --git a/i18n/es.po b/i18n/es.po --- a/i18n/es.po +++ b/i18n/es.po @@ -1,9 +1,11 @@ msgid "" msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: pygettext.py 1.5\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" +msgid "Search" +msgstr "" diff --git a/i18n/fr.po b/i18n/fr.po --- a/i18n/fr.po +++ b/i18n/fr.po @@ -1,9 +1,11 @@ msgid "" msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: pygettext.py 1.5\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" +msgid "Search" +msgstr "Recherche" diff --git a/views.py b/views.py --- a/views.py +++ b/views.py @@ -25,6 +25,7 @@ from logilab.mtconverter import xml_escape import cwtags.tag as t +from cubicweb import _ from cubicweb.view import StartupView from cubes.elasticsearch.es import indexable_types, get_connection @@ -84,6 +85,7 @@ previous_link = u' < ' next_link = u' > ' middle_link = u" · " * 3 + title = _('Search') def render_search_comp(self): search_comp = self._cw.vreg['components'].select_or_none('search-comp', @@ -138,7 +140,7 @@ # TODO if no ES configuration, redirect or display warning self.render_search_comp() query_string = self._cw.form.get('q', self._cw.form.get('search', '')) - self.w(u'<h1>%s</h1>' % self._cw._('Recherche')) + self.w(u'<h1>%s</h1>' % self._cw._(self.title)) response = self.do_search(query_string) if response.hits.total: self.w(u'<h2>Resultats pour : <em>%s</em></h2>' %