Closed Bug 354979 Opened 19 years ago Closed 17 years ago

Timezone names sorted by their English names

Categories

(Calendar :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: marcoos, Assigned: dbo)

References

Details

(Keywords: l12y)

Attachments

(2 files, 1 obsolete file)

Timezone picker in Sunbird prefs sorts the timezone names by their English names. So, this may be correct for en-US: Africa/Bujumbura Africa/Cairo Africa/Casablanca ... Europe/Vienna Europe/Vilnius Europe/Warsaw but it may not be correct in other locales. It _is_ incorrect in Polish: Afryka/Bu¿umbura (Polish for: Bujumbura) Afryka/Kair (Cairo) Afryka/Casablanca ... Europa/Wiedeñ (Vienna) Europa/Wilno (Vilnius) Europa/Warszawa (Warsaw) This should be: Afryka/Bu¿umbura Afryka/Casablanca ... Afryka/Kair (Cairo) ... Europa/Warszawa (Warsaw) Europa/Wiedeñ (Vienna) Europa/Wilno (Vilnius) etc.
OS: Linux → All
Keywords: l12y
Marek, Why don't you just sort these strings according to your language? That's what we've done for the fr locale and it works fine.
Cedric, where have you "sorted" them? The order in the DTD doesn't matter. The order is hard-coded the XUL file. http://lxr.mozilla.org/mozilla1.8/source/calendar/base/content/preferences/timezones.xul#68
(In reply to comment #3) > Cedric, where have you "sorted" them? The order in the DTD doesn't matter. > The order is hard-coded the XUL file. Oops : you're right :-) . I didn't notice that some of them are still in a wrong alphabetical order. Well, I ordered my dtd file for nothing :-).
Now that the timezones have been moved to timezones.properties, does the sorting problem persist?
I don't think so. The timezones' display names are sorted with local time and GMT at the top.
Status: NEW → RESOLVED
Closed: 17 years ago
Depends on: 363191
Resolution: --- → FIXED
Target Milestone: --- → 0.9
Version: Sunbird 0.3a2 → unspecified
This should be tested once we have translated timezone names back (bug 437441).
Stefan, I don't think this depends on the mentioned bug. Even though not all locales are packaged up in a single calendar-timezones.xpi, the matching timezones.properties for Sunbird (via preinstalled via calendar-timezones) and lightning (via jar.mn) is available.
Assignee: nobody → daniel.boelzle
I think this was intended to be fixed by bug 363191. However, it sorts the names using Array.sort(), which sorts by Unicode code. Instead it should use Array.sort(String.localeCompare). For example ["m", "o", "n", "ñ", "p"].sort() --> m, n, o, p, ñ ["m","o", "n", "ñ", "p"].sort(String.localeCompare) --> m, n, ñ, o, p
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(patch -l -p 1 -i file.patch) Use Array.sort(String.localeCompare) instead of Array.sort() (Array.sort just sorts in Unicode order, which is not appropriate for many characters such as those with diacritical marks, and those that differ only by case.)
Attachment #337246 - Flags: review?(daniel.boelzle)
Whiteboard: [patch in hand] [need review]
Attachment #337246 - Flags: review?(daniel.boelzle) → review+
Comment on attachment 337246 [details] [diff] [review] patch v1: sort timezones display names with Array.sort(String.localeCompare) The event dialog needs that fix, too. r=dbo with that done
Checked in on HEAD, MOZILLA_1_8_BRANCH and SUNBIRD_0_9_BRANCH.
Attachment #337246 - Attachment is obsolete: true
Attachment #337293 - Flags: review+
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
Whiteboard: [patch in hand] [need review]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: