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 - I18N: "Default" is not listed at top if "Default" is localized
Summary: I18N: "Default" is not listed at top if "Default" is localized
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Options (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2006-01-30 00:26 UTC by Masaki Katakai
Modified: 2007-11-05 13:40 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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".