Ignore:
Timestamp:
2018-07-04T06:09:22+02:00 (7 years ago)
Author:
renerr18
Message:

Removed I18n method calls for untranlated log/gui messages. Began refactoring poSrc files.

Location:
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideLayer.java

    r34365 r34393  
    6969  /** The angle of the circular sector that indicates the camera angle */
    7070  private static final int CA_INDICATOR_ANGLE = 40;
    71   /** Length of the edge of the small sign, which indicates that traffic signs have been found in an image. */
    72   private static final int TRAFFIC_SIGN_SIZE = 6;
    73   /** A third of the height of the sign, for easier calculations */
    74   private static final double TRAFFIC_SIGN_HEIGHT_3RD = Math.sqrt(
    75     Math.pow(TRAFFIC_SIGN_SIZE, 2) - Math.pow(TRAFFIC_SIGN_SIZE / 2d, 2)
    76   ) / 3;
    7771
    7872        private static final DataSetListenerAdapter DATASET_LISTENER =
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/actions/StreetsideDownloadAction.java

    r34365 r34393  
    2727
    2828  private static final long serialVersionUID = 4426446157849005029L;
    29   public static final Shortcut SHORTCUT = Shortcut.registerShortcut("Streetside", tr("Open Streetside layer"), KeyEvent.VK_COMMA, Shortcut.SHIFT);
     29
     30  // TODO: I18n "Open Streeside Layer"
     31  public static final Shortcut SHORTCUT = Shortcut.registerShortcut("Streetside", /*tr(*/"Open Streetside layer"/*)*/, KeyEvent.VK_COMMA, Shortcut.SHIFT);
    3032
    3133  final static Logger logger = Logger.getLogger(StreetsideDownloadAction.class);
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/actions/StreetsideJoinAction.java

    r34317 r34393  
    2828   */
    2929  public StreetsideJoinAction() {
    30     super(tr("Join mode"), new ImageProvider("mapmode", "mapillary-join").setSize(ImageSizes.DEFAULT),
    31         tr("Join/unjoin pictures"), null, false, "mapillaryJoin", true);
     30    super(tr("Join mode"), new ImageProvider("mapmode", "streetside-join").setSize(ImageSizes.DEFAULT),
     31        tr("Join/unjoin pictures"), null, false, "streetsideJoin", true);
    3232  }
    3333
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapBuilder.java

    r34385 r34393  
    7575
    7676                        long runTime = (System.currentTimeMillis()-startTime)/1000;
    77                         logger.info(I18n.tr("Completed downloading tiles for {0} in {1} seconds.", newImage.getId(),runTime));
     77                        if(StreetsideProperties.DEBUGING_ENABLED.get()) {
     78                          logger.debug("Completed downloading tiles for " + newImage.getId() + " in " + runTime + " seconds.");
     79                        }
    7880                }
    7981        }
     
    111113                                                                        + Integer.valueOf(tileNr++).toString());// + Integer.valueOf(k).toString()));
    112114                                                        tasks.add(new TileDownloadingTask(tileId));
    113                                                         logger.info(
    114                                                                         I18n.tr("Starting tile downloading task for imageId {0}, cubeface {1}, tileNr {2}",
    115                                                                                         tileId, CubemapUtils.getFaceNumberForCount(i), String.valueOf(tileNr)));
    116115                                                }
    117116                                        }
     
    121120                                for (Future<String> ff : results) {
    122121
    123                                         logger.debug(I18n.tr("Completed tile downloading task {0} in {1}", ff.get(),
    124                                                         (startTime - System.currentTimeMillis())/ 1000));
     122                                        if(StreetsideProperties.DEBUGING_ENABLED.get()) {
     123                                          logger.debug("Completed tile downloading task " +  ff.get() + " in " + (startTime - System.currentTimeMillis())/ 1000 + " seconds.");
     124                                        }
    125125                                }
    126126
     
    134134                                                                        + String.valueOf(Integer.valueOf(j).toString() + Integer.valueOf(k).toString()));
    135135                                                        tasks.add(new TileDownloadingTask(tileId));
    136               if (StreetsideProperties.DEBUGING_ENABLED.get()) {
    137                 logger.debug(
    138                   I18n.tr(
    139                     "Starting tile downloading task for imageId {0}, cubeface {1}, tileID {2}", imageId,
    140                     CubemapUtils.getFaceNumberForCount(i), tileId)
    141                   );
    142               }
    143136                                                }
    144137                                        }
     
    147140                                List<Future<String>> results = pool.invokeAll(tasks);
    148141                                for (Future<String> ff : results) {
    149                                         logger.debug(I18n.tr("Completed tile downloading task {0} in {1}", ff.get(),
    150                                                         (startTime - System.currentTimeMillis())/ 1000));
     142                                        if(StreetsideProperties.DEBUGING_ENABLED.get()) {
     143                                          logger.debug("Completed tile downloading task " + ff.get() + " in " +
     144                                                        (startTime - System.currentTimeMillis())/ 1000 + " seconds.");
     145                                        }
    151146                                }
    152147                        }
    153148                } catch (Exception ee) {
    154149                        fails++;
    155                         logger.error(I18n.tr("Error loading tile for image {0}", imageId));
     150                        logger.error("Error loading tile for image " + imageId);
    156151                        ee.printStackTrace();
    157152                }
     
    161156
    162157                if (StreetsideProperties.DEBUGING_ENABLED.get()) {
    163       logger.debug(I18n.tr("Tile imagery downloading tasks completed in {0}", runTime/1000000));
     158      logger.debug("Tile imagery downloading tasks completed in " + runTime/1000000);
    164159                }
    165160
    166161                if (fails > 0) {
    167                         logger.error(I18n.tr("{0} downloading tasks failed.", Integer.valueOf(fails)));
     162                        logger.error(Integer.valueOf(fails) + " downloading tasks failed!");
    168163                }
    169164
     
    185180                if (tileCount == (CubemapUtils.NUM_SIDES * maxCols * maxRows)) {
    186181                  if (StreetsideProperties.DEBUGING_ENABLED.get()) {
    187         logger.debug(I18n.tr("{0} tile images ready for building cumbemap faces for cubemap {0}", tileCount,
    188                                         CubemapBuilder.getInstance().getCubemap().getId()));
     182        logger.debug(tileCount + " tile images ready for building cumbemap faces for cubemap " +
     183                                        CubemapBuilder.getInstance().getCubemap().getId());
    189184                  }
    190185
     
    227222                                  final long start = System.nanoTime();
    228223                                        finalImg = GraphicsUtils.rotateImage(finalImg);
    229                                         if (StreetsideProperties.DEBUGING_ENABLED.get()) {
    230             logger.debug(I18n.tr("Rotation took {0}", System.nanoTime() - start));
    231                                         }
    232224                                }
    233225                                finalImages[i] = GraphicsUtils.convertBufferedImage2JavaFXImage(finalImg);
     
    277269    if (StreetsideProperties.DEBUGING_ENABLED.get()) {
    278270      logger.debug(
    279       I18n.tr(
    280         "Completed downloading, assembling and setting cubemap imagery for cubemap {0} in {1}", cubemap.getId(), runTime
    281         )
     271        "Completed downloading, assembling and setting cubemap imagery for cubemap " + cubemap.getId() + " in "
     272          + runTime + " sceconds."
    282273      );
    283274    }
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapUtils.java

    r34390 r34393  
    138138        if (Integer.parseInt(inputNum.substring(i,i+1)) >= CubemapUtils.NUM_BASE)
    139139        {
    140            logger.error(I18n.tr("Error converting quadkey {0} to decimal.", inputNum));
     140           logger.error("Error converting quadkey " + inputNum + " to decimal.");
    141141           return "000000000";
    142142        }
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/GraphicsUtils.java

    r34365 r34393  
    107107        }
    108108
    109         logger.info(I18n.tr("Image concatenated in {0} millisecs.",(System.currentTimeMillis()-start)));
     109        if(StreetsideProperties.DEBUGING_ENABLED.get()) {
     110          logger.debug("Image concatenated in " + (System.currentTimeMillis()-start) + " millisecs.");
     111        }
    110112        return res;
    111113        }
     
    134136                        }
    135137
    136                 logger.info(I18n.tr("Images cropped in {0} millisecs.",(System.currentTimeMillis()-start)));
     138                if(StreetsideProperties.DEBUGING_ENABLED.get()) {
     139                        logger.debug("Images cropped in " + (System.currentTimeMillis()-start) + " millisecs.");
     140                }
    137141
    138142                return res;
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/TileDownloadingTask.java

    r34365 r34393  
    107107
    108108                if (img == null) {
    109                         logger.error(I18n.tr("Download of BufferedImage {0} is null!", tileId));
     109                        logger.error("Download of BufferedImage " + tileId + " is null!");
    110110                }
    111111
    112                 //String faceId = CubemapUtils.getFaceIdFromTileId(tileId);
    113 
    114                 /*Map<String, Map<String, BufferedImage>> faces2TilesMap = CubemapBuilder
    115                                 .getInstance().getCubemap().getFace2TilesMap();*/
    116 
    117                 /*if(CubemapBuilder.getInstance().getTileImages().get(tileId)==null) {
    118                   CubemapBuilder.getInstance().getTileImages().put(tileId, new HashMap<String,BufferedImage>());
    119                 }*/
    120112                CubemapBuilder.getInstance().getTileImages().put(tileId, img);
    121113
     
    125117                  long endTime = System.currentTimeMillis();
    126118            long runTime = (endTime-startTime)/1000;
    127             logger.debug(I18n.tr("Loaded image for tile {0} in {1} seconds", tileId, runTime));
     119            logger.debug("Loaded image for " + tileId + " in " + runTime + " seconds");
    128120                }
    129121
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/StreetsideViewerDialog.java

    r34358 r34393  
    2222        private static final long serialVersionUID = -8983900297628236197L;
    2323
    24         private static final String BASE_TITLE = I18n.marktr("360° Streetside Viewer");
     24        // TODO: I18n support in all languages?
     25        private static final String BASE_TITLE = /*I18n.marktr(*/"360° Streetside Viewer"/*)*/;
    2526
    2627        private static StreetsideViewerDialog instance;
     
    3233
    3334        private StreetsideViewerDialog() {
    34                 super(I18n.tr(StreetsideViewerDialog.BASE_TITLE), "streetside-viewer", I18n.tr("Open Streetside Viewer window"),
     35          // TODO: I18n support in all languages?
     36          super(/*I18n.tr(*/StreetsideViewerDialog.BASE_TITLE/*)*/, "streetside-viewer", /*I18n.tr(*/"Open Streetside Viewer window"/*)*/,
    3537                                null, 200, true, StreetsidePreferenceSetting.class);
    3638                streetsideViewerPanel = new StreetsideViewerPanel();
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/ImageInfoHelpPopup.java

    r34365 r34393  
    4444    mainText.setContentType("text/html");
    4545    mainText.setFont(SelectableLabel.DEFAULT_FONT);
    46     // TODO: tr( RRH
     46    // TODO: Translate into all supported languages
    4747    mainText.setText(
    4848      "<html><div style='width:250px'>" +
    49       I18n.tr("The Streetside plugin now uses a separate panel to display extra information (like the image key) and actions for the currently selected Streetside image (like viewing it in a browser).") +
     49      /*I18n.tr(*/"The Streetside plugin now uses a separate panel to display extra information (like the image key) and actions for the currently selected Streetside image (like viewing it in a browser)."/*)*/ +
    5050      "<br><br>" +
    51       I18n.tr("It can be activated by clicking the left button at the bottom of this message or the button in the toolbar on the left, which uses the same icon.") +
     51      /*I18n.tr(*/"It can be activated by clicking the left button at the bottom of this message or the button in the toolbar on the left, which uses the same icon."/*)*/ +
    5252      "</div></html>"
    5353    );
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/StreetsideViewerPanel.java

    r34385 r34393  
    6767            JPanel checkPanel = new JPanel();
    6868
    69             imgReloadAction = new ImageReloadAction(I18n.tr("Reload"));
     69            // TODO: I18n for all languages?
     70            imgReloadAction = new ImageReloadAction(/*I18n.tr(*/"Reload"/*)*/);
    7071
    7172            StreetsideButton imgReloadButton = new StreetsideButton(imgReloadAction);
    72                   highResImageryCheck = new JCheckBox(I18n.tr("High resolution"));
     73
     74            // TODO: I18n for all languages?
     75      highResImageryCheck = new JCheckBox(/*I18n.tr(*/"High resolution"/*)*/);
    7376            highResImageryCheck.setSelected(StreetsideProperties.SHOW_HIGH_RES_STREETSIDE_IMAGERY.get());
    7477            highResImageryCheck.addActionListener(
     
    8386            JPanel privacyLink = new JPanel();
    8487
    85             imgLinkAction = new WebLinkAction(I18n.tr("Report a privacy concern with this image"), null);
     88            // TODO: I18n for all languages?
     89            imgLinkAction = new WebLinkAction(/*I18n.tr(*/"Report a privacy concern with this image"/*)*/, null);
    8690            privacyLink.add(new StreetsideButton(imgLinkAction, true));
    8791            checkPanel.add(privacyLink, BorderLayout.PAGE_END);
     
    139143                      );
    140144
    141                       logger.debug(I18n.tr("Privacy link set for Streetside image {0} quadKey {1}", bubbleId, newImageId));
     145                      if(StreetsideProperties.DEBUGING_ENABLED.get()) {
     146                        logger.debug(/*I18n.tr(*/"Privacy link set for Streetside image " + bubbleId + " quadKey " + newImageId/*)*/);
     147                      }
    142148
    143149                      imageLinkChangeListener.valueChanged(null);
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/ThreeSixtyDegreeViewerPanel.java

    r34365 r34393  
    9292                        @Override
    9393                        public void run() {
    94                                 //try {
    95                                         setScene(createDefaultScene());
    96                                   //setScene(createScene());
    97                                 /*} catch (NonInvertibleTransformException e) {
    98                                         logger.error(I18n.tr("Error initializing StreetsideViewerPanel - JavaFX {0}", e.getMessage()));
    99                                 }*/
     94                                setScene(createDefaultScene());
    10095                        }
    10196                });
     
    481476        }
    482477
    483         /*public void setCubemapImages(BufferedImage img, BufferedImage img1, BufferedImage img2, BufferedImage img3,
    484                         BufferedImage img4, BufferedImage img5) {
    485                 cubemapBox = null;
    486 
    487                 GraphicsUtils.PlatformHelper.run(new Runnable() {
    488                         @Override
    489                         public void run() {
    490                                 try {
    491                                         // initialize without imagery.
    492                                         scene = createScene(img, img1, img2, img3, img4, img5);
    493                                         setScene(scene);
    494                                 } catch (NonInvertibleTransformException e) {
    495                                         logger.error(I18n.tr("Error initializing StreetsideViewerPanel - JavaFX {0}", e.getMessage()));
    496                                 }
    497                         }
    498                 });
    499         }*/
    500 
    501478        public CubemapBox getCubemapBox() {
    502479                if (cubemapBox == null) {
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/WebLinkAction.java

    r34365 r34393  
    4545      StreetsideUtils.browse(url);
    4646    } catch (IOException e1) {
    47       String msg = I18n.tr("Could not open the URL {0} in a browser", url == null ? "‹null›" : url);
     47      String msg = "Could not open the URL " + url == null ? "‹null›" : url + " in a browser";
    4848      logger.warn(msg, e1);
    4949      new Notification(msg).setIcon(JOptionPane.WARNING_MESSAGE).show();
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/io/download/BoundsDownloadRunnable.java

    r34365 r34393  
    1313import org.openstreetmap.josm.gui.Notification;
    1414import org.openstreetmap.josm.plugins.streetside.StreetsidePlugin;
     15import org.openstreetmap.josm.plugins.streetside.utils.StreetsideProperties;
    1516import org.openstreetmap.josm.plugins.streetside.utils.StreetsideURL.APIv3;
    1617import org.openstreetmap.josm.tools.I18n;
     
    3233  public void run() {
    3334    URL nextURL = getUrlGenerator().apply(bounds);
    34     logger.info(I18n.tr("nextURL: {0}", nextURL.toString()));
     35    if(StreetsideProperties.DEBUGING_ENABLED.get()) {
     36      logger.debug("nextURL: " + nextURL.toString());
     37    }
    3538    try {
    3639      while (nextURL != null) {
    3740        if (Thread.interrupted()) {
    38           logger.info(I18n.tr("{} for {} interrupted!", getClass().getSimpleName(), bounds.toString()));
     41          logger.error(getClass().getSimpleName() + " for " + bounds.toString() + " interrupted!");
    3942          return;
    4043        }
     
    4447      }
    4548    } catch (IOException e) {
    46       String message = I18n.tr("Could not read from URL {0}!", nextURL.toString());
     49      String message = "Could not read from URL " + nextURL.toString() + "!";
    4750      logger.warn(message, e);
    4851      if (!GraphicsEnvironment.isHeadless()) {
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/io/download/SequenceDownloadRunnable.java

    r34365 r34393  
    2020import org.openstreetmap.josm.plugins.streetside.utils.StreetsideSequenceIdGenerator;
    2121import org.openstreetmap.josm.plugins.streetside.utils.StreetsideURL.APIv3;
    22 import org.openstreetmap.josm.tools.I18n;
    2322
    2423import com.fasterxml.jackson.core.JsonParseException;
     
    10099
    101100          // Add list of cubemap tile images to images
    102           List<StreetsideImage> tiles = new ArrayList<StreetsideImage>();
     101          List<StreetsideImage> tiles = new ArrayList<>();
    103102
    104103          EnumSet.allOf(CubemapUtils.CubemapFaces.class).forEach(face -> {
     
    129128
    130129          bubbleImages.add(image);
    131           logger.info(I18n.tr("Added image with id <" + image.getId() + ">"));
     130          logger.info("Added image with id <" + image.getId() + ">");
    132131          if (StreetsideProperties.PREDOWNLOAD_CUBEMAPS.get()) {
    133132            StreetsideData.downloadSurroundingCubemaps(image);
     
    137136
    138137    parser.close();
    139 
    140     //StreetsideImage[] images;
    141 
    142       // First load all of the 'bubbles' from the request as Streetside Images
    143       /*List<StreetsideImage> images = mapper
    144         .readValue(new BufferedInputStream(con.getInputStream()), new TypeReference<List<StreetsideImage>>() {});
    145       */
    146 
    147 
    148       //images = mapper.readValue(new BufferedInputStream(con.getInputStream()), StreetsideImage[].class);
    149 
    150       /*for (StreetsideImage image : bubbleImages) {
    151         image = JsonStreetsideSequencesDecoder.decodeBubbleData(image);
    152         if(image != null) bubbleImages.add(image);
    153       }*/
    154138
    155139    } catch (JsonParseException e) {
     
    187171
    188172    final long endTime = System.currentTimeMillis();
    189     logger.info(I18n.tr("Sucessfully loaded {0} Microsoft Streetside images in {0} ",seq.getImages().size(),endTime-startTime%60));
     173    logger.info("Sucessfully loaded " + seq.getImages().size() + " Microsoft Streetside images in " + (endTime-startTime/1000));
    190174  }
    191175
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/oauth/OAuthPortListener.java

    r34365 r34393  
    3333protected static final String RESPONSE = String.format(
    3434   "<!DOCTYPE html><html><head><meta charset=\"utf8\"><title>%s</title></head><body>%s</body></html>",
    35    I18n.tr("Mapillary login"),
     35   I18n.tr("Streetside login"),
    3636   I18n.tr("Login successful, return to JOSM.")
    3737);
     
    6868   StreetsideUser.reset();
    6969
    70    logger.info(I18n.tr("Successful login with Mapillary, the access token is: {0}", accessToken));
     70   logger.info(I18n.tr("Successful login with Streetside, the access token is: {0}", accessToken));
    7171   // Saves the access token in preferences.
    7272   StreetsideUser.setTokenValid(true);
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/oauth/StreetsideUser.java

    r34365 r34393  
    3333*/
    3434public static synchronized String getUsername() {
    35  //if (!isTokenValid) {
     35   // users are not currently supported in Streetside
    3636   return null;
    37  //}
    38  /*if (username == null) {
    39    try {
    40      username = OAuthUtils
    41          .getWithHeader(StreetsideURL.APIv3.userURL())
    42          .getString("username");
    43    } catch (IOException e) {
    44      logger.warn(I18n.tr("Invalid Streetside token, resetting field", e));
    45      reset();
    46    }
    47  }
    48  return username;*/
    4937}
    5038
     
    5442*/
    5543public static synchronized Map<String, String> getSecrets() {
    56  //if (!isTokenValid)
    57    return null;
    58  /*Map<String, String> hash = new HashMap<>();
    59  try {
    60    if (imagesHash == null)
    61      imagesHash = OAuthUtils
    62          .getWithHeader(StreetsideURL.uploadSecretsURL())
    63          .getString("images_hash", null);
    64    hash.put("images_hash", imagesHash);
    65    if (imagesPolicy == null)
    66      imagesPolicy = OAuthUtils
    67          .getWithHeader(StreetsideURL.uploadSecretsURL())
    68          .getString("images_policy");
    69  } catch (IOException e) {
    70    logger.warn(I18n.tr("Invalid Streetside token, resetting field", e));
    71    reset();
    72  }
    73  hash.put("images_policy", imagesPolicy);
    74  return hash;*/
     44  // secrets are not currently supported in Streetside
     45  return null;
    7546}
    7647
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/PluginState.java

    r34365 r34393  
    109109    JOptionPane.showMessageDialog(
    110110      Main.parent,
    111       tr("You have successfully uploaded {0} images to mapillary.com", numImages),
     111      tr("You have successfully uploaded {0} images to Bing.com", numImages),
    112112      tr("Finished upload"),
    113113      JOptionPane.INFORMATION_MESSAGE
     
    121121    JOptionPane.showMessageDialog(
    122122        Main.parent,
    123         tr("You are not logged in, please log in to Mapillary in the preferences"),
    124         tr("Not Logged in to Mapillary"),
     123        tr("You are not logged in, please log in to Streetside in the preferences"),
     124        tr("Not Logged in to Streetside"),
    125125        JOptionPane.WARNING_MESSAGE
    126126    );
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/StreetsideURL.java

    r34365 r34393  
    174174      }
    175175                  URL url = StreetsideURL.string2URL(VirtualEarth.BASE_URL_PREFIX + modifiedId.toString() + VirtualEarth.BASE_URL_SUFFIX);
    176             logger.info(I18n.tr("Tile task URL {0} invoked.", url.toString()));
     176            if(StreetsideProperties.DEBUGING_ENABLED.get()) {
     177                    logger.debug("Tile task URL " + url.toString() + " invoked.");
     178            }
    177179                        return url;
    178180                }
     
    198200                        return StreetsideURL.string2URL(VirtualEarth.BASE_URL_PREFIX + id + VirtualEarth.BASE_URL_SUFFIX);
    199201                }
    200 
    201                 /**
    202                  * Gives you the URL for the blur editor of the image with the given key.
    203                  * @param key the key of the image for which you want to open the blur editor
    204                  * @return the URL of the blur editor
    205                  * @throws IllegalArgumentException if the image key is <code>null</code>
    206                  */
    207                 /*public static URL blurEditImage(final String key) {
    208                         if (key == null) {
    209                                 throw new IllegalArgumentException("The image key must not be null!");
    210                         }
    211                         String urlEncodedKey;
    212                         try {
    213                                 urlEncodedKey = URLEncoder.encode(key, StandardCharsets.UTF_8.name());
    214                         } catch (final UnsupportedEncodingException e) {
    215                                 logger.error(I18n.tr("Unsupported encoding when URL encoding", e));
    216                                 urlEncodedKey = key;
    217                         }
    218                         return StreetsideURL.string2URL(MainWebsite.BASE_URL, "app/blur?focus=photo&pKey=", urlEncodedKey);
    219                 }*/
    220202
    221203                /**
     
    281263                                                        res.add(new URL(urlStr));
    282264                                                } catch (final MalformedURLException e) {
    283                                                         logger.error(I18n.tr("Error creating URL String for cubemap {0}", cubemapImageId));
     265                                                        logger.error("Error creating URL String for cubemap " + cubemapImageId);
    284266                                                        e.printStackTrace();
    285267                                                }
     
    298280                                                res.add(new URL(urlStr));
    299281                                        } catch (final MalformedURLException e) {
    300                                                 logger.error(I18n.tr("Error creating URL String for cubemap {0}", cubemapImageId));
     282                                                logger.error("Error creating URL String for cubemap " + cubemapImageId);
    301283                                                e.printStackTrace();
    302284                                        }
     
    338320                }
    339321
    340                 logger.info(I18n.tr("queryString result: {0}", ret.toString()));
     322                if(StreetsideProperties.DEBUGING_ENABLED.get()) {
     323                  logger.debug("queryString result: " + ret.toString());
     324                }
    341325
    342326                return ret.toString();
     
    362346                        }
    363347                }
    364                 logger.info(I18n.tr("queryStreetsideBoundsString result: {0}", ret.toString()));
     348
     349                if(StreetsideProperties.DEBUGING_ENABLED.get()) {
     350                  logger.debug("queryStreetsideBoundsString result: " + ret.toString());
     351                }
    365352
    366353                return ret.toString();
     
    376363                        logger.error(e); // This should not happen, as the encoding is hard-coded
    377364                }
    378                 logger.info(I18n.tr("queryById result: {0}", ret.toString()));
     365
     366                if(StreetsideProperties.DEBUGING_ENABLED.get()) {
     367                  logger.info("queryById result: " + ret.toString());
     368                }
    379369                return ret.toString();
    380370        }
Note: See TracChangeset for help on using the changeset viewer.