[MAGNOLIA-1172] Localization of calendar in the 'date' control doesn't work Created: 30/Oct/06  Updated: 23/Jan/13  Resolved: 10/Mar/08

Status: Closed
Project: Magnolia
Component/s: admininterface
Affects Version/s: 3.0 RC4
Fix Version/s: 3.0.2

Type: Bug Priority: Major
Reporter: Adrien FONT Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: control, i18n
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows XP Pro, Tomcat 5.0, java j2sdk1.4.2_12


Attachments: Text File calendar-fi.js.patch     Text File calendarFR.patch     Text File patch.txt     PNG File screenshot.png    
Issue Links:
Cloners
is cloned by MAGNOLIA-2084 CLONE -Localization of calendar in th... Closed
relation
is related to MAGNOLIA-1398 Finnish translation Closed
is related to MAGNOLIA-1399 Finnish translation for workflow module Closed
is related to MGNLDMS-93 Finnish translation Closed
is related to MAGNOLIA-1399 Finnish translation for workflow module Closed
supersession
is superseded by MAGNOLIA-1406 Some calendar translation files need ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

When using the calendar of a date controle, the JS objet does not draw correctly if we are not using the english language. It seems like the localization strings are not loaded. Instead, 'undefined' is displayed.
yet when loocking at the HTML code of the generated dialog that is using the calendar, We see the :

<script type="text/javascript" src="/magnolia/.resources/calendar/lang/calendar-fr.js"></script>

so, it seems that the file is found and added but the localization resources are not used by the calendar (except with the default english file).



 Comments   
Comment by Timo Pulkkinen [ 09/Nov/06 ]

The language file format in DHTML calendar has changed, but many of the language files are still in the old format (hence do not work).
There are multiple patches available for the localisation files ( http://sourceforge.net/tracker/?atid=544287&group_id=75569&func=browse ) but the author of the calendar hasn't added them to the current trunk.

Comment by Chris Miner [ 01/Feb/07 ]

Assuming it isn't just that the localization strings are not shown, but also that the calendar consists of just one week, then the problem also occurs for the german version of the calendar. I tracked down the problem to an attribute that you find in three of the calendar localization files. en, es, and ja have a line such as:

// First day of the week. "0" means display Sunday first, "1" means display
// Monday first, etc.
Calendar._FD = 1;

The other files don't. When you add that line to the german version of the calendar, then it works.

Comment by Chris Miner [ 01/Feb/07 ]

for the calendar-de.js file

Comment by Guillaume Pichenot [ 01/Feb/07 ]

Following the link given above by Timo, I dowloaded the Fr patch and the calendar works fine then (you need to repackage the jar, though).
Would it be acceptable to provide a patch for this issue or does the dev-team in general just want to stick to the official releases of the calendar tool ?

Comment by Chris Miner [ 01/Feb/07 ]

The german language updated version under that link also looks correct. At least it has the right Calendar._FD entry.

Comment by Magnolia International [ 01/Feb/07 ]

Guillaume,
sticking to releases would of course be desirable, but if the calendar widget does not work in some language we "have to" fix it. I'm not sure what the current status of the calendar is, but our fckeditor is also patched, for instance. I guess its fine, as long as we keep track of what patches we apply.

Comment by Guillaume Pichenot [ 01/Feb/07 ]

Latest release date of the calendar that I can find is April 2005. Last CVS commit is 11 month ago on their sourceforge (most files are 2 years).
Here's a patch, and, well, you get to decide if you patch for the next release.

Corrections :

  • the missing line identified earlier has been added
  • Use of HTML entities to escape special characters, so as to provide a single file for UTF8 or ISO Latin 1. Only ascii is there, so it's (should be) the same.
Comment by Philipp Bracher [ 02/Feb/07 ]

OK to patch in my opinion.

Comment by Timo Pulkkinen [ 23/Feb/07 ]

DHTML calendar patch (Finnish language)

Comment by Magnolia International [ 23/Feb/07 ]

todo : check all languages for the presence of
Calendar._FD = 1;

Comment by Magnolia International [ 26/Feb/07 ]

Added Calendar._FD = 1; everywhere and applied patches, thanks !

Comment by Magnolia International [ 26/Feb/07 ]

commited to 3.0 branch and merged to trunk.

Comment by Patrick Aebischer [ 05/Mar/08 ]

I still get that error. I am using Magnolia 3.5.4 on Tomcat 6. The english version works but all others don't.

Comment by Philipp Bracher [ 10/Mar/08 ]

sorry for reopening, will create a new issue

Comment by Magnolia International [ 24/Sep/08 ]

merged back into trunk and 3.5 and 3.6 branches

Generated at Mon Feb 12 03:24:21 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.