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.
Created attachment 123929 [details] Patch to ensure column names are always given the chance to be localised ColumnSelectionPanel has a few modes of operation and they inconsistently localise the column headers. When using a custom TableColumnSelector, the column names are generated using the static getAvailableColumnNames() method. When using the default (null) TableColumnSelector, an instance of ColumnSelectionPanel is created and its layoutPanel() method uses the raw result of an ETableColumn's getHeaderValue().toString(). This happens in both layoutPanel() and showColumnSelectionPopup(). In my use case, I am overriding getColumnDisplayNames() to make use of a resource bundle to localise my column headers. Without creating my own TableColumnSelector I see localised headers in the table but see bundle keys in the column selector. I propose wrapping the two lines where the raw column header's toString() result is used with ETable.getColumnDisplayName(). See the attached patch.
Created attachment 123972 [details] Simple test class to show that the column headers are inconsistently localised Attached 'ColumnSelectionPanelTest.java' as a simple test case showing the issue. Run with org-netbeans-swing-outline-RELEASE72.jar on the class path. Right click on any column header and note the ColumnSelectionPanel is showing different header text than the table.
Thanks for the detailed description and patch. Fixed by changeset: 244200:89b0a46e946a http://hg.netbeans.org/core-main/rev/89b0a46e946a
Integrated into 'main-golden', will be available in build *201301100107* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/89b0a46e946a User: mentlicher@netbeans.org Log: #217866: Call ETable.getColumnDisplayName() to retrieve the localized column names.