Changeset 1206 in josm for trunk/src/org


Ignore:
Timestamp:
2009-01-02T18:48:30+01:00 (16 years ago)
Author:
stoecker
Message:

fixed translation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r1169 r1206  
    760760        public void actionPerformed(ActionEvent e) {
    761761            JPanel msg = new JPanel(new GridBagLayout());
    762             JList buffer = new JList(new String[] { "50 metres", "500 metres", "5000 metres" });
    763             JList maxRect = new JList(new String[] { "1 sq km", "5 sq km", "10 sq km", "20 sq km" });
     762            Integer dist[] = {5000, 500, 50};
     763            Integer area[] = {20, 10, 5, 1};
    764764
    765765            msg.add(new JLabel(tr("Download everything within:")), GBC.eol());
     766            String s[] = new String[dist.length];
     767            for(int i = 0; i < dist.length; ++i)
     768                s[i] = tr("{0} meters", dist[i]);
     769            JList buffer = new JList(s);
    766770            msg.add(buffer, GBC.eol());
    767771            msg.add(new JLabel(tr("Maximum area per request:")), GBC.eol());
     772            s = new String[area.length];
     773            for(int i = 0; i < area.length; ++i)
     774                s[i] = tr("{0} sq km", area[i]);
     775            JList maxRect = new JList(s);
    768776            msg.add(maxRect, GBC.eol());
    769777
     
    801809             * 50k nodes.
    802810             */
    803             double buffer_y;
    804             double buffer_x;
    805             switch(buffer.getSelectedIndex()) {
    806             case 0: buffer_y = .0005; break;
    807             case 1: buffer_y = .005; break;
    808             default: buffer_y = .05;
    809             }
    810             buffer_x = buffer_y / scale;
    811 
    812             double max_area;
    813             switch(maxRect.getSelectedIndex()) {
    814             case 0: max_area = 0.0001 / scale; break;
    815             case 1: max_area = 0.0005 / scale; break;
    816             case 2: max_area = 0.001 / scale; break;
    817             default: max_area = 0.002 / scale;
    818             }
     811            Integer i = buffer.getSelectedIndex();
     812            double buffer_y = dist[i < 0 ? 0 : i] / 1000.0;
     813            double buffer_x = buffer_y / scale;
     814            i = maxRect.getSelectedIndex();
     815            double max_area = area[i < 0 ? 0 : i] / 10000.0 / scale;
    819816
    820817            Area a = new Area();
Note: See TracChangeset for help on using the changeset viewer.