Changeset 25887 in osm for applications/editors


Ignore:
Timestamp:
2011-04-23T23:23:10+02:00 (13 years ago)
Author:
stoecker
Message:

fix i18n issue

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  
    1818 */
    1919public class AlignWayNodesAction extends JosmAction {
    20     private static final String TITLE = "Align Way Nodes";
     20    private static final String TITLE = tr("Align Way Nodes");
    2121    private static final double MOVE_THRESHOLD = 1e-9;
    2222
    2323    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);
    2626    }
    2727
     
    3535        Way way = ways.iterator().next();
    3636        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);
    3838            return;
    3939        }
     
    6565
    6666        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);
    6969            return;
    7070        }
     
    108108
    109109        if( !commands.isEmpty() )
    110             Main.main.undoRedo.add(new SequenceCommand(tr(TITLE), commands));
     110            Main.main.undoRedo.add(new SequenceCommand(TITLE, commands));
    111111    }
    112112
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/PasteRelationsAction.java

    r25876 r25887  
    1717 */
    1818public class PasteRelationsAction extends JosmAction {
    19     private static final String TITLE = "Paste Relations";
     19    private static final String TITLE = tr("Paste Relations");
    2020
    2121    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,
    2424                Shortcut.GROUP_MENU, KeyEvent.ALT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK), true);
    2525    }
     
    6565
    6666        if( !commands.isEmpty() )
    67             Main.main.undoRedo.add(new SequenceCommand(tr(TITLE), commands));
     67            Main.main.undoRedo.add(new SequenceCommand(TITLE, commands));
    6868    }
    6969
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/ReplaceGeometryAction.java

    r25876 r25887  
    2323 */
    2424public class ReplaceGeometryAction extends JosmAction {
    25     private static final String TITLE = "Replace Geometry";
     25    private static final String TITLE = tr("Replace Geometry");
    2626    private static final double MAX_NODE_REPLACEMENT_DISTANCE = 3e-4;
    2727
    2828    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,
    3131                Shortcut.GROUP_HOTKEY, Shortcut.SHIFT_DEFAULT), true);
    3232    }
     
    3939            JOptionPane.showMessageDialog(Main.parent,
    4040                    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);
    4242            return;
    4343        }
     
    4848            JOptionPane.showMessageDialog(Main.parent,
    4949                    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);
    5151            return;
    5252        }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/TagBufferAction.java

    r25876 r25887  
    1717 */
    1818public 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");
    2020    private Map<String, String> tags = new HashMap<String, String>();
    2121    private Map<String, String> currentTags = new HashMap<String, String>();
     
    2323
    2424    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,
    2727                Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
    2828    }
     
    4848       
    4949        if( !commands.isEmpty() )
    50             Main.main.undoRedo.add(new SequenceCommand(tr(TITLE), commands));
     50            Main.main.undoRedo.add(new SequenceCommand(TITLE, commands));
    5151    }
    5252
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/TagSourceAction.java

    r25876 r25887  
    1717 */
    1818public class TagSourceAction extends JosmAction {
    19     private static final String TITLE = "Add Source Tag";
     19    private static final String TITLE = tr("Add Source Tag");
    2020    private String source;
    2121    private Set<OsmPrimitive> selectionBuf = new HashSet<OsmPrimitive>();
     
    2323
    2424    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,
    2727                Shortcut.GROUP_MENU, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK), true);
    2828        source = Main.pref.get("sourcetag.value");
Note: See TracChangeset for help on using the changeset viewer.