Updated translations
authorThierry Florac <thierry.florac@onf.fr>
Tue, 26 Mar 2019 14:07:04 +0100
changeset 260 11f49df0649a
parent 259 bc2b250d1d2b
child 261 6006100e6793
Updated translations
src/pyams_portal/zmi/templates/renderer-input.pt
src/pyams_portal/zmi/widget.py
--- a/src/pyams_portal/zmi/templates/renderer-input.pt	Tue Mar 26 12:33:33 2019 +0100
+++ b/src/pyams_portal/zmi/templates/renderer-input.pt	Tue Mar 26 14:07:04 2019 +0100
@@ -2,7 +2,7 @@
 	<tal:var define="render view/show_renderer_properties">
 		<i tal:condition="render"
 			class="icon-append fa fa-fw fa-pencil-square-o text-primary inverted hint align-base opaque"
-			title="Edit renderer properties" i18n:attributes="title"
+			title="${view/renderer_properties_hint}"
 			data-ams-hint-gravity="se" data-toggle="modal"
 			data-ams-url="${tales:absolute_url(context, 'renderer-properties.html')}"></i>
 		<i tal:condition="not:render"
--- a/src/pyams_portal/zmi/widget.py	Tue Mar 26 12:33:33 2019 +0100
+++ b/src/pyams_portal/zmi/widget.py	Tue Mar 26 14:07:04 2019 +0100
@@ -18,16 +18,24 @@
 from pyams_form.interfaces import IFormLayer
 from pyams_form.widget import Select2Widget, widgettemplate_config
 
+from pyams_portal import _
+
 
 @widgettemplate_config(mode=INPUT_MODE, template='templates/renderer-input.pt', layer=IFormLayer)
 class PortletRendererWidget(Select2Widget):
     """Portlet renderer selection widget"""
 
+    hint = _("Edit renderer properties")
+
     @property
     def show_renderer_properties(self):
         renderer = self.context.get_renderer(self.request)
         return (renderer is not None) and (renderer.settings_interface is not None)
 
+    @property
+    def renderer_properties_hint(self):
+        return self.request.localizer.translate(self.hint)
+
 
 def PortletRendererFieldWidget(field, request):
     return FieldWidget(field, PortletRendererWidget(request))