Changeset 3433 in josm for trunk/src/org


Ignore:
Timestamp:
2010-08-13T23:17:39+02:00 (14 years ago)
Author:
bastiK
Message:

fixed #5140 - Adding plugin list sources fault translation/cancel operation

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r3378 r3433  
    361361        UIManager.put("OptionPane.noIcon", UIManager.get("OptionPane.cancelIcon"));
    362362
    363         I18n.fixJFileChooser();
     363        I18n.translateJavaInternalMessages();
    364364
    365365        // init default coordinate format
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r3418 r3433  
    2929
    3030    /* Localization keys for file chooser (and color chooser). */
    31     private static final String[] jFileChooserLocalizationKeys = new String[] {
    32         /* windows laf */
     31    private static final String[] javaInternalMessageKeys = new String[] {
     32        /* JFileChooser windows laf */
    3333        "FileChooser.detailsViewActionLabelText",
    3434        "FileChooser.detailsViewButtonAccessibleName",
     
    5656        "FileChooser.viewMenuLabelText",
    5757
    58         /* gtk laf */
     58        /* JFileChooser gtk laf */
    5959        "FileChooser.acceptAllFileFilterText",
    6060        "FileChooser.cancelButtonText",
     
    7878        "FileChooser.saveDialogTitleText",
    7979
    80         /* motif laf */
     80        /* JFileChooser motif laf */
    8181        //"FileChooser.cancelButtonText",
    8282        //"FileChooser.cancelButtonToolTipText",
     
    9797        "FileChooser.updateButtonToolTipText",
    9898
    99         /* color chooser */
     99        /* gtk color chooser */
    100100        "GTKColorChooserPanel.blueText",
    101101        "GTKColorChooserPanel.colorNameText",
     
    105105        "GTKColorChooserPanel.redText",
    106106        "GTKColorChooserPanel.saturationText",
    107         "GTKColorChooserPanel.valueText"
     107        "GTKColorChooserPanel.valueText",
     108       
     109        /* JOptionPane */
     110        "OptionPane.okButtonText",
     111        "OptionPane.yesButtonText",
     112        "OptionPane.noButtonText",
     113        "OptionPane.cancelButtonText"
    108114    };
    109115    private static HashMap<String, String> strings = null;
     
    460466     * by Java, but not for others (e.g. ru, uk).
    461467     */
    462     public static void fixJFileChooser() {
     468    public static void translateJavaInternalMessages() {
    463469        Locale l = Locale.getDefault();
    464470
    465471        JFileChooser.setDefaultLocale(l);
    466472        JColorChooser.setDefaultLocale(l);
    467         for (String key : jFileChooserLocalizationKeys) {
     473        for (String key : javaInternalMessageKeys) {
    468474            String us = UIManager.getString(key, Locale.US);
    469475            String loc = UIManager.getString(key, l);
Note: See TracChangeset for help on using the changeset viewer.