Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013136Openbravo ERPA. Platformpublic2010-04-27 15:012010-05-15 00:00
shuehner 
mtaal 
urgentmajorhave not tried
closedfixed 
5
pi 
pi 
Core
No
0013136: OBContext.getLanguage does only use users' default language, and does not honor language change in the role change popup
the OBContext code for getLanguage does only read the language from the users default language setting.

However imo it should use the currently active ui language used by the user (which can be changed for this session in the role switch popup).
No tags attached.
related to defect 00201913.0MP12 closed alostale OBContext.getLanguage does only use users' default language, in java process 
Issue History
2010-04-27 15:01shuehnerNew Issue
2010-04-27 15:01shuehnerAssigned To => mtaal
2010-04-27 15:16shuehnerNote Added: 0026723
2010-04-27 22:32hgbotCheckin
2010-04-27 22:32hgbotNote Added: 0026735
2010-04-27 22:32hgbotStatusnew => resolved
2010-04-27 22:32hgbotResolutionopen => fixed
2010-04-27 22:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d61ce2cd289253212f817a70cc3eb57e103efbce [^]
2010-05-14 12:20shuehnerNote Added: 0027237
2010-05-14 12:20shuehnerStatusresolved => closed
2010-05-14 12:20shuehnerFixed in Version => pi
2010-05-14 15:28hudsonbotCheckin
2010-05-14 15:28hudsonbotNote Added: 0027305
2010-05-15 00:00anonymoussf_bug_id0 => 3001857
2012-04-03 08:57VictorVillarRelationship addedrelated to 0020191

Notes
(0026723)
shuehner   
2010-04-27 15:16   
When doing this change, please add javadoc to getLanguage method, explaining what value the method returns (i.e. currently selected ui language)
(0026735)
hgbot   
2010-04-27 22:32   
Repository: erp/devel/pi
Changeset: d61ce2cd289253212f817a70cc3eb57e103efbce
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Apr 27 22:32:28 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d61ce2cd289253212f817a70cc3eb57e103efbce [^]

fixes issue 13135: OBContext.getLanguage() returns 'wrong' language, if user does not have a default language set
fixes issue 13136: OBContext.getLanguage does only use users' default language, and does not honor language change in the role change popup

---
M src-test/org/openbravo/test/dal/IssuesTest.java
M src/org/openbravo/base/secureApp/LoginUtils.java
M src/org/openbravo/dal/core/OBContext.java
---
(0027237)
shuehner   
2010-05-14 12:20   
Tested in pi/pgsql, rev: da4cfb0dabc7. Code-change reviewed, now using language from Sesson set on login & role-switches first, then falls back to user default-language or system-client-default language. Tested using 'Audit Trail' popup as its translation of labels inside the grid is using the ObContext.getLanguage to retrieve the language to use. -> Working fine as the labels in the rows of that popup now change their translation properly if the ui language is changed by using the 'role switch popup'
(0027305)
hudsonbot   
2010-05-14 15:28   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/d61ce2cd2892 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/36f76c8d7193 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17198.obx [^]