Openbravo Issue Tracking System - Tools |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0007009 | Tools | openbravo2po | public | 2009-01-19 17:40 | 2020-04-13 09:22 |
|
Reporter | gforcada | |
Assigned To | alostale | |
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | out of date | |
Platform | | OS | 5 | OS Version | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | |
|
Summary | 0007009: [openbravo2po-valuetrl]Old <value> lines shouldn't be keeped if the template doesn't have them (when running a runTemplateMerge |
Description | Updating 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>
|
Steps To Reproduce | |
Proposed Solution | |
Additional Information | |
Tags | commsup_sprint6, translation |
Relationships | |
Attached Files | old value lines.tar.bz2 (560) 2009-01-23 09:59 https://issues.openbravo.com/file_download.php?file_id=708&type=bug |
|
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 |
Notes |
|
|
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. |
|
|
|
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
|
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 [^]
|
|
|
|
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 |
|
|
|
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 |
|