You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2009/04/24 17:06:09 UTC

svn commit: r768330 - in /ofbiz/branches/release09.04/framework: base/src/org/ofbiz/base/util/StringUtil.java common/config/CommonUiLabels.xml webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java

Author: adrianc
Date: Fri Apr 24 15:06:08 2009
New Revision: 768330

URL: http://svn.apache.org/viewvc?rev=768330&view=rev
Log:
Label Manager fix from the trunk.

Modified:
    ofbiz/branches/release09.04/framework/base/src/org/ofbiz/base/util/StringUtil.java
    ofbiz/branches/release09.04/framework/common/config/CommonUiLabels.xml
    ofbiz/branches/release09.04/framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java

Modified: ofbiz/branches/release09.04/framework/base/src/org/ofbiz/base/util/StringUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/base/src/org/ofbiz/base/util/StringUtil.java?rev=768330&r1=768329&r2=768330&view=diff
==============================================================================
--- ofbiz/branches/release09.04/framework/base/src/org/ofbiz/base/util/StringUtil.java (original)
+++ ofbiz/branches/release09.04/framework/base/src/org/ofbiz/base/util/StringUtil.java Fri Apr 24 15:06:08 2009
@@ -598,6 +598,7 @@
         if (insertBR) {
             html = StringUtil.replaceString(html, "<br>", "\n");
         }
+        html = html.replace("&nbsp;", " ");
         return html;
     }
 

Modified: ofbiz/branches/release09.04/framework/common/config/CommonUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/common/config/CommonUiLabels.xml?rev=768330&r1=768329&r2=768330&view=diff
==============================================================================
--- ofbiz/branches/release09.04/framework/common/config/CommonUiLabels.xml (original)
+++ ofbiz/branches/release09.04/framework/common/config/CommonUiLabels.xml Fri Apr 24 15:06:08 2009
@@ -306,7 +306,8 @@
         <value xml:lang="zh_CN">地址</value>
     </property>
     <property key="CommonAdvancedFeatures">
-        <value xml:lang="en">Advanced Features</value>    
+        <value xml:lang="en">Advanced Features</value>
+        <value xml:lang="fr">Caractéristiques avancées</value>
     </property>
     <property key="CommonAdvancedSearch">
         <value xml:lang="de">Erweiterte Suche</value>
@@ -1150,6 +1151,7 @@
     </property>
     <property key="CommonClickHereForFieldLookup">
         <value xml:lang="en">Click here For Field Lookup</value>
+        <value xml:lang="fr">Cliquez ici pour une recherche sur ce champ</value>
     </property>
     <property key="CommonClose">
         <value xml:lang="ar">غلق</value>
@@ -1995,7 +1997,7 @@
         <value xml:lang="zh_CN">电子邮件</value>
     </property>
     <property key="CommonEmptyHeader">
-        <value xml:lang="en"> </value>
+        <value xml:lang="en" xml:space="preserve"> </value>
     </property>
     <property key="CommonEnabled">
         <value xml:lang="ar">شغال</value>
@@ -4020,10 +4022,6 @@
         <value xml:lang="zh">否</value>
         <value xml:lang="zh_CN">不</value>
     </property>
-    <property key="CommonNormal">
-        <value xml:lang="en">Normal</value>
-        <value xml:lang="fr">Normal</value>
-    </property>
     <property key="CommonNoAccess">
         <value xml:lang="en">No Access to this function, contact your system administrator if you feel this is an error</value>
         <value xml:lang="es">Acceso no autorizado. Póngase en contacto con su administrador de sistemas si piensa que esto es un error.</value>
@@ -4177,6 +4175,10 @@
         <value xml:lang="zh">无</value>
         <value xml:lang="zh_CN">无</value>
     </property>
+    <property key="CommonNormal">
+        <value xml:lang="en">Normal</value>
+        <value xml:lang="fr">Normal</value>
+    </property>
     <property key="CommonNot">
         <value xml:lang="ar">لا</value>
         <value xml:lang="cs">Žádný (-á)</value>
@@ -5610,6 +5612,7 @@
     </property>
     <property key="CommonSecurityGroups">
         <value xml:lang="en">Security Groups</value>
+        <value xml:lang="fr">Groupes de sécurité</value>
     </property>
     <property key="CommonSegmentGroupGeoAbbr">
         <value xml:lang="en">Abbreviation</value>
@@ -7810,6 +7813,11 @@
         <value xml:lang="th">สร้างโดยผู้ลงชื่อเข้าใช้ระบบ</value>
         <value xml:lang="zh">登录用户新建的</value>
     </property>
+    <property key="FormFieldTitle_createdByUserLoginId">
+        <value xml:lang="en">Created By User Login Id</value>
+        <value xml:lang="fr">Créé par l'identifiant de connexion</value>
+        <value xml:lang="it">Creato dall'utente</value>
+    </property>
     <property key="FormFieldTitle_createdDate">
         <value xml:lang="ar">تاريخ الإستحداث</value>
         <value xml:lang="de">Erstellungsdatum</value>
@@ -7828,11 +7836,6 @@
         <value xml:lang="fr">Estampille temporelle de transaction créée</value>
         <value xml:lang="it">Data/ora creazione</value>
     </property>
-    <property key="FormFieldTitle_createdByUserLoginId">
-        <value xml:lang="en">Created By User Login Id</value>
-        <value xml:lang="fr">Créé par l'identifiant de connexion</value>
-        <value xml:lang="it">Creato dall'utente</value>
-    </property>
     <property key="FormFieldTitle_currencyUomId">
         <value xml:lang="ar">العملة</value>
         <value xml:lang="de">Währung</value>
@@ -8032,7 +8035,7 @@
     <property key="FormFieldTitle_rejectButton">
         <value xml:lang="ar">إضافة</value>
         <value xml:lang="en">Reject</value>
-        <value xml:lang="fr">Rejeter</value>
+        <value xml:lang="fr">Refuser</value>
     </property>
     <property key="FormFieldTitle_removeButton">
         <value xml:lang="ar">نزع</value>
@@ -8066,9 +8069,6 @@
         <value xml:lang="th">ค้นหา</value>
         <value xml:lang="zh">搜索</value>
     </property>
-    <property key="FormFieldTitle_saveButton">
-        <value xml:lang="en">Save</value>
-    </property>
     <property key="FormFieldTitle_sendButton">
         <value xml:lang="de">Absenden</value>
         <value xml:lang="en">Send</value>
@@ -8157,8 +8157,8 @@
         <value xml:lang="ar">مجموع</value>
         <value xml:lang="de">Total</value>
         <value xml:lang="en">Total</value>
-        <value xml:lang="fr">Total</value>
         <value xml:lang="es">Total</value>
+        <value xml:lang="fr">Total</value>
         <value xml:lang="it">Totale</value>
         <value xml:lang="nl">Totaal</value>
         <value xml:lang="pt">Total</value>

Modified: ofbiz/branches/release09.04/framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java?rev=768330&r1=768329&r2=768330&view=diff
==============================================================================
--- ofbiz/branches/release09.04/framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java (original)
+++ ofbiz/branches/release09.04/framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java Fri Apr 24 15:06:08 2009
@@ -86,11 +86,17 @@
 
                     for (String localeFound : localesFound) {
                         LabelValue labelValue = labelInfo.getLabelValue(localeFound);
-
-                        if (UtilValidate.isNotEmpty(labelValue)) {
-                             Element valueElem = UtilXml.addChildElementValue(propertyElem, "value", StringUtil.fromHtmlToSpecialChars(labelValue.getLabelValue(), true, true, false), resourceDocument);
+                        String valueString = null;
+                        if (labelValue != null) {
+                            valueString = labelValue.getLabelValue();
+                        }
+                        if (UtilValidate.isNotEmpty(valueString)) {
+                            valueString = StringUtil.fromHtmlToSpecialChars(valueString, true, true, true);
+                            Element valueElem = UtilXml.addChildElementValue(propertyElem, "value", valueString, resourceDocument);;
                             valueElem.setAttribute("xml:lang", localeFound);
-
+                            if (valueString.trim().length() == 0) {
+                                valueElem.setAttribute("xml:space", "preserve");
+                            }
                             if (UtilValidate.isNotEmpty(labelValue.getLabelComment())) {
                                 Comment labelComment = resourceDocument.createComment(StringUtil.fromHtmlToSpecialChars(labelValue.getLabelComment(), true, true, false));
                                 Node parent = valueElem.getParentNode();
@@ -100,7 +106,7 @@
                     }
                 }
 
-                if (UtilValidate.isNotEmpty(resourceElem) && UtilValidate.isNotEmpty(uri)) {
+                if (UtilValidate.isNotEmpty(uri)) {
                     File outFile = new File(new URI(uri));
                     FileOutputStream fos = new FileOutputStream(outFile);
                     OutputFormat format = new OutputFormat(resourceDocument.getDocumentElement().getOwnerDocument(), "UTF-8", true);