Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java	(revision 2845)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java	(revision 2846)
@@ -3,4 +3,5 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
+import static org.openstreetmap.josm.tools.I18n.trn;
 
 import java.awt.BorderLayout;
@@ -166,6 +167,6 @@
                 tabbedPane.setIconAt(1, mergeComplete);
             } else {
-                tabbedPane.setTitleAt(1, tr("Tags({0} conflicts)", newValue));
-                tabbedPane.setToolTipTextAt(1, tr("{0} pending tag conflicts to be resolved"));
+                tabbedPane.setTitleAt(1, trn("Tags({0} conflict)", "Tags({0} conflicts)", newValue, newValue));
+                tabbedPane.setToolTipTextAt(1, trn("{0} pending tag conflict to be resolved", "{0} pending tag conflicts to be resolved", newValue, newValue));
                 tabbedPane.setIconAt(1, mergeIncomplete);
             }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java	(revision 2845)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java	(revision 2846)
@@ -12,4 +12,5 @@
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
+import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -320,5 +321,5 @@
         ArrayList<T> mergedEntries = getMergedEntries();
         if (current < 0 || current >= mergedEntries.size())
-            throw new IllegalArgumentException(tr("Parameter current out of range. Got {0}.", current));
+            throw new IllegalArgumentException(MessageFormat.format("Parameter current out of range. Got {0}.", current));
         for (int i=rows.length -1; i>=0; i--) {
             int row = rows[i];
@@ -372,5 +373,5 @@
 
         if (current < 0 || current >= mergedEntries.size())
-            throw new IllegalArgumentException(tr("Parameter current out of range. Got {0}.", current));
+            throw new IllegalArgumentException(MessageFormat.format("Parameter current out of range. Got {0}.", current));
         if (current == mergedEntries.size() -1) {
             copyToEnd(source, rows);
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java	(revision 2845)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java	(revision 2846)
@@ -35,4 +35,5 @@
 import javax.swing.event.ListSelectionListener;
 
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 import org.openstreetmap.josm.tools.ImageProvider;
 
@@ -866,9 +867,7 @@
          */
         protected void setParticipatingInSynchronizedScrolling(Adjustable adjustable, boolean isParticipating) {
-            if (adjustable == null)
-                throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable"));
-
+            CheckParameterUtil.ensureParameterNotNull(adjustable, "adjustable");
             if (! synchronizedAdjustables.contains(adjustable))
-                throw new IllegalStateException(tr("Adjustable {0} not registered yet. Can't set participation in synchronized adjustment.", adjustable));
+                throw new IllegalStateException(tr("Adjustable {0} not registered yet. Cannot set participation in synchronized adjustment.", adjustable));
 
             enabledMap.put(adjustable, isParticipating);
@@ -906,9 +905,7 @@
          * @exception IllegalArgumentException thrown, if adjustable is null
          */
-        protected void adapt(final JCheckBox view, final Adjustable adjustable) throws IllegalArgumentException, IllegalStateException {
-            if (adjustable == null)
-                throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable"));
-            if (view == null)
-                throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "view"));
+        protected void adapt(final JCheckBox view, final Adjustable adjustable) throws IllegalStateException {
+            CheckParameterUtil.ensureParameterNotNull(adjustable, "adjustable");
+            CheckParameterUtil.ensureParameterNotNull(view, "view");
 
             if (! synchronizedAdjustables.contains(adjustable)) {
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModel.java	(revision 2845)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModel.java	(revision 2846)
@@ -14,4 +14,5 @@
 import org.openstreetmap.josm.gui.conflict.pair.ListMergeModel;
 import org.openstreetmap.josm.gui.conflict.pair.ListRole;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 public class NodeListMergeModel extends ListMergeModel<Node>{
@@ -29,8 +30,6 @@
      */
     public void populate(Way my, Way their) {
-        if (my == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my"));
-        if (their == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their"));
+        CheckParameterUtil.ensureParameterNotNull(my, "my");
+        CheckParameterUtil.ensureParameterNotNull(their, "their");
         getMergedEntries().clear();
         getMyEntries().clear();
@@ -63,10 +62,8 @@
      */
     public WayNodesConflictResolverCommand buildResolveCommand(Way my, Way their) {
-        if (my == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my"));
-        if (their == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their"));
+        CheckParameterUtil.ensureParameterNotNull(my, "my");
+        CheckParameterUtil.ensureParameterNotNull(their, "their");
         if (! isFrozen())
-            throw new IllegalArgumentException(tr("Merged nodes not frozen yet. Can't build resolution command."));
+            throw new IllegalArgumentException(tr("Merged nodes not frozen yet. Cannot build resolution command."));
         return new WayNodesConflictResolverCommand(my, their, getMergedEntries());
     }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java	(revision 2845)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java	(revision 2846)
@@ -6,4 +6,5 @@
 import java.awt.Color;
 import java.awt.Component;
+import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -178,5 +179,5 @@
             default:
                 // should not happen
-                throw new RuntimeException(tr("Unexpected column index. Got {0}.", column));
+                throw new RuntimeException(MessageFormat.format("Unexpected column index. Got {0}.", column));
         }
         return this;
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java	(revision 2845)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java	(revision 2846)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType.UNDECIDED;
 import static org.openstreetmap.josm.tools.I18n.tr;
+import static org.openstreetmap.josm.tools.I18n.trn;
 
 import java.beans.PropertyChangeListener;
@@ -31,4 +32,5 @@
 import org.openstreetmap.josm.io.MultiFetchServerObjectReader;
 import org.openstreetmap.josm.io.OsmTransferException;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 /**
@@ -292,6 +294,5 @@
      */
     public void decideDeletedStateConflict(MergeDecisionType decision) throws IllegalArgumentException{
-        if (decision == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "decision"));
+        CheckParameterUtil.ensureParameterNotNull(decision, "decision");
         this.deletedMergeDecision = decision;
         setChanged();
@@ -307,6 +308,5 @@
      */
     public void decideVisibleStateConflict(MergeDecisionType decision) throws IllegalArgumentException {
-        if (decision == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "decision"));
+        CheckParameterUtil.ensureParameterNotNull(decision, "decision");
         this.visibleMergeDecision = decision;
         setChanged();
@@ -468,15 +468,20 @@
         int ret = JOptionPane.showOptionDialog(
                 Main.parent,
-                tr("<html>There are {0} additional nodes used by way {1}<br>"
-                        + "which are deleted on the server.<br>"
-                        + "<br>"
-                        + "Do you want to undelete these nodes too?</html>",
-                        Long.toString(dependent.size()), Long.toString(way.getId())),
-                        tr("Undelete additional nodes?"),
-                        JOptionPane.YES_NO_OPTION,
-                        JOptionPane.QUESTION_MESSAGE,
-                        null,
-                        options,
-                        options[0]
+                "<html>" + trn("There is {0} additional node used by way {1}<br>"
+                        + "which is deleted on the server."
+                        + "<br><br>"
+                        + "Do you want to undelete this node too?",
+                        "There are {0} additional nodes used by way {1}<br>"
+                        + "which are deleted on the server."
+                        + "<br><br>"
+                        + "Do you want to undelete these nodes too?",
+                        dependent.size(), dependent.size(), way.getId())
+                        + "</html>",
+                tr("Undelete additional nodes?"),
+                JOptionPane.YES_NO_OPTION,
+                JOptionPane.QUESTION_MESSAGE,
+                null,
+                options,
+                options[0]
         );
 
@@ -497,15 +502,20 @@
         int ret = JOptionPane.showOptionDialog(
                 Main.parent,
-                tr("<html>There are {0} additional primitives referred to by relation {1}<br>"
-                        + "which are deleted on the server.<br>"
-                        + "<br>"
-                        + "Do you want to undelete them too?</html>",
-                        Long.toString(dependent.size()), Long.toString(r.getId())),
-                        tr("Undelete dependent primitives?"),
-                        JOptionPane.YES_NO_OPTION,
-                        JOptionPane.QUESTION_MESSAGE,
-                        null,
-                        options,
-                        options[0]
+                "<html>" + trn("There is {0} additional primitive referred to by relation {1}<br>"
+                        + "which is deleted on the server."
+                        + "<br><br>"
+                        + "Do you want to undelete this too?",
+                        "There are {0} additional primitives referred to by relation {1}<br>"
+                        + "which are deleted on the server."
+                        + "<br><br>"
+                        + "Do you want to undelete these too?",
+                        dependent.size(), dependent.size(), r.getId())
+                        + "</html>",
+                tr("Undelete dependent primitives?"),
+                JOptionPane.YES_NO_OPTION,
+                JOptionPane.QUESTION_MESSAGE,
+                null,
+                options,
+                options[0]
         );
 
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberListMergeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberListMergeModel.java	(revision 2845)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberListMergeModel.java	(revision 2846)
@@ -14,4 +14,5 @@
 import org.openstreetmap.josm.gui.conflict.pair.ListMergeModel;
 import org.openstreetmap.josm.gui.conflict.pair.ListRole;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 /**
  * The model for merging two lists of relation members
@@ -64,8 +65,6 @@
      */
     public void populate(Relation my, Relation their) {
-        if (my == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my"));
-        if (their == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their"));
+        CheckParameterUtil.ensureParameterNotNull(my, "my");
+        CheckParameterUtil.ensureParameterNotNull(their, "their");
 
         getMergedEntries().clear();
@@ -107,10 +106,8 @@
      */
     public RelationMemberConflictResolverCommand buildResolveCommand(Relation my, Relation their) {
-        if (my == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my"));
-        if (their == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their"));
+        CheckParameterUtil.ensureParameterNotNull(my, "my");
+        CheckParameterUtil.ensureParameterNotNull(their, "their");
         if (! isFrozen())
-            throw new IllegalArgumentException(tr("Merged nodes not frozen yet. Can't build resolution command"));
+            throw new IllegalArgumentException(tr("Merged nodes not frozen yet. Cannot build resolution command"));
         ArrayList<RelationMember> entries = getMergedEntries();
         return new RelationMemberConflictResolverCommand(my, their, entries);
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItem.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItem.java	(revision 2845)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItem.java	(revision 2846)
@@ -6,4 +6,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 /**
@@ -30,7 +31,5 @@
      */
     public TagMergeItem(String key, String myTagValue, String theirTagValue) {
-        if (key == null) {
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "key"));
-        }
+        CheckParameterUtil.ensureParameterNotNull(key, "key");
         this.key  = key;
         this.myTagValue = myTagValue;
@@ -50,7 +49,7 @@
      */
     public TagMergeItem(String key, OsmPrimitive my, OsmPrimitive their) {
-        if (key == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "key"));
-        if (my == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my"));
-        if (their == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their"));
+        CheckParameterUtil.ensureParameterNotNull(key, "key");
+        CheckParameterUtil.ensureParameterNotNull(my, "my");
+        CheckParameterUtil.ensureParameterNotNull(their, "their");
         this.key = key;
         myTagValue = my.get(key);
@@ -66,5 +65,5 @@
      */
     public void decide(MergeDecisionType decision) throws IllegalArgumentException {
-        if (decision == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "decision"));
+        CheckParameterUtil.ensureParameterNotNull(decision, "decision");
         this.mergeDecision = decision;
     }
@@ -96,5 +95,5 @@
      */
     public void applyToMyPrimitive(OsmPrimitive primitive) throws IllegalArgumentException, IllegalStateException {
-        if (primitive == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive"));
+        CheckParameterUtil.ensureParameterNotNull(primitive, "primitive");
         if (mergeDecision == MergeDecisionType.UNDECIDED) {
             throw new IllegalStateException(tr("Cannot apply undecided tag merge item."));
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeTableCellRenderer.java	(revision 2845)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeTableCellRenderer.java	(revision 2846)
@@ -6,4 +6,5 @@
 import java.awt.Color;
 import java.awt.Component;
+import java.text.MessageFormat;
 
 import javax.swing.JLabel;
@@ -37,5 +38,5 @@
         default:
             // should not happen, but just in case
-            throw new IllegalArgumentException(tr("Parameter 'col' must be 0 or 1. Got {0}.", col));
+            throw new IllegalArgumentException(MessageFormat.format("Parameter 'col' must be 0 or 1. Got {0}.", col));
         }
         return this;
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java	(revision 2845)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java	(revision 2846)
@@ -253,5 +253,5 @@
                 putValue(Action.NAME, "");
             } else {
-                putValue(Action.NAME, tr(">"));
+                putValue(Action.NAME, ">");
             }
             putValue(Action.SHORT_DESCRIPTION, tr("Keep the selected key/value pairs from the local dataset"));
@@ -282,5 +282,5 @@
                 putValue(Action.NAME, "");
             } else {
-                putValue(Action.NAME, tr(">"));
+                putValue(Action.NAME, ">");
             }
             putValue(Action.SHORT_DESCRIPTION, tr("Keep the selected key/value pairs from the server dataset"));
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java	(revision 2845)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java	(revision 2846)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -15,4 +16,5 @@
 import org.openstreetmap.josm.data.osm.Tag;
 import org.openstreetmap.josm.data.osm.TagCollection;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 /**
  * Represents a decision for a conflict due to multiple possible value for a tag.
@@ -48,10 +50,9 @@
      */
     public MultiValueResolutionDecision(TagCollection tags) throws IllegalArgumentException {
-        if (tags == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "tags"));
+        CheckParameterUtil.ensureParameterNotNull(tags, "tags");
         if (tags.isEmpty())
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be empty.", "tags"));
+            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' must not be empty.", "tags"));
         if (tags.getKeys().size() != 1)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' with tags for exactly one key expected. Got {1}.", "tags", tags.getKeys().size()));
+            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' with tags for exactly one key expected. Got {1}.", "tags", tags.getKeys().size()));
         this.tags = tags;
         autoDecide();
@@ -96,8 +97,7 @@
      */
     public void keepOne(String value) throws IllegalArgumentException, IllegalStateException {
-        if (value == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "value"));
+        CheckParameterUtil.ensureParameterNotNull(value, "value");
         if (!tags.getValues().contains(value))
-            throw new IllegalStateException(tr("Tag collection doesn't include the selected value ''{0}''.", value));
+            throw new IllegalStateException(tr("Tag collection does not include the selected value ''{0}''.", value));
         this.value = value;
         this.type = MultiValueDecisionType.KEEP_ONE;
@@ -246,6 +246,5 @@
      */
     public Command buildChangeCommand(OsmPrimitive primitive) throws IllegalArgumentException, IllegalStateException {
-        if (primitive == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive"));
+        CheckParameterUtil.ensureParameterNotNull(primitive, "primitive");
         if (!isDecided())
             throw new IllegalStateException(tr("Not decided yet."));
@@ -265,6 +264,5 @@
      */
     public Command buildChangeCommand(Collection<? extends OsmPrimitive> primitives) {
-        if (primitives == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitives"));
+        CheckParameterUtil.ensureParameterNotNull(primitives, "primitives");
         if (!isDecided())
             throw new IllegalStateException(tr("Not decided yet."));
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java	(revision 2845)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java	(revision 2846)
@@ -5,4 +5,5 @@
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.RelationMember;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 import static org.openstreetmap.josm.tools.I18n.tr;
@@ -18,6 +19,5 @@
 
     public RelationMemberConflictDecision(Relation relation, int pos) throws IllegalArgumentException {
-        if (relation == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "relation"));
+        CheckParameterUtil.ensureParameterNotNull(relation, "relation");
         RelationMember member = relation.getMember(pos);
         if (member == null)
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java	(revision 2845)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java	(revision 2846)
@@ -17,4 +17,5 @@
 
 import org.openstreetmap.josm.data.osm.TagCollection;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 public class TagConflictResolverModel extends DefaultTableModel {
@@ -121,6 +122,5 @@
      */
     public void populate(TagCollection tags, Set<String> keysWithConflicts) {
-        if (tags == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "tags"));
+        CheckParameterUtil.ensureParameterNotNull(tags, "tags");
         this.tags = tags;
         displayedKeys = new ArrayList<String>();
