Ignore:
Timestamp:
2009-09-22T15:34:19+02:00 (16 years ago)
Author:
stoecker
Message:

lots of i18n fixes

Location:
trunk/src/org/openstreetmap/josm/io
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java

    r1879 r2181  
    7272            if (cancel)
    7373                return null;
    74             throw new SAXException("Illegal characters within the HTTP-header response", e);
     74            throw new SAXException("Illegal characters within the HTTP-header response.", e);
    7575        } catch (IOException e) {
    7676            if (cancel)
  • trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java

    r2115 r2181  
    2323    public ChangesetQuery forUser(long uid) {
    2424        if (uid <= 0)
    25             throw new IllegalArgumentException(tr("parameter ''{0}'' > 0 expected. Got {1}", "uid", uid));
     25            throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected. Got ''{1}''.", "uid", uid));
    2626        this.user = uid;
    2727        return this;
  • trunk/src/org/openstreetmap/josm/io/FileExporter.java

    r1949 r2181  
    2222
    2323    public void exportData(File file, Layer layer) throws IOException {
    24         throw new IOException(tr("Could not export \"{0}\"", file.getName()));
     24        throw new IOException(tr("Could not export ''{0}''.", file.getName()));
    2525    }
    2626}
  • trunk/src/org/openstreetmap/josm/io/FileImporter.java

    r2070 r2181  
    2222
    2323    public void importData(File file) throws IOException, IllegalDataException {
    24         throw new IOException(tr("Could not read \"{0}\"", file.getName()));
     24        throw new IOException(tr("Could not read ''{0}''.", file.getName()));
    2525    }
    2626
  • trunk/src/org/openstreetmap/josm/io/GpxExporter.java

    r2163 r2181  
    5353    public void exportData(File file, Layer layer) throws IOException {
    5454        if (layer == null)
    55             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "layer"));
     55            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer"));
    5656        if (!(layer instanceof OsmDataLayer) && !(layer instanceof GpxLayer))
    57             throw new IllegalArgumentException(tr("expected instance of OsmDataLayer or GpxLayer. Got ''{0}''.", layer
     57            throw new IllegalArgumentException(tr("Expected instance of OsmDataLayer or GpxLayer. Got ''{0}''.", layer
    5858                    .getClass().getName()));
    5959        if (file == null)
    60             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "file"));
     60            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "file"));
    6161
    6262        String fn = file.getPath();
     
    6969        JPanel p = new JPanel(new GridBagLayout());
    7070
    71         p.add(new JLabel(tr("gps track description")), GBC.eol());
     71        p.add(new JLabel(tr("GPS track description")), GBC.eol());
    7272        JTextArea desc = new JTextArea(3, 40);
    7373        desc.setWrapStyleWord(true);
  • trunk/src/org/openstreetmap/josm/io/GpxReader.java

    r2151 r2181  
    308308        @Override public void endDocument() throws SAXException  {
    309309            if (!states.empty()) {
    310                 throw new SAXException(tr("Parse error: invalid document structure for gpx document"));
     310                throw new SAXException(tr("Parse error: invalid document structure for GPX document."));
    311311            }
    312312            data = currentData;
  • trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java

    r2077 r2181  
    112112    protected void remember(DataSet ds, long id, OsmPrimitiveType type) throws IllegalArgumentException, NoSuchElementException{
    113113        if (ds == null)
    114             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "ds"));
     114            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "ds"));
    115115        if (id <= 0) return;
    116116        OsmPrimitive primitive = ds.getPrimitiveById(id, type);
    117117        if (primitive == null)
    118             throw new NoSuchElementException(tr("no primitive with id {0} in local dataset. Can't infer primitive type", id));
     118            throw new NoSuchElementException(tr("No primitive with id {0} in local dataset. Can't infer primitive type.", id));
    119119        remember(id, OsmPrimitiveType.from(primitive));
    120120        return;
     
    414414            } catch(OsmApiException e) {
    415415                if (e.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) {
    416                     logger.warning(tr("Server replied with response code 404, retrying with an individual request for each primitive"));
     416                    logger.warning(tr("Server replied with response code 404, retrying with an individual request for each primitive."));
    417417                    singleGetIdPackage(type, pkg, progressMonitor);
    418418                } else
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r2171 r2181  
    8080        String serverUrl = Main.pref.get("osm-server.url", "http://api.openstreetmap.org/api");
    8181        if (serverUrl == null)
    82             throw new IllegalStateException(tr("preference ''{0}'' missing. Can't initialize OsmApi", "osm-server.url"));
     82            throw new IllegalStateException(tr("Preference ''{0}'' missing. Can't initialize OsmApi.", "osm-server.url"));
    8383        return getOsmApi(serverUrl);
    8484    }
     
    132132    protected OsmApi(String serverUrl)  {
    133133        if (serverUrl == null)
    134             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "serverUrl"));
     134            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "serverUrl"));
    135135        this.serverUrl = serverUrl;
    136136    }
     
    176176                initialized = false;
    177177            }
    178             System.out.println(tr("Communications with {0} established using protocol version {1}",
     178            System.out.println(tr("Communications with {0} established using protocol version {1}.",
    179179                    serverUrl,
    180180                    version));
     
    251251            osm.setOsmId(Long.parseLong(ret.trim()), 1);
    252252        } catch(NumberFormatException e){
    253             throw new OsmTransferException(tr("unexpected format of id replied by the server, got ''{0}''", ret));
     253            throw new OsmTransferException(tr("Unexpected format of ID replied by the server. Got ''{0}''.", ret));
    254254        }
    255255    }
     
    277277            }
    278278        } catch(NumberFormatException e) {
    279             throw new OsmTransferException(tr("unexpected format of new version of modified primitive ''{0}'', got ''{1}''", osm.getId(), ret));
     279            throw new OsmTransferException(tr("Unexpected format of new version of modified primitive ''{0}''. Got ''{1}''.", osm.getId(), ret));
    280280        }
    281281    }
     
    311311    public void openChangeset(Changeset changeset, ProgressMonitor progressMonitor) throws OsmTransferException {
    312312        if (changeset == null)
    313             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "changeset"));
     313            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "changeset"));
    314314        try {
    315315            progressMonitor.beginTask((tr("Creating changeset...")));
     
    321321                changeset.setOpen(true);
    322322            } catch(NumberFormatException e){
    323                 throw new OsmTransferException(tr("unexpected format of id replied by the server, got ''{0}''", ret));
     323                throw new OsmTransferException(tr("Unexpected format of ID replied by the server. Got ''{0}''.", ret));
    324324            }
    325325            progressMonitor.setCustomText((tr("Successfully opened changeset {0}",changeset.getId())));
     
    343343    public void updateChangeset(Changeset changeset, ProgressMonitor monitor) throws OsmTransferException {
    344344        if (changeset == null)
    345             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "changeset"));
     345            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "changeset"));
    346346        if (monitor == null) {
    347347            monitor = NullProgressMonitor.INSTANCE;
    348348        }
    349349        if (changeset.getId() <= 0)
    350             throw new IllegalArgumentException(tr("id of changeset > 0 required. Got {0}", changeset.getId()));
     350            throw new IllegalArgumentException(tr("Changeset ID > 0 expected. Got {0}.", changeset.getId()));
    351351        try {
    352352            monitor.beginTask(tr("Updating changeset..."));
     
    378378    public void closeChangeset(Changeset changeset, ProgressMonitor monitor) throws OsmTransferException {
    379379        if (changeset == null)
    380             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "changeset"));
     380            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "changeset"));
    381381        if (monitor == null) {
    382382            monitor = NullProgressMonitor.INSTANCE;
    383383        }
    384384        if (changeset.getId() <= 0)
    385             throw new IllegalArgumentException(tr("id of changeset > 0 required. Got {0}", changeset.getId()));
     385            throw new IllegalArgumentException(tr("Changeset ID > 0 expected. Got {0}.", changeset.getId()));
    386386        try {
    387387            monitor.beginTask(tr("Closing changeset..."));
     
    405405            progressMonitor.beginTask("", list.size() * 2);
    406406            if (changeset == null)
    407                 throw new OsmTransferException(tr("No changeset present for diff upload"));
     407                throw new OsmTransferException(tr("No changeset present for diff upload."));
    408408
    409409            initialize(progressMonitor);
     
    596596            throw new OsmTransferException(tr("Current changeset is null. Can't upload data."));
    597597        if (changeset.getId() <= 0)
    598             throw new OsmTransferException(tr("id of current changeset > 0 required. Current id is {0}", changeset.getId()));
     598            throw new OsmTransferException(tr("ID of current changeset > 0 required. Current ID is {0}.", changeset.getId()));
    599599    }
    600600    /**
     
    622622        }
    623623        if (changeset.getId() <= 0)
    624             throw new IllegalArgumentException(tr("Changeset id > 0 expected. Got {0}", changeset.getId()));
     624            throw new IllegalArgumentException(tr("Changeset ID > 0 expected. Got {0}.", changeset.getId()));
    625625        if (!changeset.isOpen())
    626             throw new IllegalArgumentException(tr("Open changeset expected. Got closed changeset with id {0}", changeset.getId()));
     626            throw new IllegalArgumentException(tr("Open changeset expected. Got closed changeset with id {0}.", changeset.getId()));
    627627        this.changeset = changeset;
    628628    }
  • trunk/src/org/openstreetmap/josm/io/OsmApiException.java

    r1874 r2181  
    9191            sb.append(tr("(Code={0})", responseCode));
    9292        } else {
    93             sb.append(tr("The server replied an error with code {0}", responseCode));
     93            sb.append(tr("The server replied an error with code {0}.", responseCode));
    9494        }
    9595        return sb.toString();
  • trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java

    r2115 r2181  
    7070            String value = atts.getValue("id");
    7171            if (value == null) {
    72                 throwException(tr("missing mandatory attribute ''{0}''", "id"));
     72                throwException(tr("Missing mandatory attribute ''{0}''.", "id"));
    7373            }
    7474            long id = 0;
     
    7676                id = Long.parseLong(value);
    7777            } catch(NumberFormatException e) {
    78                 throwException(tr("illegal value for attribute ''{0}''. Got ''{1}''", "id", value));
     78                throwException(tr("Illegal value for attribute ''{0}''. Got ''{1}''.", "id", value));
    7979            }
    8080            if (id <= 0) {
    81                 throwException(tr("illegal nummeric value for attribute ''{0}''. Got ''{1}''", "id", id));
     81                throwException(tr("Illegal nummeric value for attribute ''{0}''. Got ''{1}''.", "id", id));
    8282            }
    8383            current.setId(id);
     
    107107            value = atts.getValue("open");
    108108            if (value == null) {
    109                 throwException(tr("missing mandatory attribute ''{0}''", "open"));
     109                throwException(tr("Missing mandatory attribute ''{0}''.", "open"));
    110110            } else if (value.equals("true")) {
    111111                current.setOpen(true);
     
    113113                current.setOpen(false);
    114114            } else {
    115                 throwException(tr("illegal boolean value for attribute ''{0}''. Got ''{1}''", "open", value));
     115                throwException(tr("Illegal boolean value for attribute ''{0}''. Got ''{1}''.", "open", value));
    116116            }
    117117
     
    126126                    minLon = Double.parseDouble(min_lon);
    127127                } catch(NumberFormatException e) {
    128                     throwException(tr("illegal value for attribute ''{0}''. Got ''{1}''", "min_lon", min_lon));
     128                    throwException(tr("Illegal value for attribute ''{0}''. Got ''{1}''.", "min_lon", min_lon));
    129129                }
    130130                double minLat = 0;
     
    132132                    minLat = Double.parseDouble(min_lat);
    133133                } catch(NumberFormatException e) {
    134                     throwException(tr("illegal value for attribute ''{0}''. Got ''{1}''", "min_lat", min_lat));
     134                    throwException(tr("Illegal value for attribute ''{0}''. Got ''{1}''.", "min_lat", min_lat));
    135135                }
    136136                current.setMin(new LatLon(minLat, minLon));
     
    142142                    maxLon = Double.parseDouble(max_lon);
    143143                } catch(NumberFormatException e) {
    144                     throwException(tr("illegal value for attribute ''{0}''. Got ''{1}''", "max_lon", max_lon));
     144                    throwException(tr("Illegal value for attribute ''{0}''. Got ''{1}''.", "max_lon", max_lon));
    145145                }
    146146                double maxLat = 0;
     
    148148                    maxLat = Double.parseDouble(max_lat);
    149149                } catch(NumberFormatException e) {
    150                     throwException(tr("illegal value for attribute ''{0}''. Got ''{1}''", "max_lat", max_lat));
     150                    throwException(tr("Illegal value for attribute ''{0}''. Got ''{1}''.", "max_lat", max_lat));
    151151                }
    152152                current.setMax(new LatLon(maxLon, maxLat));
     
    157157            if (qName.equals("osm")) {
    158158                if (atts == null) {
    159                     throwException(tr("Missing mandatory attribute ''{0}'' of XML element {1}", "version", "osm"));
     159                    throwException(tr("Missing mandatory attribute ''{0}'' of XML element {1}.", "version", "osm"));
    160160                }
    161161                String v = atts.getValue("version");
    162162                if (v == null) {
    163                     throwException(tr("Missing mandatory attribute ''{0}''", "version"));
     163                    throwException(tr("Missing mandatory attribute ''{0}''.", "version"));
    164164                }
    165165                if (!(v.equals("0.6"))) {
     
    195195                return User.createOsmUser(id, name);
    196196            } catch(NumberFormatException e) {
    197                 throwException(tr("Illegal value for attribute ''uid''. Got ''{0}''", uid));
     197                throwException(tr("Illegal value for attribute ''uid''. Got ''{0}''.", uid));
    198198            }
    199199            return null;
  • trunk/src/org/openstreetmap/josm/io/OsmExporter.java

    r2025 r2181  
    8181            JOptionPane.showMessageDialog(
    8282                    Main.parent,
    83                     tr("<html>An error occurred while saving.<br>Error is: <br>{0}</html>", e.getMessage()),
     83                    tr("<html>An error occurred while saving.<br>Error is:<br>{0}</html>", e.getMessage()),
    8484                    tr("Error"),
    8585                    JOptionPane.ERROR_MESSAGE
     
    9696                JOptionPane.showMessageDialog(
    9797                        Main.parent,
    98                         tr("<html>An error occurred while restoring backup file.<br>Error is: <br>{0}</html>", e2.getMessage()),
     98                        tr("<html>An error occurred while restoring backup file.<br>Error is:<br>{0}</html>", e2.getMessage()),
    9999                        tr("Error"),
    100100                        JOptionPane.ERROR_MESSAGE
  • trunk/src/org/openstreetmap/josm/io/OsmHistoryReader.java

    r1811 r2181  
    6666            String v = attr.getValue(name);
    6767            if (v == null) {
    68                 throwException(tr("mandatory attribute ''{0}'' missing", name));
     68                throwException(tr("Missing mandatory attribute ''{0}''.", name));
    6969            }
    7070            Long l = 0l;
     
    7272                l = Long.parseLong(v);
    7373            } catch(NumberFormatException e) {
    74                 throwException(tr("illegal value for mandatory attribute ''{0}'' of type long, got ''{1}''", name, v));
     74                throwException(tr("Illegal value for mandatory attribute ''{0}'' of type long. Got ''{1}''.", name, v));
    7575            }
    7676            if (l < 0) {
    77                 throwException(tr("illegal value for mandatory attribute ''{0}'' of type long (>=0), got ''{1}''", name, v));
     77                throwException(tr("Illegal value for mandatory attribute ''{0}'' of type long (>=0). Got ''{1}''.", name, v));
    7878            }
    7979            return l;
     
    8383            String v = attr.getValue(name);
    8484            if (v == null) {
    85                 throwException(tr("mandatory attribute ''{0}'' missing", name));
     85                throwException(tr("Missing mandatory attribute ''{0}''.", name));
    8686            }
    8787            Integer i = 0;
     
    8989                i = Integer.parseInt(v);
    9090            } catch(NumberFormatException e) {
    91                 throwException(tr("illegal value for mandatory attribute ''{0}'' of type int, got ''{1}''", name, v));
     91                throwException(tr("Illegal value for mandatory attribute ''{0}'' of type int. Got ''{1}''.", name, v));
    9292            }
    9393            if (i < 0) {
    94                 throwException(tr("illegal value for mandatory attribute ''{0}'' of type int (>=0), got ''{1}''", name, v));
     94                throwException(tr("Illegal value for mandatory attribute ''{0}'' of type int (>=0). Got ''{1}''.", name, v));
    9595            }
    9696            return i;
     
    100100            String v = attr.getValue(name);
    101101            if (v == null) {
    102                 throwException(tr("mandatory attribute ''{0}'' missing", name));
     102                throwException(tr("Missing mandatory attribute ''{0}''.", name));
    103103            }
    104104            return v;
     
    108108            String v = attr.getValue(name);
    109109            if (v == null) {
    110                 throwException(tr("mandatory attribute ''{0}'' missing", name));
     110                throwException(tr("Missing mandatory attribute ''{0}''.", name));
    111111            }
    112112            if (v.equals("true")) return true;
    113113            if (v.equals("false")) return false;
    114             throwException(tr("illegal value for mandatory attribute ''{0}'' of type boolean, got ''{1}''", name, v));
     114            throwException(tr("Illegal value for mandatory attribute ''{0}'' of type boolean. Got ''{1}''.", name, v));
    115115            // not reached
    116116            return false;
     
    172172                type = OsmPrimitiveType.fromApiTypeName(v);
    173173            } catch(IllegalArgumentException e) {
    174                 throwException(tr("illegal value for mandatory attribute ''{0}'' of type OsmPrimitiveType, got ''{1}''", "type", v));
     174                throwException(tr("Illegal value for mandatory attribute ''{0}'' of type OsmPrimitiveType. Got ''{1}''.", "type", v));
    175175            }
    176176            String role = getMandatoryAttributeString(atts, "role");
  • trunk/src/org/openstreetmap/josm/io/OsmImporter.java

    r2070 r2181  
    3434        } catch (FileNotFoundException e) {
    3535            e.printStackTrace();
    36             throw new IOException(tr("File \"{0}\" does not exist", file.getName()));
     36            throw new IOException(tr("File ''{0}'' does not exist.", file.getName()));
    3737        }
    3838    }
  • trunk/src/org/openstreetmap/josm/io/OsmReader.java

    r2155 r2181  
    172172            if (qName.equals("osm")) {
    173173                if (atts == null) {
    174                     throwException(tr("Missing mandatory attribute ''{0}'' of XML element {1}", "version", "osm"));
     174                    throwException(tr("Missing mandatory attribute ''{0}'' of XML element {1}.", "version", "osm"));
    175175                }
    176176                String v = atts.getValue("version");
    177177                if (v == null) {
    178                     throwException(tr("Missing mandatory attribute ''{0}''", "version"));
     178                    throwException(tr("Missing mandatory attribute ''{0}''.", "version"));
    179179                }
    180180                if (!(v.equals("0.5") || v.equals("0.6"))) {
     
    203203                } else {
    204204                    throwException(tr(
    205                             "Missing manadatory attributes on element ''bounds''. Got minlon=''{0}'',minlat=''{1}00,maxlon=''{3}'',maxlat=''{4}'', origin=''{5}''",
     205                            "Missing manadatory attributes on element ''bounds''. Got minlon=''{0}'',minlat=''{1}00,maxlon=''{3}'',maxlat=''{4}'', origin=''{5}''.",
    206206                            minlon, minlat, maxlon, maxlat, origin
    207207                    ));
     
    226226                if (list == null) {
    227227                    throwException(
    228                             tr("found XML element <nd> element not as direct child of element <way>")
     228                            tr("Found XML element <nd> not as direct child of element <way>.")
    229229                    );
    230230                }
    231231                if (atts.getValue("ref") == null) {
    232232                    throwException(
    233                             tr("Missing mandatory attribute ''{0}'' on <nd> of way {1}", "ref", current.id)
     233                            tr("Missing mandatory attribute ''{0}'' on <nd> of way {1}.", "ref", current.id)
    234234                    );
    235235                }
     
    237237                if (id == 0) {
    238238                    throwException(
    239                             tr("Illegal value of attribute ''ref'' of element <nd>. Got {0}", id)
     239                            tr("Illegal value of attribute ''ref'' of element <nd>. Got {0}.", id)
    240240                    );
    241241                }
     
    254254                if (list == null) {
    255255                    throwException(
    256                             tr("Found XML element <member> not as direct child of element <relation>")
     256                            tr("Found XML element <member> not as direct child of element <relation>.")
    257257                    );
    258258                }
     
    260260                String value = atts.getValue("ref");
    261261                if (value == null) {
    262                     throwException(tr("Missing attribute ''ref'' on member in relation {0}",current.id));
     262                    throwException(tr("Missing attribute ''ref'' on member in relation {0}.",current.id));
    263263                }
    264264                try {
     
    269269                value = atts.getValue("type");
    270270                if (value == null) {
    271                     throwException(tr("Missing attribute ''type'' on member {0} in relation {1}", Long.toString(emd.id), Long.toString(current.id)));
     271                    throwException(tr("Missing attribute ''type'' on member {0} in relation {1}.", Long.toString(emd.id), Long.toString(current.id)));
    272272                }
    273273                if (! (value.equals("way") || value.equals("node") || value.equals("relation"))) {
     
    309309                return User.createOsmUser(id, name);
    310310            } catch(NumberFormatException e) {
    311                 throwException(tr("Illegal value for attribute ''uid''. Got ''{0}''", uid));
     311                throwException(tr("Illegal value for attribute ''uid''. Got ''{0}''.", uid));
    312312            }
    313313            return null;
     
    319319            current.id = getLong(atts, "id");
    320320            if (current.id == 0) {
    321                 throwException(tr("Illegal object with id=0"));
     321                throwException(tr("Illegal object with ID=0."));
    322322            }
    323323
     
    345345                    current.version = Integer.parseInt(version);
    346346                } catch(NumberFormatException e) {
    347                     throwException(tr("Illegal value for attribute ''version'' on OSM primitive with id {0}. Got {1}", Long.toString(current.id), version));
     347                    throwException(tr("Illegal value for attribute ''version'' on OSM primitive with ID {0}. Got {1}.", Long.toString(current.id), version));
    348348                }
    349349                if (ds.version.equals("0.6")){
    350350                    if (current.version <= 0 && current.id > 0) {
    351                         throwException(tr("Illegal value for attribute ''version'' on OSM primitive with id {0}. Got {1}", Long.toString(current.id), version));
     351                        throwException(tr("Illegal value for attribute ''version'' on OSM primitive with ID {0}. Got {1}.", Long.toString(current.id), version));
    352352                    } else if (current.version < 0 && current.id  <=0) {
    353                         System.out.println(tr("WARNING: normalizing value of attribute ''version'' of element {0} to 0, API version is ''0.6''. Got {1}", current.id, current.version));
     353                        System.out.println(tr("WARNING: Normalizing value of attribute ''version'' of element {0} to {2}, API version is ''{3}''. Got {1}.", current.id, current.version, 0, "0.6"));
    354354                        current.version = 0;
    355355                    }
    356356                } else if (ds.version.equals("0.5")) {
    357357                    if (current.version <= 0 && current.id > 0) {
    358                         System.out.println(tr("WARNING: normalizing value of attribute ''version'' of element {0} to 1, API version is ''0.5''. Got {1}", current.id, current.version));
     358                        System.out.println(tr("WARNING: Normalizing value of attribute ''version'' of element {0} to {2}, API version is ''{3}''. Got {1}.", current.id, current.version, 1, "0.5"));
    359359                        current.version = 1;
    360360                    } else if (current.version < 0 && current.id  <=0) {
    361                         System.out.println(tr("WARNING: normalizing value of attribute ''version'' of element {0} to 0, API version is ''0.5''. Got {1}", current.id, current.version));
     361                        System.out.println(tr("WARNING: Normalizing value of attribute ''version'' of element {0} to {2}, API version is ''{3}''. Got {1}.", current.id, current.version, 0, "0.5"));
    362362                        current.version = 0;
    363363                    }
    364364                } else {
    365365                    // should not happen. API version has been checked before
    366                     throwException(tr("Unknown or unsupported API version. Got {0}", ds.version));
     366                    throwException(tr("Unknown or unsupported API version. Got {0}.", ds.version));
    367367                }
    368368            } else {
     
    370370                //
    371371                if (current.id > 0 && ds.version != null && ds.version.equals("0.6")) {
    372                     throwException(tr("Missing attribute ''version'' on OSM primitive with id {0}", Long.toString(current.id)));
     372                    throwException(tr("Missing attribute ''version'' on OSM primitive with ID {0}.", Long.toString(current.id)));
    373373                }
    374374            }
     
    392392                return Long.parseLong(value);
    393393            } catch(NumberFormatException e) {
    394                 throwException(tr("Illegal long value for attribute ''{0}''. Got ''{1}''",name, value));
     394                throwException(tr("Illegal long value for attribute ''{0}''. Got ''{1}''.",name, value));
    395395            }
    396396            return 0; // should not happen
     
    416416                        throw new IllegalDataException (
    417417                                tr(
    418                                         "way with external id ''{0}'' includes missing node with external id ''{1}''",
     418                                        "Way with external ID ''{0}'' includes missing node with external ID ''{1}''.",
    419419                                        externalWayId,
    420420                                        id
     
    429429            w.setNodes(wayNodes);
    430430            if (incomplete) {
    431                 logger.warning(tr("marked way {0} with {1} nodes incomplete because at least one node was missing in the " +
    432                         "loaded data and is therefore incomplete too", externalWayId, w.getNodesCount()));
     431                logger.warning(tr("Marked way {0} with {1} nodes incomplete because at least one node was missing in the " +
     432                        "loaded data and is therefore incomplete too.", externalWayId, w.getNodesCount()));
    433433                w.incomplete = true;
    434434                ds.addPrimitive(w);
     
    477477                } else
    478478                    throw new IllegalDataException(
    479                             tr("Unknown relation member type ''{0}'' in relation with external id ''{1}''", rm.type,externalRelationId)
     479                            tr("Unknown relation member type ''{0}'' in relation with external id ''{1}''.", rm.type,externalRelationId)
    480480                    );
    481481
     
    488488                        throw new IllegalDataException(
    489489                                tr(
    490                                         "Relation with external id ''{0}'' refers to missing primitive with external id ''{1}''",
     490                                        "Relation with external id ''{0}'' refers to missing primitive with external id ''{1}''.",
    491491                                        externalRelationId,
    492492                                        rm.id
  • trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java

    r2070 r2181  
    5050    public OsmServerBackreferenceReader(OsmPrimitive primitive) throws IllegalArgumentException {
    5151        if (primitive == null)
    52             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "primitive"));
     52            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive"));
    5353        if (primitive.getId() == 0)
    54             throw new IllegalArgumentException(tr("id parameter ''{0}'' > 0 required. Got {1}", "primitive", primitive.getId()));
     54            throw new IllegalArgumentException(tr("ID parameter ''{0}'' > 0 expected. Got ''{1}''.", "primitive", primitive.getId()));
    5555        this.id = primitive.getId();
    5656        this.primitiveType = OsmPrimitiveType.from(primitive);
     
    7070    public OsmServerBackreferenceReader(long id, OsmPrimitiveType type) throws IllegalArgumentException   {
    7171        if (id <= 0)
    72             throw new IllegalArgumentException(tr("parameter ''{0}'' > 0 required. Got {1}", "id", id));
     72            throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected. Got ''{1}''.", "id", id));
    7373        if (type == null)
    74             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "type"));
     74            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "type"));
    7575        this.id = id;
    7676        this.primitiveType = type;
  • trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java

    r2124 r2181  
    4444    public List<Changeset> queryChangesets(ChangesetQuery query, ProgressMonitor monitor) throws OsmTransferException {
    4545        if (query == null)
    46             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "query"));
     46            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "query"));
    4747        if (monitor == null) {
    4848            monitor = NullProgressMonitor.INSTANCE;
     
    7878    public Changeset readChangeset(long id, ProgressMonitor monitor) throws OsmTransferException {
    7979        if (id <= 0)
    80             throw new IllegalArgumentException(tr("parameter ''{0}'' > 0 expected. Got {1}", "id", id));
     80            throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected. Got ''{1}''.", "id", id));
    8181        if (monitor == null) {
    8282            monitor = NullProgressMonitor.INSTANCE;
  • trunk/src/org/openstreetmap/josm/io/OsmServerHistoryReader.java

    r1892 r2181  
    3131    public OsmServerHistoryReader(OsmPrimitiveType type, long id) throws IllegalArgumentException {
    3232        if (type == null)
    33             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "type"));
     33            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "type"));
    3434        if (id < 0)
    35             throw new IllegalArgumentException(tr("parameter ''{0}'' >= 0 expected, got ''{1}''", "id", id));
     35            throw new IllegalArgumentException(tr("Parameter ''{0}'' >= 0 expected. Got ''{1}''.", "id", id));
    3636        this.primitiveType = type;
    3737        this.id = id;
  • trunk/src/org/openstreetmap/josm/io/OsmServerReader.java

    r2124 r2181  
    6161                activeConnection = (HttpURLConnection)url.openConnection();
    6262            } catch(Exception e) {
    63                 throw new OsmTransferException(tr("Failed to open connection to API {0}", url.toExternalForm()), e);
     63                throw new OsmTransferException(tr("Failed to open connection to API {0}.", url.toExternalForm()), e);
    6464            }
    6565            if (cancel) {
     
    8686                activeConnection.connect();
    8787            } catch (Exception e) {
    88                 throw new OsmTransferException(tr("Couldn't connect to the osm server. Please check your internet connection."), e);
     88                throw new OsmTransferException(tr("Couldn't connect to the OSM server. Please check your internet connection."), e);
    8989            }
    9090            try {
  • trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java

    r2124 r2181  
    4646            Node xmlNode = (Node)xpath.compile("/osm/user[1]").evaluate(document, XPathConstants.NODE);
    4747            if ( xmlNode== null)
    48                 throw new OsmDataParsingException(tr("XML tag <user> is missing"));
     48                throw new OsmDataParsingException(tr("XML tag <user> is missing."));
    4949
    5050            // -- id
    5151            String v = getAttribute(xmlNode, "id");
    5252            if (v == null)
    53                 throw new OsmDataParsingException(tr("Missing attribute ''{0}'' on XML tag ''{1}''", "id", "user"));
     53                throw new OsmDataParsingException(tr("Missing attribute ''{0}'' on XML tag ''{1}''.", "id", "user"));
    5454            try {
    5555                userInfo.setId(Long.parseLong(v));
    5656            } catch(NumberFormatException e) {
    57                 throw new OsmDataParsingException(tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}", "id", "user", v));
     57                throw new OsmDataParsingException(tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}.", "id", "user", v));
    5858            }
    5959            // -- display name
     
    7575                v = getAttribute(xmlNode, "lat");
    7676                if (v == null)
    77                     throw new OsmDataParsingException(tr("Missing attribute ''{0}'' on XML tag ''{1}''", "lat", "home"));
     77                    throw new OsmDataParsingException(tr("Missing attribute ''{0}'' on XML tag ''{1}''.", "lat", "home"));
    7878                double lat;
    7979                try {
    8080                    lat = Double.parseDouble(v);
    8181                } catch(NumberFormatException e) {
    82                     throw new OsmDataParsingException(tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}", "lat", "home", v));
     82                    throw new OsmDataParsingException(tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}.", "lat", "home", v));
    8383                }
    8484
    8585                v = getAttribute(xmlNode, "lon");
    8686                if (v == null)
    87                     throw new OsmDataParsingException(tr("Missing attribute ''{0}'' on XML tag ''{1}''", "lon", "home"));
     87                    throw new OsmDataParsingException(tr("Missing attribute ''{0}'' on XML tag ''{1}''.", "lon", "home"));
    8888                double lon;
    8989                try {
    9090                    lon = Double.parseDouble(v);
    9191                } catch(NumberFormatException e) {
    92                     throw new OsmDataParsingException(tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}", "lon", "home", v));
     92                    throw new OsmDataParsingException(tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}.", "lon", "home", v));
    9393                }
    9494
    9595                v = getAttribute(xmlNode, "zoom");
    9696                if (v == null)
    97                     throw new OsmDataParsingException(tr("Missing attribute ''{0}'' on XML tag ''{1}''", "zoom", "home"));
     97                    throw new OsmDataParsingException(tr("Missing attribute ''{0}'' on XML tag ''{1}''.", "zoom", "home"));
    9898                int zoom;
    9999                try {
    100100                    zoom = Integer.parseInt(v);
    101101                } catch(NumberFormatException e) {
    102                     throw new OsmDataParsingException(tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}", "zoom", "home", v));
     102                    throw new OsmDataParsingException(tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}.", "zoom", "home", v));
    103103                }
    104104                userInfo.setHome(new LatLon(lat,lon));
  • trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java

    r2115 r2181  
    145145            boolean useDiffUpload = Main.pref.getBoolean("osm-server.atomic-upload", apiVersion.compareTo("0.6")>=0);
    146146            if (useDiffUpload && ! casUseDiffUploads) {
    147                 System.out.println(tr("WARNING: preference ''{0}'' or api version ''{1}'' of dataset requires to use diff uploads, but API is not able to handle them. Ignoring diff upload.", "osm-server.atomic-upload", apiVersion));
     147                System.out.println(tr("WARNING: preference ''{0}'' or API version ''{1}'' of dataset requires to use diff uploads, but API is not able to handle them. Ignoring diff upload.", "osm-server.atomic-upload", apiVersion));
    148148                useDiffUpload = false;
    149149            }
Note: See TracChangeset for help on using the changeset viewer.