Closed
Bug 286481
Opened 20 years ago
Closed 19 years ago
Export of events in csv format doesn't start in italian version - JS Error on Console
Categories
(Calendar :: Sunbird Only, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: alyno, Assigned: mostafah)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.6) Gecko/20050226 Firefox/1.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.6) Gecko/20050226 Firefox/1.0.1 Unable to export Selected Events in CSV format: After selecting one/all events and pressing the File->Export Selected Events...->Save AS CSV, nothing happens: no file is created. All the other formats work fine. JavaScript console reports error: TriggerIcalUnits is not defined Source file: chrome://calendar/content/ImportExport.js - Line 1832 I'm using the win32 italian version of Mozilla Sunbird 0.2 (win32-it-IT) downloaded from www.mozillaitalia.org Reproducible: Always Steps to Reproduce: 1. Select one/many ebents 2. File->Export Selected Events 3. Select "Comma Separated (CSV)" in the Save As... Dialog 4. Press the Save Button Actual Results: Nothing Expected Results: Creation of a .CSV file
hope this will help:
i've made a little debug and found the problem.
the error is in the addAlarmNode function: at the beginning of this function
there's an if statement used to define the triggerIcalUnits variable. This
statement checks triggerUnits but only in english. It looks for the strings
"minutes", "hours" and "days" but - in the italian version - it should check
"minuti", "ore", and "giorni".
Changed the code in:
if(triggerUnits == "minuti")
triggerIcalUnits = "M";
else if(triggerUnits == "ore")
triggerIcalUnits = "H";
else if(triggerUnits == "giorni")
triggerIcalUnits = "D";
and now it works!
(I only suppose that you should use "ore" instead of "hours" and "giorni"
instead of "days" because I didn't manage to start this function with a
triggerUnits value different from "minutes")There's still a problem:
if I try to export a holyday loaded from the ItalianHolidays.ics file, the above
mentioned triggerUnits variables changes back to english (i.e. it's value is
again "minutes" unstead of "minuti"). Solved changing the above proposed code in:
if(triggerUnits == "minuti" || triggerUnits== "minutes")
triggerIcalUnits = "M";
else if(triggerUnits == "ore" || triggerUnits=="hours")
triggerIcalUnits = "H";
else if(triggerUnits == "giorni" || triggerUnits=="days")
triggerIcalUnits = "D";
maybe we need to change similarly the import function?Summary: Export of events in csv format doesn't start: JS Error on Console → Export of events in csv format doesn't start in italian version - JS Error on Console
I was not able to reproduce this error. Downloaded the Italian version of sunbird0.2 from http://www.sanavia.it/sunbird/Sunbird-0.2-win32-it-IT.zip Created an event with an alarm (New Event). Exported that event to csv (File | Export selected events). No problem. --------- Looking at the code, it looks like the value should be a non-localized value from eventDialog.xul alarm-length-units (the value fields of the menuitems are not displayed and should not be localized, and they aren't localized in the downloaded program). Reporter, are you using the build http://www.sanavia.it/sunbird/Sunbird-0.2-win32-it-IT.zip without modification? --------- This value is saved in the ics file as property X-MOZILLA-ALARM-DEFAULT-UNITS :hours If I edit this file by hand and change "hours" to "ora", then restart sunbird, it will produce the error if I try to export this event. Reporter, how are the events (that are causing the problem) generated? Are they written by another program other than sunbird? ---------- (Developers: In the event object and event dialog, maybe we could change the value from the spelled out english word to the single rfc2445 4.3.6 letter so there is less confusion. Thus the menuitem *values* (not labels) would change "minutes" ==> "M", "hours" ==> "H", "days" ==> "D". In the storage, this property is there so someone can turn off an alarm and later turn it back on without having to set the value again. It could be stored using the same code as the trigger value, such as X-MOZ-TRIGGER-DEFAULT;VALUE=DURATION:-PT15M for a 15 minute default. Using the code, people will be less likely to try to localize it if they are generating ics events with alarms in other programs. If the alarm is enabled so a TRIGGER value is stored, the X-MOZ alarm properties are unused and need not be stored, they just hold the same value. )
You're absolutely right, I've downloaded and re-installed Sunbird again, re-imported my calendar (using ics format, exported directly from Sunbird on Windows) and the bug didn't show up again. I tried this import-export procedure even on my previous copy of Sunbird (which I had backupped). After that I tryed a csv export and it worked flawless. Trying to understand HOW the ics file in wrong format was generated: I use Sunbird both on Windows and Linux, importing and exporting through ics format. On Linux, sometimes, I use Kalendar too, modifying, exporting and importing again in Sunbird. I'll try this procedure again to discover why the minutes-minuti problem happens.
Comment 5•19 years ago
|
||
marking WFM per comment 3 and comment 4.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
Updated•19 years ago
|
QA Contact: gurganbl → sunbird
You need to log in
before you can comment on or make changes to this bug.
Description
•