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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0044053
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] E. Translationmajoralways2020-05-13 15:112020-10-19 16:21
ReporterAtulOpenbravoView Statuspublic 
Assigned ToAtulOpenbravo 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0044053: Before transforming PO to XML, check whether new line exists at the end of PO File, if not add it

DescriptionIn Translation Helper, Export PO's process generates zip file which includes each module to be translated. PO files for each module table are structured such that each PO file ends with a new line.
When these PO files are being edited by PO Edit tool, it is found that new line at the end of PO file is lost.
For the Last candidates in such a PO files, When PO files are being transformed back to XML files in PO2XML, Original String is set as blank though there exists a Original String as well as Translated String for it.

eg could be found at

https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core.fr_FR/diff/a42eb9a0c723/referencedata/translation/fr_FR/OBUISEL_SELECTOR_TRL_fr_FR.xml [^]

@@ -1,22 +1,17 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <compiereTrl language="fr_FR" table="OBUISEL_SELECTOR" version="">
- <row id="34CC84D1AB714A978F6B79F2B434058A" trl="N">
- <value column="Name" original="Aba Layout Variant Selector"/>
- <value column="Description" original="Aba Layout Variant Selector"/>
+ <row id="34CC84D1AB714A978F6B79F2B434058A" trl="Y">
+ <value column="Name" original="Aba Layout Variant Selector">Sélecteur de variantes de disposition de la zone de boutons d'action</value>
+ <value column="Description" original=""/>


It is therefore necessary to check and if required add new line at end of each PO file before transforming them to XML files in the org.openbravo.xmlpo module
https://code.openbravo.com/erp/mods/org.openbravo.xmlpo [^]
Steps To Reproduce-
TagsNo tags attached.
Attached Filesdiff file icon ProposedFixForBUG_44053.diff [^] (2,356 bytes) 2020-05-13 15:16 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0123767)
AtulOpenbravo (developer)
2020-10-19 13:56
edited on: 2020-10-19 13:57

Test Plan
- Install org.openbravo.xmlpo and org.openbravo.translator.helper modules and their dependent modules in instance.
- Login as System Admin
- Navigate to Translation Helper window
- Choose any language and run Export PO's process.
- Realize that po zip is downloaded.
- Extract the contents of the zip and open up any po file in PO Editor tool and close the file.
- Again the zip the po extracted folder with same directory structure.
- Using Translation Helper window, select the previously selected language, run Import PO's process, select the zip file (whose contents were opened/edited in PO editor tool)
- Execute the process. Realize that it is successful.


To check the effect of patch
- Run the above process twice one with fix and one without fix.
- Remember to take backup of XML files in both the case from attachments/lang/ directory
- Check the difference between both the XML

Before change when AD_ELEMENT_Name_es_ES.po and AD_MENU_Name_es_ES.po files opened/edited in PO Editor Tool is as below:-

--- a/AD_ELEMENT_TRL_es_ES.xml Mon Oct 19 17:11:43 2020 +0530
+++ b/AD_ELEMENT_TRL_es_ES.xml Mon Oct 19 17:13:34 2020 +0530
@@ -27791,7 +27791,7 @@
     <value column="PO_PrintName" original=""/>
   </row>
   <row id="FF80818131FFA2FC0131FFC874C5001D" trl="N">
- <value column="Name" original="Run Time"/>
+ <value column="Name" original=""/>
     <value column="PrintName" original="Run Time"/>
     <value column="Description" original="Operation run time"/>
     <value column="Help" original="Operation run time"/>
diff -r 0a069fa706ef AD_MENU_TRL_es_ES.xml
--- a/AD_MENU_TRL_es_ES.xml Mon Oct 19 17:11:43 2020 +0530
+++ b/AD_MENU_TRL_es_ES.xml Mon Oct 19 17:13:34 2020 +0530
@@ -1600,8 +1600,8 @@
     <value column="Name" original="Return from Customer"/>
     <value column="Description" original=""/>
   </row>
- <row id="FF808181323E504701323E5E20F10063" trl="Y">
- <value column="Name" original="Production Run">Ejecución de producción</value>
+ <row id="FF808181323E504701323E5E20F10063" trl="N">
+ <value column="Name" original=""/>
     <value column="Description" original="Edit precisely what has been produced from a selected product order."/>
   </row>
 </compiereTrl>


After the change there is no such change found in the above files.

(0123768)
hgbot (developer)
2020-10-19 14:23

Merge Request created: https://gitlab.com/openbravo/tools/translations/org.openbravo.xmlpo/-/merge_requests/4 [^]
(0123775)
hgbot (developer)
2020-10-19 16:21

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/tools/translations/org.openbravo.xmlpo [^]
Changeset: e1c9632f18bd9ac94de3496dbc0cfe64661a91e1
Author: Atul Gaware <atul.gaware@openbravo.com>
Date: 2020-10-19T17:51:58+05:30
URL: https://gitlab.com/openbravo/tools/translations/org.openbravo.xmlpo/-/commit/e1c9632f18bd9ac94de3496dbc0cfe64661a91e1 [^]

Fixes BUG-0044053: Before transforming PO to XML, check
whether new line exists at the end of PO File, if not add
it

When transforming PO files to XML file check whether PO file
ends with a new line or not, if not then append a new line
at end of file and use the file for transformation.

---
M src/org/openbravo/xmlpo/po2xml/PO2XMLMain.java
---
(0123776)
hgbot (developer)
2020-10-19 16:21

Repository: https://gitlab.com/openbravo/tools/translations/org.openbravo.xmlpo [^]
Changeset: a1fd56db3112d42a73435d0be52f8211db5af060
Author: Atul Gaware <atul.gaware@openbravo.com>
Date: 2020-10-19T18:03:14+05:30
URL: https://gitlab.com/openbravo/tools/translations/org.openbravo.xmlpo/-/commit/a1fd56db3112d42a73435d0be52f8211db5af060 [^]

Related To BUG-44053:Before transforming PO to XML, check
whether new line exists at the end of PO File, if not add
it

Uncommented the call to checkAddNewLineAtEOF method that was
left commented during testing.

---
M src/org/openbravo/xmlpo/po2xml/PO2XMLMain.java
---
(0123777)
hgbot (developer)
2020-10-19 16:21

Merge request merged: https://gitlab.com/openbravo/tools/translations/org.openbravo.xmlpo/-/merge_requests/4 [^]

- Issue History
Date Modified Username Field Change
2020-05-13 15:11 AtulOpenbravo New Issue
2020-05-13 15:11 AtulOpenbravo Assigned To => platform
2020-05-13 15:11 AtulOpenbravo Modules => Core
2020-05-13 15:11 AtulOpenbravo Triggers an Emergency Pack => No
2020-05-13 15:16 AtulOpenbravo Proposed Solution updated
2020-05-13 15:16 AtulOpenbravo File Added: ProposedFixForBUG_44053.diff
2020-05-13 15:18 AtulOpenbravo Description Updated View Revisions
2020-05-13 15:18 AtulOpenbravo Proposed Solution updated
2020-05-13 15:20 AtulOpenbravo Description Updated View Revisions
2020-05-13 15:20 AtulOpenbravo Proposed Solution updated
2020-05-18 07:18 alostale Assigned To platform => Triage Finance
2020-10-13 08:45 xabiermerino Resolution time => 1604098800
2020-10-19 10:44 AtulOpenbravo Status new => scheduled
2020-10-19 10:44 AtulOpenbravo Assigned To Triage Finance => AtulOpenbravo
2020-10-19 13:56 AtulOpenbravo Note Added: 0123767
2020-10-19 13:57 AtulOpenbravo Note Edited: 0123767 View Revisions
2020-10-19 14:23 hgbot Note Added: 0123768
2020-10-19 16:21 hgbot Resolution open => fixed
2020-10-19 16:21 hgbot Status scheduled => closed
2020-10-19 16:21 hgbot Note Added: 0123775
2020-10-19 16:21 hgbot Note Added: 0123776
2020-10-19 16:21 hgbot Note Added: 0123777


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker