Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java	(revision 2847)
@@ -214,5 +214,5 @@
                         tr("Continue resolving")};
                 int ret = JOptionPane.showOptionDialog(Main.parent,
-                        tr("<html>You didn''t finish to merge the differences in this conflict.<br>"
+                        tr("<html>You did not finish to merge the differences in this conflict.<br>"
                                 + "Conflict resolutions won't be applied unless all differences<br>"
                                 + "are resolved."
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 2847)
@@ -50,4 +50,5 @@
 import org.openstreetmap.josm.tools.Shortcut;
 import org.openstreetmap.josm.tools.ImageProvider.OverlayPosition;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 /**
@@ -81,5 +82,5 @@
     static public LayerListDialog getInstance() throws IllegalStateException {
         if (instance == null)
-            throw new IllegalStateException(tr("Dialog not created yet. Invoke createInstance() first"));
+            throw new IllegalStateException("Dialog not created yet. Invoke createInstance() first");
         return instance;
     }
@@ -311,6 +312,5 @@
         public ShowHideLayerAction(Layer layer) throws IllegalArgumentException {
             this();
-            if (layer == null)
-                throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer"));
+            CheckParameterUtil.ensureParameterNotNull(layer, "layer");
             this.layer = layer;
             putValue(NAME, tr("Show/Hide"));
@@ -356,8 +356,7 @@
         private  Layer layer;
 
-        public ActivateLayerAction(Layer layer) throws IllegalArgumentException {
+        public ActivateLayerAction(Layer layer) {
             this();
-            if (layer == null)
-                throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer"));
+            CheckParameterUtil.ensureParameterNotNull(layer, "layer");
             this.layer = layer;
             putValue(NAME, tr("Activate"));
@@ -423,6 +422,5 @@
         public MergeAction(Layer layer) throws IllegalArgumentException {
             this();
-            if (layer == null)
-                throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer"));
+            CheckParameterUtil.ensureParameterNotNull(layer, "layer");
             this.layer = layer;
             putValue(NAME, tr("Merge"));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java	(revision 2847)
@@ -516,5 +516,5 @@
             HelpAwareOptionPane.showOptionDialog(
                     ChangesetCacheManager.this,
-                    tr("<html>JOSM is currently running with an anonymous user. It can't download<br>"
+                    tr("<html>JOSM is currently running with an anonymous user. It cannot download<br>"
                             + "your changesets from the OSM server unless you enter your OSM user name<br>"
                             + "in the JOSM preferences.</html>"
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java	(revision 2847)
@@ -60,7 +60,7 @@
     protected void renderOpen(Changeset cs) {
         if (cs.isOpen()) {
-            setText(trc("changeset.open", "Open"));
+            setText(trc("changeset.state", "Open"));
         } else {
-            setText(trc("changeset.open", "Closed"));
+            setText(trc("changeset.state", "Closed"));
         }
         setToolTipText("");
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java	(revision 2847)
@@ -6,4 +6,5 @@
 import java.awt.Component;
 import java.io.IOException;
+import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -68,5 +69,5 @@
         super(tr("Downloading changeset content"), false /* don't ignore exceptions */);
         if (changesetId <= 0)
-            throw new IllegalArgumentException(tr("Expected integer value > 0 for parameter ''{0}'', got ''{1}''", "changesetId", changesetId));
+            throw new IllegalArgumentException(MessageFormat.format("Expected integer value > 0 for parameter ''{0}'', got ''{1}''", "changesetId", changesetId));
         init(Collections.singleton(changesetId));
     }
@@ -94,5 +95,5 @@
         super(parent, tr("Downloading changeset content"), false /* don't ignore exceptions */);
         if (changesetId <= 0)
-            throw new IllegalArgumentException(tr("Expected integer value > 0 for parameter ''{0}'', got ''{1}''", "changesetId", changesetId));
+            throw new IllegalArgumentException(MessageFormat.format("Expected integer value > 0 for parameter ''{0}'', got ''{1}''", "changesetId", changesetId));
         init(Collections.singleton(changesetId));
     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java	(revision 2847)
@@ -322,5 +322,5 @@
             HelpAwareOptionPane.showOptionDialog(
                     ChangesetContentPanel.this,
-                    trn("<html>The selected object isn''t available in the current<br>"
+                    trn("<html>The selected object is not available in the current<br>"
                             + "edit layer ''{0}''.</html>",
                             "<html>None of the selected objects is available in the current<br>"
@@ -384,5 +384,5 @@
             HelpAwareOptionPane.showOptionDialog(
                     ChangesetContentPanel.this,
-                    trn("<html>The selected object isn''t available in the current<br>"
+                    trn("<html>The selected object is not available in the current<br>"
                             + "edit layer ''{0}''.</html>",
                             "<html>None of the selected objects is available in the current<br>"
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/SingleChangesetDownloadPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/SingleChangesetDownloadPanel.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/SingleChangesetDownloadPanel.java	(revision 2847)
@@ -139,5 +139,5 @@
         public void validate() {
             if (!isValid()) {
-                feedbackInvalid(tr("The current value isn't a valid changeset ID. Please enter an integer value > 0"));
+                feedbackInvalid(tr("The current value is not a valid changeset ID. Please enter an integer value > 0"));
             } else {
                 feedbackValid(tr("Please enter an integer value > 0"));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java	(revision 2847)
@@ -525,5 +525,5 @@
                     query.forUser(im.getUserId());
                 } else
-                    throw new IllegalStateException(tr("Can't restrict changeset query to the current user because the current user is anonymous"));
+                    throw new IllegalStateException(tr("Cannot restrict changeset query to the current user because the current user is anonymous"));
             } else if (rbRestrictToUid.isSelected()) {
                 int uid  = valUid.getUid();
@@ -531,8 +531,8 @@
                     query.forUser(uid);
                 } else
-                    throw new IllegalStateException(tr("Current value ''{0}'' for user ID isn''t valid", tfUid.getText()));
+                    throw new IllegalStateException(tr("Current value ''{0}'' for user ID is not valid", tfUid.getText()));
             } else if (rbRestrictToUserName.isSelected()) {
                 if (! valUserName.isValid())
-                    throw new IllegalStateException(tr("Can''t restrict the changeset query to the user name ''{0}''", tfUserName.getText()));
+                    throw new IllegalStateException(tr("Cannot restrict the changeset query to the user name ''{0}''", tfUserName.getText()));
                 query.forUser(tfUserName.getText());
             }
@@ -835,5 +835,5 @@
         public void fillInQuery(ChangesetQuery query) throws IllegalStateException{
             if (!isValidChangesetQuery())
-                throw new IllegalStateException(tr("Can't build changeset query with time based restrictions. Input isn't valid."));
+                throw new IllegalStateException(tr("Cannot build changeset query with time based restrictions. Input is not valid."));
             if (rbClosedAfter.isSelected()) {
                 GregorianCalendar cal = new GregorianCalendar();
@@ -940,5 +940,5 @@
         public void fillInQuery(ChangesetQuery query) {
             if (!isValidChangesetQuery())
-                throw new IllegalStateException(tr("Can't restrict the changeset query to a specific bounding box. The input is invalid."));
+                throw new IllegalStateException(tr("Cannot restrict the changeset query to a specific bounding box. The input is invalid."));
             query.inBbox(getBoundingBox());
         }
@@ -987,9 +987,9 @@
                 int uid = Integer.parseInt(value);
                 if (uid <= 0) {
-                    feedbackInvalid(tr("The current value isn't a valid user ID. Please enter an integer value > 0"));
+                    feedbackInvalid(tr("The current value is not a valid user ID. Please enter an integer value > 0"));
                     return;
                 }
             } catch(NumberFormatException e) {
-                feedbackInvalid(tr("The current value isn't a valid user ID. Please enter an integer value > 0"));
+                feedbackInvalid(tr("The current value is not a valid user ID. Please enter an integer value > 0"));
                 return;
             }
@@ -1028,5 +1028,5 @@
             String value  = getComponent().getText();
             if (value.trim().length() == 0) {
-                feedbackInvalid(tr("<html>The  current value isn't a valid user name.<br>Please enter an non-empty user name.</html>"));
+                feedbackInvalid(tr("<html>The  current value is not a valid user name.<br>Please enter an non-empty user name.</html>"));
                 return;
             }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 2847)
@@ -3,4 +3,5 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
+import static org.openstreetmap.josm.tools.I18n.trn;
 
 import java.awt.BorderLayout;
@@ -43,4 +44,5 @@
 import org.openstreetmap.josm.io.OsmServerObjectReader;
 import org.openstreetmap.josm.io.OsmTransferException;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.xml.sax.SAXException;
@@ -117,6 +119,5 @@
      */
     public ChildRelationBrowser(OsmDataLayer layer) throws IllegalArgumentException {
-        if (layer == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer"));
+        CheckParameterUtil.ensureParameterNotNull(layer, "layer");
         this.layer = layer;
         model = new RelationTreeModel();
@@ -326,6 +327,8 @@
                 JOptionPane.showMessageDialog(
                         Main.parent,
-                        tr("There were {0} conflicts during import.", conflictsCount),
-                        tr("Conflicts in data"),
+                        trn("There was {0} conflict during import.",
+                                "There were {0} conflicts during import.",
+                                conflictsCount, conflictsCount),
+                        trn("Conflict in data", "Conflicts in data", conflictsCount),
                         JOptionPane.WARNING_MESSAGE
                 );
@@ -342,5 +345,5 @@
             String message = tr("<html>The child relation<br>"
                     + "{0}<br>"
-                    + "is deleted on the server. It can't be loaded",
+                    + "is deleted on the server. It cannot be loaded",
                     r.getDisplayName(DefaultNameFormatter.getInstance())
             );
@@ -479,6 +482,8 @@
                 JOptionPane.showMessageDialog(
                         Main.parent,
-                        tr("There were {0} conflicts during import.", conflictsCount),
-                        tr("Conflicts in data"),
+                        trn("There was {0} conflict during import.",
+                                "There were {0} conflicts during import.",
+                                conflictsCount, conflictsCount),
+                        trn("Conflict in data", "Conflicts in data", conflictsCount),
                         JOptionPane.WARNING_MESSAGE
                 );
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java	(revision 2847)
@@ -19,4 +19,5 @@
 import org.openstreetmap.josm.io.OsmServerObjectReader;
 import org.openstreetmap.josm.io.OsmTransferException;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 import org.xml.sax.SAXException;
 
@@ -43,8 +44,6 @@
     public DownloadRelationTask(Collection<Relation> relations, OsmDataLayer layer) throws IllegalArgumentException{
         super(tr("Download relations"), false /* don't ignore exception */);
-        if (relations == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "relations"));
-        if (layer == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "layer"));
+        CheckParameterUtil.ensureParameterNotNull(relations, "relations");
+        CheckParameterUtil.ensureParameterNotNull(layer, "layer");
         this.relations = relations;
         this.layer = layer;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 2847)
@@ -3,4 +3,5 @@
 import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
 import static org.openstreetmap.josm.tools.I18n.tr;
+import static org.openstreetmap.josm.tools.I18n.trn;
 
 import java.awt.BorderLayout;
@@ -1087,5 +1088,5 @@
                     Main.parent,
                     tr("<html>This relation has been changed outside of the editor.<br>"
-                            + "You can't apply your changes and continue editing.<br>"
+                            + "You cannot apply your changes and continue editing.<br>"
                             + "<br>"
                             + "Do you want to create a conflict and close the editor?</html>"),
@@ -1303,10 +1304,14 @@
 
         protected boolean confirmSettingEmptyRole(int onNumMembers) {
-            String message = tr("<html>You are setting an empty role on {0} primitives.<br>"
-                    + "This is equal to deleting the roles of these primitives.<br>"
-                    + "Do you really want to apply the new role?</html>", onNumMembers);
+            String message = "<html>"
+                + trn("You are setting an empty role on {0} primitive.",
+                        "You are setting an empty role on {0} primitives.", onNumMembers, onNumMembers)
+                        + "<br>"
+                        + tr("This is equal to deleting the roles of these primitives.") +
+                        "<br>"
+                        + tr("Do you really want to apply the new role?") + "</html>";
             String [] options = new String[] {
                     tr("Yes, apply it"),
-                    tr("No, don't apply")
+                    tr("No, do not apply")
             };
             int ret = ConditionalOptionPaneUtil.showOptionDialog(
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java	(revision 2847)
@@ -22,4 +22,5 @@
 import org.openstreetmap.josm.io.OsmServerBackreferenceReader;
 import org.openstreetmap.josm.io.OsmTransferException;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 import org.xml.sax.SAXException;
 
@@ -74,10 +75,6 @@
     public ParentRelationLoadingTask(Relation child, OsmDataLayer layer, boolean full, PleaseWaitProgressMonitor monitor ) {
         super(tr("Download referring relations"), monitor, false /* don't ignore exception */);
-        if (child == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "child"));
-        if (layer == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer"));
-        if (child.isNew())
-            throw new IllegalArgumentException(tr("Value of child.getId() > 0 expected. Got {1}.", child.getId()));
+        CheckParameterUtil.ensureValidPrimitiveId(child, "child");
+        CheckParameterUtil.ensureParameterNotNull(layer, "layer");
         referrers = null;
         this.layer = layer;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java	(revision 2847)
@@ -16,4 +16,5 @@
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 public abstract class RelationEditor extends ExtendedDialog {
@@ -120,6 +121,5 @@
                 false
         );
-        if (layer == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer"));
+        CheckParameterUtil.ensureParameterNotNull(layer, "layer");
         this.layer = layer;
         setRelation(relation);
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java	(revision 2847)
@@ -159,5 +159,5 @@
             } catch(Exception e) {
                 if (cancelled) {
-                    System.out.println(tr("Warning: ignoring exception because task was cancelled. Exception was: " + e.toString()));
+                    System.out.println(tr("Warning: ignoring exception because task was cancelled. Exception was: {0}", e.toString()));
                     return;
                 }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java	(revision 2846)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java	(revision 2847)
@@ -1,6 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.dialogs.relation;
-import static org.openstreetmap.josm.tools.I18n.tr;
-
 import java.util.ArrayList;
 import java.util.Collection;
@@ -16,4 +14,5 @@
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 
 public class SelectionTableModel extends AbstractTableModel implements SelectionChangedListener, MapView.LayerChangeListener{
@@ -30,6 +29,5 @@
      */
     public SelectionTableModel(OsmDataLayer layer) throws IllegalArgumentException {
-        if (layer == null)
-            throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer"));
+        CheckParameterUtil.ensureParameterNotNull(layer, "layer");
         this.layer = layer;
         cache = new ArrayList<OsmPrimitive>();
