Closed
Bug 533814
Opened 16 years ago
Closed 16 years ago
Make posix locale claim to be nb-NO if it hits no_NO
Categories
(Core :: Internationalization, defect)
Tracking
()
VERIFIED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | final-fixed |
People
(Reporter: Pike, Assigned: smontagu)
Details
Attachments
(1 file, 3 obsolete files)
1.00 KB,
patch
|
Pike
:
review+
beltzner
:
approval1.9.2+
|
Details | Diff | Splinter Review |
The maemo device is sending the deprecated no_NO locale code for Norwegian, and we should map that to the best match we have, which is nb-NO.
Assignee | ||
Comment 1•16 years ago
|
||
In what context exactly? Do you mean that GetSystemLocale should return nb-NO when the locale it gets from the OS is no-NO?
Reporter | ||
Comment 2•16 years ago
|
||
AFAICT, it boils down to GetXPLocale, http://mxr.mozilla.org/mozilla/source/intl/locale/src/unix/nsPosixLocale.cpp#100. It starts in the chrome registry, http://mxr.mozilla.org/mozilla-central/source/chrome/src/nsChromeRegistry.cpp#444.
But yes, if we see no-NO (actually, no_NO), report that as nb-NO instead of no-NO.
Assignee | ||
Comment 3•16 years ago
|
||
Not asking review yet because I have no way to test it this week, but attaching in case someone else wants to test.
Reporter | ||
Comment 4•16 years ago
|
||
Comment on attachment 417022 [details] [diff] [review]
Patch
AFAICT, this should happen on lang_code instead of country_code.
Assignee | ||
Comment 5•16 years ago
|
||
Thanks, Axel! (the previous version wouldn't even have compiled because I left out the "_" in country_code)
Attachment #417022 -
Attachment is obsolete: true
Assignee | ||
Comment 6•16 years ago
|
||
Third time's the charm...
Attachment #417033 -
Attachment is obsolete: true
Reporter | ||
Comment 7•16 years ago
|
||
Comment on attachment 417034 [details] [diff] [review]
Patch v.3
Looks good to me, any chance to test this yet?
Assignee | ||
Comment 8•16 years ago
|
||
I've run into a catch-22 testing this: the only system that I have that uses posix locale is Ubuntu, where I can install nb_NO or nn_NO but no no_NO.
Comment 9•16 years ago
|
||
Simon: I can test on n900 and n810 if you have a test build that I can run.
Reporter | ||
Comment 10•16 years ago
|
||
Comment on attachment 417034 [details] [diff] [review]
Patch v.3
stricmp doesn't compile on arm, trying with strcasecmp now. Not sure if that is more portable.
Reporter | ||
Comment 11•16 years ago
|
||
With strcasecmp, I got a working build that detects norks OK.
Do we have something in nspr or so to abstract the platform-dependent extensions?
Assignee | ||
Comment 12•16 years ago
|
||
This should be portable enough
Attachment #417034 -
Attachment is obsolete: true
Attachment #418717 -
Flags: review?
Assignee | ||
Updated•16 years ago
|
Attachment #418717 -
Flags: review? → review?(l10n)
Reporter | ||
Comment 13•16 years ago
|
||
Comment on attachment 418717 [details] [diff] [review]
Use nsDependentCString.LowerCaseEqualsLiteral
Looks good to me. Can you run this through the try server?
Attachment #418717 -
Flags: review?(l10n) → review+
Assignee | ||
Comment 14•16 years ago
|
||
Pushed to try server in http://hg.mozilla.org/try/rev/9e4982f218f0
Assignee | ||
Comment 15•16 years ago
|
||
Can someone test the build at https://build.mozilla.org/tryserver-builds/smontagu@mozilla.com-try-9e4982f218f0/maemo/ ?
Comment 16•16 years ago
|
||
I downloaded the build from comment 15, but it was a single-locale build (en-US).
I tried to build myself yesterday and was able to get a working build with the patch from attachment 418717 [details] [diff] [review]: <http://l10n.mozilla.org/~stas/builds/fennec-1.0b6pre-20091221.multi.linux-gnueabi-arm.tar> (You may still need the xulrunner package from the url in comment 15.)
I ran make chrome-ab-CD for every locale in maemo-locales before running make package. With matchOS set to true, it correctly detected nb-NO when the OS was set to no-NO.
Looks like it's working :)
Assignee | ||
Comment 17•16 years ago
|
||
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•16 years ago
|
Attachment #418717 -
Flags: approval1.9.2.1?
Comment 18•16 years ago
|
||
Comment on attachment 418717 [details] [diff] [review]
Use nsDependentCString.LowerCaseEqualsLiteral
a192=beltzner
Attachment #418717 -
Flags: approval1.9.2.1? → approval1.9.2+
Assignee | ||
Comment 19•16 years ago
|
||
status1.9.2:
--- → final-fixed
Comment 20•16 years ago
|
||
Verified on Mozilla/5.0 (X11; U; Linux armv7l; en-US; rv:1.9.2b6pre) Gecko/20091223 Firefox/3.6b6pre Fennec/1.0b6pre running on N900 on Maemo 5 (1.2009.42-11.002) in Nowegian ("Norsk (Norge)")
$ locale
LANG=no_NO
LC_CTYPE="no_NO"
LC_NUMERIC=no_NO
LC_TIME=no_NO
LC_COLLATE="no_NO"
LC_MONETARY=no_NO
LC_MESSAGES=no_NO
LC_PAPER=no_NO
LC_NAME=no_NO
LC_ADDRESS=no_NO
LC_TELEPHONE=no_NO
LC_MEASUREMENT=no_NO
LC_IDENTIFICATION=no_NO
LC_ALL=
$
Status: RESOLVED → VERIFIED
Flags: in-litmus?
Updated•13 years ago
|
Flags: in-litmus?
You need to log in
before you can comment on or make changes to this bug.
Description
•