You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2008/08/12 14:28:28 UTC

svn commit: r685130 - in /ofbiz/trunk/applications: ecommerce/data/DemoProduct.xml ecommerce/data/DemoProductCategoriesI18nData.xml ecommerce/data/DemoProductI18nData.xml order/webapp/ordermgr/entry/catalog/categorydetail.ftl

Author: jleroux
Date: Tue Aug 12 05:28:28 2008
New Revision: 685130

URL: http://svn.apache.org/viewvc?rev=685130&view=rev
Log:
Example of Main category localisation 

Modified:
    ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml
    ofbiz/trunk/applications/ecommerce/data/DemoProductCategoriesI18nData.xml
    ofbiz/trunk/applications/ecommerce/data/DemoProductI18nData.xml
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl

Modified: ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml?rev=685130&r1=685129&r2=685130&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml Tue Aug 12 05:28:28 2008
@@ -127,7 +127,7 @@
         primaryParentCategoryId="201" productCategoryId="2012" productCategoryTypeId="CATALOG_CATEGORY"/>
     <ProductCategory longDescription="long description of Micro Widgets"
         primaryParentCategoryId="2011" productCategoryId="20111" productCategoryTypeId="CATALOG_CATEGORY"/>
-    <ProductCategory categoryName="Featured Products" productCategoryId="PROMOTIONS" productCategoryTypeId="CATALOG_CATEGORY" detailScreen="component://ecommerce/widget/CatalogScreens.xml#categorydetailmatrix"/>
+    <ProductCategory productCategoryId="PROMOTIONS" productCategoryTypeId="CATALOG_CATEGORY" detailScreen="component://ecommerce/widget/CatalogScreens.xml#categorydetailmatrix"/>
     <ProductCategory categoryName="Demo Default Search"
         longDescription="Catalog1 Search Products - only products in this category will show up in a search in catalog1"
         productCategoryId="CATALOG1_SEARCH" productCategoryTypeId="SEARCH_CATEGORY"/>

Modified: ofbiz/trunk/applications/ecommerce/data/DemoProductCategoriesI18nData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoProductCategoriesI18nData.xml?rev=685130&r1=685129&r2=685130&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoProductCategoriesI18nData.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoProductCategoriesI18nData.xml Tue Aug 12 05:28:28 2008
@@ -18,6 +18,8 @@
     under the License.
 -->
 <entity-engine-xml>
+    <!-- When you set contents here, don't forget to remove the original Name in DemoProduct.xml if any... I got caught by this today -->
+    
    <!-- Gizmos category -->
     <DataResource dataResourceId="DR100DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/>   
     <DataResource dataResourceId="DR100DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/>   
@@ -256,18 +258,32 @@
     <DataResource dataResourceId="DRFOOD-001DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/>   
     <DataResource dataResourceId="DRFOOD-001DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/>    
     <DataResource dataResourceId="DRFOOD-001DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/>    
-
+    
     <ElectronicText dataResourceId="DRFOOD-001DESCFR" textData="Nourriture à la carte"/>
     <ElectronicText dataResourceId="DRFOOD-001DESCIT" textData="Nutrimento configurabili"/>
     <ElectronicText dataResourceId="DRFOOD-001DESCEN" textData="Configurables Foods"/>
-
+    
     <Content contentId="CFOOD-001DESCFR" contentTypeId="DOCUMENT" dataResourceId="DRFOOD-001DESCFR" description="DESCRIPTION FR Nourriture à la carte" localeString="fr" />
     <Content contentId="CFOOD-001DESCIT" contentTypeId="DOCUMENT" dataResourceId="DRFOOD-001DESCIT" description="DESCRIPTION IT Nutrimento configurabili" localeString="it" />
     <Content contentId="CFOOD-001DESCEN" contentTypeId="DOCUMENT" dataResourceId="DRFOOD-001DESCEN" description="DESCRIPTION EN Configurables Foods" localeString="en"/>
-
+    
     <ProductCategoryContent productCategoryId="FOOD-001" contentId="CFOOD-001DESCEN" prodCatContentTypeId="CATEGORY_NAME" fromDate="2007-12-28 00:00:00.0"/>
     
     <ContentAssoc contentId="CFOOD-001DESCEN" contentIdTo="CFOOD-001DESCIT" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2007-12-28 00:00:00.0"/>
     <ContentAssoc contentId="CFOOD-001DESCEN" contentIdTo="CFOOD-001DESCFR" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2007-12-28 00:00:00.0"/>
-        
+    
+    <!-- Featured products category -->
+    <DataResource dataResourceId="DRPROMO-001DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/>   
+    <DataResource dataResourceId="DRPROMO-001DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/>    
+    
+    <ElectronicText dataResourceId="DRPROMO-001DESCFR" textData="Produits de démonstration"/>
+    <ElectronicText dataResourceId="DRPROMO-001DESCEN" textData="Featured products"/>
+    
+    <Content contentId="CPROMO-001DESCFR" contentTypeId="DOCUMENT" dataResourceId="DRPROMO-001DESCFR" description="DESCRIPTION FR Articles de démonstration" localeString="fr" />
+    <Content contentId="CPROMO-001DESCEN" contentTypeId="DOCUMENT" dataResourceId="DRPROMO-001DESCEN" description="DESCRIPTION EN Featured products" localeString="en"/>
+    
+    <ProductCategoryContent productCategoryId="PROMOTIONS" contentId="CPROMO-001DESCEN" prodCatContentTypeId="CATEGORY_NAME" fromDate="2007-12-28 00:00:00.0"/>
+    
+    <ContentAssoc contentId="CPROMO-001DESCEN" contentIdTo="CPROMO-001DESCFR" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2007-12-28 00:00:00.0"/>
+    
 </entity-engine-xml>

Modified: ofbiz/trunk/applications/ecommerce/data/DemoProductI18nData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoProductI18nData.xml?rev=685130&r1=685129&r2=685130&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoProductI18nData.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoProductI18nData.xml Tue Aug 12 05:28:28 2008
@@ -18,6 +18,8 @@
 under the License.
 -->
 <entity-engine-xml>
+    <!-- When you set contents here, don't forget to remove the original Name in DemoProduct.xml if any... I got caught by this today -->
+    
     <!-- Example of a product with many languages -->
     <DataResource dataResourceId="GZ2644DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/>   
     <DataResource dataResourceId="GZ2644DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/>   

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl?rev=685130&r1=685129&r2=685130&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl Tue Aug 12 05:28:28 2008
@@ -44,11 +44,13 @@
 
 
 <#if productCategory?exists>
-    <#if categoryContentWrapper.get("CATEGORY_NAME")?has_content>
-        <h1>${categoryContentWrapper.get("CATEGORY_NAME")}</h1>
+    <#assign categoryName = categoryContentWrapper.get("CATEGORY_NAME")?if_exists/>
+    <#assign categoryDescription = categoryContentWrapper.get("DESCRIPTION")?if_exists/>
+    <#if categoryName?has_content>
+        <h1>${categoryName}</h1>
     </#if>
-    <#if categoryContentWrapper.get("DESCRIPTION")?has_content>
-        <h1>${categoryContentWrapper.get("DESCRIPTION")}</h1>
+    <#if categoryDescription?has_content>
+        <h1>${categoryDescription}</h1>
     </#if>
     <#if hasQuantities?exists>
       <form method="post" action="<@ofbizUrl>addCategoryDefaults<#if requestAttributes._CURRENT_VIEW_?exists>/${requestAttributes._CURRENT_VIEW_}</#...@ofbizUrl>" name="thecategoryform" style='margin: 0;'>