Ignore:
Timestamp:
2006-07-03T00:31:24+02:00 (18 years ago)
Author:
imi
Message:
  • started i18n
  • started "download incomplete ways" action
  • added straight line selection mode
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java

    r101 r104  
    11package org.openstreetmap.josm.actions.mapmode;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.awt.event.ActionEvent;
     
    5153         */
    5254        public DeleteAction(MapFrame mapFrame) {
    53                 super("Delete",
     55                super(tr("Delete"),
    5456                                "delete",
    55                                 "Delete nodes, streets or segments.",
     57                                tr("Delete nodes, streets or segments."),
    5658                                "D",
    5759                                KeyEvent.VK_D,
     
    146148                                        String reason = deleteNodeAndJoinSegment((Node)osm);
    147149                                        if (reason != null && msgBox) {
    148                                                 JOptionPane.showMessageDialog(Main.parent, "Cannot delete node. "+reason);
     150                                                JOptionPane.showMessageDialog(Main.parent,tr("Cannot delete node.")+" "+reason);
    149151                                                return;
    150152                                        }
    151153                                } else if (msgBox) {
    152                                         JOptionPane.showMessageDialog(Main.parent, "This object is in use.");
     154                                        JOptionPane.showMessageDialog(Main.parent, tr("This object is in use."));
    153155                                        return;
    154156                                }
     
    167169                        if (!s.deleted && (s.from == n || s.to == n)) {
    168170                                if (segs.size() > 1)
    169                                         return "Used by more than two segments.";
     171                                        return tr("Used by more than two segments.");
    170172                                segs.add(s);
    171173                        }
    172174                }
    173175                if (segs.size() != 2)
    174                         return "Used by only one segment.";
     176                        return tr("Used by only one segment.");
    175177                Segment seg1 = segs.get(0);
    176178                Segment seg2 = segs.get(1);
     
    182184                for (Way w : Main.ds.ways)
    183185                        if (!w.deleted && (w.segments.contains(seg1) || w.segments.contains(seg2)))
    184                                 return "Used in a way.";
     186                                return tr("Used in a way.");
    185187                if (seg1.from == seg2.from || seg1.to == seg2.to)
    186                         return "Wrong direction of segments.";
     188                        return tr("Wrong direction of segments.");
    187189                for (Entry<String, String> e : seg1.entrySet())
    188190                        if (seg2.keySet().contains(e.getKey()) && !seg2.get(e.getKey()).equals(e.getValue()))
    189                                 return "Conflicting keys";
     191                                return tr("Conflicting keys");
    190192                Segment s = new Segment(seg1);
    191193                s.to = seg2.to;
     
    197199                        new ChangeCommand(seg1, s),
    198200                        new DeleteCommand(Arrays.asList(new OsmPrimitive[]{n, seg2}))};
    199                 Main.main.editLayer().add(new SequenceCommand("Delete Node", Arrays.asList(cmds)));
     201                Main.main.editLayer().add(new SequenceCommand(tr("Delete Node"), Arrays.asList(cmds)));
    200202                return null;
    201203    }
Note: See TracChangeset for help on using the changeset viewer.