Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0007009
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Tools] openbravo2pomajorhave not tried2009-01-19 17:402020-04-13 09:22
ReportergforcadaView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionout of date 
StatusclosedFix in branchpiFixed in SCM revision269
ProjectionnoneETAnone 
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Review Assigned To
Summary

0007009: [openbravo2po-valuetrl]Old <value> lines shouldn't be keeped if the template doesn't have them (when running a runTemplateMerge

DescriptionUpdating an xml file with old <value> lines that aren't used in the template file used to update it should not been keeped.

The <value> lines with original="" aren't useful at all.

<row id="800109" trl="N">
 <value column="Name" isTrl="N" original="click Link">click Link</value>
 <value column="Arghelp1" isTrl="N" original="Introduzca el texto del link">Introduzca el texto del link</value>
 <value column="Arghelp2" isTrl="N" original="">click Link</value>
 <value column="Arghelp3" isTrl="N" original="">click Link</value>
 <value column="Description" isTrl="N" original="">click Link</value>
</row>

Instead it should look like:

<row id="800109" trl="N">
 <value column="Name" isTrl="N" original="click Link">click Link</value>
 <value column="Arghelp1" isTrl="N" original="Introduzca el texto del link">Introduzca el texto del link</value>
</row>

Tagscommsup_sprint6, translation
Attached Filesbz2 file icon old value lines.tar.bz2 [^] (560 bytes) 2009-01-23 09:59

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0012552)
gforcada (reporter)
2009-01-23 10:11

In the attached file you can see an en_US.xml file, used as template, an it_IT.xml file used as a base and a output/*_it_IT.xml file that is the result of merging en_US.xml and it_IT.xml file.

The command used was:

ant runTemplateMerge -DoutFold=../files/old\ value\ lines/output -DinpTempFile=../files/old\ value\ lines/AT_COMMAND_TRL_en_US.xml -DinpBaseFile=../files/old\ value\ lines/AT_COMMAND_TRL_it_IT.xml


The main problem with keeping them is that the translation is filled with the <value column="Name"> translation and when exported to po (with runXML2PO) they are added to po files and thus add false translations.
(0013354)
pheenan (reporter)
2009-02-11 15:54

Fixed this issue with the following test information

Template File:
<?xml version="1.0" encoding="UTF-8"?>
<compiereTrl language="es_ES" table="AD_MENU" version="2.40">
  <row id="102" trl="Y">
    <value column="Name" original=""></value>
  </row>
  <row id="103" trl="Y">
    <value column="Name" original="Red"></value>
  </row>
  <row id="104" trl="Y">
    <value column="Name" original=""></value>
  </row>
  <row id="105" trl="Y">
    <value column="Name" original="Black"></value>
    <value column="Description" original="black reference"></value>
  </row>
  <row id="107" trl="Y">
    <value column="Name" original="Orange"></value>
  </row>
</compiereTrl>

Base File:
<?xml version="1.0" encoding="UTF-8"?>
<compiereTrl language="es_ES" table="AD_MENU" version="2.40">
  <row id="102" trl="Y">
    <value column="Name" original="Blue">Azul</value>
  </row>
  <row id="104" trl="Y">
    <value column="Name" original="">Verde</value>
  </row>
  <row id="105" trl="Y">
    <value column="Name" original="black">Negre</value>
    <value column="Description" original="black reference">Referencia de Negre</value>
  </row>
  <row id="106" trl="Y">
    <value column="Name" original="Yellow">Amarillo</value>
  </row>
  <row id="107" trl="Y">
    <value column="Name" original="Orange"></value>
  </row>
</compiereTrl>

Output File:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<compiereTrl language="es_ES" table="AD_MENU" version="2.40">
  <row id="103" trl="N">
    <value column="Name" isTrl="N" original="Red"/>
  </row>
  <row id="105" trl="Y">
    <value column="Name" isTrl="Y" original="Black">Negre</value>
    <value column="Description" isTrl="Y" original="black reference">Referencia de Negre</value>
  </row>
  <row id="107" trl="N">
    <value column="Name" isTrl="N" original="Orange"/>
  </row>
</compiereTrl>
(0013356)
svnbot (reporter)
2009-02-11 16:41

Repository: localization
Revision: 269
Author: pheenan
Date: 2009-02-11 16:41:30 +0100 (Wed, 11 Feb 2009)

Fixed 7009. Updating functionality to clean value rows where there is no value in the original text. Also fixing issue in the valueType mapping (not indexing the values correctly.). Cleaned up some commented code that is no longer needed. Added test files to support the TestMergeXMLFiles test case. NOTE: need to add file comparison to the merge test.

---
U tools/openbravo2po/branches/openbravo2po-valuetrl/src/org/openbravo/xmlpo/objects/FileObject.java
U tools/openbravo2po/branches/openbravo2po-valuetrl/src/org/openbravo/xmlpo/objects/TaskProcess.java
U tools/openbravo2po/branches/openbravo2po-valuetrl/src/org/openbravo/xmlpo/templateMerge/TemplateProcessor.java
U tools/openbravo2po/branches/openbravo2po-valuetrl/src/org/openbravo/xmlpo/utils/MergeXMLFiles.java
U tools/openbravo2po/branches/openbravo2po-valuetrl/src/org/openbravo/xmlpo/utils/XMLFileBuilder.java
A tools/openbravo2po/branches/openbravo2po-valuetrl/tests/resources/templateMerge/base/AD_MENU_TRL_es_ES_MergeTest.xml
A tools/openbravo2po/branches/openbravo2po-valuetrl/tests/resources/templateMerge/output/AD_MENU_TRL_es_ES_Result.xml
A tools/openbravo2po/branches/openbravo2po-valuetrl/tests/resources/templateMerge/template/AD_MENU_TRL_MergeTest_Template.xml
U tools/openbravo2po/branches/openbravo2po-valuetrl/tests/src/org/openbravo/xmlpo/templateMerge/TestTemplateMerge.java
A tools/openbravo2po/branches/openbravo2po-valuetrl/tests/src/org/openbravo/xmlpo/utils/TestMergeXMLFiles.java
---

https://dev.openbravo.com/websvn/localization/?rev=269&sc=1 [^]
(0013832)
gforcada (reporter)
2009-02-20 12:56

Hi Phil,

Seems something went wrong during this update.

In the previous version (rev 259) running a runTemplateMerge and then a runXML2PO worked fine for all Italian translations files that are now in the subversion.

From revision 269 (the one that fixes this bug) onwards the runXML2PO still works but if you do a runTemplateMerge and with the resulting file do a runXML2PO it fails with a java.lang.ArrayIndexOutOfBoundsException in XML2POMain
(0013833)
gforcada (reporter)
2009-02-20 13:00

Files that actually fail:

it_IT/trunk/AT_COMMAND_TRL_it_IT.xml
it_IT/trunk/AD_WINDOW_TRL_it_IT.xml
it_IT/trunk/AD_TAB_TRL_it_IT.xml
it_IT/trunk/AD_REFERENCE_TRL_it_IT.xml
it_IT/trunk/AD_PROCESS_TRL_it_IT.xml
it_IT/trunk/AD_PROCESS_PARA_TRL_it_IT.xml
it_IT/trunk/AD_FIELD_TRL_it_IT.xml
it_IT/trunk/AD_ELEMENT_TRL_it_IT.xml

All of them show a java.lang.ArrayIndexOutOfBoundsException while running XML2POMain

- Issue History
Date Modified Username Field Change
2009-01-19 17:40 gforcada New Issue
2009-01-23 09:59 gforcada File Added: old value lines.tar.bz2
2009-01-23 10:11 gforcada Note Added: 0012552
2009-01-23 16:37 jordimas Issue Monitored: jordimas
2009-01-27 12:04 pheenan Assigned To => pheenan
2009-01-27 12:04 pheenan Status new => scheduled
2009-01-27 12:04 pheenan fix_in_branch => trunk
2009-01-27 12:26 pheenan Tag Attached: comsup_sprint5
2009-02-11 10:03 pheenan Tag Detached: comsup_sprint5
2009-02-11 10:04 pheenan Tag Attached: commsup_sprint6
2009-02-11 10:04 pheenan Tag Detached: commsup_sprint6
2009-02-11 10:05 pheenan Tag Attached: commsup_sprint6
2009-02-11 15:54 pheenan Note Added: 0013354
2009-02-11 16:41 svnbot Checkin
2009-02-11 16:41 svnbot Note Added: 0013356
2009-02-11 16:41 svnbot Status scheduled => resolved
2009-02-11 16:41 svnbot Resolution open => fixed
2009-02-11 16:41 svnbot svn_revision => 269
2009-02-20 12:56 gforcada Status resolved => new
2009-02-20 12:56 gforcada Resolution fixed => open
2009-02-20 12:56 gforcada Note Added: 0013832
2009-02-20 13:00 gforcada Note Added: 0013833
2009-04-30 12:21 alostale Assigned To pheenan => alostale
2009-04-30 18:16 rmorley Tag Attached: translation
2020-04-13 09:22 alostale Status new => closed
2020-04-13 09:22 alostale Resolution open => out of date


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker