Closed Bug 31509 Opened 25 years ago Closed 25 years ago

Mac HELP menu displays Japanese "About.." incorrectly

Categories

(Core :: XUL, defect, P3)

PowerPC
Mac System 8.6
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: momoi, Assigned: ftang)

References

Details

(Whiteboard: fix ready to check in.)

** Observed with M14-rtm with Japanese Lang Pack on Mac OS 8.6 ** There is "Help | About Netscape" menu. On Mac, this item gets added to the Mac Finder's Help menu. When volunteer Japanese localizers translated the menu, they discovered that the display was corrupted when UTF-8 encoding was used in the relevant .dtd file.
The same problem does not occur on Windows or Linux when using teh UTF-8 encoded translated .dtd file.
I assume that on Win and Linux, we are using our own Seamonkey menus, but on the Mac we are using the native Mac menu. We fixed a similar and possibly related bug "[PP]Mac menus DON'T display Unicode correctly": http://bugzilla.mozilla.org/show_bug.cgi?id=5402 This was back when we were using native menu widgits for XUL. The patch for that bug is here: http://bugzilla.mozilla.org/showattachment.cgi?attach_id=309
BTW, tague who fixed the previously mentioned bug is no longer at Netscape...
->teruko for qa. (i don't think am the right qa contact --but do correct me if otherwise. :-)
QA Contact: sairuh → teruko
accepting for m16
Status: NEW → ASSIGNED
Target Milestone: M16
moving all defects not directly related to P0 beta2 features off to M18.
Target Milestone: M16 → M18
Cc'd msanz to track localizability bugs.
Blocks: 12394
Mass moving M18 bugs to M19
Target Milestone: M18 → M19
Blocks: 14744
we need this bug fixed for beta 2, can you mark it no later than M17?
Could you help us understand why this should be high priority? It sure seems less important than features and serious defects that affect all users. I think it is triaged correctly as is.
we need to have beta2 localized for Mac and we are trying to get all localizability bugs fixed. quality issues. Maybe we can help you fix it if you want.
It would be great if someone else could take this bug. I'm sure Mac users would rather have Pink do scrollable menus and his other critical tasks, rather than have a localized "About Netscape" menu item.
nominating localizability bugs for nsbeta2
Keywords: nsbeta2
By agreement, I'm re-assigning this bug to Frank Tang for now for assessment and possibel fix.
Assignee: pinkerton → ftang
Status: ASSIGNED → NEW
I will work on this bug on early M17.
Status: NEW → ASSIGNED
Target Milestone: M19 → M17
Is that true it show as ... instead of garbage. Please indicte it is dot or gabage next time. It will help me reduce the time to find the bug (at least 30 mins) Ok the bug is those 3 ToNewCString in nsMenu.cpp and nsContextMenu.cpp
Whiteboard: fix ready to check in.
Target Milestone: M17 → M16
OK... here is the patch. pinkerton, please review it. We should also fix the ToNewCString in the nsContextMenu.cpp although it is not directly related to the help menu. Index: nsMenu.cpp =================================================================== RCS file: /cvsroot/mozilla/widget/src/mac/nsMenu.cpp,v retrieving revision 1.65 diff -w -c -2 -r1.65 nsMenu.cpp *** nsMenu.cpp 2000/04/17 08:21:17 1.65 --- nsMenu.cpp 2000/05/05 09:03:08 *************** *** 309,315 **** if(mIsHelpMenu) { ! char labelStr[256]; ! ::InsertMenuItem(mMacMenuHandle, c2pstr(label.ToCString(labelStr, sizeof(labelStr))), ! mMenuItemVoidArray.Count()); } else { ::InsertMenuItem(mMacMenuHandle, "\pa", currItemIndex); --- 328,333 ---- if(mIsHelpMenu) { ! ::InsertMenuItem(mMacMenuHandle, "\pa", mMenuItemVoidArray.Count()); ! NSStringSetMenuItemText(mMacMenuHandle, mMenuItemVoidArray.Count(), label); } else { ::InsertMenuItem(mMacMenuHandle, "\pa", currItemIndex); Index: nsContextMenu.cpp =================================================================== RCS file: /cvsroot/mozilla/widget/src/mac/nsContextMenu.cpp,v retrieving revision 1.22 diff -w -c -2 -r1.22 nsContextMenu.cpp *** nsContextMenu.cpp 2000/04/17 08:19:17 1.22 --- nsContextMenu.cpp 2000/05/05 09:07:29 *************** *** 185,203 **** nsString label; nsString labelHack; labelHack.AssignWithConversion(" "); - nsString tmp; tmp.AssignWithConversion("-"); aMenuItem->GetLabel(label); - PRUnichar slash = tmp.CharAt(0); - char* menuLabel; - if(label[0] == slash) { - labelHack.Append(label); - menuLabel = labelHack.ToNewCString(); - } else { - menuLabel = label.ToNewCString(); - } mNumMenuItems++; ::InsertMenuItem(mMacMenuHandle, (const unsigned char *)" ", mNumMenuItems); ! ::SetMenuItemText(mMacMenuHandle, mNumMenuItems, c2pstr(menuLabel)); ! delete[] menuLabel; } } --- 185,198 ---- nsString label; nsString labelHack; labelHack.AssignWithConversion(" "); aMenuItem->GetLabel(label); mNumMenuItems++; ::InsertMenuItem(mMacMenuHandle, (const unsigned char *)" ", mNumMenuItems); ! if(label[0] == PRUnichar('-')) { ! labelHack.Append(label); ! NSStringSetMenuItemText(mMacMenuHandle, mNumMenuItems, labelHack); ! } else { ! NSStringSetMenuItemText(mMacMenuHandle, mNumMenuItems, label); ! } } } I will check in tomorrow.
As far as I remember, they were not "dots". Rather they were misconverted for the Mac OS Help menu. I normally do not use the word "corrupted" if the display is of "dots". I'll re-check tomorrow.
By your definition, tehn, it is: 4. Non ascii text display as incorrect character, such as Lain characters or ASCII characters while it should display Chinese.
Blocks: 28424
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
fix checked in .
"About Netscape" menu item must not be in Help menu of Finder. This is wrong.
You're right about not having this item under HELP menu. The standard thing is to place this is under the Apple menu. In the current build (5/8/2000), it does have "about Communicator" under the Apple menu but also "about Netsape" under the Help menu. But there are other items under HELP menu such as "Release Notes" and they have the same problem as this one. So we can use this bug to verify localizabiltiy of other items under the HELP menu. We'll see if the item under Apple menu also has this problem. blee, if you don't want to see "About Netscape " under HELP menu, please file a separate bug.
** Checked with 5/8/2000 (2000050820) Mac build ** ** By ftang's request, I've done a spot check on items under the Help menu. Full check of all the items should be done with a proper L10n build ** The items under question are in helpMenu.dtd file. I modified some items in this file to Japanese names and they all showed corerctly as Japanese. Prior to this fix, all Japanese items under the HELP menu was showing as "dots". Unfortunately the same string "About Netscape/Mozilla" is now used under the Apple menu -- which as blee points out is the correct place for this item. Netscape 6 duplicates the same item under the Help and the Apple menus. In the latter, the same string is still showing as "dots". I'll file a new bug for this latter problem. Marking the fix verified.
Status: RESOLVED → VERIFIED
Hardware: PC → Macintosh
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: teruko → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.