Translated action title
authorThierry Florac <thierry.florac@onf.fr>
Fri, 21 Sep 2018 16:28:25 +0200
changeset 141 d83e8f9a9885
parent 140 85b79777318f
child 142 5a6990958cb3
Translated action title
src/pyams_form/widget/templates/action-display.pt
src/pyams_form/widget/templates/action-input.pt
--- a/src/pyams_form/widget/templates/action-display.pt	Tue Sep 18 16:17:35 2018 +0200
+++ b/src/pyams_form/widget/templates/action-display.pt	Fri Sep 21 16:28:25 2018 +0200
@@ -2,7 +2,7 @@
 		class="btn padding-x-5 hint opaque baseline"
 		tal:define="url tales:absolute_url(view.form.context, view.url)"
 		tal:attributes="id view/id;
-						title view/title;
+						title python:request.localizer.translate(view.title);
 						style view/style;
 						lang view/lang;
 						onclick view/onclick;
@@ -26,6 +26,7 @@
 						data-ams-url python:url if view.url else None;
 						data-ams-click-handler view/click_handler;
 						data-toggle python:'modal' if view.modal_target else None;
-						data-ams-data tales:object_data(view);">
+						data-ams-data tales:object_data(view);"
+		data-ams-hint-gravity="s">
 	<i tal:attributes="class view/label_css_class"></i>
 </button>
--- a/src/pyams_form/widget/templates/action-input.pt	Tue Sep 18 16:17:35 2018 +0200
+++ b/src/pyams_form/widget/templates/action-input.pt	Fri Sep 21 16:28:25 2018 +0200
@@ -2,7 +2,7 @@
 		class="btn padding-x-5 hint opaque baseline"
 		tal:define="url tales:absolute_url(view.form.context, view.url)"
 		tal:attributes="id view/id;
-						title view/title;
+						title python:request.localizer.translate(view.title);
 						style view/style;
 						lang view/lang;
 						onclick view/onclick;