Changed checkbox translations
authorThierry Florac <thierry.florac@onf.fr>
Wed, 01 Jul 2015 10:10:36 +0200
changeset 19 ee1e85bd3580
parent 18 a36d954c4adb
child 20 e421b7c4281a
Changed checkbox translations
src/pyams_form/widget/templates/checkbox-display.pt
src/pyams_form/widget/templates/checkbox-input.pt
--- a/src/pyams_form/widget/templates/checkbox-display.pt	Wed Jul 01 10:10:03 2015 +0200
+++ b/src/pyams_form/widget/templates/checkbox-display.pt	Wed Jul 01 10:10:36 2015 +0200
@@ -1,4 +1,4 @@
-<i18n:var domain="pyams_form">
+<i18n:var>
 	<label class="checkbox" tal:define="items view/items">
 		<input name="field-empty-marker" type="hidden" value="1"
 				tal:attributes="name string:${view/name}-empty-marker" />
@@ -59,7 +59,7 @@
 								alt view/alt;
 								accesskey view/accesskey;
 								onselect view/onselect" />
-			<i></i><span tal:replace="item/label" i18n:translate="">Label</span>
+			<i></i><span tal:replace="python:request.localizer.translate(item['label'])" i18n:translate="">Label</span>
 		</tal:loop>
 	</label>
 </i18n:var>
--- a/src/pyams_form/widget/templates/checkbox-input.pt	Wed Jul 01 10:10:03 2015 +0200
+++ b/src/pyams_form/widget/templates/checkbox-input.pt	Wed Jul 01 10:10:36 2015 +0200
@@ -1,4 +1,4 @@
-<i18n:var domain="pyams_form">
+<i18n:var>
 	<label class="checkbox" tal:define="items view/items">
 		<input name="field-empty-marker" type="hidden" value="1"
 				tal:attributes="name string:${view/name}-empty-marker" />
@@ -63,7 +63,7 @@
 								alt view/alt;
 								accesskey view/accesskey;
 								onselect view/onselect" />
-			<i></i><span tal:replace="item/label" i18n:translate="">Label</span>
+			<i></i><span tal:replace="python:request.localizer.translate(item['label'])">Label</span>
 		</tal:loop>
 	</label>
 </i18n:var>