Changeset 20217 in osm for applications/editors/josm/plugins/piclayer/src
- Timestamp:
- 2010-02-28T18:59:14+01:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer
- Files:
-
- 1 deleted
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/CalibrationFileFilter.java
r17327 r20217 19 19 ***************************************************************************/ 20 20 package org.openstreetmap.josm.plugins.piclayer; 21 22 import static org.openstreetmap.josm.tools.I18n.tr; 21 23 22 24 import java.io.File; … … 44 46 @Override 45 47 public String getDescription() { 46 return "Calibration Files (*" + EXTENSION + ")"; 48 return tr("Calibration Files")+ " (*" + EXTENSION + ")"; 47 49 } 48 49 50 } -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/LoadPictureCalibrationAction.java
r17327 r20217 20 20 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 24 22 25 import java.awt.event.ActionEvent; 23 26 import java.io.File; … … 48 51 */ 49 52 public LoadPictureCalibrationAction( PicLayerAbstract owner ) { 50 super("Load Picture Calibration..." , null,"Loads calibration data to a file", null, false);53 super(tr("Load Picture Calibration..."), null, tr("Loads calibration data to a file"), null, false); 51 54 // Remember the owner... 52 55 m_owner = owner; … … 74 77 // Error 75 78 e.printStackTrace(); 76 JOptionPane.showMessageDialog(Main.parent , "Loading file failed: " +e.getMessage());79 JOptionPane.showMessageDialog(Main.parent , tr("Loading file failed: {0}", e.getMessage())); 77 80 } 78 } 81 } 79 82 } 80 83 } -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/MovePictureAction.java
r14779 r20217 20 20 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 22 24 23 25 import java.awt.event.MouseEvent; … … 51 53 */ 52 54 public MovePictureAction(MapFrame frame) { 53 super("PicLayer ", "move", "Drag to move the picture", frame, ImageProvider.getCursor("crosshair", null));55 super(tr("PicLayer move"), "move", tr("Drag to move the picture"), frame, ImageProvider.getCursor("crosshair", null)); 54 56 } 55 57 -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/NewLayerFromClipboardAction.java
r14779 r20217 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 24 23 25 import java.awt.event.ActionEvent; 24 26 import java.io.IOException; … … 38 40 */ 39 41 public NewLayerFromClipboardAction() { 40 super("New picture layer from clipboard", null, null, null, false); 42 super(tr("New picture layer from clipboard"), null, null, null, false); 41 43 } 42 44 -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/NewLayerFromFileAction.java
r14779 r20217 20 20 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 22 24 23 25 import java.awt.event.ActionEvent; … … 60 62 @Override 61 63 public String getDescription() { 62 return "Image files"; 64 return tr("Image files"); 63 65 } 64 66 … … 69 71 */ 70 72 public NewLayerFromFileAction() { 71 super("New picture layer from file...", null, null, null, false); 73 super(tr("New picture layer from file..."), null, null, null, false); 72 74 } 73 75 -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerAbstract.java
r18597 r20217 20 20 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 22 24 23 25 import java.awt.Color; … … 93 95 // Create popup menu 94 96 // Reset submenu 95 JMenu reset_submenu = new JMenu( 97 JMenu reset_submenu = new JMenu(tr("Reset")); 96 98 reset_submenu.add( new ResetPictureAllAction( this ) ); 97 99 reset_submenu.addSeparator(); … … 105 107 new JMenuItem( new SavePictureCalibrationAction(this)), 106 108 new JMenuItem( new LoadPictureCalibrationAction(this)), 107 new JSeparator(),108 new JMenuItem( new HelpAction() )109 109 }; 110 110 … … 122 122 Image image = createImage(); 123 123 if ( image == null ) { 124 throw new IOException( 124 throw new IOException(tr("Image not created properly.")); 125 125 } 126 126 // Convert to Buffered Image - not sure if this is the right way... … … 136 136 m_initial_scale = Main.map.mapView.getDist100Pixel(); 137 137 } else { 138 throw new IOException( 138 throw new IOException(tr("Could not find the map object.")); 139 139 } 140 140 } -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerFromClipboard.java
r17327 r20217 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 24 23 25 import java.awt.Image; 24 26 import java.awt.Toolkit; … … 41 43 // Check result 42 44 if ( t == null ) { 43 throw new IOException( 45 throw new IOException(tr("Nothing in clipboard")); 44 46 } 45 47 … … 50 52 image = (Image)t.getTransferData(DataFlavor.imageFlavor); 51 53 } else { 52 throw new IOException( 54 throw new IOException(tr("The clipboard data is not an image")); 53 55 } 54 56 } catch (UnsupportedFlavorException e) { -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java
r19467 r20217 70 70 m_menu.add( m_newFromFileAction = new NewLayerFromFileAction() ); 71 71 m_menu.add( m_newFromClipAction = new NewLayerFromClipboardAction() ); 72 m_menu.addSeparator();73 m_menu.add( new HelpAction() );74 72 m_newFromFileAction.setEnabled( false ); 75 73 m_newFromClipAction.setEnabled( false ); -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPictureAllAction.java
r17327 r20217 20 20 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 24 22 25 import java.awt.event.ActionEvent; 23 26 … … 39 42 */ 40 43 public ResetPictureAllAction( PicLayerAbstract owner ) { 41 super( "All", null, "Resets picture calibration", null, false);44 super(tr("All"), null, tr("Resets picture calibration"), null, false); 42 45 // Remember the owner... 43 46 m_owner = owner; -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPictureAngleAction.java
r17327 r20217 20 20 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 24 22 25 import java.awt.event.ActionEvent; 23 26 … … 39 42 */ 40 43 public ResetPictureAngleAction( PicLayerAbstract owner ) { 41 super( "Angle", null, "Resets picture rotation", null, false);44 super(tr("Angle"), null, tr("Resets picture rotation"), null, false); 42 45 // Remember the owner... 43 46 m_owner = owner; -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPicturePositionAction.java
r17327 r20217 20 20 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 24 22 25 import java.awt.event.ActionEvent; 23 26 … … 39 42 */ 40 43 public ResetPicturePositionAction( PicLayerAbstract owner ) { 41 super( "Position", null,"Resets picture position", null, false);44 super(tr("Reset position"), null, tr("Resets picture position"), null, false); 42 45 // Remember the owner... 43 46 m_owner = owner; -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPictureScaleAction.java
r17327 r20217 20 20 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 24 22 25 import java.awt.event.ActionEvent; 23 26 … … 39 42 */ 40 43 public ResetPictureScaleAction( PicLayerAbstract owner ) { 41 super( "Scale", null, "Resets picture scale", null, false);44 super(tr("Scale"), null, tr("Resets picture scale"), null, false); 42 45 // Remember the owner... 43 46 m_owner = owner; -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/RotatePictureAction.java
r14779 r20217 20 20 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 22 24 23 25 import java.awt.event.MouseEvent; … … 50 52 */ 51 53 public RotatePictureAction(MapFrame frame) { 52 super("PicLayer ", "rotate", "Drag to rotate the picture", frame, ImageProvider.getCursor("crosshair", null));54 super(tr("PicLayer rotate"), "rotate", tr("Drag to rotate the picture"), frame, ImageProvider.getCursor("crosshair", null)); 53 55 // TODO Auto-generated constructor stub 54 56 } -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/SavePictureCalibrationAction.java
r17327 r20217 20 20 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 24 22 25 import java.awt.event.ActionEvent; 23 26 import java.io.File; … … 47 50 */ 48 51 public SavePictureCalibrationAction( PicLayerAbstract owner ) { 49 super("Save Picture Calibration..." , null,"Saves calibration data to a file", null, false);52 super(tr("Save Picture Calibration..."), null, tr("Saves calibration data to a file"), null, false); 50 53 // Remember the owner... 51 54 m_owner = owner; … … 76 79 m_owner.saveCalibration(props); 77 80 try { 78 props.store(new FileOutputStream(file), "JOSM PicLayer plugin calibration data"); 81 props.store(new FileOutputStream(file), tr("JOSM PicLayer plugin calibration data")); 79 82 } catch (Exception e) { 80 83 // Error 81 84 e.printStackTrace(); 82 JOptionPane.showMessageDialog(Main.parent , "Saving file failed: " +e.getMessage());85 JOptionPane.showMessageDialog(Main.parent , tr("Saving file failed: {0}", e.getMessage())); 83 86 } 84 87 } -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScaleXPictureAction.java
r17321 r20217 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 24 23 25 import org.openstreetmap.josm.Main; 24 26 import org.openstreetmap.josm.actions.mapmode.MapMode; … … 37 39 */ 38 40 public ScaleXPictureAction(MapFrame frame) { 39 super("PicLayer ", "scale_x", "Drag to scale the picture in the X Axis", frame);41 super(tr("PicLayer scale X"), "scale_x", tr("Drag to scale the picture in the X Axis"), frame); 40 42 // TODO Auto-generated constructor stub 41 43 } -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScaleXYPictureAction.java
r17321 r20217 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 24 23 25 import org.openstreetmap.josm.Main; 24 26 import org.openstreetmap.josm.actions.mapmode.MapMode; … … 37 39 */ 38 40 public ScaleXYPictureAction(MapFrame frame) { 39 super("PicLayer ", "scale", "Drag to scale the picture in the X and Y Axis", frame);41 super(tr("PicLayer scale"), "scale", tr("Drag to scale the picture in the X and Y Axis"), frame); 40 42 // TODO Auto-generated constructor stub 41 43 } -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScaleYPictureAction.java
r17321 r20217 21 21 package org.openstreetmap.josm.plugins.piclayer; 22 22 23 import static org.openstreetmap.josm.tools.I18n.tr; 24 23 25 import org.openstreetmap.josm.Main; 24 26 import org.openstreetmap.josm.actions.mapmode.MapMode; … … 37 39 */ 38 40 public ScaleYPictureAction(MapFrame frame) { 39 super("PicLayer ", "scale_y", "Drag to scale the picture in the Y Axis", frame);41 super(tr("PicLayer scale Y"), "scale_y", tr("Drag to scale the picture in the Y Axis"), frame); 40 42 // TODO Auto-generated constructor stub 41 43 }
Note:
See TracChangeset
for help on using the changeset viewer.