fixed bug 0009299: Some spanish translations issues
authorAsier Lostalé <asier.lostale@openbravo.com>
Mon, 08 Jun 2009 13:44:56 +0200
changeset 3980 7ea6521d32dc
parent 3979 e61cd04cf663
child 3981 e4caff5b5554
fixed bug 0009299: Some spanish translations issues
src-core/src/org/openbravo/uiTranslation/TranslationHandler.java
src-core/src/org/openbravo/xmlEngine/XmlVectorValue.java
--- a/src-core/src/org/openbravo/uiTranslation/TranslationHandler.java	Mon Jun 08 15:20:27 2009 +0530
+++ b/src-core/src/org/openbravo/uiTranslation/TranslationHandler.java	Mon Jun 08 13:44:56 2009 +0200
@@ -194,11 +194,14 @@
   }
 
   private void processTranslations() {
+
     if (documentTypeId != null && !documentTypeId.equals("")) {
       setProcessLabels();
-    } else if (tabId != null && !tabId.equals("")) {
+    }
+    if (tabId != null && !tabId.equals("")) {
       setTabLabels();
     } else if (fileName != null && !fileName.equals("")) {
+      // look for fileName for all manual windows (including processes)
       String textFileName = fileName.replace(baseDesignPath, "");
       if (textFileName.contains("?")) {
         String suffix = textFileName.substring(textFileName.lastIndexOf("."));
--- a/src-core/src/org/openbravo/xmlEngine/XmlVectorValue.java	Mon Jun 08 15:20:27 2009 +0530
+++ b/src-core/src/org/openbravo/xmlEngine/XmlVectorValue.java	Mon Jun 08 13:44:56 2009 +0200
@@ -48,10 +48,12 @@
       XmlComponentValue xmlComponentValue = (XmlComponentValue) e.nextElement();
       String result = "";
       if (textMap != null) {
+
         if (xmlComponentValue.print() != null && !xmlComponentValue.print().startsWith("<")
             && !xmlComponentValue.print().equals("")) {
+
           boolean isTranslated = false;
-          result = xmlComponentValue.print();
+          result = xmlComponentValue.print().trim();
           log4jXmlVectorValue.debug("printStringBuffer(HashMap<String, String> textMap) - result: "
               + result);
           log4jXmlVectorValue.debug("checking for existence of text in textdata: " + result);