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/UploadAction.java

    r103 r104  
    11package org.openstreetmap.josm.actions;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.awt.GridBagLayout;
     
    3234 */
    3335public class UploadAction extends JosmAction {
    34 
    3536        public UploadAction() {
    36                 super("Upload to OSM", "upload", "Upload all changes to the OSM server.", "Ctrl-Shift-U",
     37                super(tr("Upload to OSM"), "upload", tr("Upload all changes to the OSM server."), tr("Ctrl-Shift-U"),
    3738                                KeyStroke.getKeyStroke(KeyEvent.VK_U, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));
    3839        }
     
    4041        public void actionPerformed(ActionEvent e) {
    4142                if (Main.map == null) {
    42                         JOptionPane.showMessageDialog(Main.parent, "Nothing to upload. Get some data first.");
     43                        JOptionPane.showMessageDialog(Main.parent,tr("Nothing to upload. Get some data first."));
    4344                        return;
    4445                }
    4546               
    4647                if (!Main.map.conflictDialog.conflicts.isEmpty()) {
    47                         JOptionPane.showMessageDialog(Main.parent, "There are unresolved conflicts. You have to resolve these first.");
     48                        JOptionPane.showMessageDialog(Main.parent,tr("There are unresolved conflicts. You have to resolve these first."));
    4849                        Main.map.conflictDialog.action.button.setSelected(true);
    4950                        Main.map.conflictDialog.action.actionPerformed(null);
     
    7273                all.addAll(delete);
    7374
    74                 PleaseWaitRunnable uploadTask = new PleaseWaitRunnable("Uploading data"){
     75                PleaseWaitRunnable uploadTask = new PleaseWaitRunnable(tr("Uploading data")){
    7576                        @Override protected void realRun() throws SAXException {
    7677                                server.setProgressInformation(currentAction, progress);
     
    9697        private boolean displayUploadScreen(Collection<OsmPrimitive> add, Collection<OsmPrimitive> update, Collection<OsmPrimitive> delete) {
    9798                if (add.isEmpty() && update.isEmpty() && delete.isEmpty()) {
    98                         JOptionPane.showMessageDialog(Main.parent, "No changes to upload.");
     99                        JOptionPane.showMessageDialog(Main.parent,tr("No changes to upload."));
    99100                        return false;
    100101                }
     
    105106
    106107                if (!add.isEmpty()) {
    107                         p.add(new JLabel("Objects to add:"), GBC.eol());
     108                        p.add(new JLabel(tr("Objects to add:")), GBC.eol());
    108109                        JList l = new JList(add.toArray());
    109110                        l.setCellRenderer(renderer);
     
    113114
    114115                if (!update.isEmpty()) {
    115                         p.add(new JLabel("Objects to modify:"), GBC.eol());
     116                        p.add(new JLabel(tr("Objects to modify:")), GBC.eol());
    116117                        JList l = new JList(update.toArray());
    117118                        l.setCellRenderer(renderer);
     
    121122
    122123                if (!delete.isEmpty()) {
    123                         p.add(new JLabel("Objects to delete:"), GBC.eol());
     124                        p.add(new JLabel(tr("Objects to delete:")), GBC.eol());
    124125                        JList l = new JList(delete.toArray());
    125126                        l.setCellRenderer(renderer);
     
    128129                }
    129130
    130                 return JOptionPane.showConfirmDialog(Main.parent, p, "Upload this changes?",
     131                return JOptionPane.showConfirmDialog(Main.parent, p, tr("Upload this changes?"),
    131132                                JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;
    132133        }
Note: See TracChangeset for help on using the changeset viewer.