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

    r103 r104  
    11package org.openstreetmap.josm.actions;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.awt.GridBagLayout;
     
    3638public class GpxExportAction extends DiskAccessAction {
    3739
    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>");
    3941
    4042        private final Layer layer;
    4143
    4244        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));
    4446                this.layer = layer;
    4547        }
     
    4749        public void actionPerformed(ActionEvent e) {
    4850                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."));
    5052                        return;
    5153                }
     
    7173                JPanel p = new JPanel(new GridBagLayout());
    7274
    73                 p.add(new JLabel("gps track description"), GBC.eol());
     75                p.add(new JLabel(tr("gps track description")), GBC.eol());
    7476                JTextArea desc = new JTextArea(3,40);
    7577                desc.setWrapStyleWord(true);
     
    7779                p.add(new JScrollPane(desc), GBC.eop().fill(GBC.BOTH));
    7880               
    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));
    8082                author.setSelected(true);
    8183                p.add(author, GBC.eol());
    82                 JLabel nameLabel = new JLabel("Real name");
     84                JLabel nameLabel = new JLabel(tr("Real name"));
    8385                p.add(nameLabel, GBC.std().insets(10,0,5,0));
    8486                JTextField authorName = new JTextField(Main.pref.get("lastAuthorName"));
    8587                p.add(authorName, GBC.eol().fill(GBC.HORIZONTAL));
    86                 JLabel emailLabel = new JLabel("Email");
     88                JLabel emailLabel = new JLabel(tr("Email"));
    8789                p.add(emailLabel, GBC.std().insets(10,0,5,0));
    8890                JTextField email = new JTextField(Main.pref.get("osm-server.username"));
    8991                p.add(email, GBC.eol().fill(GBC.HORIZONTAL));
    90                 JLabel copyrightLabel = new JLabel("Copyright (URL)");
     92                JLabel copyrightLabel = new JLabel(tr("Copyright (URL)"));
    9193                p.add(copyrightLabel, GBC.std().insets(10,0,5,0));
    9294                JTextField copyright = new JTextField();
    9395                p.add(copyright, GBC.std().fill(GBC.HORIZONTAL));
    94                 JButton predefined = new JButton("Predefined");
     96                JButton predefined = new JButton(tr("Predefined"));
    9597                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"));
    9799                p.add(copyrightYearLabel, GBC.std().insets(10,0,5,5));
    98100                JTextField copyrightYear = new JTextField("");
     
    102104                addDependencies(author, authorName, email, copyright, predefined, copyrightYear, nameLabel, emailLabel, copyrightLabel, copyrightYearLabel, warning);
    103105               
    104                 p.add(new JLabel("Keywords"), GBC.eol());
     106                p.add(new JLabel(tr("Keywords")), GBC.eol());
    105107                JTextField keywords = new JTextField();
    106108                p.add(keywords, GBC.eop().fill(GBC.HORIZONTAL));
    107109
    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);
    109111                if (answer != JOptionPane.OK_OPTION)
    110112                        return;
     
    127129                } catch (IOException x) {
    128130                        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);
    130132                }               
    131133        }
     
    178180                predefined.addActionListener(new ActionListener(){
    179181                        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 as MIT/X11)"});
     182                                JList l = new JList(new String[]{"Creative Commons By-SA", "public domain", "GNU Lesser Public License (LGPL)", "BSD License (MIT/X11)"});
    181183                                l.setVisibleRowCount(4);
    182184                                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);
    184186                                if (answer != JOptionPane.OK_OPTION || l.getSelectedIndex() == -1)
    185187                                        return;
Note: See TracChangeset for help on using the changeset viewer.