Changeset 104 in josm for src/org/openstreetmap/josm/actions/GpxExportAction.java
- Timestamp:
- 2006-07-03T00:31:24+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/actions/GpxExportAction.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; … … 36 38 public class GpxExportAction extends DiskAccessAction { 37 39 38 private final static String warningGpl = "<html><font color='red' size='-2'>Note: GPL is not compatible to the OSM license. Do not upload GPL licensed tracks</html>";40 private final static String warningGpl = tr("<html><font color='red' size='-2'>Note: GPL is not compatible to the OSM license. Do not upload GPL licensed tracks</html>"); 39 41 40 42 private final Layer layer; 41 43 42 44 public GpxExportAction(Layer layer) { 43 super( "Export to GPX", "exportgpx", "Export the data to GPX file.", "Ctrl-E", KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.CTRL_DOWN_MASK));45 super(tr("Export to GPX"), "exportgpx", tr("Export the data to GPX file."), tr("Ctrl-E"), KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.CTRL_DOWN_MASK)); 44 46 this.layer = layer; 45 47 } … … 47 49 public void actionPerformed(ActionEvent e) { 48 50 if (layer == null && Main.map == null) { 49 JOptionPane.showMessageDialog(Main.parent, "Nothing to export. Get some data first.");51 JOptionPane.showMessageDialog(Main.parent, tr("Nothing to export. Get some data first.")); 50 52 return; 51 53 } … … 71 73 JPanel p = new JPanel(new GridBagLayout()); 72 74 73 p.add(new JLabel( "gps track description"), GBC.eol());75 p.add(new JLabel(tr("gps track description")), GBC.eol()); 74 76 JTextArea desc = new JTextArea(3,40); 75 77 desc.setWrapStyleWord(true); … … 77 79 p.add(new JScrollPane(desc), GBC.eop().fill(GBC.BOTH)); 78 80 79 JCheckBox author = new JCheckBox( "Add author information", Main.pref.getBoolean("lastAddAuthor", true));81 JCheckBox author = new JCheckBox(tr("Add author information"), Main.pref.getBoolean("lastAddAuthor", true)); 80 82 author.setSelected(true); 81 83 p.add(author, GBC.eol()); 82 JLabel nameLabel = new JLabel( "Real name");84 JLabel nameLabel = new JLabel(tr("Real name")); 83 85 p.add(nameLabel, GBC.std().insets(10,0,5,0)); 84 86 JTextField authorName = new JTextField(Main.pref.get("lastAuthorName")); 85 87 p.add(authorName, GBC.eol().fill(GBC.HORIZONTAL)); 86 JLabel emailLabel = new JLabel( "Email");88 JLabel emailLabel = new JLabel(tr("Email")); 87 89 p.add(emailLabel, GBC.std().insets(10,0,5,0)); 88 90 JTextField email = new JTextField(Main.pref.get("osm-server.username")); 89 91 p.add(email, GBC.eol().fill(GBC.HORIZONTAL)); 90 JLabel copyrightLabel = new JLabel( "Copyright (URL)");92 JLabel copyrightLabel = new JLabel(tr("Copyright (URL)")); 91 93 p.add(copyrightLabel, GBC.std().insets(10,0,5,0)); 92 94 JTextField copyright = new JTextField(); 93 95 p.add(copyright, GBC.std().fill(GBC.HORIZONTAL)); 94 JButton predefined = new JButton( "Predefined");96 JButton predefined = new JButton(tr("Predefined")); 95 97 p.add(predefined, GBC.eol().insets(5,0,0,0)); 96 JLabel copyrightYearLabel = new JLabel( "Copyright year");98 JLabel copyrightYearLabel = new JLabel(tr("Copyright year")); 97 99 p.add(copyrightYearLabel, GBC.std().insets(10,0,5,5)); 98 100 JTextField copyrightYear = new JTextField(""); … … 102 104 addDependencies(author, authorName, email, copyright, predefined, copyrightYear, nameLabel, emailLabel, copyrightLabel, copyrightYearLabel, warning); 103 105 104 p.add(new JLabel( "Keywords"), GBC.eol());106 p.add(new JLabel(tr("Keywords")), GBC.eol()); 105 107 JTextField keywords = new JTextField(); 106 108 p.add(keywords, GBC.eop().fill(GBC.HORIZONTAL)); 107 109 108 int answer = JOptionPane.showConfirmDialog(Main.parent, p, "Export options", JOptionPane.OK_CANCEL_OPTION);110 int answer = JOptionPane.showConfirmDialog(Main.parent, p, tr("Export options"), JOptionPane.OK_CANCEL_OPTION); 109 111 if (answer != JOptionPane.OK_OPTION) 110 112 return; … … 127 129 } catch (IOException x) { 128 130 x.printStackTrace(); 129 JOptionPane.showMessageDialog(Main.parent, "Error while exporting "+fn+":\n"+x.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);131 JOptionPane.showMessageDialog(Main.parent, tr("Error while exporting {0}", fn)+":\n"+x.getMessage(), tr("Error"), JOptionPane.ERROR_MESSAGE); 130 132 } 131 133 } … … 178 180 predefined.addActionListener(new ActionListener(){ 179 181 public void actionPerformed(ActionEvent e) { 180 JList l = new JList(new String[]{"Creative Commons By-SA", "public domain", "GNU Lesser Public License (LGPL)", "BSD License ( same asMIT/X11)"});182 JList l = new JList(new String[]{"Creative Commons By-SA", "public domain", "GNU Lesser Public License (LGPL)", "BSD License (MIT/X11)"}); 181 183 l.setVisibleRowCount(4); 182 184 l.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); 183 int answer = JOptionPane.showConfirmDialog(Main.parent, new JScrollPane(l), "Choose a predefined license", JOptionPane.OK_CANCEL_OPTION);185 int answer = JOptionPane.showConfirmDialog(Main.parent, new JScrollPane(l),tr("Choose a predefined license"), JOptionPane.OK_CANCEL_OPTION); 184 186 if (answer != JOptionPane.OK_OPTION || l.getSelectedIndex() == -1) 185 187 return;
Note:
See TracChangeset
for help on using the changeset viewer.