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

lots of i18n fixes

Location:
trunk/src/org/openstreetmap/josm/data
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java

    r2017 r2181  
    7676    protected void addConflict(Conflict<?> conflict) throws IllegalStateException {
    7777        if (hasConflictForMy(conflict.getMy()))
    78             throw new IllegalStateException(tr("already registered a conflict for primitive ''{0}''", conflict.getMy().toString()));
     78            throw new IllegalStateException(tr("Already registered a conflict for primitive ''{0}''.", conflict.getMy().toString()));
    7979        if (!conflicts.contains(conflict)) {
    8080            conflicts.add(conflict);
     
    9292    public void add(Conflict<?> conflict) throws IllegalStateException, IllegalArgumentException {
    9393        if (conflict == null)
    94             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "conflict"));
     94            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "conflict"));
    9595        addConflict(conflict);
    9696        fireConflictAdded();
  • trunk/src/org/openstreetmap/josm/data/osm/BackreferencedDataSet.java

    r2095 r2181  
    103103    public BackreferencedDataSet(DataSet source) {
    104104        if (source == null)
    105             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null"));
     105            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null."));
    106106        this.source = source;
    107107        int size = source.ways.size() + source.relations.size();
  • trunk/src/org/openstreetmap/josm/data/osm/DataSet.java

    r2165 r2181  
    391391    public OsmPrimitive getPrimitiveById(long id, OsmPrimitiveType type) {
    392392        if (id <= 0)
    393             throw new IllegalArgumentException(tr("parameter {0} > 0 required. Got {1}.", "id", id));
     393            throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected. Got ''{1}''.", "id", id));
    394394        if (id <= 0)
    395             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "type"));
     395            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "type"));
    396396        Collection<? extends OsmPrimitive> primitives = null;
    397397        switch(type) {
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r2120 r2181  
    176176    public OsmPrimitive(long id) throws IllegalArgumentException {
    177177        if (id < 0)
    178             throw new IllegalArgumentException(tr("expected id >= 0. Got {0}", id));
     178            throw new IllegalArgumentException(tr("Expected ID >= 0. Got {0}.", id));
    179179        this.id = id;
    180180        this.version = 0;
     
    300300    public void setVisible(boolean visible) throws IllegalStateException{
    301301        if (id == 0 && visible == false)
    302             throw new IllegalStateException(tr("a primitive with id=0 can't be invisible"));
     302            throw new IllegalStateException(tr("A primitive with ID = 0 can't be invisible."));
    303303        this.visible = visible;
    304304    }
     
    336336    public void setOsmId(long id, int version) {
    337337        if (id <= 0)
    338             throw new IllegalArgumentException(tr("id > 0 expected. Got {0}", id));
     338            throw new IllegalArgumentException(tr("ID > 0 expected. Got {0}.", id));
    339339        if (version <= 0)
    340             throw new IllegalArgumentException(tr("version > 0 expected. Got {0}", version));
     340            throw new IllegalArgumentException(tr("Version > 0 expected. Got {0}.", version));
    341341        this.id = id;
    342342        this.version = version;
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveType.java

    r2115 r2181  
    2323            if (type.getAPIName().equals(typeName)) return type;
    2424        }
    25         throw new IllegalArgumentException(tr("parameter ''{0}'' is not a valid type name, got ''{1}''", "typeName", typeName));
     25        throw new IllegalArgumentException(tr("Parameter ''{0}'' is not a valid type name. Got ''{1}''.", "typeName", typeName));
    2626    }
    2727
     
    3434        if (cls.equals(Way.class)) return WAY;
    3535        if (cls.equals(Relation.class)) return RELATION;
    36         throw new IllegalArgumentException(tr("parameter ''{0}'' is not an acceptable class, got ''{1}''", "cls", cls.toString()));
     36        throw new IllegalArgumentException(tr("Parameter ''{0}'' is not an acceptable class. Got ''{1}''.", "cls", cls.toString()));
    3737    }
    3838
  • trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java

    r2070 r2181  
    570570        if (primitive == null) return;
    571571        if (! isApplicableToPrimitive())
    572             throw new IllegalStateException(tr("tag collection can't be applied to a primitive because there are keys with multiple values"));
     572            throw new IllegalStateException(tr("Tag collection can't be applied to a primitive because there are keys with multiple values."));
    573573        for (Tag tag: tags) {
    574574            if (tag.getValue() == null || tag.getValue().equals("")) {
     
    591591        if (primitives == null) return;
    592592        if (! isApplicableToPrimitive())
    593             throw new IllegalStateException(tr("tag collection can't be applied to a primitive because there are keys with multiple values"));
     593            throw new IllegalStateException(tr("Tag collection can't be applied to a primitive because there are keys with multiple values."));
    594594        for (OsmPrimitive primitive: primitives) {
    595595            applyTo(primitive);
     
    608608        if (primitive == null) return;
    609609        if (! isApplicableToPrimitive())
    610             throw new IllegalStateException(tr("tag collection can't be applied to a primitive because there are keys with multiple values"));
     610            throw new IllegalStateException(tr("Tag collection can't be applied to a primitive because there are keys with multiple values."));
    611611        primitive.removeAll();
    612612        for (Tag tag: tags) {
     
    626626        if (primitives == null) return;
    627627        if (! isApplicableToPrimitive())
    628             throw new IllegalStateException(tr("tag collection can't be applied to a primitive because there are keys with multiple values"));
     628            throw new IllegalStateException(tr("Tag collection can't be applied to a primitive because there are keys with multiple values."));
    629629        for (OsmPrimitive primitive: primitives) {
    630630            replaceTagsOf(primitive);
  • trunk/src/org/openstreetmap/josm/data/osm/Way.java

    r2077 r2181  
    210210        if (n==null) return;
    211211        if (incomplete)
    212             throw new IllegalStateException(tr("can't add node {0} to incomplete way {1}", n.getId(), getId()));
     212            throw new IllegalStateException(tr("Cannot add node {0} to incomplete way {1}.", n.getId(), getId()));
    213213        if (incomplete) return;
    214214        clearCached();
     
    228228        if (n==null) return;
    229229        if (incomplete)
    230             throw new IllegalStateException(tr("can't add node {0} to incomplete way {1}", n.getId(), getId()));
     230            throw new IllegalStateException(tr("Cannot add node {0} to incomplete way {1}.", n.getId(), getId()));
    231231        clearCached();
    232232        nodes.add(offs, n);
  • trunk/src/org/openstreetmap/josm/data/osm/history/History.java

    r2017 r2181  
    152152                return primitive;
    153153        }
    154         throw new NoSuchElementException(tr("There's no primitive with version {0} in this history", version));
     154        throw new NoSuchElementException(tr("There's no primitive with version {0} in this history.", version));
    155155    }
    156156
     
    159159
    160160        if (versions.isEmpty())
    161             throw new NoSuchElementException(tr("There's no version valid at date ''{0}'' in this history", date));
     161            throw new NoSuchElementException(tr("There's no version valid at date ''{0}'' in this history.", date));
    162162        if (get(0).getTimestamp().compareTo(date)> 0)
    163             throw new NoSuchElementException(tr("There's no version valid at date ''{0}'' in this history", date));
     163            throw new NoSuchElementException(tr("There's no version valid at date ''{0}'' in this history.", date));
    164164        for (int i = 1; i < versions.size();i++) {
    165165            if (get(i-1).getTimestamp().compareTo(date) <= 0
     
    172172    public HistoryOsmPrimitive get(int idx) {
    173173        if (idx < 0 || idx >= versions.size())
    174             throw new IndexOutOfBoundsException(tr("parameter ''{0}'' in range 0..{1} expected, got {2}", "idx", versions.size()-1, idx));
     174            throw new IndexOutOfBoundsException(tr("Parameter ''{0}'' in range 0..{1} expected. Got ''{2}''.", "idx", versions.size()-1, idx));
    175175        return versions.get(idx);
    176176    }
     
    178178    public HistoryOsmPrimitive getEarliest() {
    179179        if (isEmpty())
    180             throw new NoSuchElementException(tr("no earliest version found. History is empty."));
     180            throw new NoSuchElementException(tr("No earliest version found. History is empty."));
    181181        return sortAscending().versions.get(0);
    182182    }
     
    184184    public HistoryOsmPrimitive getLatest() {
    185185        if (isEmpty())
    186             throw new NoSuchElementException(tr("no latest version found. History is empty."));
     186            throw new NoSuchElementException(tr("No latest version found. History is empty."));
    187187        return sortDescending().versions.get(0);
    188188    }
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java

    r2017 r2181  
    2929    protected void ensurePositiveLong(long value, String name) {
    3030        if (value <= 0)
    31             throw new IllegalArgumentException(tr("parameter ''{0}'' > 0 expected, got ''{1}''", name, value));
     31            throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected. Got ''{1}''.", name, value));
    3232    }
    3333
    3434    protected void ensureNotNull(Object obj, String name) {
    3535        if (obj == null)
    36             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", name));
     36            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", name));
    3737    }
    3838
     
    102102    public int compareTo(HistoryOsmPrimitive o) {
    103103        if (this.id != o.id)
    104             throw new ClassCastException(tr("can't compare primitive with id ''{0}'' to primitive with id ''{1}''", o.id, this.id));
     104            throw new ClassCastException(tr("Can't compare primitive with ID ''{0}'' to primitive with ID ''{1}''.", o.id, this.id));
    105105        return new Long(this.version).compareTo(o.version);
    106106    }
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java

    r1670 r2181  
    8787    public RelationMember getRelationMember(int idx) throws IndexOutOfBoundsException  {
    8888        if (idx < 0 || idx >= members.size())
    89             throw new IndexOutOfBoundsException(tr("parameter {0} not in range 0..{1}, got {2}", "idx", members.size(),idx));
     89            throw new IndexOutOfBoundsException(tr("Parameter {0} not in range 0..{1}. Got ''{2}''.", "idx", members.size(),idx));
    9090        return members.get(idx);
    9191    }
     
    108108    public void addMember(RelationMember member) throws IllegalArgumentException {
    109109        if (member == null)
    110             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "member"));
     110            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "member"));
    111111        members.add(member);
    112112    }
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java

    r1670 r2181  
    4646    public long getNodeId(int idx) throws IndexOutOfBoundsException {
    4747        if (idx < 0 || idx >= nodeIds.size())
    48             throw new IndexOutOfBoundsException(tr("parameter {0} not in range 0..{1}, got {2}", "idx", nodeIds.size(),idx));
     48            throw new IndexOutOfBoundsException(tr("Parameter {0} not in range 0..{1}. Got ''{2}''.", "idx", nodeIds.size(),idx));
    4949        return nodeIds.get(idx);
    5050    }
  • trunk/src/org/openstreetmap/josm/data/osm/history/RelationMember.java

    r2017 r2181  
    2929        this.role = (role == null ? "" : role);
    3030        if (primitiveType == null)
    31             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "primitiveType"));
     31            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitiveType"));
    3232        this.primitiveType = primitiveType;
    3333        if (primitiveId <=0)
    34             throw new IllegalArgumentException(tr("parameter ''{0}'' > 0 expected, got ''{1}''", "primitiveId", primitiveId));
     34            throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected. Got ''{1}''.", "primitiveId", primitiveId));
    3535        this.primitiveId = primitiveId;
    3636    }
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitor.java

    r2025 r2181  
    4242    public MergeSourceBuildingVisitor(DataSet selectionBase) throws IllegalArgumentException {
    4343        if (selectionBase == null)
    44             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "selectionBase"));
     44            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "selectionBase"));
    4545        this.selectionBase = selectionBase;
    4646        this.hull = new DataSet();
Note: See TracChangeset for help on using the changeset viewer.