Comment 8 for bug 174672

Revision history for this message
In , Joey Minta (jminta) wrote :

Comment on attachment 204301
Patch v1

This looks like a good start.

+ // Get Holiday calendar URL from the prefs
+ var url = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefService)
+ .getBranch("calendar.").getCharPref("holidayCalendarURL");
I really don't think a preference is called for here. Preferences are things users might want to change, but this will only happen the first time Sunbird is run. That means that changing it will have no effect. Why not just use srGetStrBundle() and use that to get the url/name directly?

+ holidayCalendar.name = name;
Maybe we want to give the calendar a separate color too? That way the events don't get mixed up between 'Home' and 'Holiday'.

+# Holiday calendar file
As I'm learning, you're going to need to give translators a little more info for what they should put here. Probably expand this comment to include a reference to the general holiday's page, so they can get a url from there.

Just a general nit: include a blank line between code blocks, it makes the code more readable.