Changeset 2844 in josm
- Timestamp:
- 2010-01-13T19:47:32+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/command
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java
r2405 r2844 2 2 package org.openstreetmap.josm.command; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr ;4 import static org.openstreetmap.josm.tools.I18n.trn; 5 5 6 6 import java.util.ArrayList; … … 47 47 public MutableTreeNode description() { 48 48 return new DefaultMutableTreeNode( 49 new JLabel(tr ("Added {0} objects", data.size()), null,49 new JLabel(trn("Added {0} object", "Added {0} objects", data.size(), data.size()), null, 50 50 JLabel.HORIZONTAL 51 51 ) -
trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
r2025 r2844 115 115 } else { 116 116 text = value == null 117 ? tr("Remove \"{0}\" for {1} {2}", key, objects.size(), trn("object","objects",objects.size()))118 : tr("Set {0}={1} for {2} {3}",key,value, objects.size(), trn("object","objects",objects.size()));117 ? tr("Remove \"{0}\" for {1} objects", key, objects.size()) 118 : tr("Set {0}={1} for {2} objects", key, value, objects.size()); 119 119 } 120 120 DefaultMutableTreeNode root = new DefaultMutableTreeNode(new JLabel(text, ImageProvider.get("data", "key"), JLabel.HORIZONTAL)); -
trunk/src/org/openstreetmap/josm/command/Command.java
r2683 r2844 21 21 import org.openstreetmap.josm.gui.layer.Layer; 22 22 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 23 import org.openstreetmap.josm.tools.CheckParameterUtil; 23 24 24 25 /** … … 63 64 */ 64 65 public Command(OsmDataLayer layer) throws IllegalArgumentException { 65 if (layer == null) 66 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "layer")); 66 CheckParameterUtil.ensureParameterNotNull(layer, "layer"); 67 67 this.layer = layer; 68 68 } -
trunk/src/org/openstreetmap/josm/command/ConflictAddCommand.java
r2512 r2844 32 32 tr("<html>Layer ''{0}'' already has a conflict for primitive<br>" 33 33 + "''{1}''.<br>" 34 + "This conflict can 't be added.</html>",34 + "This conflict cannot be added.</html>", 35 35 getLayer().getName(), 36 36 conflict.getMy().getDisplayName(DefaultNameFormatter.getInstance()) … … 52 52 @Override public void undoCommand() { 53 53 if (! Main.map.mapView.hasLayer(getLayer())) { 54 System.out.println(tr("Warning: Layer ''{0}'' does n't exist any more. Can't remove conflict for primitive ''{1}''.",54 System.out.println(tr("Warning: Layer ''{0}'' does not exist any more. Cannot remove conflict for primitive ''{1}''.", 55 55 getLayer().getName(), 56 56 conflict.getMy().getDisplayName(DefaultNameFormatter.getInstance()) -
trunk/src/org/openstreetmap/josm/command/ConflictResolveCommand.java
r2512 r2844 65 65 66 66 if (! Main.map.mapView.hasLayer(getLayer())) { 67 logger.warning(tr("Can ''t undo command ''{0}'' because layer ''{1}'' is not present any more",67 logger.warning(tr("Cannot undo command ''{0}'' because layer ''{1}'' is not present any more", 68 68 this.toString(), 69 69 getLayer().toString() -
trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
r2769 r2844 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 import static org.openstreetmap.josm.tools.I18n.trn; 6 import static org.openstreetmap.josm.tools.I18n.marktr; 6 7 7 8 import java.awt.GridBagLayout; … … 35 36 import org.openstreetmap.josm.gui.actionsupport.DeleteFromRelationConfirmationDialog; 36 37 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 38 import org.openstreetmap.josm.tools.CheckParameterUtil; 37 39 import org.openstreetmap.josm.tools.ImageProvider; 38 40 … … 55 57 public DeleteCommand(Collection<? extends OsmPrimitive> data) throws IllegalArgumentException { 56 58 if (data == null) 57 throw new IllegalArgumentException( tr("Parameter ''{0}'' must not be empty"));59 throw new IllegalArgumentException("Parameter 'data' must not be empty"); 58 60 if (data.isEmpty()) 59 61 throw new IllegalArgumentException(tr("At least one object to delete required, got empty collection")); … … 68 70 */ 69 71 public DeleteCommand(OsmPrimitive data) throws IllegalArgumentException { 70 if (data == null) 71 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "data")); 72 CheckParameterUtil.ensureParameterNotNull(data, "data"); 72 73 this.toDelete = Collections.singleton(data); 73 74 } … … 84 85 public DeleteCommand(OsmDataLayer layer, OsmPrimitive data) throws IllegalArgumentException { 85 86 super(layer); 86 if (data == null) 87 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "data")); 87 CheckParameterUtil.ensureParameterNotNull(data, "data"); 88 88 this.toDelete = Collections.singleton(data); 89 89 } … … 101 101 super(layer); 102 102 if (data == null) 103 throw new IllegalArgumentException( tr("Parameter ''{0}'' must not be empty"));103 throw new IllegalArgumentException("Parameter 'data' must not be empty"); 104 104 if (data.isEmpty()) 105 105 throw new IllegalArgumentException(tr("At least one object to delete required, got empty collection")); … … 159 159 String msg = ""; 160 160 switch(OsmPrimitiveType.from(primitive)) { 161 case NODE: msg = "Delete node {0}"; break;162 case WAY: msg = "Delete way {0}"; break;163 case RELATION:msg = "Delete relation {0}"; break;161 case NODE: msg = marktr("Delete node {0}"); break; 162 case WAY: msg = marktr("Delete way {0}"); break; 163 case RELATION:msg = marktr("Delete relation {0}"); break; 164 164 } 165 165 … … 213 213 */ 214 214 public static Command deleteWithReferences(OsmDataLayer layer, Collection<? extends OsmPrimitive> selection, boolean silent) throws IllegalArgumentException { 215 if (layer == null) 216 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "layer")); 215 CheckParameterUtil.ensureParameterNotNull(layer, "layer"); 217 216 if (selection == null || selection.isEmpty()) return null; 218 217 Set<OsmPrimitive> parents = OsmPrimitive.getReferrer(selection); … … 436 435 tr("You are about to delete nodes outside of the area you have downloaded." 437 436 + "<br>" 438 + "This can cause problems because other objects (that you do n't see) might use them."437 + "This can cause problems because other objects (that you do not see) might use them." 439 438 + "<br>" + "Do you really want to delete?") + "</html>")); 440 439 return ConditionalOptionPaneUtil.showConfirmationDialog( -
trunk/src/org/openstreetmap/josm/command/ModifiedConflictResolveCommand.java
r2624 r2844 39 39 String msg = ""; 40 40 switch(OsmPrimitiveType.from(conflict.getMy())) { 41 case NODE: msg = marktr("Set the ' modified' flag for node {0}"); break;42 case WAY: msg = marktr("Set the ' modified' flag for way {0}"); break;43 case RELATION: msg = marktr("Set the ' modified' flag for relation {0}"); break;41 case NODE: msg = marktr("Set the ''modified'' flag for node {0}"); break; 42 case WAY: msg = marktr("Set the ''modified'' flag for way {0}"); break; 43 case RELATION: msg = marktr("Set the ''modified'' flag for relation {0}"); break; 44 44 } 45 45 return new DefaultMutableTreeNode( -
trunk/src/org/openstreetmap/josm/command/PurgePrimitivesCommand.java
r2565 r2844 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.tools.I18n.trn; 5 6 6 7 import java.util.Collection; … … 109 110 110 111 DefaultMutableTreeNode root = new DefaultMutableTreeNode( 111 tr ("Purged {0} objects", primitives.size())112 trn("Purged {0} object", "Purged {0} objects", primitives.size(), primitives.size()) 112 113 ); 113 114 for (OsmPrimitive p : primitives) { … … 201 202 public void undoCommand() { 202 203 if (! Main.map.mapView.hasLayer(getLayer())) { 203 logger.warning(tr("Can ''t undo command ''{0}'' because layer ''{1}'' is not present any more",204 logger.warning(tr("Cannot undo command ''{0}'' because layer ''{1}'' is not present any more", 204 205 this.toString(), 205 206 getLayer().toString() -
trunk/src/org/openstreetmap/josm/command/RelationMemberConflictResolverCommand.java
r2569 r2844 87 87 public void undoCommand() { 88 88 if (! Main.map.mapView.hasLayer(layer)) { 89 logger.warning(tr("Can ''t undo command ''{0}'' because layer ''{1}'' is not present any more",89 logger.warning(tr("Cannot undo command ''{0}'' because layer ''{1}'' is not present any more", 90 90 this.toString(), 91 91 layer.toString() -
trunk/src/org/openstreetmap/josm/command/UndeletePrimitivesCommand.java
r2512 r2844 2 2 package org.openstreetmap.josm.command; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr ;4 import static org.openstreetmap.josm.tools.I18n.trn; 5 5 6 6 import java.util.ArrayList; … … 59 59 return new DefaultMutableTreeNode( 60 60 new JLabel( 61 tr ("Undelete {0} primitives", toUndelete.size()),61 trn("Undelete {0} primitive", "Undelete {0} primitives", toUndelete.size(), toUndelete.size()), 62 62 ImageProvider.get("data", "object"), 63 63 JLabel.HORIZONTAL -
trunk/src/org/openstreetmap/josm/command/VersionConflictResolveCommand.java
r2512 r2844 39 39 String msg = ""; 40 40 switch(OsmPrimitiveType.from(conflict.getMy())) { 41 case NODE: msg = marktr("Resolve version conflict sfor node {0}"); break;42 case WAY: msg = marktr("Resolve version conflict sfor way {0}"); break;43 case RELATION: msg = marktr("Resolve version conflict sfor relation {0}"); break;41 case NODE: msg = marktr("Resolve version conflict for node {0}"); break; 42 case WAY: msg = marktr("Resolve version conflict for way {0}"); break; 43 case RELATION: msg = marktr("Resolve version conflict for relation {0}"); break; 44 44 } 45 45 return new DefaultMutableTreeNode(
Note:
See TracChangeset
for help on using the changeset viewer.