fixed bug 0006602: Translation for manual windows is not working properly
authorAsier Lostalé <asier.lostale@openbravo.com>
Wed, 17 Dec 2008 09:50:46 +0000
changeset 2363 4451ba9c80f3
parent 2362 6ab7fc15175c
child 2364 40fe8e060b70
fixed bug 0006602: Translation for manual windows is not working properly
build.xml
src-trl/src/org/openbravo/translate/Translate.java
--- a/build.xml	Wed Dec 17 09:41:13 2008 +0000
+++ b/build.xml	Wed Dec 17 09:50:46 2008 +0000
@@ -341,6 +341,10 @@
 	<target name="translate" depends="init">
 		<ant dir="${base.src}" target="translate" inheritAll="true" inheritRefs="true" />
 	</target>
+	
+	 <target name="translate.modules" depends="init">
+	    <ant dir="${base.src}" target="translate.modules" inheritAll="true" inheritRefs="true" />
+	  </target>
 
 	<target name="installWebService" depends="init">
 		<ant dir="${base.src}" target="installWebService" inheritAll="true" inheritRefs="true">
--- a/src-trl/src/org/openbravo/translate/Translate.java	Wed Dec 17 09:41:13 2008 +0000
+++ b/src-trl/src/org/openbravo/translate/Translate.java	Wed Dec 17 09:50:46 2008 +0000
@@ -394,7 +394,7 @@
    */
   @Override
 public void startElement(String uri, String name, String qName, Attributes amap) {//(String name, AttributeList amap) throws SAXException {
-    if (log4j.isDebugEnabled()) log4j.info("Configuration: startElement is called: element name=" + qName);
+    if (log4j.isDebugEnabled()) log4j.info("Configuration: startElement is called: element name=" + qName+" actualtag"+actualTag+" trlTxt"+translationText);
     if (actualTag!=null && isParseable(actualTag) && translationText != null) {
       translate(translationText.toString());
     } 
@@ -434,6 +434,9 @@
 public void endElement(String uri, String name, String qName) {//(String name) throws SAXException {
     if (log4j.isDebugEnabled()) log4j.debug("Configuration: endElement is called: " + qName);
 
+    if (isParseable(actualTag) && translationText != null) {
+        translate(translationText.toString());
+    }
     translationText = null;
     actualTag="";
   }
@@ -493,6 +496,7 @@
     translated.addElement("Y");
     String resultado = ini;
     if (!ini.equals("") && !ini.toLowerCase().startsWith("xx") && !isNumeric(ini)) {
+      log4j.debug("Translating "+ini+" for file"+actualFile+" moduleLang:"+moduleLang); 
       resultado = tokenize(ini, 0, translated);
       try {
         aux = translated.elementAt(0).equals("Y");