[Erp5-report] r30291 - in /erp5/trunk/bt5/erp5_apparel: SkinTemplateItem/portal_skins/erp5_...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Nov 4 15:27:36 CET 2009


Author: fabien
Date: Wed Nov  4 15:27:35 2009
New Revision: 30291

URL: http://svn.erp5.org?rev=30291&view=rev
Log:
change some tales expression to be more dynamic and by able to translate.
Translate composition title

Modified:
    erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelComponent_view/my_segment_list.xml
    erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_asCellRange.xml
    erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_cleaning_code_list.xml
    erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_fabric_brand_list.xml
    erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_visual_pattern.xml
    erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_viewComposition/my_composition_list.xml
    erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/Apparel_getCompositionTitle.xml
    erp5/trunk/bt5/erp5_apparel/bt/revision

Modified: erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelComponent_view/my_segment_list.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelComponent_view/my_segment_list.xml?rev=30291&r1=30290&r2=30291&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelComponent_view/my_segment_list.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelComponent_view/my_segment_list.xml [utf8] Wed Nov  4 15:27:35 2009
@@ -293,7 +293,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python: getattr(here.portal_categories[field.getId().replace(\'my_\', \'\', 1).replace(\'_list\', \'\')], preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\')</string> </value>
+            <value> <string>python: getattr(here.portal_categories[field.getId().replace(\'my_\', \'\', 1).replace(\'_list\', \'\')], preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\')</string> </value>
         </item>
       </dictionary>
     </pickle>

Modified: erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_asCellRange.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_asCellRange.xml?rev=30291&r1=30290&r2=30291&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_asCellRange.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_asCellRange.xml [utf8] Wed Nov  4 15:27:35 2009
@@ -54,7 +54,7 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>if matrixbox == 1:\n
-  line = [(\'composition/\'+x.getId(),x.getTitleOrId())for x in context.getCompositionValueList()]\n
+  line = [(\'composition/\'+x.getId(),x.getTranslatedTitle() or x.getTitleOrId())for x in context.getCompositionValueList()]\n
   column = []\n
   tab = []\n
 \n

Modified: erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_cleaning_code_list.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_cleaning_code_list.xml?rev=30291&r1=30290&r2=30291&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_cleaning_code_list.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_cleaning_code_list.xml [utf8] Wed Nov  4 15:27:35 2009
@@ -269,7 +269,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python: here.portal_categories[field.getId().replace(\'my_\', \'\', 1).replace(\'_list\', \'\')].getCategoryChildCompactLogicalPathItemList(display_none_category=1,local_sort_id="compact_title",checked_permission=\'View\')</string> </value>
+            <value> <string>python: getattr(here.portal_categories[field.getId().replace(\'my_\', \'\', 1).replace(\'_list\', \'\')], preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\')</string> </value>
         </item>
       </dictionary>
     </pickle>

Modified: erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_fabric_brand_list.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_fabric_brand_list.xml?rev=30291&r1=30290&r2=30291&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_fabric_brand_list.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_fabric_brand_list.xml [utf8] Wed Nov  4 15:27:35 2009
@@ -293,7 +293,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python: getattr(here.portal_categories[field.getId().replace(\'my_\', \'\', 1).replace(\'_list\', \'\')], preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\', filter_node=1)</string> </value>
+            <value> <string>python: getattr(here.portal_categories[field.getId().replace(\'my_\', \'\', 1).replace(\'_list\', \'\')], preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\')</string> </value>
         </item>
       </dictionary>
     </pickle>

Modified: erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_visual_pattern.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_visual_pattern.xml?rev=30291&r1=30290&r2=30291&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_visual_pattern.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_view/my_visual_pattern.xml [utf8] Wed Nov  4 15:27:35 2009
@@ -267,18 +267,15 @@
   <record id="2" aka="AAAAAAAAAAI=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.Formulator.TALESField</string>
-          <string>TALESMethod</string>
-        </tuple>
-        <none/>
+        <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>here/portal_categories/visual_pattern/getCategoryChildLogicalPathItemList</string> </value>
+            <value> <string>python: getattr(here.portal_categories[field.getId().replace(\'my_\', \'\', 1).replace(\'_list\', \'\')], preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\')</string> </value>
         </item>
       </dictionary>
     </pickle>

Modified: erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_viewComposition/my_composition_list.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_viewComposition/my_composition_list.xml?rev=30291&r1=30290&r2=30291&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_viewComposition/my_composition_list.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelFabric_viewComposition/my_composition_list.xml [utf8] Wed Nov  4 15:27:35 2009
@@ -117,42 +117,40 @@
                 </item>
                 <item>
                     <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra_item</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>items</string> </key>
                     <value>
                       <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
-                    </value>
-                </item>
-                <item>
-                    <key> <string>description</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>editable</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>enabled</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>external_validator</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>extra</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>extra_item</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>hidden</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>items</string> </key>
-                    <value>
-                      <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
                     </value>
                 </item>
                 <item>
@@ -264,37 +262,15 @@
   <record id="2" aka="AAAAAAAAAAI=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.Formulator.TALESField</string>
-          <string>TALESMethod</string>
-        </tuple>
-        <none/>
+        <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>here/getCompositionList</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-  <record id="3" aka="AAAAAAAAAAM=">
-    <pickle>
-      <tuple>
-        <tuple>
-          <string>Products.Formulator.TALESField</string>
-          <string>TALESMethod</string>
-        </tuple>
-        <none/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>_text</string> </key>
-            <value> <string>here/portal_categories/composition/getCategoryChildLogicalPathItemList</string> </value>
+            <value> <string>python: getattr(here.portal_categories[field.getId().replace(\'my_\', \'\', 1).replace(\'_list\', \'\')], preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\')</string> </value>
         </item>
       </dictionary>
     </pickle>

Modified: erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/Apparel_getCompositionTitle.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/Apparel_getCompositionTitle.xml?rev=30291&r1=30290&r2=30291&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/Apparel_getCompositionTitle.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/Apparel_getCompositionTitle.xml [utf8] Wed Nov  4 15:27:35 2009
@@ -55,6 +55,7 @@
             <key> <string>_body</string> </key>
             <value> <string># this script is used to display a small text in the main form corresponding to the composition\n
 # it return something like "3.0 % Polyamide, 5.0 % Elasthanne"\n
+translateString = context.Base_translateString\n
 \n
 title_list = []\n
 cell_list = []\n
@@ -62,7 +63,7 @@
 for cat, title in poly_list:\n
   cell = context.getCell(cat, base_id=\'composition\')\n
   if cell is not None:\n
-    cell_list.append({\'quantity\':cell.getQuantity(), \'title\':title})\n
+    cell_list.append({\'quantity\':cell.getQuantity(), \'title\':translateString(catalog=\'content\', msg=title)})\n
 \n
 # sort by quantity\n
 cell_list.sort(key=lambda x: x[\'quantity\'], reverse=True)\n
@@ -109,11 +110,12 @@
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>translateString</string>
                             <string>title_list</string>
                             <string>cell_list</string>
                             <string>_getitem_</string>
-                            <string>_getattr_</string>
-                            <string>context</string>
                             <string>poly_list</string>
                             <string>_getiter_</string>
                             <string>cat</string>

Modified: erp5/trunk/bt5/erp5_apparel/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_apparel/bt/revision?rev=30291&r1=30290&r2=30291&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_apparel/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_apparel/bt/revision [utf8] Wed Nov  4 15:27:35 2009
@@ -1,1 +1,1 @@
-128
+129




More information about the Erp5-report mailing list