Changeset 2848 in josm for trunk


Ignore:
Timestamp:
2010-01-13T20:13:40+01:00 (10 years ago)
Author:
mjulius
Message:

fix messages for gui/io

Location:
trunk/src/org/openstreetmap/josm/gui/io
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java

    r2711 r2848  
    6363        OsmPrimitive p = layer.data.getPrimitiveById(id, type);
    6464        if (p == null)
    65             throw new IllegalStateException(tr("Failed to update primitive with id {0} because current edit layer doesn't include such a primitive", id));
     65            throw new IllegalStateException(tr("Failed to update primitive with id {0} because current edit layer does not include such a primitive", id));
    6666        Main.worker.execute(new UpdatePrimitivesTask(layer, Collections.singleton(p)));
    6767    }
     
    192192     */
    193193    protected void handleUploadConflictForClosedChangeset(long changsetId, Date d) {
    194         String msg =  tr("<html>Uploading <strong>failed</strong> because you''ve been using<br>"
     194        String msg =  tr("<html>Uploading <strong>failed</strong> because you have been using<br>"
    195195                + "changeset {0} which was already closed at {1}.<br>"
    196196                + "Please upload again with a new or an existing open changeset.</html>",
  • trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java

    r2828 r2848  
    238238            tfPassword.setToolTipText(tr("Please enter the password name of your OSM account"));
    239239            lblHeading.setText(
    240                     tr("<html>Authenticating at the OSM API ''{0}'' failed. Please enter a valid username and a valid password.</html>",
    241                             OsmApi.getOsmApi().getBaseUrl()));
     240                    "<html>" + tr("Authenticating at the OSM API ''{0}'' failed. Please enter a valid username and a valid password.",
     241                            OsmApi.getOsmApi().getBaseUrl()) + "</html>");
    242242            lblWarning.setText(tr("Warning: The password is transferred unencrypted."));
    243243        }
     
    255255            tfPassword.setToolTipText(tr("Please enter the password for authenticating at your proxy server"));
    256256            lblHeading.setText(
    257                     tr("<html>Authenticating at the HTTP proxy ''{0}'' failed. Please enter a valid username and a valid password.</html>",
    258                             System.getProperty("http.proxyHost") + ":" + System.getProperty("http.proxyPort")));
    259             lblWarning.setText(tr("<html>Warning: depending on the authentication method the proxy server uses the password may be transferred unencrypted.</html>"));
     257                    "<html>" + tr("Authenticating at the HTTP proxy ''{0}'' failed. Please enter a valid username and a valid password.",
     258                            System.getProperty("http.proxyHost") + ":" + System.getProperty("http.proxyPort")) + "</html>");
     259            lblWarning.setText("<html>" + tr("Warning: depending on the authentication method the proxy server uses the password may be transferred unencrypted.") + "</html>");
    260260        }
    261261
  • trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java

    r2789 r2848  
    6161            JOptionPane.showMessageDialog(
    6262                    JOptionPane.getFrameForComponent(parent),
    63                     tr("<html>Could not retrieve the list of your open changesets because<br>"
    64                             + "JOSM doesn't know your identity.<br>"
    65                             + "You've either chosen to work anonymously or you are not entitled<br>"
    66                             + "to know the identity of the user on whose behalf you are working."
    67                             + "</html>"
    68                     ),
     63                    "<html>" + tr("Could not retrieve the list of your open changesets because<br>"
     64                            + "JOSM does not know your identity.<br>"
     65                            + "You have either chosen to work anonymously or you are not entitled<br>"
     66                            + "to know the identity of the user on whose behalf you are working.")
     67                            + "</html>",
    6968                    tr("Missing user identity"),
    7069                    JOptionPane.ERROR_MESSAGE
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayerInfo.java

    r2512 r2848  
    55
    66import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     7import org.openstreetmap.josm.tools.CheckParameterUtil;
     8
    79import static org.openstreetmap.josm.tools.I18n.tr;
    810
     
    2830     */
    2931    public SaveLayerInfo(OsmDataLayer layer) {
    30         if (layer == null)
    31             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer"));
     32        CheckParameterUtil.ensureParameterNotNull(layer, "layer");
    3233        this.layer = layer;
    3334        this.doSaveToFile = layer.requiresSaveToFile();
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayerTask.java

    r2512 r2848  
    77import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    88import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     9import org.openstreetmap.josm.tools.CheckParameterUtil;
    910
    1011/**
     
    3536     */
    3637    protected SaveLayerTask(SaveLayerInfo layerInfo, ProgressMonitor monitor) {
    37         if (layerInfo == null)
    38             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layerInfo"));
     38        CheckParameterUtil.ensureParameterNotNull(layerInfo, "layerInfo");
    3939        if (monitor == null) {
    4040            monitor = NullProgressMonitor.INSTANCE;
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java

    r2599 r2848  
    487487            int numProblems = model.getNumCancel() + model.getNumFailed();
    488488            if (numProblems == 0) return;
    489             String msg = tr(
     489            String msg = trn(
    490490                    "<html>An upload and/or save operation of one layer with modifications<br>"
    491491                    + "was cancelled or has failed.</html>",
  • trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java

    r2711 r2848  
    2020import org.openstreetmap.josm.io.OsmServerWriter;
    2121import org.openstreetmap.josm.io.OsmTransferException;
     22import org.openstreetmap.josm.tools.CheckParameterUtil;
    2223
    2324/**
     
    5657     */
    5758    public UploadLayerTask(UploadStrategySpecification strategy, OsmDataLayer layer, ProgressMonitor monitor, Changeset changeset) {
    58         if (layer == null)
    59             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer"));
    60         if (strategy == null)
    61             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "strategy"));
     59        CheckParameterUtil.ensureParameterNotNull(layer, "layer");
     60        CheckParameterUtil.ensureParameterNotNull(strategy, "strategy");
    6261        if (monitor == null) {
    6362            monitor = NullProgressMonitor.INSTANCE;
  • trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java

    r2801 r2848  
    322322            lbl.setIcon(ImageProvider.get("warning-small.png"));
    323323            lbl.setText(tr("Upload in one request not possible (too many objects to upload)"));
    324             lbl.setToolTipText(tr("<html>Can''t upload {0} objects in one request because the<br>"
     324            lbl.setToolTipText(tr("<html>Cannot upload {0} objects in one request because the<br>"
    325325                    + "max. changeset size {1} on server ''{2}'' is exceeded.</html>",
    326326                    numUploadedObjects,
Note: See TracChangeset for help on using the changeset viewer.