Ticket #12045: 12045.patch
| File 12045.patch, 8.2 KB (added by , 10 years ago) | 
|---|
- 
      
build.xml
1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <project name="PicLayer" default="dist" basedir="."> 3 <property name="commit.message" value="[josm/PicLayer] - #1 0335 add interpolation hints for the image drawing"/>3 <property name="commit.message" value="[josm/PicLayer] - #12045 add ability to localize dialog titles"/> 4 4 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 5 5 <property name="plugin.main.version" value="7817"/> 6 6  - 
      
src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java
20 20 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 22 23 import static org.openstreetmap.josm.tools.I18n.tr;24 25 23 import java.util.ArrayList; 26 24 import java.util.List; 27 28 25 import javax.swing.JOptionPane; 29 import javax.swing.UIManager;30 31 26 import org.openstreetmap.josm.Main; 32 27 import org.openstreetmap.josm.actions.JosmAction; 33 28 import org.openstreetmap.josm.actions.mapmode.MapMode; … … 52 47 import org.openstreetmap.josm.plugins.piclayer.actions.transform.affine.RemovePointAction; 53 48 import org.openstreetmap.josm.plugins.piclayer.actions.transform.affine.TransformPointAction; 54 49 import org.openstreetmap.josm.plugins.piclayer.layer.PicLayerAbstract; 50 import static org.openstreetmap.josm.tools.I18n.tr; 55 51 56 52 /** 57 53 * Main Plugin class. … … 157 153 if (arg0 instanceof PicLayerAbstract && ((PicLayerAbstract) arg0).getTransformer().isModified()) { 158 154 if (JOptionPane.showConfirmDialog(Main.parent, tr("Do you want to save current calibration of layer {0}?", 159 155 ((PicLayerAbstract)arg0).getPicLayerName()), 160 UIManager.getString("OptionPane.titleText"),156 tr("Select an option"), 161 157 JOptionPane.YES_NO_OPTION) == 0) 162 158 new SavePictureCalibrationAction((PicLayerAbstract) arg0).actionPerformed(null); 163 159 }  - 
      
src/org/openstreetmap/josm/plugins/piclayer/actions/LoadPictureCalibrationAction.java
76 76 } catch (Exception e) { 77 77 // Error 78 78 e.printStackTrace(); 79 JOptionPane.showMessageDialog(Main.parent , tr("Loading file failed: {0}", e.getMessage()) );79 JOptionPane.showMessageDialog(Main.parent , tr("Loading file failed: {0}", e.getMessage()), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE); 80 80 } 81 81 } 82 82 }  - 
      
src/org/openstreetmap/josm/plugins/piclayer/actions/LoadPictureCalibrationFromWorldAction.java
38 38 } catch (Exception ex) { 39 39 // Error 40 40 ex.printStackTrace(); 41 JOptionPane.showMessageDialog(Main.parent , tr("Loading file failed: {0}", ex.getMessage()) );41 JOptionPane.showMessageDialog(Main.parent , tr("Loading file failed: {0}", ex.getMessage()), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE); 42 42 } 43 43 } 44 44 }  - 
      
src/org/openstreetmap/josm/plugins/piclayer/actions/SavePictureCalibrationAction.java
84 84 } catch (Exception e) { 85 85 // Error 86 86 e.printStackTrace(); 87 JOptionPane.showMessageDialog(Main.parent , tr("Saving file failed: {0}", e.getMessage()) );87 JOptionPane.showMessageDialog(Main.parent , tr("Saving file failed: {0}", e.getMessage()), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE); 88 88 } 89 89 } 90 90 }  - 
      
src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromClipboardAction.java
59 59 catch (IOException e) { 60 60 // Failed 61 61 System.out.println( "NewLayerFromClipboardAction::actionPerformed - " + e.getMessage() ); 62 JOptionPane.showMessageDialog(null, e.getMessage() );62 JOptionPane.showMessageDialog(null, e.getMessage(), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE); 63 63 return; 64 64 } 65 65 // Add layer  - 
      
src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromFileAction.java
135 135 kml.process(); 136 136 JOptionPane.showMessageDialog(null, tr("KML calibration is in beta stage and may produce incorrectly calibrated layers!\n"+ 137 137 "Please use {0} to upload your KMLs that were calibrated incorrectly.", 138 "https://josm.openstreetmap.de/ticket/5451") );138 "https://josm.openstreetmap.de/ticket/5451"), tr("Notification"), JOptionPane.INFORMATION_MESSAGE); 139 139 for (KMLGroundOverlay overlay : kml.getGroundOverlays()) { 140 140 //TODO: zoom to whole picture, not only the last 141 141 addNewLayerFromKML(file, overlay, newLayerPos); … … 157 157 catch (IOException e) { 158 158 // Failed 159 159 System.out.println( "NewLayerFromFileAction::actionPerformed - " + e.getMessage() ); 160 JOptionPane.showMessageDialog(null, e.getMessage() );160 JOptionPane.showMessageDialog(null, e.getMessage(), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE); 161 161 } 162 162 } 163 163 … … 183 183 } catch (IOException e) { 184 184 // Failed 185 185 System.out.println( "NewLayerFromFileAction::actionPerformed - " + e.getMessage() ); 186 JOptionPane.showMessageDialog(null, e.getMessage() );186 JOptionPane.showMessageDialog(null, e.getMessage(), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE); 187 187 } 188 188 } 189 189 }  - 
      
src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerFromFile.java
215 215 msg += "\n" + tr("Set \"{0}\" to yes/no/ask in the preferences\n"+ 216 216 "to control the autoloading of calibration files.", prefkey); 217 217 msg += "\n" + tr("Do you want to apply it ?"); 218 int answer = JOptionPane.showConfirmDialog(Main.parent, msg, tr("Load calibration file ?"), JOptionPane.YES_NO_OPTION);218 int answer = JOptionPane.showConfirmDialog(Main.parent, msg, tr("Load calibration file?"), JOptionPane.YES_NO_OPTION); 219 219 if (answer == JOptionPane.YES_OPTION) { 220 220 loadcal = true; 221 221 }  
