- Timestamp:
- 2016-09-10T01:45:13+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r10962 r10983 123 123 public static void showHelp() { 124 124 // TODO: put in a platformHook for system that have no console by default 125 System.out.println(tr("Java OpenStreetMap Editor")+" [" 125 System.out.println(getHelp()); 126 } 127 128 static String getHelp() { 129 return tr("Java OpenStreetMap Editor")+" [" 126 130 +Version.getInstance().getAgentString()+"]\n\n"+ 127 131 tr("usage")+":\n"+ … … 157 161 " Java option to specify the maximum size of allocated memory in megabytes")+":\n"+ 158 162 "\t-Xmx...m\n\n"+ 159 tr("examples")+":\n"+ 160 "\tjava -jar josm.jar track1.gpx track2.gpx london.osm\n"+ 161 "\tjava -jar josm.jar "+OsmUrlToBounds.getURL(43.2, 11.1, 13)+'\n'+ 162 "\tjava -jar josm.jar london.osm --selection=http://www.ostertag.name/osm/OSM_errors_node-duplicate.xml\n"+ 163 "\tjava -jar josm.jar 43.2,11.1,43.4,11.4\n"+ 164 "\tjava -Djosm.pref=$XDG_CONFIG_HOME -Djosm.userdata=$XDG_DATA_HOME -Djosm.cache=$XDG_CACHE_HOME -jar josm.jar\n"+ 165 "\tjava -Djosm.home=/home/user/.josm_dev -jar josm.jar\n"+ 166 "\tjava -Xmx1024m -jar josm.jar\n\n"+ 167 tr("Parameters --download, --downloadgps, and --selection are processed in this order.")+'\n'+ 168 tr("Make sure you load some data if you use --selection.")+'\n' 169 ); 163 tr("examples")+":\n"+ 164 "\tjava -jar josm.jar track1.gpx track2.gpx london.osm\n"+ 165 "\tjava -jar josm.jar "+OsmUrlToBounds.getURL(43.2, 11.1, 13)+'\n'+ 166 "\tjava -jar josm.jar london.osm --selection=http://www.ostertag.name/osm/OSM_errors_node-duplicate.xml\n"+ 167 "\tjava -jar josm.jar 43.2,11.1,43.4,11.4\n"+ 168 "\tjava -Djosm.pref=$XDG_CONFIG_HOME -Djosm.userdata=$XDG_DATA_HOME -Djosm.cache=$XDG_CACHE_HOME -jar josm.jar\n"+ 169 "\tjava -Djosm.home=/home/user/.josm_dev -jar josm.jar\n"+ 170 "\tjava -Xmx1024m -jar josm.jar\n\n"+ 171 tr("Parameters --download, --downloadgps, and --selection are processed in this order.")+'\n'+ 172 tr("Make sure you load some data if you use --selection.")+'\n'; 170 173 } 171 174 … … 182 185 args = new ProgramArguments(argArray); 183 186 } catch (IllegalArgumentException e) { 187 System.err.println(e.getMessage()); 184 188 System.exit(1); 185 189 return; … … 188 192 Level logLevel = args.getLogLevel(); 189 193 Logging.setLogLevel(logLevel); 190 Main.info(tr("Log level is at {0} ({1}, {2})", logLevel.getLocalizedName(), logLevel.getName(), logLevel.intValue())); 194 if (!args.showVersion() && !args.showHelp()) { 195 Main.info(tr("Log level is at {0} ({1}, {2})", logLevel.getLocalizedName(), logLevel.getName(), logLevel.intValue())); 196 } 191 197 192 198 Optional<String> language = args.getSingle(Option.LANGUAGE); … … 215 221 Main.platform.preStartupHook(); 216 222 217 Main.COMMAND_LINE_ARGS.addAll(Arrays.asList(argArray));218 219 223 if (args.showVersion()) { 220 224 System.out.println(Version.getInstance().getAgentString()); 221 System.exit(0);225 return; 222 226 } else if (args.showHelp()) { 223 227 showHelp(); 224 System.exit(0); 225 } 228 return; 229 } 230 231 Main.COMMAND_LINE_ARGS.addAll(Arrays.asList(argArray)); 226 232 227 233 boolean skipLoadingPlugins = args.hasOption(Option.SKIP_PLUGINS); … … 246 252 247 253 checkIPv6(); 248 249 // asking for help? show help and exit250 if (args.hasOption(Option.HELP)) {251 showHelp();252 System.exit(0);253 }254 254 255 255 processOffline(args); -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r10748 r10983 403 403 // FIXME: This can be removed after we switch to a minimal version of Java that enables CLDR by default 404 404 // or includes all languages we need in the JRE. See http://openjdk.java.net/jeps/252 for Java 9 405 Utils.updateSystemProperty("java.locale.providers", "JRE,CLDR");405 System.setProperty("java.locale.providers", "JRE,CLDR"); // Don't call Utils.updateSystemProperty to avoid spurious log at startup 406 406 407 407 //languages.put("ar", PluralMode.MODE_AR);
Note:
See TracChangeset
for help on using the changeset viewer.