This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 71987

Summary: I18N: "Default" is not listed at top if "Default" is localized
Product: editor Reporter: Masaki Katakai <masaki>
Component: OptionsAssignee: Daniel Prusa <dprusa>
Status: VERIFIED FIXED    
Severity: blocker CC: jf4jbug, mgrummich
Priority: P3 Keywords: I18N
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Masaki Katakai 2006-01-30 00:26:26 UTC
Try ml build in Japanese locale. "Default" is localized into Japanese, but it's
not listed at the top of list items. In English, the item is displayed at the
top item.

1. Start IDE
2. Tools -> Options
3. Fonts & Colors
4. Syntax tab
5. Check list of "Category"

"Default" is not listed at the top.

It seems that the following codes assume English "Default" for comparison.
Please use the same word which is defined in resouce bundle.

editor/options/src/org/netbeans/modules/options/colors/CategoryComparator.java 

    public int compare (Object o1, Object o2) {
	if (name (o1).startsWith ("Default")) 
	    return name (o2).startsWith ("Default") ? 0 : -1;
        if (name (o2).startsWith ("Default"))
            return 1;
	return name (o1).compareTo (name (o2));
    }
Comment 1 Daniel Prusa 2006-03-29 12:43:57 UTC
Fixed in trunk. Id used for comparison instead of display name now.

/cvs/editor/options/src/org/netbeans/modules/options/colors/CategoryComparator.java
new revision: 1.5; previous revision: 1.4
Comment 2 Daniel Prusa 2006-03-29 12:52:45 UTC
->fixed
Comment 3 Pavel Rehak 2006-08-23 13:33:17 UTC
Verified.
Comment 4 Masaki Katakai 2006-10-02 06:48:58 UTC
Thanks for fixing. Changed target milestone to "Dev".