Changeset 8721 in osm for applications/editors/josm


Ignore:
Timestamp:
2008-07-04T12:27:18+02:00 (16 years ago)
Author:
stoecker
Message:

fixed i18n a lot

Location:
applications/editors/josm/plugins/wmsplugin/src/wmsplugin
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/DownloadWMSTask.java

    r6780 r8721  
    2020       
    2121        public DownloadWMSTask(WMSLayer wmsLayer, Bounds bounds, double pixelPerDegree) {
    22                 super(tr("Downloading " + wmsLayer.name));
     22                super(tr("Downloading {0}", wmsLayer.name));
    2323
    2424                this.wmsLayer = wmsLayer;
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Help_WMSmenuAction.java

    r6775 r8721  
    11package wmsplugin;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.awt.event.ActionEvent;
     
    1618        public Help_WMSmenuAction() {
    1719                //super("Help / About");
    18                 super("help", "help", "Help  / About", 0, 0, false);
     20                super(tr("help"), "help", tr("Help  / About"), 0, 0, false);
    1921               
    2022        }
     
    2325                //todo - put this into a txt file?
    2426                  String helptext =
    25                         "You can add, edit and delete WMS entries in the WMSplugin Preference Tab - "  +
     27                        tr("You can add, edit and delete WMS entries in the WMSplugin Preference Tab - "  +
    2628                        "these will then show up in the WMS menu.\n\n"+
    2729                       
     
    4244                        "&srs=EPSG:4326&Service=WMS&Version=1.1.0&Request=GetMap&format=image/png\n" +
    4345                        " \n" +
    44                         "Note: Make sure the image is suitable, copyright-wise, if in doubt, don't use.\n"+
    45                          "WMS Plugin version: "+ WMSPlugin.VERSION ;           
     46                        "Note: Make sure the image is suitable, copyright-wise, if in doubt, don't use.");
    4647               
    4748                JTextPane tp = new JTextPane();
     
    5152                 
    5253                  js.getViewport().add(tp);
    53                   JFrame jf = new JFrame("WMS Plugin Help");
     54                  JFrame jf = new JFrame(tr("WMS Plugin Help"));
    5455                  jf.getContentPane().add(js);
    5556                  jf.pack();
     
    5758                  jf.setVisible(true);
    5859                  tp.setText(helptext);
    59        
     60        }
    6061}
    61        
    62 }
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Map_Rectifier_WMSmenuAction.java

    r6787 r8721  
    11package wmsplugin;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.awt.event.ActionEvent;
     
    1618
    1719        public Map_Rectifier_WMSmenuAction() {
    18                 super("Rectified Image ...", "OLmarker", "Download Rectified Image from Metacarta's Map Rectifer WMS", 0, 0, false);
     20                super(tr("Rectified Image ..."), "OLmarker", tr("Download Rectified Image from Metacarta's Map Rectifer WMS"), 0, 0, false);
    1921        }
    2022
    2123        public void actionPerformed(ActionEvent e) {
    22                 String newid = JOptionPane.showInputDialog(Main.parent, "Metacarta Map Rectifier image id");
     24                String newid = JOptionPane.showInputDialog(Main.parent, tr("Metacarta Map Rectifier image id"));
    2325
    2426                if (newid != null && !newid.equals("")) {
     
    2729
    2830                        DownloadWMSTask.download(WMSDownloadAction.getLayer(
    29                                 new WMSInfo("rectifier id="+newid, newURL, -1)));
     31                                new WMSInfo(tr("rectifier id={0}",newid), newURL, -1)));
    3032                }
    3133        }
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSAdjustAction.java

    r6777 r8721  
    2424
    2525        public WMSAdjustAction(MapFrame mapFrame) {
    26                 super("landsatAdjust", "movelandsat",
    27                                                 "Adjust the position of the WMS layer", mapFrame,
     26                super(tr("landsatAdjust"), "movelandsat",
     27                                                tr("Adjust the position of the WMS layer"), mapFrame,
    2828                                                ImageProvider.getCursor("normal", "move"));
    2929        }
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSDownloadAction.java

    r6780 r8721  
    11package wmsplugin;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.awt.event.ActionEvent;
     
    1315       
    1416        public WMSDownloadAction(WMSInfo info) {
    15                 super(info.name, "wmsmenu", "Download WMS tile from "+info.name, 0, 0, false);
     17                super(info.name, "wmsmenu", tr("Download WMS tile from {0}",info.name), 0, 0, false);
    1618                this.info = info;
    1719        }
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java

    r6788 r8721  
    11package wmsplugin;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.awt.image.BufferedImage;
     
    4345                } catch (MalformedURLException e) {
    4446                        throw (IOException) new IOException(
    45                                 "WMSGrabber: Illegal url.").initCause(e);
     47                                tr("WMSGrabber: Illegal url.")).initCause(e);
    4648                }
    4749        }
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java

    r6777 r8721  
    5151
    5252        public WMSLayer() {
    53                 this("Blank Layer", null);
     53                this(tr("Blank Layer"), null);
    5454        }
    5555
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java

    r8664 r8721  
    2828public class WMSPlugin extends Plugin {
    2929
    30         static String VERSION = "2.4";
    31        
    3230        WMSLayer wmsLayer;
    3331        static JMenu wmsJMenu;
     
    8280                // if no (valid) prefs are set, initialize to a sensible default.
    8381                if (wmsList.isEmpty()) {
    84                         WMSInfo landsatInfo = new WMSInfo("Landsat",
     82                        WMSInfo landsatInfo = new WMSInfo(tr("Landsat"),
    8583                                        "http://onearth.jpl.nasa.gov/wms.cgi?request=GetMap&"+
    8684                                        "layers=global_mosaic&styles=&srs=EPSG:4326&"+
     
    8987                        wmsList.add(landsatInfo);
    9088                       
    91                         WMSInfo npeInfo = new WMSInfo("NPE Maps",
     89                        WMSInfo npeInfo = new WMSInfo(tr("NPE Maps"),
    9290                                        "http://nick.dev.openstreetmap.org/openpaths/freemap.php?layers=npe&", 2);
    9391                        npeInfo.save();
     
    114112                wmsJMenu.addSeparator();
    115113                wmsJMenu.add(new JMenuItem(new
    116                                 JosmAction("Blank Layer", "blankmenu", "Open a blank WMS layer to load data from a file", 0, 0, false) {
     114                                JosmAction(tr("Blank Layer"), "blankmenu", tr("Open a blank WMS layer to load data from a file"), 0, 0, false) {
    117115                        public void actionPerformed(ActionEvent ev) {
    118116                                Main.main.addLayer(new WMSLayer());
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java

    r8664 r8721  
    3636                JPanel p = gui.createPreferenceTab("wms", tr("WMS Plugin Preferences"), tr("Modify list of WMS servers displayed in the WMS plugin menu"));
    3737               
    38                 model = new DefaultTableModel(new String[]{"#", "Menu Name", "WMS URL"}, 0) {
     38                model = new DefaultTableModel(new String[]{"#", tr("Menu Name"), tr("WMS URL")}, 0) {
    3939                        @Override public boolean isCellEditable(int row, int column) {
    4040                                return column != 0;
     
    5959                        public void actionPerformed(ActionEvent e) {
    6060                                JPanel p = new JPanel(new GridBagLayout());
    61                                 p.add(new JLabel("Menu Name"), GBC.std().insets(0,0,5,0));
     61                                p.add(new JLabel(tr("Menu Name")), GBC.std().insets(0,0,5,0));
    6262                                JTextField key = new JTextField(10);
    6363                                JTextField value = new JTextField(10);
    6464                                p.add(key, GBC.eop().insets(5,0,0,0).fill(GBC.HORIZONTAL));
    65                                 p.add(new JLabel("WMS URL"), GBC.std().insets(0,0,5,0));
     65                                p.add(new JLabel(tr("WMS URL")), GBC.std().insets(0,0,5,0));
    6666                                p.add(value, GBC.eol().insets(5,0,0,0).fill(GBC.HORIZONTAL));
    6767                                int answer = JOptionPane.showConfirmDialog(gui, p, tr("Enter a menu name and WMS URL"), JOptionPane.OK_CANCEL_OPTION);
Note: See TracChangeset for help on using the changeset viewer.