Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8039463

Swedish translation for label in JFileChooser is incorrect

XMLWordPrintable

    • x86_64
    • linux
    • Verified

        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 ----------

          1. 7u121b08.jpg
            7u121b08.jpg
            36 kB
          2. 8u111b08.jpg
            8u111b08.jpg
            37 kB
          3. 9b130.jpg
            9b130.jpg
            37 kB

              ljiang Leo Jiang (Inactive)
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: