Changeset 29434 in osm
- Timestamp:
- 2013-03-29T21:30:25+01:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/imagery_offset_db/src/iodb
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagery_offset_db/src/iodb/CalibrationLayer.java
r29433 r29434 100 100 public String getToolTipText() { 101 101 if( obj.isDeprecated() ) 102 return tr("A deprecated calibration of type {0} by {1}", OffsetInfoAction.getGeometryType(obj), obj.getAuthor());102 return tr("A deprecated calibration geometry of {0} nodes by {1}", obj.getGeometry().length, obj.getAuthor()); 103 103 else 104 return tr("A calibration of type {0} by {1}", OffsetInfoAction.getGeometryType(obj), obj.getAuthor());104 return tr("A calibration geometry of {0} nodes by {1}", obj.getGeometry().length, obj.getAuthor()); 105 105 } 106 106 … … 198 198 class ZoomToLayerAction extends AbstractAction { 199 199 public ZoomToLayerAction() { 200 super(tr("Zoom to layer"));200 super(tr("Zoom to {0}", tr("layer"))); // to use translation from AutoScaleAction 201 201 putValue(SMALL_ICON, ImageProvider.get("dialogs/autoscale/layer")); 202 202 } -
applications/editors/josm/plugins/imagery_offset_db/src/iodb/DeprecateOffsetAction.java
r29433 r29434 45 45 tr("Are you sure this calibration geometry is aligned badly?"); 46 46 if( JOptionPane.showConfirmDialog(Main.parent, 47 tr("Warning: deprecation is basically irreversible! \n{0}", desc),47 tr("Warning: deprecation is basically irreversible!")+ "\n" + desc, 48 48 ImageryOffsetTools.DIALOG_TITLE, JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) != JOptionPane.YES_OPTION ) { 49 49 return; … … 78 78 } 79 79 80 String message; 81 if(offset instanceof ImageryOffset) 82 message = tr("Please enter the reason why you mark this imagery offset as deprecated"); 83 else 84 message = tr("Please enter the reason why you mark this calibration geometry as deprecated"); 85 String reason = StoreImageryOffsetAction.queryDescription(message); 80 String message = offset instanceof ImageryOffset 81 ? tr("Please enter the reason why you mark this imagery offset as deprecated") 82 : tr("Please enter the reason why you mark this calibration geometry as deprecated"); 83 String reason = StoreImageryOffsetAction.queryDescription(message + ":"); 86 84 if( reason == null ) 87 85 return; -
applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetInfoAction.java
r29433 r29434 76 76 sb.append(tr("Imagery ID")).append(": ").append(((ImageryOffset)offset).getImagery()).append('\n'); 77 77 } else { 78 sb.append(tr("A calibration of type {0}", getGeometryType((CalibrationObject)offset))).append('\n');78 sb.append(tr("A calibration geometry of {0} nodes", ((CalibrationObject)offset).getGeometry().length)).append('\n'); 79 79 } 80 80 … … 101 101 return sb.toString(); 102 102 } 103 104 /**105 * Explains a calibration object geometry type: whether is's a point,106 * a path or a polygon.107 */108 public static String getGeometryType( CalibrationObject obj ) {109 if( obj.getGeometry() == null )110 return tr("nothing"); // meant never to happen111 int n = obj.getGeometry().length;112 if( n == 1 )113 return tr("point");114 else if( n > 1 && !obj.getGeometry()[0].equals(obj.getGeometry()[n - 1]) )115 return tr("path ({0} nodes)", n);116 else if( n > 1 && obj.getGeometry()[0].equals(obj.getGeometry()[n - 1]) )117 return tr("polygon ({0} nodes)", n - 1);118 else119 return tr("geometry"); // meant never to happen120 }121 103 }
Note:
See TracChangeset
for help on using the changeset viewer.