[kronolith] probybly NLS bug when adding holidays
Jan Schneider
jan at horde.org
Wed Jan 16 13:50:52 UTC 2013
Zitat von Jens-Uwe Mozdzen <jmozdzen at nde.ag>:
> Hi,
>
> when trying to add holidays, there seems to be a NLS bug:
>
> When I'm logged in with "German" as effective language, adding
> German holidays doesn't get me anywhere (UI "hangs", Firebug shows a
> call to "insertCalendarInList:function(type,id,cal,div)
> {var
> noItems,calendar,link;if(!div){div=this.getCalendarList(type,cal.owner);}"
> with "cal" parameter undefined.
>
> That function is called in the "saveCalendar()" method
> (kronolith/js/kronolith.js line 3526 here). The "cal" parameter is
> determined via "Kronolith.conf.calendars.holiday[ data.driver]"...
> data.driver is the value "Deutschland" (as displayed in the UI
> form), while the array's element is "Germany". Hence the code
> couldn't find the proper entry, resulting in the undefined value
> handed down to insertCalendarInList().
>
> I suspected a NLS problem, which was IMO confirmed by the following:
> When the user changed the UI language to English, adding the
> calendar worked like a charm... because the calendar name didn't get
> translated.
>
> As the calendar name is taken from the value displayed in the UI,
> which seems to be translated (I won't argue that :) ), it might be
> better to select the entry in the Javascript array of calendars by
> comparing the calendar name, rather than just indexing via the UI
> string. The "name" attribute of the calendar "Germany" is
> "Deutschland", which is the value displayed in the UI ;)
>
> It works for all other holiday calendars implemented here, because
> their names have no translation available :)
>
> With regards,
> Jens
> --
> Jens-U. Mozdzen voice : +49-40-559 51 75
> NDE Netzdesign und -entwicklung AG fax : +49-40-559 51 77
> Postfach 61 03 15 mobile : +49-179-4 98 21 98
> D-22423 Hamburg e-mail : jmozdzen at nde.ag
>
> Vorsitzende des Aufsichtsrates: Angelika Mozdzen
> Sitz und Registergericht: Hamburg, HRB 90934
> Vorstand: Jens-U. Mozdzen
> USt-IdNr. DE 814 013 983
Bug #11961
--
Jan Schneider
The Horde Project
http://www.horde.org/
More information about the kronolith
mailing list