Changeset 29434 in osm for applications/editors


Ignore:
Timestamp:
2013-03-29T21:30:25+01:00 (12 years ago)
Author:
zverik
Message:

fixed composite translation strings

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  
    100100    public String getToolTipText() {
    101101        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());
    103103        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());
    105105    }
    106106
     
    198198    class ZoomToLayerAction extends AbstractAction {
    199199        public ZoomToLayerAction() {
    200             super(tr("Zoom to layer"));
     200            super(tr("Zoom to {0}", tr("layer"))); // to use translation from AutoScaleAction
    201201            putValue(SMALL_ICON, ImageProvider.get("dialogs/autoscale/layer"));
    202202        }
  • applications/editors/josm/plugins/imagery_offset_db/src/iodb/DeprecateOffsetAction.java

    r29433 r29434  
    4545                tr("Are you sure this calibration geometry is aligned badly?");
    4646        if( JOptionPane.showConfirmDialog(Main.parent,
    47                 tr("Warning: deprecation is basically irreversible!\n{0}", desc),
     47                tr("Warning: deprecation is basically irreversible!")+ "\n" + desc,
    4848                ImageryOffsetTools.DIALOG_TITLE, JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) != JOptionPane.YES_OPTION ) {
    4949            return;
     
    7878        }
    7979
    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 + ":");
    8684        if( reason == null )
    8785            return;
  • applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetInfoAction.java

    r29433 r29434  
    7676            sb.append(tr("Imagery ID")).append(": ").append(((ImageryOffset)offset).getImagery()).append('\n');
    7777        } 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');
    7979        }
    8080       
     
    101101        return sb.toString();
    102102    }
    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 happen
    111         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         else
    119             return tr("geometry"); // meant never to happen
    120     }
    121103}
Note: See TracChangeset for help on using the changeset viewer.