Changeset 2853 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2010-01-13T20:22:11+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java
r2683 r2853 41 41 private String[] applicationOptions = new String[] { 42 42 tr("Apply selected changes"), 43 tr("Do n't apply changes"),43 tr("Do not apply changes"), 44 44 tr("Cancel") 45 45 }; -
trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java
r2826 r2853 103 103 try { 104 104 if (pi.downloadlink == null) { 105 String msg = tr("Warning: Cannot download plugin ''{0}''. Its download link is n''t known. Skipping download.", pi.name);105 String msg = tr("Warning: Cannot download plugin ''{0}''. Its download link is not known. Skipping download.", pi.name); 106 106 System.err.println(msg); 107 107 throw new PluginDownloadException(msg); … … 124 124 in.close(); 125 125 } catch(MalformedURLException e) { 126 String msg = tr("Warning: Cannot download plugin ''{0}''. Its download link ''{1}'' is n''t a valid URL. Skipping download.", pi.name, pi.downloadlink);126 String msg = tr("Warning: Cannot download plugin ''{0}''. Its download link ''{1}'' is not a valid URL. Skipping download.", pi.name, pi.downloadlink); 127 127 System.err.println(msg); 128 128 throw new PluginDownloadException(msg); -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r2834 r2853 131 131 continue; 132 132 } 133 String msg = tr("<html>Loading of {0} pluginwas requested."133 String msg = tr("<html>Loading of the plugin \"{0}\" was requested." 134 134 + "<br>This plugin is no longer developed and very likely will produce errors." 135 135 +"<br>It should be disabled.<br>Delete from preferences?</html>", unmaintained); … … 200 200 StringBuilder sb = new StringBuilder(); 201 201 sb.append("<html>"); 202 sb.append(trn("A required plugin for plugin {0} was not found. The requiredplugin is:",203 "{1} required plugins for plugin {0} were not found. The requiredplugins are:",202 sb.append(trn("A required plugin for plugin {0} was not found. The missing plugin is:", 203 "{1} required plugins for plugin {0} were not found. The missing plugins are:", 204 204 missingRequiredPlugin.size(), 205 205 plugin, … … 691 691 dialog.setButtonIcons(new String[] {"dialogs/delete.png", "cancel.png"}); 692 692 dialog.setContent( 693 tr("<html>")+693 "<html>" + 694 694 tr("An unexpected exception occurred that may have come from the ''{0}'' plugin.", plugin.getPluginInformation().name) 695 695 + "<br>" -
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r2837 r2853 67 67 Manifest manifest = jar.getManifest(); 68 68 if (manifest == null) 69 throw new PluginException(name, tr("The plugin file ''{0}'' does n't include a Manifest.", file.toString()));69 throw new PluginException(name, tr("The plugin file ''{0}'' does not include a Manifest.", file.toString())); 70 70 scanManifest(manifest, false); 71 71 libraries.add(0, fileToURL(file)); -
trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
r2784 r2853 113 113 "the error and try to supply as much detail as possible.")), GBC.eop()); 114 114 p.add(new JMultilineLabel( 115 tr("Alternatively, if that does n't work you can manually fill in the information" +115 tr("Alternatively, if that does not work you can manually fill in the information" + 116 116 "below at this URL:")), GBC.eol()); 117 117 p.add(new UrlLabel("http://josm.openstreetmap.de/newticket"), GBC.eop().insets(8,0,0,0)); -
trunk/src/org/openstreetmap/josm/tools/CheckParameterUtil.java
r2801 r2853 2 2 package org.openstreetmap.josm.tools; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr;4 import java.text.MessageFormat; 5 5 6 6 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; … … 17 17 18 18 public static void ensureValidPrimitiveId(PrimitiveId id, String parameterName) throws IllegalArgumentException { 19 if (id == null) 20 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", parameterName)); 19 ensureParameterNotNull(id, parameterName); 21 20 if (id.getUniqueId() <= 0) 22 throw new IllegalArgumentException( tr("Expected unique id > 0 for primitive id, got {0}", id.getUniqueId()));21 throw new IllegalArgumentException(MessageFormat.format("Expected unique id > 0 for primitive ''{1}'', got {0}", id.getUniqueId(), parameterName)); 23 22 } 24 23 25 24 public static void ensureValidVersion(long version, String parameterName) throws IllegalArgumentException { 26 25 if (version < 0) 27 throw new IllegalArgumentException( tr("Expected value of type long > 0 for parameter ''{0}'', got {1}", parameterName, version));26 throw new IllegalArgumentException(MessageFormat.format("Expected value of type long > 0 for parameter ''{0}'', got {1}", parameterName, version)); 28 27 } 29 28 30 29 public static void ensureParameterNotNull(Object value, String parameterName) { 31 30 if (value == null) 32 throw new IllegalArgumentException( tr("Parameter ''{0}'' must not be null", parameterName));31 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' must not be null", parameterName)); 33 32 } 34 33 … … 42 41 */ 43 42 public static void ensureValidNodeId(PrimitiveId id, String parameterName) throws IllegalArgumentException { 44 if (id == null) 45 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", parameterName)); 43 ensureParameterNotNull(id, parameterName); 46 44 if (! id.getType().equals(OsmPrimitiveType.NODE)) 47 throw new IllegalArgumentException( tr("Parameter ''{0}'' of type node expected, got ''{1}''", parameterName, id.getType().getAPIName()));45 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' of type node expected, got ''{1}''", parameterName, id.getType().getAPIName())); 48 46 } 49 47 } -
trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
r2748 r2853 224 224 String message = tr("<html>Failed to open a connection to the remote server<br>" + "''{0}''<br>" 225 225 + "for security reasons. This is most likely because you are running<br>" 226 + "in an applet and because you did n''t load your applet from ''{1}''.</html>", apiUrl, host);226 + "in an applet and because you did not load your applet from ''{1}''.</html>", apiUrl, host); 227 227 return message; 228 228 } … … 305 305 public static String explainNotFound(OsmApiException e) { 306 306 String apiUrl = OsmApi.getOsmApi().getBaseUrl(); 307 String message = tr("The OSM server ''{0}'' does n''t know about an object<br>"307 String message = tr("The OSM server ''{0}'' does not know about an object<br>" 308 308 + "you tried to read, update, or delete. Either the respective object<br>" 309 + "does n''t exist on the server or you''re using an invalid URL to access<br>"310 + "it. Please carefully check the server s address ''{0}'' for typos."309 + "does not exist on the server or you are using an invalid URL to access<br>" 310 + "it. Please carefully check the server''s address ''{0}'' for typos." 311 311 , apiUrl); 312 312 message = "<html>" + message + "</html>"; … … 333 333 334 334 String message = tr("<html>Failed to open a connection to the remote server<br>" + "''{0}''.<br>" 335 + "Host name ''{1}'' could n''t be resolved. <br>"335 + "Host name ''{1}'' could not be resolved. <br>" 336 336 + "Please check the API URL in your preferences and your internet connection.</html>", apiUrl, host); 337 337 e.printStackTrace(); -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r2512 r2853 340 340 */ 341 341 public static ImageIcon get(OsmPrimitiveType type) throws IllegalArgumentException { 342 if (type == null) 343 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "type")); 342 CheckParameterUtil.ensureParameterNotNull(type, "type"); 344 343 return get("data", type.getAPIName()); 345 344 } -
trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
r2789 r2853 105 105 Matcher m = p.matcher(preferenceValue); 106 106 if (!m.find()) 107 throw new WindowGeometryException(tr("Preference with key ''{0}'' does not include ''{1}''. Can ''t restore window geometry from preferences.", preferenceKey, field));107 throw new WindowGeometryException(tr("Preference with key ''{0}'' does not include ''{1}''. Cannot restore window geometry from preferences.", preferenceKey, field)); 108 108 v = m.group(1); 109 109 return Integer.parseInt(v); … … 111 111 throw e; 112 112 } catch(NumberFormatException e) { 113 throw new WindowGeometryException(tr("Preference with key ''{0}'' does not provide an int value for ''{1}''. Got {2}. Can ''t restore window geometry from preferences.", preferenceKey, field, v));113 throw new WindowGeometryException(tr("Preference with key ''{0}'' does not provide an int value for ''{1}''. Got {2}. Cannot restore window geometry from preferences.", preferenceKey, field, v)); 114 114 } catch(Exception e) { 115 throw new WindowGeometryException(tr("Failed to parse field ''{1}'' in preference with key ''{0}''. Exception was: {2}. Can ''t restore window geometry from preferences.", preferenceKey, field, e.toString()), e);115 throw new WindowGeometryException(tr("Failed to parse field ''{1}'' in preference with key ''{0}''. Exception was: {2}. Cannot restore window geometry from preferences.", preferenceKey, field, e.toString()), e); 116 116 } 117 117 } … … 120 120 String value = Main.pref.get(preferenceKey); 121 121 if (value == null || value.equals("")) 122 throw new WindowGeometryException(tr("Preference with key ''{0}'' does not exist. Can ''t restore window geometry from preferences.", preferenceKey));122 throw new WindowGeometryException(tr("Preference with key ''{0}'' does not exist. Cannot restore window geometry from preferences.", preferenceKey)); 123 123 topLeft = new Point(); 124 124 extent = new Dimension();
Note:
See TracChangeset
for help on using the changeset viewer.