JDK-8039463 : Swedish translation for label in JFileChooser is incorrect
  • Type: Bug
  • Component: globalization
  • Sub-Component: translation
  • Affected Version: 7u51
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64
  • Submitted: 2014-03-31
  • Updated: 2016-08-11
  • Resolved: 2016-08-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u20Resolved 9Fixed
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
Problem manifested itself when upgrading from JRE version 1.7.0_7 to 1.7.0_51 (version in between have not been tested).

ADDITIONAL OS VERSION INFORMATION :
Tested on multiple versions of Linux as well as WIndows

EXTRA RELEVANT SYSTEM CONFIGURATION :
Since the problem has been found on multiple systems with different configurations there is nothing relevant system information.

A DESCRIPTION OF THE PROBLEM :
After upgrading the JRE from version 1.7.0_7 to 1.7.0_51 the Swedish translation for the label "Files of Type:" changed from "Filtyp:" to "Mappnamn:"

which is the equivalent of changing from "File type:" to "Directory name:".

REGRESSION.  Last worked in version 7u10

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- Run the provided java code by providing it the parameters "sv" "SE" and click "Browse". You can run it with any other <language> <country> parameters to see if any other labels have been changed incorrectly.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The label for the File type JComboBox should say "Filtyp:"
ACTUAL -
When running the application on a machine with JRE 1.7.0_7 installed it displays the correct label "Filtyp:" but when running on a machine with JRE 1.7.0_51 it displays the incorrect label "Mappnamn:"

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.event.*;
import java.util.*;

import javax.swing.*;
import javax.swing.filechooser.*;


public class TestBrokenJFileChooserLang {

    private static JFileChooser chooser;

    public static void main (String[] args) {
	String langName = args[0];
	String countryCode = args[1];
	Locale langSettings = new Locale (langName, countryCode, "");
	Locale.setDefault (langSettings);

	chooser = new JFileChooser ();
	JButton openButton = new JButton ("Browse");
	final JFrame frame = new JFrame ();
	openButton.addActionListener (new ActionListener () {
	    @Override public void actionPerformed (ActionEvent e) {
		FileNameExtensionFilter filter = new FileNameExtensionFilter ("JPG & GIF Images",
									      "jpg", "gif");
		chooser.setFileFilter (filter);
		chooser.showOpenDialog (frame);
	    }
	});
	JPanel mainPanel = new JPanel ();
	mainPanel.setSize (new Dimension (500,200));
	mainPanel.add (openButton);
	frame.add (mainPanel);
	frame.pack ();
	frame.setVisible (true);
	frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
    }
}

---------- END SOURCE ----------


Comments
They will be corrected as in 8u20 and then to other releases: FileChooser.folderNameLabel.textAndMnemonic=&Mapp: FileChooser.filesOfTypeLabel.textAndMnemonic=Filer av &typen:
28-04-2014

It seems like a typo in the fix JDK-8010521 http://hg.openjdk.java.net/jdk9/client/jdk/rev/f5fbd8065920 --- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_sv.properties Tue Mar 12 10:35:44 2013 -0400 +++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_sv.properties Mon Mar 25 16:49:25 2013 -0700 @@ -21,8 +21,8 @@ FileChooser.lookInLabel.textAndMnemonic=Leta &i: FileChooser.saveInLabel.textAndMnemonic=Spara i: FileChooser.fileNameLabel.textAndMnemonic=Fil&namn: -FileChooser.folderNameLabel.textAndMnemonic=Mapp(&N): -FileChooser.filesOfTypeLabel.textAndMnemonic=Filforma&t: +FileChooser.folderNameLabel.textAndMnemonic=Mapp&namn: +FileChooser.filesOfTypeLabel.textAndMnemonic=Mapp&namn:
09-04-2014

is it affecting 8 or 9?
08-04-2014