Closed
Bug 372617
Opened 19 years ago
Closed 19 years ago
Timezone in the preferences pane doesn't match "likelyTimezone"
Categories
(Calendar :: Preferences, defect)
Calendar
Preferences
Tracking
(Not tracked)
VERIFIED
FIXED
Sunbird 0.5
People
(Reporter: p.franc, Assigned: ssitter)
Details
Attachments
(1 file)
|
1.15 KB,
patch
|
mattwillis
:
first-review+
mvl
:
second-review+
|
Details | Diff | Splinter Review |
If no preference is set, the function guessSystemTimezone() tries to guess the timezone using the likelyTimezone property from the calendar.properties file. To get this property it uses the stringbundle in gCalendarBundle variable. However this variable is not defined (there is no stringbundle in the prefpane) for the preference/option dialog.
I would suggest to use something similar to the following code in the calUtils.js
if(typeof(gCalendarBundle) != 'undefined') {
var stringBundleTZ = gCalendarBundle.getString("likelyTimezone");
} else {
var strBundleService = Cc["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService);
var calendarBundle = strBundleService.createBundle("chrome://calendar/locale/calendar.properties");
var stringBundleTZ = calendarBundle.GetStringFromName("likelyTimezone");
}
| Assignee | ||
Comment 1•19 years ago
|
||
Please specify if you are using Sunbird or Lightning and what version.
If you are using a recent nightly build this is most probably caused by Bug 370670.
| Reporter | ||
Comment 2•19 years ago
|
||
(In reply to comment #1)
> Please specify if you are using Sunbird or Lightning and what version.
Sunbird pre0.5 cs (confirmed in sk too)
> If you are using a recent nightly build this is most probably caused by Bug
> 370670.
IMHO this is unrelated. Bug #370670 is just about updating the timezone string (used for l10n teams that didn't put the full string there). This bug is about not getting this string into the calUtils.js.
http://lxr.mozilla.org/mozilla/source/calendar/base/src/calUtils.js#203
The gCalendarBundle is null (there is no related stringbundle) while this is called from preference dialog.
Comment 3•19 years ago
|
||
(In reply to comment #2)
> Sunbird pre0.5 cs (confirmed in sk too)
Please can you specify what build are you using? (Help>About...)
| Reporter | ||
Comment 4•19 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.8.1.3pre) Gecko/20070304 Calendar/0.5pre
Comment 5•19 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; sk; rv:1.8.1.3pre) Gecko/20070304 Calendar/0.5pre
| Assignee | ||
Comment 6•19 years ago
|
||
For sk locale: likelyTimezone is incorrect, short name must be in English
For cs locale: likelyTimezone is incorrect, long name must match a timezone in mozilla/calendar/base/src/tzdata.c
See localization note in http://lxr.mozilla.org/mozilla1.8/source/calendar/locales/en-US/chrome/calendar/calendar.properties#182
Please fix your locale and test again. I'm think I saw this working before.
Comment 7•19 years ago
|
||
For sk locale:
no, we have tried English short string, Slovak short string, long name as in mozilla/calendar/base/src/tzdata.c (string '/mozilla.org/20070129_1/Europe/Bratislava' - is this correct?) and nothing worked.
Yes, you are right, it was working when we used non-localized timezones strings.
| Assignee | ||
Comment 8•19 years ago
|
||
(In reply to comment #7)
Bug 370670 was just fixed today. Without that patch Sunbird/Lightning tried to match likelyTimezone against a non existent timezone - that would fail in every case. Please retest with next nightly build.
| Assignee | ||
Comment 9•19 years ago
|
||
Assignee: nobody → ssitter
Status: NEW → ASSIGNED
Attachment #257412 -
Flags: second-review?(mvl)
Attachment #257412 -
Flags: first-review?(ctalbert.moz)
Updated•19 years ago
|
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Sunbird 0.5
Comment 10•19 years ago
|
||
It still does not work in sk locale.
likelyTimezone is set to /mozilla.org/20070129_1/Europe/Bratislava
Tested on todays build (with new profile): Mozilla/5.0 (Windows; U; Windows NT 6.0; sk; rv:1.8.1.3pre) Gecko/20070306 Calendar/0.5pre
Comment 11•19 years ago
|
||
Comment on attachment 257412 [details] [diff] [review]
rev0 - use calGetString() to read likelyTimezone
r2=mvl
Attachment #257412 -
Flags: second-review?(mvl) → second-review+
Comment 12•19 years ago
|
||
Comment on attachment 257412 [details] [diff] [review]
rev0 - use calGetString() to read likelyTimezone
r1=lilmatt
Attachment #257412 -
Flags: first-review?(ctalbert.moz) → first-review+
Comment 13•19 years ago
|
||
Patch checked in on MOZILLA_1_8_BRANCH and trunk.
-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 14•19 years ago
|
||
Verified using Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.8.1.3pre) Gecko/20070309 Calendar/0.5pre
Reporters, can you verify using your cs or sk build after the changes from Comment #6?
Comment 15•19 years ago
|
||
Verified using Mozilla/5.0 (Windows; U; Windows NT 6.0; sk; rv:1.8.1.3pre) Gecko/20070309 Calendar/0.5pre
Updated•19 years ago
|
Component: Internal Components → Preferences
QA Contact: base → preferences
You need to log in
before you can comment on or make changes to this bug.
Description
•