Changeset 104 in josm for src/org/openstreetmap/josm/gui/MainApplication.java
- Timestamp:
- 2006-07-03T00:31:24+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/gui/MainApplication.java
r98 r104 1 1 //Licence: GPL 2 2 package org.openstreetmap.josm.gui; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.awt.Toolkit; … … 20 22 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 21 23 import org.openstreetmap.josm.tools.BugReportExceptionHandler; 22 23 24 /** 24 25 * Main window class application. … … 27 28 */ 28 29 public class MainApplication extends Main { 29 30 30 /** 31 31 * Construct an main frame, ready sized and operating. Does not … … 49 49 } 50 50 if (modified) { 51 final String msg = uploadedModified ? "\nHint: Some changes came from uploading new data to the server.": "";51 final String msg = uploadedModified ? tr("\nHint: Some changes came from uploading new data to the server.") : ""; 52 52 final int answer = JOptionPane.showConfirmDialog( 53 Main.parent, "There are unsaved changes. Really quit?"+msg,54 "Unsaved Changes", JOptionPane.YES_NO_OPTION);53 Main.parent, tr("There are unsaved changes. Really quit?")+msg, 54 tr("Unsaved Changes"), JOptionPane.YES_NO_OPTION); 55 55 if (answer != JOptionPane.YES_OPTION) 56 56 return; … … 72 72 List<String> argList = Arrays.asList(argArray); 73 73 if (argList.contains("--help") || argList.contains("-?") || argList.contains("-h")) { 74 System.out.println("Java OpenStreetMap Editor"); 75 System.out.println(); 76 System.out.println("usage:"); 77 System.out.println("\tjava -jar josm.jar <option> <option> <option>..."); 78 System.out.println(); 79 System.out.println("options:"); 80 System.out.println("\t--help|-?|-h Show this help"); 81 System.out.println("\t--geometry=widthxheight(+|-)x(+|-)y Standard unix geometry argument"); 82 System.out.println("\t[--download=]minlat,minlon,maxlat,maxlon Download the bounding box"); 83 System.out.println("\t[--download=]<url> Download the location at the url (with lat=x&lon=y&zoom=z)"); 84 System.out.println("\t[--download=]<filename> Open file (as raw gps, if .gpx or .csv)"); 85 System.out.println("\t--downloadgps=minlat,minlon,maxlat,maxlon Download the bounding box as raw gps"); 86 System.out.println("\t--selection=<searchstring> Select with the given search"); 87 System.out.println("\t--no-fullscreen Don't launch in fullscreen mode"); 88 System.out.println("\t--reset-preferences Reset the preferences to default"); 89 System.out.println(); 90 System.out.println("examples:"); 91 System.out.println("\tjava -jar josm.jar track1.gpx track2.gpx london.osm"); 92 System.out.println("\tjava -jar josm.jar http://www.openstreetmap.org/index.html?lat=43.2&lon=11.1&zoom=13"); 93 System.out.println("\tjava -jar josm.jar london.osm --selection=http://www.ostertag.name/osm/OSM_errors_node-duplicate.xml"); 94 System.out.println("\tjava -jar josm.jar 43.2,11.1,43.4,11.4"); 95 System.out.println(); 96 System.out.println("Parameters are read in the order they are specified, so make sure you load"); 97 System.out.println("some data before --selection"); 98 System.out.println(); 99 System.out.println("Instead of --download=<bbox> you may specify osm://<bbox>"); 74 System.out.println(tr("Java OpenStreetMap Editor\n\n"+ 75 "usage:\n"+ 76 "\tjava -jar josm.jar <option> <option> <option>...\n\n"+ 77 "options:\n"+ 78 "\t--help|-?|-h Show this help\n"+ 79 "\t--geometry=widthxheight(+|-)x(+|-)y Standard unix geometry argument\n"+ 80 "\t[--download=]minlat,minlon,maxlat,maxlon Download the bounding box\n"+ 81 "\t[--download=]<url> Download the location at the url (with lat=x&lon=y&zoom=z)\n"+ 82 "\t[--download=]<filename> Open file (as raw gps, if .gpx or .csv)\n"+ 83 "\t--downloadgps=minlat,minlon,maxlat,maxlon Download the bounding box as raw gps\n"+ 84 "\t--selection=<searchstring> Select with the given search\n"+ 85 "\t--no-fullscreen Don't launch in fullscreen mode\n"+ 86 "\t--reset-preferences Reset the preferences to default\n\n"+ 87 "examples:\n"+ 88 "\tjava -jar josm.jar track1.gpx track2.gpx london.osm\n"+ 89 "\tjava -jar josm.jar http://www.openstreetmap.org/index.html?lat=43.2&lon=11.1&zoom=13\n"+ 90 "\tjava -jar josm.jar london.osm --selection=http://www.ostertag.name/osm/OSM_errors_node-duplicate.xml\n"+ 91 "\tjava -jar josm.jar 43.2,11.1,43.4,11.4\n\n"+ 92 93 "Parameters are read in the order they are specified, so make sure you load\n"+ 94 "some data before --selection\n\n"+ 95 "Instead of --download=<bbox> you may specify osm://<bbox>\n")); 100 96 System.exit(0); 101 97 } … … 103 99 final File prefDir = new File(Main.pref.getPreferencesDir()); 104 100 if (prefDir.exists() && !prefDir.isDirectory()) { 105 JOptionPane.showMessageDialog(null, "Cannot open preferences directory: "+Main.pref.getPreferencesDir());101 JOptionPane.showMessageDialog(null, tr("Cannot open preferences directory: {0}",Main.pref.getPreferencesDir())); 106 102 return; 107 103 } … … 125 121 126 122 preConstructorInit(args); 127 JFrame mainFrame = new JFrame( "Java Open Street Map - Editor");123 JFrame mainFrame = new JFrame(tr("Java Open Street Map - Editor")); 128 124 Main.parent = mainFrame; 129 125 Main main = new MainApplication(mainFrame);
Note:
See TracChangeset
for help on using the changeset viewer.