Changeset 2853 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2010-01-13T20:22:11+01:00 (15 years ago)
Author:
mjulius
Message:

fix messages for the rest

Location:
trunk/src/org/openstreetmap/josm
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java

    r2683 r2853  
    4141    private String[] applicationOptions = new String[] {
    4242            tr("Apply selected changes"),
    43             tr("Don't apply changes"),
     43            tr("Do not apply changes"),
    4444            tr("Cancel")
    4545    };
  • trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java

    r2826 r2853  
    103103        try {
    104104            if (pi.downloadlink == null) {
    105                 String msg = tr("Warning: Cannot download plugin ''{0}''. Its download link isn''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);
    106106                System.err.println(msg);
    107107                throw new PluginDownloadException(msg);
     
    124124            in.close();
    125125        } catch(MalformedURLException e) {
    126             String msg = tr("Warning: Cannot download plugin ''{0}''. Its download link ''{1}'' isn''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);
    127127            System.err.println(msg);
    128128            throw new PluginDownloadException(msg);
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r2834 r2853  
    131131                continue;
    132132            }
    133             String msg =  tr("<html>Loading of {0} plugin was requested."
     133            String msg =  tr("<html>Loading of the plugin \"{0}\" was requested."
    134134                    + "<br>This plugin is no longer developed and very likely will produce errors."
    135135                    +"<br>It should be disabled.<br>Delete from preferences?</html>", unmaintained);
     
    200200        StringBuilder sb = new StringBuilder();
    201201        sb.append("<html>");
    202         sb.append(trn("A required plugin for plugin {0} was not found. The required plugin is:",
    203                 "{1} required plugins for plugin {0} were not found. The required plugins 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:",
    204204                missingRequiredPlugin.size(),
    205205                plugin,
     
    691691            dialog.setButtonIcons(new String[] {"dialogs/delete.png", "cancel.png"});
    692692            dialog.setContent(
    693                     tr("<html>") +
     693                    "<html>" +
    694694                    tr("An unexpected exception occurred that may have come from the ''{0}'' plugin.", plugin.getPluginInformation().name)
    695695                    + "<br>"
  • trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java

    r2837 r2853  
    6767            Manifest manifest = jar.getManifest();
    6868            if (manifest == null)
    69                 throw new PluginException(name, tr("The plugin file ''{0}'' doesn't include a Manifest.", file.toString()));
     69                throw new PluginException(name, tr("The plugin file ''{0}'' does not include a Manifest.", file.toString()));
    7070            scanManifest(manifest, false);
    7171            libraries.add(0, fileToURL(file));
  • trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java

    r2784 r2853  
    113113                            "the error and try to supply as much detail as possible.")), GBC.eop());
    114114                    p.add(new JMultilineLabel(
    115                             tr("Alternatively, if that doesn't work you can manually fill in the information" +
     115                            tr("Alternatively, if that does not work you can manually fill in the information" +
    116116                            "below at this URL:")), GBC.eol());
    117117                    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  
    22package org.openstreetmap.josm.tools;
    33
    4 import static org.openstreetmap.josm.tools.I18n.tr;
     4import java.text.MessageFormat;
    55
    66import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
     
    1717
    1818    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);
    2120        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));
    2322    }
    2423
    2524    public static void ensureValidVersion(long version, String parameterName) throws IllegalArgumentException {
    2625        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));
    2827    }
    2928
    3029    public static void ensureParameterNotNull(Object value, String parameterName) {
    3130        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));
    3332    }
    3433
     
    4241     */
    4342    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);
    4644        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()));
    4846    }
    4947}
  • trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java

    r2748 r2853  
    224224        String message = tr("<html>Failed to open a connection to the remote server<br>" + "''{0}''<br>"
    225225                + "for security reasons. This is most likely because you are running<br>"
    226                 + "in an applet and because you didn''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);
    227227        return message;
    228228    }
     
    305305    public static String explainNotFound(OsmApiException e) {
    306306        String apiUrl = OsmApi.getOsmApi().getBaseUrl();
    307         String message = tr("The OSM server ''{0}'' doesn''t know about an object<br>"
     307        String message = tr("The OSM server ''{0}'' does not know about an object<br>"
    308308                + "you tried to read, update, or delete. Either the respective object<br>"
    309                 + "doesn''t exist on the server or you''re using an invalid URL to access<br>"
    310                 + "it. Please carefully check the servers 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."
    311311                , apiUrl);
    312312        message = "<html>" + message + "</html>";
     
    333333
    334334        String message = tr("<html>Failed to open a connection to the remote server<br>" + "''{0}''.<br>"
    335                 + "Host name ''{1}'' couldn''t be resolved. <br>"
     335                + "Host name ''{1}'' could not be resolved. <br>"
    336336                + "Please check the API URL in your preferences and your internet connection.</html>", apiUrl, host);
    337337        e.printStackTrace();
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r2512 r2853  
    340340     */
    341341    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");
    344343        return get("data", type.getAPIName());
    345344    }
  • trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java

    r2789 r2853  
    105105            Matcher m = p.matcher(preferenceValue);
    106106            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));
    108108            v = m.group(1);
    109109            return Integer.parseInt(v);
     
    111111            throw e;
    112112        } 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));
    114114        } 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);
    116116        }
    117117    }
     
    120120        String value = Main.pref.get(preferenceKey);
    121121        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));
    123123        topLeft = new Point();
    124124        extent = new Dimension();
Note: See TracChangeset for help on using the changeset viewer.