Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025493Openbravo ERPE. Translationpublic2014-01-16 16:222014-02-13 12:28
egoitz 
shankarb 
normalmajoralways
closedfixed 
5
 
3.0PR14Q23.0PR14Q2 
AugustoMauch
Core
No
0025493: The text on a report of a module not in english can be replaced with a transaltion if the literal is alrady transalted
The text on a report of a module not in english can be replaced with a transaltion if the literal is alrady transalted.
The steps to reproduce describes and example:
-Install the spanish transalation pack
-Define a new module in spanish
-Crea a new jrxml to be assigned to the invoices.
-Define the new report as a template for the document type for invoices.
-Add on the jrxml the literal "Invoice" on a static text (you want to be printed without translate)
-Compile the application with compile.complete
-Restart tomcat
-Check that there is a textinferfaces for your jrmxl file with text Invoices
and that the transalation is for english because the textinterfacs belong to a module defined on spanish.
-Print an invoice
*See that the text "Invoice" is translated to "Factura" but you wanted to print "Invoice"
See the attached file.

The problem was that although the translations where properly ordered on the select, after that a hash map is filled witht the result of the query.
The array with the result of the query is readed in order so if there are two results with the same text on the query, the second one replaces the first when filling the hash map
No tags attached.
diff TranslationUtils.diff (939) 2014-01-16 16:22
https://issues.openbravo.com/file_download.php?file_id=6644&type=bug
Issue History
2014-01-16 16:22egoitzNew Issue
2014-01-16 16:22egoitzAssigned To => AugustoMauch
2014-01-16 16:22egoitzFile Added: TranslationUtils.diff
2014-01-16 16:22egoitzModules => Core
2014-01-16 16:22egoitzResolution time => 1392332400
2014-01-16 16:22egoitzTriggers an Emergency Pack => No
2014-01-20 10:00shankarbAssigned ToAugustoMauch => shankarb
2014-01-28 06:45shankarbStatusnew => scheduled
2014-01-28 06:45shankarbfix_in_branch => pi
2014-01-28 06:47shankarbReview Assigned To => AugustoMauch
2014-01-28 06:47shankarbfix_in_branchpi =>
2014-01-28 06:47shankarbIssue Monitored: AugustoMauch
2014-01-28 06:51hgbotCheckin
2014-01-28 06:51hgbotNote Added: 0063732
2014-01-28 06:51hgbotStatusscheduled => resolved
2014-01-28 06:51hgbotResolutionopen => fixed
2014-01-28 06:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/dd222399853ef3d618728c023128f98c04623864 [^]
2014-02-12 18:29hudsonbotCheckin
2014-02-12 18:29hudsonbotNote Added: 0064121
2014-02-13 12:28AugustoMauchNote Added: 0064223
2014-02-13 12:28AugustoMauchStatusresolved => closed
2014-02-13 12:28AugustoMauchFixed in Version => 3.0MP32

Notes
(0063732)
hgbot   
2014-01-28 06:51   
Repository: erp/devel/pi
Changeset: dd222399853ef3d618728c023128f98c04623864
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Mon Jan 27 15:55:02 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/dd222399853ef3d618728c023128f98c04623864 [^]

Fixes Issue 0025493: Prevent unwanted translation of literals.

If a report using a literal and if the literal is already translated,
then the literal is replaced by the translated value.
Preventing that by adding values to the resultmap only if it did not exist.

---
M src-core/src/org/openbravo/uiTranslation/TranslationUtils.java
---
(0064121)
hudsonbot   
2014-02-12 18:29   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/d1a5bb862230 [^]
Maturity status: Test
(0064223)
AugustoMauch   
2014-02-13 12:28   
Code reviewed and verified in pi@9d50bf45a6c9