Changeset 1655 in josm


Ignore:
Timestamp:
2009-06-08T17:34:50+02:00 (15 years ago)
Author:
stoecker
Message:

better i18n of new conflict stuff

Location:
trunk/src/org/openstreetmap/josm/gui/conflict
Files:
4 edited

Legend:

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

    r1653 r1655  
    5353    protected ListMergeModel<T> model;
    5454
    55 
    5655    private CopyStartLeftAction copyStartLeftAction;
    5756    private CopyBeforeCurrentLeftAction copyBeforeCurrentLeftAction;
     
    880879        protected void setParticipatingInSynchronizedScrolling(Adjustable adjustable, boolean isParticipating) {
    881880            if (adjustable == null)
    882                 throw new IllegalArgumentException(tr("argument \"adjustable\" must not be null"));
     881                throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "adjustable"));
    883882
    884883            if (! synchronizedAdjustables.contains(adjustable))
     
    921920        protected void adapt(final JCheckBox view, final Adjustable adjustable) throws IllegalArgumentException, IllegalStateException {
    922921            if (adjustable == null)
    923                 throw new IllegalArgumentException(tr("argument \"adjustable\" must not be null"));
     922                throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "adjustable"));
    924923            if (view == null)
    925                 throw new IllegalArgumentException(tr("argument \"view\" must not be null"));
     924                throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "view"));
    926925
    927926            if (! synchronizedAdjustables.contains(adjustable)) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModel.java

    r1650 r1655  
    3131    public void populate(Way my, Way their) {
    3232        if (my == null)
    33             throw new IllegalArgumentException(tr("parameter \"way\" must not be null"));
     33            throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "my"));
    3434        if (their == null)
    35             throw new IllegalArgumentException(tr("parameter \"their\" must not be null"));
     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 \"my\" most not be null"));
     67            throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "my"));
    6868        if (their == null)
    69             throw new IllegalArgumentException(tr("parameter \"my\" most not be null"));
     69            throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "their"));
    7070        if (! isFrozen())
    7171            throw new IllegalArgumentException(tr("Merged nodes not frozen yet. Can't build resolution command"));
  • trunk/src/org/openstreetmap/josm/gui/conflict/relation/RelationMemberListMergeModel.java

    r1650 r1655  
    7272    public void populate(Relation my, Relation their) {
    7373        if (my == null)
    74             throw new IllegalArgumentException(tr("parameter way must not be null"));
     74            throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "my"));
    7575        if (their == null)
    76             throw new IllegalArgumentException(tr("parameter their must not be null"));
     76            throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "their"));
    7777
    7878        getMergedEntries().clear();
     
    118118    public RelationMemberConflictResolverCommand buildResolveCommand(Relation my, Relation their) {
    119119        if (my == null)
    120             throw new IllegalArgumentException(tr("parameter my most not be null"));
     120            throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "my"));
    121121        if (their == null)
    122             throw new IllegalArgumentException(tr("parameter my most not be null"));
     122            throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "their"));
    123123        if (! isFrozen())
    124124            throw new IllegalArgumentException(tr("merged nodes not frozen yet. Can't build resolution command"));
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagMergeItem.java

    r1654 r1655  
    1010
    1111/**
    12  * TagMergeItem represents an individual merge action for a specific pair of key/value. 
    13  * 
     12 * TagMergeItem represents an individual merge action for a specific pair of key/value.
     13 *
    1414 * A TagMergeItem manages the values of the two key/value-pairs and keeps track of the applied
    15  * merge decision. 
     15 * merge decision.
    1616 *
    1717 */
    1818public class TagMergeItem {
    19    
     19
    2020    private String key = null;
    2121    private String myTagValue = null;
    2222    private String theirTagValue = null;
    2323    private MergeDecisionType mergeDecision = MergeDecisionType.UNDECIDED;
    24    
    25    
     24
    2625    /**
    2726     * constructor
    28      * 
     27     *
    2928     * @param key  the common tag key. Must not be null.
    30      * @param myTagValue  the value for this key known in the local dataset 
    31      * @param theirTagValue  the value for this key known in the dataset on the server 
     29     * @param myTagValue  the value for this key known in the local dataset
     30     * @param theirTagValue  the value for this key known in the dataset on the server
    3231     * @throws IllegalArgumentException if key is null
    3332     */
    3433    public TagMergeItem(String key, String myTagValue, String theirTagValue) {
    3534        if (key == null) {
    36             throw new IllegalArgumentException(tr("parameter 'key' must not be null"));
     35            throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "key"));
    3736        }
    3837        this.key  = key;
     
    4140        this.mergeDecision = MergeDecisionType.UNDECIDED;
    4241    }
    43    
     42
    4443    /**
    4544     * constructor
    46      * 
     45     *
    4746     * @param key  the tag key common to the merged OSM primitives. Must not be null.
    48      * @param my  my version of the OSM primitive (i.e. the version known in the local dataset). Must not be null. 
     47     * @param my  my version of the OSM primitive (i.e. the version known in the local dataset). Must not be null.
    4948     * @param their their version of the OSM primitive (i.e. the version known on the server). Must not be null.
    5049     * @throws IllegalArgumentException thrown if key is null
     
    5352     */
    5453    public TagMergeItem(String key, OsmPrimitive my, OsmPrimitive their) {
    55         if (key == null) throw new IllegalArgumentException(tr("parameter 'key' must not be null"));
    56         if (my == null) throw new IllegalArgumentException(tr("parameter 'my' must not be null"));
    57         if (their == null) throw new IllegalArgumentException(tr("parameter 'their' must not be null"));
     54        if (key == null) throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "key"));
     55        if (my == null) throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "my"));
     56        if (their == null) throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "their"));
    5857        this.key = key;
    5958        myTagValue = null;
    6059        if (my.keys != null && my.keys.containsKey(key)) {
    6160            myTagValue = my.keys.get(key);
    62         } 
     61        }
    6362        theirTagValue = null;
    6463        if (their.keys != null && their.keys.containsKey(key)) {
     
    6665        }
    6766    }
    68    
    69    
     67
    7068    /**
    71      * applies a merge decision to this merge item 
    72      * 
     69     * applies a merge decision to this merge item
     70     *
    7371     * @param decision the merge decision. Must not be null.
    7472     * @exception IllegalArgumentException thrown if decision is null
    75      * 
     73     *
    7674     */
    7775    public void decide(MergeDecisionType decision) throws IllegalArgumentException {
    78         if (decision == null) throw new IllegalArgumentException(tr("argument 'decision' must not be null"));
     76        if (decision == null) throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "decision"));
    7977        this.mergeDecision = decision;
    8078    }
     
    9593        return mergeDecision;
    9694    }
    97    
     95
    9896    /**
    9997     * applies the current merge decisions to the tag set of an OSM primitive. The
    10098     * OSM primitive has the role of primitive in the local dataset ('my' primitive,
    101      * not 'their' primitive) 
    102      * 
     99     * not 'their' primitive)
     100     *
    103101     * @param primitive the OSM primitive. Must not be null.
    104102     * @exception IllegalArgumentException thrown, if primitive is null
     
    106104     */
    107105    public void applyToMyPrimitive(OsmPrimitive primitive) throws IllegalArgumentException, IllegalStateException {
    108         if (primitive == null) throw new IllegalArgumentException(tr("parameter 'primitive' must not be null"));
     106        if (primitive == null) throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "primitive"));
    109107        if (mergeDecision == MergeDecisionType.UNDECIDED) {
    110108            throw new IllegalStateException(tr("cannot apply undecided tag merge item"));
     
    126124                }
    127125                primitive.keys.put(key, myTagValue);
    128             } 
     126            }
    129127        } else {
    130128           // should not happen
    131129        }
    132130    }
    133    
    134131}
Note: See TracChangeset for help on using the changeset viewer.