Ignore:
Timestamp:
2006-07-03T00:31:24+02:00 (18 years ago)
Author:
imi
Message:
  • started i18n
  • started "download incomplete ways" action
  • added straight line selection mode
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/gui/MainApplication.java

    r98 r104  
    11//Licence: GPL
    22package org.openstreetmap.josm.gui;
     3
     4import static org.openstreetmap.josm.tools.I18n.tr;
    35
    46import java.awt.Toolkit;
     
    2022import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2123import org.openstreetmap.josm.tools.BugReportExceptionHandler;
    22 
    2324/**
    2425 * Main window class application.
     
    2728 */
    2829public class MainApplication extends Main {
    29 
    3030        /**
    3131         * Construct an main frame, ready sized and operating. Does not
     
    4949                                        }
    5050                                        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.") : "";
    5252                                                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);
    5555                                                if (answer != JOptionPane.YES_OPTION)
    5656                                                        return;
     
    7272                List<String> argList = Arrays.asList(argArray);
    7373                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"));
    10096                        System.exit(0);
    10197                }
     
    10399                final File prefDir = new File(Main.pref.getPreferencesDir());
    104100                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()));
    106102                        return;
    107103                }
     
    125121
    126122                preConstructorInit(args);
    127                 JFrame mainFrame = new JFrame("Java Open Street Map - Editor");
     123                JFrame mainFrame = new JFrame(tr("Java Open Street Map - Editor"));
    128124                Main.parent = mainFrame;
    129125                Main main = new MainApplication(mainFrame);
Note: See TracChangeset for help on using the changeset viewer.