Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 3903 - Locale- No GetPlatformLocale for Macintosh
: Locale- No GetPlatformLocale for Macintosh
Product: MailNews Core
Classification: Components
Component: Internationalization (show other bugs)
: Trunk
: PowerPC All
: P3 normal (vote)
: M9
Assigned To: tague
: nhottanscp
Depends on:
  Show dependency treegraph
Reported: 1999-03-17 10:05 PST by nhottanscp
Modified: 2008-07-31 01:22 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---


Description nhottanscp 1999-03-17 10:05:22 PST
Need a mapping function from a locale to
script id, lang id, region code and charset name.
Comment 1 Frank Tang 1999-03-17 16:01:59 PST
mark this m4
Comment 2 nhottanscp 1999-03-22 17:48:59 PST
Proposed interface for Macintosh.

class nsIMacLocale : public nsISupports {


  // locale to script code, language code and region code
  NS_IMETHOD GetPlatformLocale(const nsString* locale, PRInt16* script, PRInt16*
lang, short* region) = 0;
  // locale to charset name
  NS_IMETHOD GetPlatformLocaleCharset(const nsString* locale, nsString* charset)
= 0;
  // language code and region code pair to locale
  NS_IMETHOD GetXPLocale(const PRInt16 lang, const PRInt16 region, nsString*
locale) = 0;
Comment 3 Frank Tang 1999-04-05 13:44:59 PDT
We should use PRInt16* instead of short* for region on GetPlatformLocale
Comment 4 tague 1999-04-05 13:56:59 PDT
Frank :-

The appropriate types to use are short - that is how Script, Region, etc. are
defined in the Macintosh headers.  They aren't defined as PRInt16.  The return
types should match what is in the system headers.

Comment 5 tague 1999-04-28 00:05:59 PDT
Checked in this functionality 4/27/99.
Comment 6 Katsuhiko Momoi 1999-04-28 00:27:59 PDT
Naoki, in what functions are we using this in Mac? Also will we be using this in M5?
Comment 7 nhottanscp 1999-04-28 10:01:59 PDT
There is no way that the client code can use the interface which was checked in
30 min before the tree close for M5 :-)
My plan is to integrate this for M6 also make Mac unit test available.
Tague's unit test may be able to verify this.
Comment 8 Katsuhiko Momoi 1999-04-29 19:29:59 PDT
Tague, I'm inclined to mark this bug verified since there
seems to be no apparent way to check how this works in the
product. If you have a SelfTest program I can use to see if this
is working, I'll attempt to use it. Otherwise, rather than
having this on my plate, we should get it out of the way.
Comment 9 tague 1999-04-30 11:24:59 PDT
look at intl/locale/tests/nsLocaleTest.  that is my self test.   the self tests
build but won't run on Mac because of some changes in the registry which I
haven't nailed down yet.
Comment 10 Katsuhiko Momoi 1999-05-26 15:30:59 PDT
I'm marking this bug fix verified without further testing on Mac which
we are not doing.
Montse,I'm going to mark it verified fixed and put it on your plate.
If you other thoughs, doing Mac mail headers sort testing,
then send it back to me.
Comment 11 bobj 1999-05-28 15:19:59 PDT
You verify this in other places using the RDF tree widgets (e.g., Manage
Bookmarks).  I don't know if these are locale sensitive yet.
Comment 12 nhottanscp 1999-08-06 16:28:59 PDT
In my original request, it had script, lang and region while the implementation
doesn't have region returned. I noticed that I need a resion code when I was
debugging yhe date format interface. Sorry for the late notice but I need to
reopen this bug.
The change is just to add an additional mapping table with a look up code. Can I
do the change? I can also do the verification by using it in the date format
Comment 13 tague 1999-08-06 17:00:59 PDT
sure.  go ahead if you feel comfortable making the changes, otherwise I have M9
work on Macintosh locale and I can take a look at this problem while I do that
Comment 14 nhottanscp 1999-08-06 17:30:59 PDT
I probably cannot do that for M9, in case if you not finish for M9 then move to
M10 and reassign to me, thanks.
Comment 15 tague 1999-08-08 21:13:59 PDT
Naoki :- I added a region code to both GetPlatformLocale and GetXPLocale in the
nsIMacLocale interface.  I made the corresponding changes to the other locale
functionality to keep it building, but I didn't do anything with the region code
in your services.
Comment 16 nhottanscp 1999-08-09 10:34:59 PDT
Set myself as QA Contact.
Comment 17 nhottanscp 1999-08-09 11:13:59 PDT
Tested/verified US,GB,FR,DE,IT,AU,JP using scriptable date format.
Also checked the table, doesn't seem to have any typo.
Marking as VERIFIED.

Note You need to log in before you can comment on or make changes to this bug.