Support nouvelle signature de la fonction « translate ».
authorBenoît Pin <benoit.pin@gmail.com>
Thu, 3 Oct 2013 21:14:26 +0000 (23:14 +0200)
committerBenoît Pin <benoit.pin@gmail.com>
Thu, 3 Oct 2013 21:14:26 +0000 (23:14 +0200)
skins/order_cancel_form.pt
skins/order_view_template.pt
skins/photoprint_templates_edit_form.py

index b976045..8f37263 100644 (file)
@@ -24,7 +24,7 @@
             <td tal:define="_ python:modules['Products.photoprint.utils'].translate">
               <input type="text" size="58"
                 name="subject"
-                tal:attributes="value python:_('[%s] order %s canceling notification', here) % (here.portal_photo_print.store_name, here.getId())"/>
+                tal:attributes="value python:_('[%s] order %s canceling notification') % (here.portal_photo_print.store_name, here.getId())"/>
             </td>
           </tr>
           <tr>
@@ -48,7 +48,7 @@
               <label tal:repeat="member python:mtool.getMembers(here.listCreators())">
                 <input type="checkbox" name="recipients:list" tal:attributes="value member/id" checked="checked" />
                 <span tal:replace="member/getMemberFullName">Membre full name</span>
-                &lt;<span tal:replace="member/email">member email</span>&gt;
+                &lt;<span tal:replace="python:member.getProperty('email')">member email</span>&gt;
               </label>
             </td>
           </tr>
index f3ba7d1..0678456 100644 (file)
@@ -75,8 +75,7 @@
             </table>
           </td>
           <td>
-            <img tal:define="translate nocall:modules/Products/photoprint/utils/translate;
-                             tr python:lambda msg: translate(msg, here)"
+            <img tal:define="tr nocall:modules/Products/photoprint/utils/translate"
                  tal:attributes="src python:'%s/order_states/%s' % (portal_url, tr('%s-en.gif' % options['wfstate']))"
                  style="float:right"/>
           </td>
index 94851be..b70ce31 100755 (executable)
@@ -1,7 +1,6 @@
 ##parameters=addTemplate='', edit='', deleteOptionContainer='', createOptionsContainer=''
 from Products.CMFCore.utils import getToolByName
-from Products.photoprint.utils import translate
-_ = lambda msg : translate(msg, context)
+from Products.photoprint.utils import translate as _
 
 utool = getToolByName(context, 'portal_url')
 pptool = getToolByName(context, 'portal_photo_print')