Changeset 25887 in osm for applications/editors/josm
- Timestamp:
- 2011-04-23T23:23:10+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/AlignWayNodesAction.java
r25876 r25887 18 18 */ 19 19 public class AlignWayNodesAction extends JosmAction { 20 private static final String TITLE = "Align Way Nodes";20 private static final String TITLE = tr("Align Way Nodes"); 21 21 private static final double MOVE_THRESHOLD = 1e-9; 22 22 23 23 public AlignWayNodesAction() { 24 super( tr(TITLE), "dumbutils/alignwaynodes", tr("Align nodes in a way"),25 Shortcut.registerShortcut("tools:alignwaynodes", tr("Tool: {0}", tr(TITLE)), KeyEvent.VK_L, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);24 super(TITLE, "dumbutils/alignwaynodes", tr("Align nodes in a way"), 25 Shortcut.registerShortcut("tools:alignwaynodes", tr("Tool: {0}", TITLE), KeyEvent.VK_L, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true); 26 26 } 27 27 … … 35 35 Way way = ways.iterator().next(); 36 36 if( way.getNodesCount() < (way.isClosed() ? 4 : 3) ) { 37 JOptionPane.showMessageDialog(Main.parent, tr("The way with selected nodes can not be straightened."), tr(TITLE), JOptionPane.ERROR_MESSAGE);37 JOptionPane.showMessageDialog(Main.parent, tr("The way with selected nodes can not be straightened."), TITLE, JOptionPane.ERROR_MESSAGE); 38 38 return; 39 39 } … … 65 65 66 66 if( nodes.size() < 3 ) { 67 JOptionPane.showMessageDialog(Main.parent, "Internal error: number of nodes is " + nodes.size(),68 tr(TITLE), JOptionPane.ERROR_MESSAGE);67 JOptionPane.showMessageDialog(Main.parent, tr("Internal error: number of nodes is {0}.", nodes.size()), 68 TITLE, JOptionPane.ERROR_MESSAGE); 69 69 return; 70 70 } … … 108 108 109 109 if( !commands.isEmpty() ) 110 Main.main.undoRedo.add(new SequenceCommand( tr(TITLE), commands));110 Main.main.undoRedo.add(new SequenceCommand(TITLE, commands)); 111 111 } 112 112 -
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/PasteRelationsAction.java
r25876 r25887 17 17 */ 18 18 public class PasteRelationsAction extends JosmAction { 19 private static final String TITLE = "Paste Relations";19 private static final String TITLE = tr("Paste Relations"); 20 20 21 21 public PasteRelationsAction() { 22 super( tr(TITLE), "dumbutils/pasterelations", tr("Paste relation membership from objects in the buffer onto selected object(s)"),23 Shortcut.registerShortcut("tools:pasterelations", tr("Tool: {0}", tr(TITLE)), KeyEvent.VK_V,22 super(TITLE, "dumbutils/pasterelations", tr("Paste relation membership from objects in the buffer onto selected object(s)"), 23 Shortcut.registerShortcut("tools:pasterelations", tr("Tool: {0}", TITLE), KeyEvent.VK_V, 24 24 Shortcut.GROUP_MENU, KeyEvent.ALT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK), true); 25 25 } … … 65 65 66 66 if( !commands.isEmpty() ) 67 Main.main.undoRedo.add(new SequenceCommand( tr(TITLE), commands));67 Main.main.undoRedo.add(new SequenceCommand(TITLE, commands)); 68 68 } 69 69 -
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/ReplaceGeometryAction.java
r25876 r25887 23 23 */ 24 24 public class ReplaceGeometryAction extends JosmAction { 25 private static final String TITLE = "Replace Geometry";25 private static final String TITLE = tr("Replace Geometry"); 26 26 private static final double MAX_NODE_REPLACEMENT_DISTANCE = 3e-4; 27 27 28 28 public ReplaceGeometryAction() { 29 super( tr(TITLE), "dumbutils/replacegeometry", tr("Replace geometry of selected way with a new one"),30 Shortcut.registerShortcut("tools:replacegeometry", tr("Tool: {0}", tr(TITLE)), KeyEvent.VK_G,29 super(TITLE, "dumbutils/replacegeometry", tr("Replace geometry of selected way with a new one"), 30 Shortcut.registerShortcut("tools:replacegeometry", tr("Tool: {0}", TITLE), KeyEvent.VK_G, 31 31 Shortcut.GROUP_HOTKEY, Shortcut.SHIFT_DEFAULT), true); 32 32 } … … 39 39 JOptionPane.showMessageDialog(Main.parent, 40 40 tr("This tool replaces geometry of one way with another, and requires two ways to be selected."), 41 tr(TITLE), JOptionPane.INFORMATION_MESSAGE);41 TITLE, JOptionPane.INFORMATION_MESSAGE); 42 42 return; 43 43 } … … 48 48 JOptionPane.showMessageDialog(Main.parent, 49 49 tr("Please select one way that exists in the database and one new way with correct geometry."), 50 tr(TITLE), JOptionPane.WARNING_MESSAGE);50 TITLE, JOptionPane.WARNING_MESSAGE); 51 51 return; 52 52 } -
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/TagBufferAction.java
r25876 r25887 17 17 */ 18 18 public class TagBufferAction extends JosmAction { 19 private static final String TITLE = "Copy tags from previous selection";19 private static final String TITLE = tr("Copy tags from previous selection"); 20 20 private Map<String, String> tags = new HashMap<String, String>(); 21 21 private Map<String, String> currentTags = new HashMap<String, String>(); … … 23 23 24 24 public TagBufferAction() { 25 super( tr(TITLE), "dumbutils/tagbuffer", tr("Pastes tags of previously selected object(s)"),26 Shortcut.registerShortcut("tools:tagbuffer", tr("Tool: {0}", tr(TITLE)), KeyEvent.VK_R,25 super(TITLE, "dumbutils/tagbuffer", tr("Pastes tags of previously selected object(s)"), 26 Shortcut.registerShortcut("tools:tagbuffer", tr("Tool: {0}", TITLE), KeyEvent.VK_R, 27 27 Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true); 28 28 } … … 48 48 49 49 if( !commands.isEmpty() ) 50 Main.main.undoRedo.add(new SequenceCommand( tr(TITLE), commands));50 Main.main.undoRedo.add(new SequenceCommand(TITLE, commands)); 51 51 } 52 52 -
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/TagSourceAction.java
r25876 r25887 17 17 */ 18 18 public class TagSourceAction extends JosmAction { 19 private static final String TITLE = "Add Source Tag";19 private static final String TITLE = tr("Add Source Tag"); 20 20 private String source; 21 21 private Set<OsmPrimitive> selectionBuf = new HashSet<OsmPrimitive>(); … … 23 23 24 24 public TagSourceAction() { 25 super( tr(TITLE), "dumbutils/sourcetag", tr("Add remembered source tag"),26 Shortcut.registerShortcut("tools:sourcetag", tr("Tool: {0}", tr(TITLE)), KeyEvent.VK_S,25 super(TITLE, "dumbutils/sourcetag", tr("Add remembered source tag"), 26 Shortcut.registerShortcut("tools:sourcetag", tr("Tool: {0}", TITLE), KeyEvent.VK_S, 27 27 Shortcut.GROUP_MENU, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK), true); 28 28 source = Main.pref.get("sourcetag.value");
Note:
See TracChangeset
for help on using the changeset viewer.