Ignore:
Timestamp:
2008-11-15T13:55:26+01:00 (16 years ago)
Author:
stoecker
Message:

some locale fixes

Location:
applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/Lakewalker.java

    r6949 r11938  
    7979                        i =  7;
    8080                } else {
    81                         throw new ArrayIndexOutOfBoundsException("Direction index '"+direction+"' not found");
     81                        throw new ArrayIndexOutOfBoundsException(tr("Direction index '{0}' not found",direction));
    8282                }
    8383                return i;
     
    106106               
    107107                if(!bbox.contains(lat, lon)){
    108                         throw new LakewalkerException("The starting location was not within the bbox");
     108                        throw new LakewalkerException(tr("The starting location was not within the bbox"));
    109109                }
    110110               
    111111                int v;
    112112               
    113                 setStatus("Looking for shoreline...");
     113                setStatus(tr("Looking for shoreline..."));
    114114               
    115115                while(true){
     
    135135                double[] startgeo = xy_to_geo(xy[0],xy[1],this.resolution);
    136136
    137                 System.out.printf("Found shore at lat %.4f lon %.4f\n",lat,lon);
     137                //System.out.printf("Found shore at lat %.4f lon %.4f\n",lat,lon);
    138138               
    139139                int last_dir = this.getDirectionIndex(this.startdir);
     
    143143                        // Print a counter
    144144                        if(i % 250 == 0){
    145                                 setStatus(i+" nodes so far...");
    146                                 System.out.println(i+" nodes so far...");
     145                                setStatus(tr("{0} nodes so far...",i));
     146                                //System.out.println(i+" nodes so far...");
    147147                        }
    148148                       
     
    195195                        double[] geo = xy_to_geo(xy[0],xy[1],this.resolution);
    196196                        nodelist.add(geo);
    197                         System.out.println("Adding node at "+xy[0]+","+xy[1]+" ("+geo[1]+","+geo[0]+")");
     197                        //System.out.println("Adding node at "+xy[0]+","+xy[1]+" ("+geo[1]+","+geo[0]+")");
    198198                       
    199199                        // Check if we got stuck in a loop
  • applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPreferences.java

    r11925 r11938  
    1313public class LakewalkerPreferences implements PreferenceSetting {
    1414
     15  // TODO: Make these translatable
    1516  public static final String[] DIRECTIONS = new String[] {"east", "northeast", "north", "northwest", "west", "southwest", "south", "southeast"};
    1617  public static final String[] WAYTYPES = new String[] {"water", "coastline", "land", "none"};
     
    1920  public static final String PREF_MAX_SEG = "lakewalker.max_segs_in_way";
    2021  public static final String PREF_MAX_NODES = "lakewalker.max_nodes";
    21   public static final String PREF_THRESHOLD = "lakewalker.threshold";
    2222  public static final String PREF_THRESHOLD_VALUE = "lakewalker.thresholdvalue";
    2323  public static final String PREF_EPSILON = "lakewalker.epsilon";
     
    3535  protected JLabel maxNodesLabel = new JLabel(tr("Maximum number of nodes in initial trace"));
    3636  protected IntConfigurer thresholdConfig = new IntConfigurer();
    37   protected JLabel thresholdLabel = new JLabel(tr("Maximum gray value to count as water (0-255) [For old script]"));
    38   protected IntConfigurer thresholdConfigNew = new IntConfigurer();
    39   protected JLabel thresholdLabelNew = new JLabel(tr("Maximum gray value to count as water (0-255)"));
     37  protected JLabel thresholdLabel = new JLabel(tr("Maximum gray value to count as water (0-255)"));
    4038  protected DoubleConfigurer epsilonConfig = new DoubleConfigurer();
    4139  protected JLabel epsilonLabel = new JLabel(tr("Line simplification accuracy (degrees)"));
     
    5856    maxSegsConfig.setToolTipText(tr("Maximum number of segments allowed in each generated way. Default 250."));
    5957    maxNodesConfig.setToolTipText(tr("Maximum number of nodes to generate before bailing out (before simplifying lines). Default 50000."));
    60     thresholdConfig.setToolTipText(tr("Maximum gray value to accept as water (based on Landsat IR-1 data). Can be in the range 0-255. Default 35."));
    61     thresholdConfigNew.setToolTipText(tr("Maximum gray value to accept as water (based on Landsat IR-1 data). Can be in the range 0-255. Default 90."));
     58    thresholdConfig.setToolTipText(tr("Maximum gray value to accept as water (based on Landsat IR-1 data). Can be in the range 0-255. Default 90."));
    6259    epsilonConfig.setToolTipText(tr("Accuracy of Douglas-Peucker line simplification, measured in degrees.<br>Lower values give more nodes, and more accurate lines. Default 0.0003."));
    6360    landsatResConfig.setToolTipText(tr("Resolution of Landsat tiles, measured in pixels per degree. Default 4000."));
     
    7572    maxSegsConfig.setValue(Main.pref.getInteger(PREF_MAX_SEG, 500));
    7673    maxNodesConfig.setValue(Main.pref.getInteger(PREF_MAX_NODES, 50000));
    77     thresholdConfig.setValue(Main.pref.getInteger(PREF_THRESHOLD, 35));
    78     thresholdConfigNew.setValue(Main.pref.getInteger(PREF_THRESHOLD_VALUE, 90));
     74    thresholdConfig.setValue(Main.pref.getInteger(PREF_THRESHOLD_VALUE, 90));
    7975    epsilonConfig.setValue(Main.pref.getDouble(PREF_EPSILON, 0.0003));
    8076    landsatResConfig.setValue(Main.pref.getInteger(PREF_LANDSAT_RES, 4000));
     
    9793    prefPanel.add(thresholdLabel, labelConstraints);
    9894    prefPanel.add(thresholdConfig.getControls(), dataConstraints);
    99     prefPanel.add(thresholdLabelNew, labelConstraints);
    100     prefPanel.add(thresholdConfigNew.getControls(), dataConstraints);
    10195    prefPanel.add(epsilonLabel, labelConstraints);
    10296    prefPanel.add(epsilonConfig.getControls(), dataConstraints);
     
    123117    Main.pref.put(PREF_MAX_SEG, maxSegsConfig.getValueString());
    124118    Main.pref.put(PREF_MAX_NODES, maxNodesConfig.getValueString());
    125     Main.pref.put(PREF_THRESHOLD, thresholdConfig.getValueString());
    126     Main.pref.put(PREF_THRESHOLD_VALUE, thresholdConfigNew.getValueString());
     119    Main.pref.put(PREF_THRESHOLD_VALUE, thresholdConfig.getValueString());
    127120    Main.pref.put(PREF_EPSILON, epsilonConfig.getValueString());
    128121    Main.pref.put(PREF_LANDSAT_RES, landsatResConfig.getValueString());
Note: See TracChangeset for help on using the changeset viewer.