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/gui/conflict
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ComparePairType.java

    r1954 r2181  
    8080    public ListRole getOppositeRole(ListRole role) {
    8181        if (!isParticipatingIn(role))
    82             throw new IllegalStateException(tr("role {0} is not participating in compare pair {1}", role.toString(), this.toString()));
     82            throw new IllegalStateException(tr("Role {0} is not participating in compare pair {1}.", role.toString(), this.toString()));
    8383        if (participatingRoles[0].equals(role))
    8484            return participatingRoles[1];
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java

    r2039 r2181  
    323323        ArrayList<T> mergedEntries = getMergedEntries();
    324324        if (current < 0 || current >= mergedEntries.size())
    325             throw new IllegalArgumentException(tr("parameter current out of range: got {0}", current));
     325            throw new IllegalArgumentException(tr("Parameter current out of range. Got {0}.", current));
    326326        for (int i=rows.length -1; i>=0; i--) {
    327327            int row = rows[i];
     
    375375
    376376        if (current < 0 || current >= mergedEntries.size())
    377             throw new IllegalArgumentException(tr("parameter current out of range: got {0}", current));
     377            throw new IllegalArgumentException(tr("Parameter current out of range. Got {0}.", current));
    378378        if (current == mergedEntries.size() -1) {
    379379            copyToEnd(source, rows);
     
    589589        public boolean isSamePositionInOppositeList(int row) {
    590590            if (!isParticipatingInCurrentComparePair())
    591                 throw new IllegalStateException(tr("list in role {0} is currently not participating in a compare pair", role.toString()));
     591                throw new IllegalStateException(tr("List in role {0} is currently not participating in a compare pair.", role.toString()));
    592592            if (row >= getEntries().size()) return false;
    593593            if (row >= getOppositeEntries().size()) return false;
     
    613613        public boolean isIncludedInOppositeList(int row) {
    614614            if (!isParticipatingInCurrentComparePair())
    615                 throw new IllegalStateException(tr("list in role {0} is currently not participating in a compare pair", role.toString()));
     615                throw new IllegalStateException(tr("List in role {0} is currently not participating in a compare pair.", role.toString()));
    616616
    617617            if (row >= getEntries().size()) return false;
     
    762762            if (index < compareModes.size())
    763763                return compareModes.get(index);
    764             throw new IllegalArgumentException(tr("unexpected value of parameter \"index\". Got {0}", index));
     764            throw new IllegalArgumentException(tr("Unexpected value of parameter ''index''. Got {0}.", index));
    765765        }
    766766
     
    776776            int i = compareModes.indexOf(anItem);
    777777            if (i < 0)
    778                 throw new IllegalStateException(tr("item {0} not found in list", anItem));
     778                throw new IllegalStateException(tr("Item {0} not found in list.", anItem));
    779779            selectedIdx = i;
    780780            fireModelDataChanged();
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java

    r2165 r2181  
    436436                putValue(Action.NAME, tr("> bottom"));
    437437            }
    438             putValue(Action.SHORT_DESCRIPTION, tr("Copy my selected elements to the end of the list of merged elements"));
     438            putValue(Action.SHORT_DESCRIPTION, tr("Copy my selected elements to the end of the list of merged elements."));
    439439            setEnabled(false);
    440440        }
     
    463463                putValue(Action.NAME, "> before");
    464464            }
    465             putValue(Action.SHORT_DESCRIPTION, tr("Copy my selected elements before the first selected element in the list of merged elements"));
     465            putValue(Action.SHORT_DESCRIPTION, tr("Copy my selected elements before the first selected element in the list of merged elements."));
    466466            setEnabled(false);
    467467        }
     
    497497                putValue(Action.NAME, "> after");
    498498            }
    499             putValue(Action.SHORT_DESCRIPTION, tr("Copy my selected elements after the first selected element in the list of merged elements"));
     499            putValue(Action.SHORT_DESCRIPTION, tr("Copy my selected elements after the first selected element in the list of merged elements."));
    500500            setEnabled(false);
    501501        }
     
    527527                putValue(Action.NAME, "< top");
    528528            }
    529             putValue(Action.SHORT_DESCRIPTION, tr("Copy their selected element to the start of the list of merged elements"));
     529            putValue(Action.SHORT_DESCRIPTION, tr("Copy their selected element to the start of the list of merged elements."));
    530530            setEnabled(false);
    531531        }
     
    550550                putValue(Action.NAME, "< bottom");
    551551            }
    552             putValue(Action.SHORT_DESCRIPTION, tr("Copy their selected elements to the end of the list of merged elements"));
     552            putValue(Action.SHORT_DESCRIPTION, tr("Copy their selected elements to the end of the list of merged elements."));
    553553            setEnabled(false);
    554554        }
     
    572572                putValue(Action.NAME, "< before");
    573573            }
    574             putValue(Action.SHORT_DESCRIPTION, tr("Copy their selected elements before the first selected element in the list of merged elements"));
     574            putValue(Action.SHORT_DESCRIPTION, tr("Copy their selected elements before the first selected element in the list of merged elements."));
    575575            setEnabled(false);
    576576        }
     
    632632                putValue(Action.NAME, tr("Up"));
    633633            }
    634             putValue(Action.SHORT_DESCRIPTION, tr("Move up the selected elements by one position"));
     634            putValue(Action.SHORT_DESCRIPTION, tr("Move up the selected elements by one position."));
    635635            setEnabled(false);
    636636        }
     
    664664                putValue(Action.NAME, tr("Down"));
    665665            }
    666             putValue(Action.SHORT_DESCRIPTION, tr("Move down the selected entries by one position"));
     666            putValue(Action.SHORT_DESCRIPTION, tr("Move down the selected entries by one position."));
    667667            setEnabled(false);
    668668        }
     
    696696                putValue(Action.NAME, tr("Remove"));
    697697            }
    698             putValue(Action.SHORT_DESCRIPTION, tr("Remove the selected entries from the list of merged elements"));
     698            putValue(Action.SHORT_DESCRIPTION, tr("Remove the selected entries from the list of merged elements."));
    699699            setEnabled(false);
    700700        }
     
    726726        public FreezeAction() {
    727727            putValue(Action.NAME, tr("Freeze"));
    728             putValue(Action.SHORT_DESCRIPTION, tr("Freeze the current list of merged elements"));
     728            putValue(Action.SHORT_DESCRIPTION, tr("Freeze the current list of merged elements."));
    729729            putValue(PROP_SELECTED, false);
    730730            setEnabled(true);
     
    759759            if (state == ItemEvent.SELECTED) {
    760760                putValue(Action.NAME, tr("Unfreeze"));
    761                 putValue(Action.SHORT_DESCRIPTION, tr("Unfreeze the list of merged elements and start merging"));
     761                putValue(Action.SHORT_DESCRIPTION, tr("Unfreeze the list of merged elements and start merging."));
    762762                model.setFrozen(true);
    763763            } else if (state == ItemEvent.DESELECTED) {
    764764                putValue(Action.NAME, tr("Freeze"));
    765                 putValue(Action.SHORT_DESCRIPTION, tr("Freeze the current list of merged elements"));
     765                putValue(Action.SHORT_DESCRIPTION, tr("Freeze the current list of merged elements."));
    766766                model.setFrozen(false);
    767767            }
     
    786786        if (newValue) {
    787787            lblFrozenState.setText(
    788                     tr("<html>Click <strong>{0}</strong> to start merging my and their entries</html>",
     788                    tr("<html>Click <strong>{0}</strong> to start merging my and their entries.</html>",
    789789                            freezeAction.getValue(Action.NAME))
    790790            );
    791791        } else {
    792792            lblFrozenState.setText(
    793                     tr("<html>Click <strong>{0}</strong> to finish merging my and their entries</html>",
     793                    tr("<html>Click <strong>{0}</strong> to finish merging my and their entries.</html>",
    794794                            freezeAction.getValue(Action.NAME))
    795795            );
     
    879879        protected void setParticipatingInSynchronizedScrolling(Adjustable adjustable, boolean isParticipating) {
    880880            if (adjustable == null)
    881                 throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "adjustable"));
     881                throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable"));
    882882
    883883            if (! synchronizedAdjustables.contains(adjustable))
    884                 throw new IllegalStateException(tr("adjustable {0} not registered yet. Can't set participation in synchronized adjustment",adjustable));
     884                throw new IllegalStateException(tr("Adjustable {0} not registered yet. Can't set participation in synchronized adjustment.", adjustable));
    885885
    886886            enabledMap.put(adjustable, isParticipating);
     
    897897        protected boolean isParticipatingInSynchronizedScrolling(Adjustable adjustable) throws IllegalStateException {
    898898            if (! synchronizedAdjustables.contains(adjustable))
    899                 throw new IllegalStateException(tr("adjustable {0} not registered yet",adjustable));
     899                throw new IllegalStateException(tr("Adjustable {0} not registered yet.", adjustable));
    900900
    901901            return enabledMap.get(adjustable);
     
    920920        protected void adapt(final JCheckBox view, final Adjustable adjustable) throws IllegalArgumentException, IllegalStateException {
    921921            if (adjustable == null)
    922                 throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "adjustable"));
     922                throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable"));
    923923            if (view == null)
    924                 throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "view"));
     924                throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "view"));
    925925
    926926            if (! synchronizedAdjustables.contains(adjustable)) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModel.java

    r2165 r2181  
    3131    public void populate(Way my, Way their) {
    3232        if (my == null)
    33             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "my"));
     33            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my"));
    3434        if (their == null)
    35             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "their"));
     35            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their"));
    3636        getMergedEntries().clear();
    3737        getMyEntries().clear();
     
    6565    public WayNodesConflictResolverCommand buildResolveCommand(Way my, Way their) {
    6666        if (my == null)
    67             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "my"));
     67            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my"));
    6868        if (their == null)
    69             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "their"));
     69            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their"));
    7070        if (! isFrozen())
    71             throw new IllegalArgumentException(tr("Merged nodes not frozen yet. Can't build resolution command"));
     71            throw new IllegalArgumentException(tr("Merged nodes not frozen yet. Can't build resolution command."));
    7272        return new WayNodesConflictResolverCommand(my, their, getMergedEntries());
    7373    }
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java

    r2039 r2181  
    180180            default:
    181181                // should not happen
    182                 throw new RuntimeException(tr("unexpected column index. Got {0}", column));
     182                throw new RuntimeException(tr("Unexpected column index. Got {0}.", column));
    183183        }
    184184        return this;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java

    r2070 r2181  
    295295    public void decideDeletedStateConflict(MergeDecisionType decision) throws IllegalArgumentException{
    296296        if (decision == null)
    297             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "decision"));
     297            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "decision"));
    298298        this.deletedMergeDecision = decision;
    299299        setChanged();
     
    310310    public void decideVisibleStateConflict(MergeDecisionType decision) throws IllegalArgumentException {
    311311        if (decision == null)
    312             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "decision"));
     312            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "decision"));
    313313        this.visibleMergeDecision = decision;
    314314        setChanged();
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberListMergeModel.java

    r2165 r2181  
    7171    public void populate(Relation my, Relation their) {
    7272        if (my == null)
    73             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "my"));
     73            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my"));
    7474        if (their == null)
    75             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "their"));
     75            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their"));
    7676
    7777        getMergedEntries().clear();
     
    114114    public RelationMemberConflictResolverCommand buildResolveCommand(Relation my, Relation their) {
    115115        if (my == null)
    116             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "my"));
     116            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my"));
    117117        if (their == null)
    118             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "their"));
     118            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their"));
    119119        if (! isFrozen())
    120             throw new IllegalArgumentException(tr("merged nodes not frozen yet. Can't build resolution command"));
     120            throw new IllegalArgumentException(tr("Merged nodes not frozen yet. Can't build resolution command"));
    121121        return new RelationMemberConflictResolverCommand(my, their, getMergedEntries());
    122122    }
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItem.java

    r2165 r2181  
    3131    public TagMergeItem(String key, String myTagValue, String theirTagValue) {
    3232        if (key == null) {
    33             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "key"));
     33            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "key"));
    3434        }
    3535        this.key  = key;
     
    5050     */
    5151    public TagMergeItem(String key, OsmPrimitive my, OsmPrimitive their) {
    52         if (key == null) throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "key"));
    53         if (my == null) throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "my"));
    54         if (their == null) throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "their"));
     52        if (key == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "key"));
     53        if (my == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my"));
     54        if (their == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their"));
    5555        this.key = key;
    5656        myTagValue = my.get(key);
     
    6666     */
    6767    public void decide(MergeDecisionType decision) throws IllegalArgumentException {
    68         if (decision == null) throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "decision"));
     68        if (decision == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "decision"));
    6969        this.mergeDecision = decision;
    7070    }
     
    9696     */
    9797    public void applyToMyPrimitive(OsmPrimitive primitive) throws IllegalArgumentException, IllegalStateException {
    98         if (primitive == null) throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "primitive"));
     98        if (primitive == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive"));
    9999        if (mergeDecision == MergeDecisionType.UNDECIDED) {
    100             throw new IllegalStateException(tr("cannot apply undecided tag merge item"));
     100            throw new IllegalStateException(tr("Cannot apply undecided tag merge item."));
    101101        } else if (mergeDecision == MergeDecisionType.KEEP_THEIR) {
    102102            if (theirTagValue == null) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeTableCellRenderer.java

    r2017 r2181  
    3737        default:
    3838            // should not happen, but just in case
    39             throw new IllegalArgumentException(tr("Parameter 'col' must be 0 or 1. Got {0}", col));
     39            throw new IllegalArgumentException(tr("Parameter 'col' must be 0 or 1. Got {0}.", col));
    4040        }
    4141        return this;
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java

    r2141 r2181  
    4949    public MultiValueResolutionDecision(TagCollection tags) throws IllegalArgumentException {
    5050        if (tags == null)
    51             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "tags"));
     51            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "tags"));
    5252        if (tags.isEmpty())
    53             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be empty", "tags"));
     53            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be empty.", "tags"));
    5454        if (tags.getKeys().size() != 1)
    55             throw new IllegalArgumentException(tr("parameter ''{0}'' with tags for exactly one key expected. Got {1}", "tags", tags.getKeys().size()));
     55            throw new IllegalArgumentException(tr("Parameter ''{0}'' with tags for exactly one key expected. Got {1}.", "tags", tags.getKeys().size()));
    5656        this.tags = tags;
    5757        autoDecide();
     
    9797    public void keepOne(String value) throws IllegalArgumentException, IllegalStateException {
    9898        if (value == null)
    99             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "value"));
     99            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "value"));
    100100        if (!tags.getValues().contains(value))
    101             throw new IllegalStateException(tr("tag collection doesn't include the selected value ''{0}''", value));
     101            throw new IllegalStateException(tr("Tag collection doesn't include the selected value ''{0}''.", value));
    102102        this.value = value;
    103103        this.type = MultiValueDecisionType.KEEP_ONE;
     
    134134    public String getChosenValue() throws IllegalStateException {
    135135        switch(type) {
    136             case UNDECIDED: throw new IllegalStateException(tr("Not decided yet"));
     136            case UNDECIDED: throw new IllegalStateException(tr("Not decided yet."));
    137137            case KEEP_ONE: return value;
    138138            case KEEP_NONE: return null;
     
    211211        if (primitive == null) return;
    212212        if (!isDecided())
    213             throw new IllegalStateException(tr("Not decided yet"));
     213            throw new IllegalStateException(tr("Not decided yet."));
    214214        String key = tags.getKeys().iterator().next();
    215215        String value = getChosenValue();
     
    247247    public Command buildChangeCommand(OsmPrimitive primitive) throws IllegalArgumentException, IllegalStateException {
    248248        if (primitive == null)
    249             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "primitive"));
     249            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive"));
    250250        if (!isDecided())
    251             throw new IllegalStateException(tr("Not decided yet"));
     251            throw new IllegalStateException(tr("Not decided yet."));
    252252        String key = tags.getKeys().iterator().next();
    253253        String value = getChosenValue();
     
    266266    public Command buildChangeCommand(Collection<? extends OsmPrimitive> primitives) {
    267267        if (primitives == null)
    268             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "primitives"));
     268            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitives"));
    269269        if (!isDecided())
    270             throw new IllegalStateException(tr("Not decided yet"));
     270            throw new IllegalStateException(tr("Not decided yet."));
    271271        String key = tags.getKeys().iterator().next();
    272272        String value = getChosenValue();
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java

    r2070 r2181  
    1919    public RelationMemberConflictDecision(Relation relation, int pos) throws IllegalArgumentException {
    2020        if (relation == null)
    21             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "relation"));
     21            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "relation"));
    2222        RelationMember member = relation.getMember(pos);
    2323        if (member == null)
    24             throw new IndexOutOfBoundsException(tr("pos {0} is out of range. current number of members: {1}", pos, relation.getMembersCount()));
     24            throw new IndexOutOfBoundsException(tr("Position {0} is out of range. Current number of members is {1}.", pos, relation.getMembersCount()));
    2525        this.relation = relation;
    2626        this.pos  = pos;
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java

    r2070 r2181  
    8484    public void populate(TagCollection tags) {
    8585        if (tags == null)
    86             throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "tags"));
     86            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "tags"));
    8787        this.tags = tags;
    8888        keys = new ArrayList<String>();
Note: See TracChangeset for help on using the changeset viewer.