Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014881Openbravo ERPB. User interfacepublic2010-10-15 12:132010-12-30 13:13
networkb 
alostale 
highminoralways
closedfixed 
5
2.50MP22 
3.0RC3 
Core
No
0014881: Calendar always appear in english
Although you are using the application translated in Spanish Language, when you click on Calendar icon to insert a date in any window all calendar elements still appear in english
1. install spanish translation module (or any other language translation module)
2. go to Sales Management || Transactions || Sales Order || Header : click on calendar icon to enter and Order Date

Realize that Month, Days and indications appear in english
No tags attached.
depends on backport 00154212.50MP25 closed alostale Calendar always appear in english 
related to defect 00155922.50MP26 closed alostale The date selectors don't wokr in mp25 in firefox 
Issue History
2010-10-15 12:13networkbNew Issue
2010-10-15 12:13networkbAssigned To => dbaz
2010-10-18 15:01dbazNote Added: 0031911
2010-10-18 15:01dbazAssigned Todbaz => alostale
2010-10-25 08:55alostaleStatusnew => scheduled
2010-12-14 13:24alostaleStatusscheduled => acknowledged
2010-12-14 13:24alostaleStatusacknowledged => scheduled
2010-12-14 13:24alostalefix_in_branch => pi
2010-12-14 13:25alostaleTarget Version2.50MP25 => 3.0RC3
2010-12-14 13:25alostalefix_in_branchpi =>
2010-12-14 13:26hgbotCheckin
2010-12-14 13:26hgbotNote Added: 0033164
2010-12-14 13:26hgbotStatusscheduled => resolved
2010-12-14 13:26hgbotResolutionopen => fixed
2010-12-14 13:26hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fe902e8d37f159ec4300466e921cf4fe79c2c7cb [^]
2010-12-14 16:24dbazStatusresolved => closed
2010-12-16 22:16anonymoussf_bug_id0 => 3138785
2010-12-30 13:13hudsonbotCheckin
2010-12-30 13:13hudsonbotNote Added: 0033443
2011-01-10 12:12alostaleRelationship addedrelated to 0015592

Notes
(0031911)
dbaz   
2010-10-18 15:01   
When we are in a en_US environment this generated line should be

<SCRIPT language="JavaScript" src="../web/js/jscalendar/lang/calendar-en.js" type="text/javascript"></SCRIPT>

and in es_ES should be

<SCRIPT language="JavaScript" src="../web/js/jscalendar/lang/calendar-es.js" type="text/javascript"></SCRIPT>


The problem is that in both cases the result is always "calendar-en.js"

The problem root could be inside

src/org/openbravo/wad/controls/WADDate.java and WADDateTime.java in this piece of code

  private void generateJSCode() {
    addImport("DateTextBox", "../../../../../web/js/default/DateTextBox.js");
    addImport("calendar", "../../../../../web/js/jscalendar/calendar.js");
    if (!getData("AD_Language").equals(""))
      addImport("calendarLang", "../../../../../web/js/jscalendar/lang/calendar-"
          + getData("AD_Language").substring(0, 2) + ".js");
    else
      addImport("calendarLang", "../../../../../web/js/jscalendar/lang/calendar-en.js");
    generateValidation();
    setCalloutJS();
  }

That the "if" statement is not working properly.
(0033164)
hgbot   
2010-12-14 13:26   
Repository: erp/devel/pi
Changeset: fe902e8d37f159ec4300466e921cf4fe79c2c7cb
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Dec 14 13:25:28 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/fe902e8d37f159ec4300466e921cf4fe79c2c7cb [^]

fixed bug 14881: Calendar always appear in english

---
M src-wad/src/org/openbravo/wad/controls/WADDate.java
M src-wad/src/org/openbravo/wad/controls/WADDateTime.java
A web/js/jscalendar/lang/calendar-lang.js
---
(0033443)
hudsonbot   
2010-12-30 13:13   
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/fe902e8d37f1 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/7d7e5eebcc62 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.19448.obx [^]