Ignore:
Timestamp:
2009-07-24T11:19:32+02:00 (15 years ago)
Author:
stoecker
Message:

fixed exception

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/DeleteCommand.java

    r1814 r1826  
    9090
    9191        String cname = null;
     92        String apiname = null;
    9293        String cnamem = null;
    9394        for (OsmPrimitive osm : toDelete) {
    9495            if (cname == null) {
     96                apiname = OsmPrimitiveType.from(osm).getAPIName();
    9597                cname = OsmPrimitiveType.from(osm).getLocalizedDisplayNameSingular();
    96                 cnamem = OsmPrimitiveType.from(osm).getLocalizedDisplayNameSingular();
     98                cnamem = OsmPrimitiveType.from(osm).getLocalizedDisplayNamePlural();
    9799            } else if (!cname.equals(OsmPrimitiveType.from(osm).getLocalizedDisplayNameSingular())) {
    98                 cname = "object";
     100                apiname = "object";
     101                cname = trn("object", "objects", 1);
    99102                cnamem = trn("object", "objects", 2);
    100103            }
    101104        }
    102105        DefaultMutableTreeNode root = new DefaultMutableTreeNode(new JLabel(tr("Delete {0} {1}", toDelete.size(), trn(
    103                 cname, cnamem, toDelete.size())), ImageProvider.get("data", cname), JLabel.HORIZONTAL));
     106                cname, cnamem, toDelete.size())), ImageProvider.get("data", apiname), JLabel.HORIZONTAL));
    104107        for (OsmPrimitive osm : toDelete) {
    105108            root.add(new DefaultMutableTreeNode(
Note: See TracChangeset for help on using the changeset viewer.