Changeset 8721 in osm for applications/editors/josm/plugins
- Timestamp:
- 2008-07-04T12:27:18+02:00 (17 years ago)
- 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 20 20 21 21 public DownloadWMSTask(WMSLayer wmsLayer, Bounds bounds, double pixelPerDegree) { 22 super(tr("Downloading " +wmsLayer.name));22 super(tr("Downloading {0}", wmsLayer.name)); 23 23 24 24 this.wmsLayer = wmsLayer; -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Help_WMSmenuAction.java
r6775 r8721 1 1 package wmsplugin; 2 3 import static org.openstreetmap.josm.tools.I18n.tr; 2 4 3 5 import java.awt.event.ActionEvent; … … 16 18 public Help_WMSmenuAction() { 17 19 //super("Help / About"); 18 super( "help", "help", "Help / About", 0, 0, false);20 super(tr("help"), "help", tr("Help / About"), 0, 0, false); 19 21 20 22 } … … 23 25 //todo - put this into a txt file? 24 26 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 - " + 26 28 "these will then show up in the WMS menu.\n\n"+ 27 29 … … 42 44 "&srs=EPSG:4326&Service=WMS&Version=1.1.0&Request=GetMap&format=image/png\n" + 43 45 " \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."); 46 47 47 48 JTextPane tp = new JTextPane(); … … 51 52 52 53 js.getViewport().add(tp); 53 JFrame jf = new JFrame("WMS Plugin Help"); 54 JFrame jf = new JFrame(tr("WMS Plugin Help")); 54 55 jf.getContentPane().add(js); 55 56 jf.pack(); … … 57 58 jf.setVisible(true); 58 59 tp.setText(helptext); 59 60 } 60 61 } 61 62 } -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Map_Rectifier_WMSmenuAction.java
r6787 r8721 1 1 package wmsplugin; 2 3 import static org.openstreetmap.josm.tools.I18n.tr; 2 4 3 5 import java.awt.event.ActionEvent; … … 16 18 17 19 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); 19 21 } 20 22 21 23 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")); 23 25 24 26 if (newid != null && !newid.equals("")) { … … 27 29 28 30 DownloadWMSTask.download(WMSDownloadAction.getLayer( 29 new WMSInfo("rectifier id= "+newid, newURL, -1)));31 new WMSInfo(tr("rectifier id={0}",newid), newURL, -1))); 30 32 } 31 33 } -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSAdjustAction.java
r6777 r8721 24 24 25 25 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, 28 28 ImageProvider.getCursor("normal", "move")); 29 29 } -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSDownloadAction.java
r6780 r8721 1 1 package wmsplugin; 2 3 import static org.openstreetmap.josm.tools.I18n.tr; 2 4 3 5 import java.awt.event.ActionEvent; … … 13 15 14 16 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); 16 18 this.info = info; 17 19 } -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java
r6788 r8721 1 1 package wmsplugin; 2 3 import static org.openstreetmap.josm.tools.I18n.tr; 2 4 3 5 import java.awt.image.BufferedImage; … … 43 45 } catch (MalformedURLException e) { 44 46 throw (IOException) new IOException( 45 "WMSGrabber: Illegal url.").initCause(e); 47 tr("WMSGrabber: Illegal url.")).initCause(e); 46 48 } 47 49 } -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java
r6777 r8721 51 51 52 52 public WMSLayer() { 53 this("Blank Layer", null); 53 this(tr("Blank Layer"), null); 54 54 } 55 55 -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java
r8664 r8721 28 28 public class WMSPlugin extends Plugin { 29 29 30 static String VERSION = "2.4";31 32 30 WMSLayer wmsLayer; 33 31 static JMenu wmsJMenu; … … 82 80 // if no (valid) prefs are set, initialize to a sensible default. 83 81 if (wmsList.isEmpty()) { 84 WMSInfo landsatInfo = new WMSInfo("Landsat" ,82 WMSInfo landsatInfo = new WMSInfo(tr("Landsat"), 85 83 "http://onearth.jpl.nasa.gov/wms.cgi?request=GetMap&"+ 86 84 "layers=global_mosaic&styles=&srs=EPSG:4326&"+ … … 89 87 wmsList.add(landsatInfo); 90 88 91 WMSInfo npeInfo = new WMSInfo("NPE Maps" ,89 WMSInfo npeInfo = new WMSInfo(tr("NPE Maps"), 92 90 "http://nick.dev.openstreetmap.org/openpaths/freemap.php?layers=npe&", 2); 93 91 npeInfo.save(); … … 114 112 wmsJMenu.addSeparator(); 115 113 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) { 117 115 public void actionPerformed(ActionEvent ev) { 118 116 Main.main.addLayer(new WMSLayer()); -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java
r8664 r8721 36 36 JPanel p = gui.createPreferenceTab("wms", tr("WMS Plugin Preferences"), tr("Modify list of WMS servers displayed in the WMS plugin menu")); 37 37 38 model = new DefaultTableModel(new String[]{"#", "Menu Name" ,"WMS URL"}, 0) {38 model = new DefaultTableModel(new String[]{"#", tr("Menu Name"), tr("WMS URL")}, 0) { 39 39 @Override public boolean isCellEditable(int row, int column) { 40 40 return column != 0; … … 59 59 public void actionPerformed(ActionEvent e) { 60 60 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)); 62 62 JTextField key = new JTextField(10); 63 63 JTextField value = new JTextField(10); 64 64 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)); 66 66 p.add(value, GBC.eol().insets(5,0,0,0).fill(GBC.HORIZONTAL)); 67 67 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.