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

lots of i18n fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.