Ignore:
Timestamp:
2015-11-04T19:50:56+01:00 (9 years ago)
Author:
simon04
Message:

JOSM/piclayer: Dialog windows header can not be translated - fixes #josm12045

Location:
applications/editors/josm/plugins/piclayer
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/piclayer/build.xml

    r31114 r31729  
    11<?xml version="1.0" encoding="utf-8"?>
    22<project name="PicLayer" default="dist" basedir=".">
    3     <property name="commit.message" value="[josm/PicLayer] - #10335 add interpolation hints for the image drawing"/>
     3    <property name="commit.message" value="[josm/PicLayer] - #12045 add ability to localize dialog titles"/>
    44    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    55    <property name="plugin.main.version" value="7817"/>
  • applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java

    r30962 r31729  
    2121package org.openstreetmap.josm.plugins.piclayer;
    2222
    23 import static org.openstreetmap.josm.tools.I18n.tr;
    24 
    2523import java.util.ArrayList;
    2624import java.util.List;
    27 
    2825import javax.swing.JOptionPane;
    29 import javax.swing.UIManager;
    30 
    3126import org.openstreetmap.josm.Main;
    3227import org.openstreetmap.josm.actions.JosmAction;
     
    5348import org.openstreetmap.josm.plugins.piclayer.actions.transform.affine.TransformPointAction;
    5449import org.openstreetmap.josm.plugins.piclayer.layer.PicLayerAbstract;
     50import static org.openstreetmap.josm.tools.I18n.tr;
    5551
    5652/**
     
    158154            if (JOptionPane.showConfirmDialog(Main.parent, tr("Do you want to save current calibration of layer {0}?",
    159155                    ((PicLayerAbstract)arg0).getPicLayerName()),
    160                     UIManager.getString("OptionPane.titleText"),
     156                    tr("Select an option"),
    161157                    JOptionPane.YES_NO_OPTION) == 0)
    162158                new SavePictureCalibrationAction((PicLayerAbstract) arg0).actionPerformed(null);
  • applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/LoadPictureCalibrationAction.java

    r27191 r31729  
    7777                // Error
    7878                e.printStackTrace();
    79                 JOptionPane.showMessageDialog(Main.parent , tr("Loading file failed: {0}", e.getMessage()));
     79                JOptionPane.showMessageDialog(Main.parent , tr("Loading file failed: {0}", e.getMessage()), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE);
    8080            }
    8181        }
  • applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/LoadPictureCalibrationFromWorldAction.java

    r28660 r31729  
    3939                // Error
    4040                ex.printStackTrace();
    41                 JOptionPane.showMessageDialog(Main.parent , tr("Loading file failed: {0}", ex.getMessage()));
     41                JOptionPane.showMessageDialog(Main.parent , tr("Loading file failed: {0}", ex.getMessage()), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE);
    4242            }
    4343        }
  • applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/SavePictureCalibrationAction.java

    r27191 r31729  
    8585                // Error
    8686                e.printStackTrace();
    87                 JOptionPane.showMessageDialog(Main.parent , tr("Saving file failed: {0}", e.getMessage()));
     87                JOptionPane.showMessageDialog(Main.parent , tr("Saving file failed: {0}", e.getMessage()), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE);
    8888            }
    8989        }
  • applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromClipboardAction.java

    r27149 r31729  
    6060            // Failed
    6161            System.out.println( "NewLayerFromClipboardAction::actionPerformed - " + e.getMessage() );
    62             JOptionPane.showMessageDialog(null, e.getMessage() );
     62            JOptionPane.showMessageDialog(null, e.getMessage(), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE);
    6363            return;
    6464        }
  • applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromFileAction.java

    r31114 r31729  
    136136                    JOptionPane.showMessageDialog(null, tr("KML calibration is in beta stage and may produce incorrectly calibrated layers!\n"+
    137137                    "Please use {0} to upload your KMLs that were calibrated incorrectly.",
    138                     "https://josm.openstreetmap.de/ticket/5451"));
     138                    "https://josm.openstreetmap.de/ticket/5451"), tr("Notification"), JOptionPane.INFORMATION_MESSAGE);
    139139                    for (KMLGroundOverlay overlay : kml.getGroundOverlays()) {
    140140                        //TODO: zoom to whole picture, not only the last
     
    158158            // Failed
    159159            System.out.println( "NewLayerFromFileAction::actionPerformed - " + e.getMessage() );
    160             JOptionPane.showMessageDialog(null, e.getMessage() );
     160            JOptionPane.showMessageDialog(null, e.getMessage(), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE);
    161161        }
    162162    }
     
    184184            // Failed
    185185            System.out.println( "NewLayerFromFileAction::actionPerformed - " + e.getMessage() );
    186             JOptionPane.showMessageDialog(null, e.getMessage() );
     186            JOptionPane.showMessageDialog(null, e.getMessage(), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE);
    187187        }
    188188    }
  • applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerFromFile.java

    r30738 r31729  
    216216                            "to control the autoloading of calibration files.", prefkey);
    217217            msg += "\n" + tr("Do you want to apply it ?");
    218             int answer = JOptionPane.showConfirmDialog(Main.parent, msg, tr("Load calibration file ?"), JOptionPane.YES_NO_OPTION);
     218            int answer = JOptionPane.showConfirmDialog(Main.parent, msg, tr("Load calibration file?"), JOptionPane.YES_NO_OPTION);
    219219            if (answer == JOptionPane.YES_OPTION) {
    220220                loadcal = true;
Note: See TracChangeset for help on using the changeset viewer.