Closed Bug 484664 Opened 12 years ago Closed 12 years ago

test_bug22310.js fails on Windows 2000: unsupported 'gu-IN' locale

Categories

(Core :: Internationalization, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9.2a1

People

(Reporter: sgautherie, Assigned: smontagu)

References

()

Details

(Keywords: fixed1.9.1, Whiteboard: [fixed1.9.1rc2])

Attachments

(1 file)

[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090322 SeaMonkey/2.0b1pre] (experimental/_m-c_, home, optim default) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/8d2c566f3256
 +http://hg.mozilla.org/comm-central/rev/573fb4c0ec8b)

{
Unexpected date format: month name in gu-IN
...
*** TEST-UNEXPECTED-FAIL | objdir\mozilla\_tests\xpcshell\test_intl_locale\unit\test_bug22310.js | false == true
}

Removing
|[dt("gu-IN").has("\u0A9C\u0AC2\u0AA8"), "month name in gu-IN"],|
makes this test pass.
Flags: wanted1.9.2?
What does the following give you in the Error Console?

var dts = Components.classes["@mozilla.org/intl/scriptabledateformat;1"]
  .getService(Components.interfaces.nsIScriptableDateFormat);
dts.FormatDateTime("gu-IN", dts.dateFormatLong,
  dts.timeFormatSeconds, 2008, 6, 30, 12, 56, 34);

It gives me "30 જૂન 2008 12:56:34" which is what the test expects.
http://msdn.microsoft.com/en-us/library/ms776260.aspx says:

0x0447	Windows XP and later: Gujarati (India)	gu-IN	Gujr	Unicode only
(In reply to comment #1)
> It gives me "30 જૂન 2008 12:56:34" which is what the test expects.

It gives nothing.

With s/gu-IN/fr-fr/, it gives "lundi 30 juin 2008 12:56:34", as expected.

(In reply to comment #2)
> Windows XP and later

Obvious cause :->
Summary: [SeaMonkey] test_bug22310.js fails, (at least on my Windows 2000) → test_bug22310.js fails on Windows 2000: unsupported 'gu-IN' locale
No longer blocks: SmTestFail, CcMcBuildIssues
Serge, can you test this fix (using ta-IN instead of gu-IN)? If this doesn't work either I guess I'll just remove that line of the test.

I'm a little surprised that Konkani works and Gujarati doesn't, but there it is.
(In reply to comment #3)
> (In reply to comment #1)
> > It gives me "30 જૂન 2008 12:56:34" which is what the test expects.
> 
> It gives nothing.


It should have given a date in some other language... Seems like a bug.
(In reply to comment #5)

> > It gives nothing.
> It should have given a date in some other language... Seems like a bug.

I'm not sure if you mean that this is a bug in Gecko or in Windows, but (assuming tentatively that Windows is not falling back to a default locale when given an unsupported locale id code), we could probably do our own fallback during locale parsing.
Comment on attachment 368791 [details] [diff] [review]
Possible fix
[Checkin: Comment 9 & 12]


"Windows 2000 and later" ta-IN works for me, as expected :-)
(In reply to comment #6)
> (In reply to comment #5)
> 
> > > It gives nothing.
> > It should have given a date in some other language... Seems like a bug.
> 
> I'm not sure if you mean that this is a bug in Gecko or in Windows, but
> (assuming tentatively that Windows is not falling back to a default locale when
> given an unsupported locale id code), we could probably do our own fallback
> during locale parsing.

According to my own bug 474636, nsIScriptableDateFormat has a fallback, which I think it should have. Not sure if it should be provided by Windows or Gecko.
http://hg.mozilla.org/mozilla-central/rev/d74e551f46a3
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
V.Fixed, per comment 7.
Status: RESOLVED → VERIFIED
Flags: wanted1.9.2? → in-testsuite+
Target Milestone: --- → mozilla1.9.2a1
The test was landed on 1.9.1 without this fix :-(
Simon, can you check it in there too?
Whiteboard: [needs 1.9.1 landing]
Comment on attachment 368791 [details] [diff] [review]
Possible fix
[Checkin: Comment 9 & 12]


http://hg.mozilla.org/releases/mozilla-1.9.1/rev/b95bb1093f2c
Attachment #368791 - Attachment description: Possible fix → Possible fix [Checkin: Comment 9 & 12]
Keywords: fixed1.9.1
Whiteboard: [needs 1.9.1 landing] → [fixed1.9.1rc1+]
Whiteboard: [fixed1.9.1rc1+] → [fixed1.9.1rc2]
You need to log in before you can comment on or make changes to this bug.