JDK-6937235 : [filechooser] tooltip for desktop button is in English on non-English windows
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u10
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows
  • CPU: generic
  • Submitted: 2010-03-23
  • Updated: 2011-01-19
  • Resolved: 2010-03-23
Related Reports
Duplicate :  
Description
When open standard file chooser, all the tooltips of the buttons are in English, except one.

The tooltip of the home directory button is in English as "Desktop" on windows, when the home directory is the root.

There is no message in the resource file corresponding to it.

In the file /src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java, there is code section

if (OS_VERSION.startsWith("4.1")) {		// Windows 98 (4.10)
	    // Desktop Button
	    File homeDir = fsv.getHomeDirectory();
	    String toolTipText = homeFolderToolTipText;
	    if (fsv.isRoot(homeDir)) {
		toolTipText = getFileView(fc).getName(homeDir); // Probably "Desktop".
	    }
  .................

The tooltip is "Desktop", which makes user feel strange on non-English windows, because all the other buttons have localized tooltips.

Attached is the snapshot.