diff -r de33539c2db2 -r 5c1931a42176 src/pyams_thesaurus/zmi/thesaurus.py --- a/src/pyams_thesaurus/zmi/thesaurus.py Fri Apr 17 14:02:46 2015 +0200 +++ b/src/pyams_thesaurus/zmi/thesaurus.py Fri Apr 17 14:54:09 2015 +0200 @@ -9,8 +9,6 @@ # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # -from pyramid.response import Response -from pyams_form.schema import CloseButton __docformat__ = 'restructuredtext' @@ -37,6 +35,7 @@ # import packages from pyams_form.form import AJAXAddForm, AJAXEditForm +from pyams_form.schema import CloseButton from pyams_pagelet.pagelet import pagelet_config from pyams_skin.layer import IPyAMSLayer from pyams_skin.page import InnerPage @@ -58,6 +57,7 @@ from pyramid.events import subscriber from pyramid.exceptions import NotFound from pyramid.httpexceptions import HTTPBadRequest +from pyramid.response import Response from pyramid.url import resource_url from pyramid.view import view_config from z3c.form import field, button @@ -391,8 +391,9 @@ def updateWidgets(self, prefix=None): super(ThesaurusImportForm, self).updateWidgets(prefix) - self.widgets['language'].noValueMessage = _("-- automatic selection -- (if available)") - self.widgets['encoding'].noValueMessage = _("-- automatic selection -- (if available)") + translate = self.request.localizer.translate + self.widgets['language'].noValueMessage = translate(_("-- automatic selection -- (if available)")) + self.widgets['encoding'].noValueMessage = translate(_("-- automatic selection -- (if available)")) def create(self, data): configuration = ThesaurusUpdaterConfiguration(data) @@ -447,7 +448,7 @@ """Thesaurus export form""" title = _("Thesaurus") - legend = _("export thesaurus terms") + legend = _("Export thesaurus terms") icon_css_class = 'fa fa-fw fa-download' fields = field.Fields(IThesaurusExporterConfiguration)