Changeset 104 in josm for src/org/openstreetmap/josm/actions/UploadAction.java
- Timestamp:
- 2006-07-03T00:31:24+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/actions/UploadAction.java
r103 r104 1 1 package org.openstreetmap.josm.actions; 2 3 import static org.openstreetmap.josm.tools.I18n.tr; 2 4 3 5 import java.awt.GridBagLayout; … … 32 34 */ 33 35 public class UploadAction extends JosmAction { 34 35 36 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"), 37 38 KeyStroke.getKeyStroke(KeyEvent.VK_U, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK)); 38 39 } … … 40 41 public void actionPerformed(ActionEvent e) { 41 42 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.")); 43 44 return; 44 45 } 45 46 46 47 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.")); 48 49 Main.map.conflictDialog.action.button.setSelected(true); 49 50 Main.map.conflictDialog.action.actionPerformed(null); … … 72 73 all.addAll(delete); 73 74 74 PleaseWaitRunnable uploadTask = new PleaseWaitRunnable( "Uploading data"){75 PleaseWaitRunnable uploadTask = new PleaseWaitRunnable(tr("Uploading data")){ 75 76 @Override protected void realRun() throws SAXException { 76 77 server.setProgressInformation(currentAction, progress); … … 96 97 private boolean displayUploadScreen(Collection<OsmPrimitive> add, Collection<OsmPrimitive> update, Collection<OsmPrimitive> delete) { 97 98 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.")); 99 100 return false; 100 101 } … … 105 106 106 107 if (!add.isEmpty()) { 107 p.add(new JLabel( "Objects to add:"), GBC.eol());108 p.add(new JLabel(tr("Objects to add:")), GBC.eol()); 108 109 JList l = new JList(add.toArray()); 109 110 l.setCellRenderer(renderer); … … 113 114 114 115 if (!update.isEmpty()) { 115 p.add(new JLabel( "Objects to modify:"), GBC.eol());116 p.add(new JLabel(tr("Objects to modify:")), GBC.eol()); 116 117 JList l = new JList(update.toArray()); 117 118 l.setCellRenderer(renderer); … … 121 122 122 123 if (!delete.isEmpty()) { 123 p.add(new JLabel( "Objects to delete:"), GBC.eol());124 p.add(new JLabel(tr("Objects to delete:")), GBC.eol()); 124 125 JList l = new JList(delete.toArray()); 125 126 l.setCellRenderer(renderer); … … 128 129 } 129 130 130 return JOptionPane.showConfirmDialog(Main.parent, p, "Upload this changes?",131 return JOptionPane.showConfirmDialog(Main.parent, p, tr("Upload this changes?"), 131 132 JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION; 132 133 }
Note:
See TracChangeset
for help on using the changeset viewer.