Changeset 2850 in josm for trunk


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

fix messages for gui

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
20 edited

Legend:

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

    r2801 r2850  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5
     6import java.text.MessageFormat;
    57
    68import org.openstreetmap.josm.Main;
     
    8284        CheckParameterUtil.ensureParameterNotNull(userName, "userName");
    8385        if (userName.trim().equals(""))
    84             throw new IllegalArgumentException(tr("Expected non-empty value for parameter ''{0}'', got ''{1}''", "userName", userName));
     86            throw new IllegalArgumentException(MessageFormat.format("Expected non-empty value for parameter ''{0}'', got ''{1}''", "userName", userName));
    8587        this.userName = userName;
    8688        userInfo = null;
  • trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java

    r2626 r2850  
    217217                value = Double.parseDouble(tfLatValue.getText());
    218218            } catch(NumberFormatException ex) {
    219                 setErrorMessage(tfLatValue,tr("The string ''{0}'' isn''t a valid double value.", tfLatValue.getText()));
     219                setErrorMessage(tfLatValue,tr("The string ''{0}'' is not a valid double value.", tfLatValue.getText()));
    220220                return;
    221221            }
     
    249249                value = Double.parseDouble(tfLonValue.getText());
    250250            } catch(NumberFormatException ex) {
    251                 setErrorMessage(tfLonValue,tr("The string ''{0}'' isn''t a valid double value.", tfLonValue.getText()));
     251                setErrorMessage(tfLonValue,tr("The string ''{0}'' is not a valid double value.", tfLonValue.getText()));
    252252                return;
    253253            }
  • trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java

    r2824 r2850  
    509509                    }
    510510                } catch(BadLocationException e) {
    511                     System.err.println(tr("Warning: bad location in HTML document. Exception was: " + e.toString()));
     511                    System.err.println(tr("Warning: bad location in HTML document. Exception was: {0}", e.toString()));
    512512                    e.printStackTrace();
    513513                }
  • trunk/src/org/openstreetmap/josm/gui/history/AdjustmentSynchronizer.java

    r2512 r2850  
    1515
    1616import javax.swing.JCheckBox;
     17
     18import org.openstreetmap.josm.tools.CheckParameterUtil;
    1719
    1820/**
     
    7375     */
    7476    protected void setParticipatingInSynchronizedScrolling(Adjustable adjustable, boolean isParticipating) {
    75         if (adjustable == null)
    76             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable"));
    77 
     77        CheckParameterUtil.ensureParameterNotNull(adjustable, "adjustable");
    7878        if (! synchronizedAdjustables.contains(adjustable))
    79             throw new IllegalStateException(tr("Adjustable {0} not registered yet. Can't set participation in synchronized adjustment.", adjustable));
     79            throw new IllegalStateException(tr("Adjustable {0} not registered yet. Cannot set participation in synchronized adjustment.", adjustable));
    8080
    8181        enabledMap.put(adjustable, isParticipating);
     
    113113     * @exception IllegalArgumentException thrown, if adjustable is null
    114114     */
    115     protected void adapt(final JCheckBox view, final Adjustable adjustable) throws IllegalArgumentException, IllegalStateException {
    116         if (adjustable == null)
    117             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable"));
    118         if (view == null)
    119             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "view"));
     115    protected void adapt(final JCheckBox view, final Adjustable adjustable) throws IllegalStateException {
     116        CheckParameterUtil.ensureParameterNotNull(adjustable, "adjustable");
     117        CheckParameterUtil.ensureParameterNotNull(view, "view");
    120118
    121119        if (! synchronizedAdjustables.contains(adjustable)) {
  • trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java

    r2512 r2850  
    1919import org.openstreetmap.josm.data.osm.history.HistoryNode;
    2020import org.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive;
     21import org.openstreetmap.josm.tools.CheckParameterUtil;
    2122
    2223/**
     
    9293     */
    9394    public CoordinateInfoViewer(HistoryBrowserModel model) throws IllegalArgumentException{
    94         if (model == null)
    95             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "model"));
     95        CheckParameterUtil.ensureParameterNotNull(model, "model");
    9696        setModel(model);
    9797        build();
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java

    r2655 r2850  
    4040import org.openstreetmap.josm.gui.layer.Layer;
    4141import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     42import org.openstreetmap.josm.tools.CheckParameterUtil;
    4243
    4344/**
     
    114115    public HistoryBrowserModel(History history) {
    115116        this();
    116         if (history == null)
    117             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "history"));
     117        CheckParameterUtil.ensureParameterNotNull(history, "history");
    118118        setHistory(history);
    119119    }
     
    225225     */
    226226    public TagTableModel getTagTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException {
    227         if (pointInTimeType == null)
    228             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType"));
     227        CheckParameterUtil.ensureParameterNotNull(pointInTimeType, "pointInTimeType");
    229228        if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME))
    230229            return currentTagTableModel;
     
    237236
    238237    public NodeListTableModel getNodeListTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException {
    239         if (pointInTimeType == null)
    240             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType"));
     238        CheckParameterUtil.ensureParameterNotNull(pointInTimeType, "pointInTimeType");
    241239        if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME))
    242240            return currentNodeListTableModel;
     
    249247
    250248    public RelationMemberTableModel getRelationMemberTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException {
    251         if (pointInTimeType == null)
    252             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType"));
     249        CheckParameterUtil.ensureParameterNotNull(pointInTimeType, "pointInTimeType");
    253250        if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME))
    254251            return currentRelationMemberTableModel;
     
    273270     */
    274271    public void setReferencePointInTime(HistoryOsmPrimitive reference) throws IllegalArgumentException, IllegalStateException{
    275         if (reference == null)
    276             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "reference"));
     272        CheckParameterUtil.ensureParameterNotNull(reference, "reference");
    277273        if (history == null)
    278274            throw new IllegalStateException(tr("History not initialized yet. Failed to set reference primitive."));
     
    304300     */
    305301    public void setCurrentPointInTime(HistoryOsmPrimitive current) throws IllegalArgumentException, IllegalStateException{
    306         if (current == null)
    307             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "current"));
     302        CheckParameterUtil.ensureParameterNotNull(current, "current");
    308303        if (history == null)
    309304            throw new IllegalStateException(tr("History not initialized yet. Failed to set current primitive."));
     
    347342     */
    348343    public HistoryOsmPrimitive getPointInTime(PointInTimeType type) throws IllegalArgumentException  {
    349         if (type == null)
    350             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "type"));
     344        CheckParameterUtil.ensureParameterNotNull(type, "type");
    351345        if (type.equals(PointInTimeType.CURRENT_POINT_IN_TIME))
    352346            return current;
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java

    r2711 r2850  
    77import java.awt.Component;
    88import java.io.IOException;
     9import java.text.MessageFormat;
    910import java.util.Collection;
    1011import java.util.HashSet;
     
    7879    public HistoryLoadTask add(long id, OsmPrimitiveType type) throws IllegalArgumentException {
    7980        if (id <= 0)
    80             throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected. Got {1}.", "id", id));
    81         if (type == null)
    82             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "type"));
     81            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected. Got {1}.", "id", id));
     82        CheckParameterUtil.ensureParameterNotNull(type, "type");
    8383        SimplePrimitiveId pid = new SimplePrimitiveId(id, type);
    8484        toLoad.add(pid);
     
    9292     * @return this task
    9393     */
    94     public HistoryLoadTask add(PrimitiveId pid) throws IllegalArgumentException {
    95         if (pid == null)
    96             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pid"));
    97         if (pid.getUniqueId() <= 0)
    98             throw new IllegalArgumentException(tr("id in parameter ''{0}'' > 0 expected, got {1}.", "pid", pid.getUniqueId()));
     94    public HistoryLoadTask add(PrimitiveId pid) {
     95        CheckParameterUtil.ensureValidPrimitiveId(pid, "pid");
    9996        toLoad.add(pid);
    10097        return this;
     
    108105     * @throws IllegalArgumentException thrown if primitive is null
    109106     */
    110     public HistoryLoadTask add(HistoryOsmPrimitive primitive) throws IllegalArgumentException  {
    111         if (primitive == null)
    112             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive"));
     107    public HistoryLoadTask add(HistoryOsmPrimitive primitive) {
     108        CheckParameterUtil.ensureParameterNotNull(primitive, "primitive");
    113109        toLoad.add(primitive.getPrimitiveId());
    114110        return this;
     
    122118     * @throws IllegalArgumentException thrown if history is null
    123119     */
    124     public HistoryLoadTask add(History history)throws IllegalArgumentException {
    125         if (history == null)
    126             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "history"));
     120    public HistoryLoadTask add(History history) {
     121        CheckParameterUtil.ensureParameterNotNull(history, "history");
    127122        toLoad.add(history.getPrimitmiveId());
    128123        return this;
     
    137132     * @throws IllegalArgumentException thrown if primitive.getId() <= 0
    138133     */
    139     public HistoryLoadTask add(OsmPrimitive primitive) throws IllegalArgumentException {
    140         if (primitive == null)
    141             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive"));
    142         if (primitive.getId() <= 0)
    143             throw new IllegalArgumentException(tr("Object id > 0 expected. Got {0}", primitive.getId()));
     134    public HistoryLoadTask add(OsmPrimitive primitive) {
     135        CheckParameterUtil.ensureValidPrimitiveId(primitive, "primitive");
    144136        toLoad.add(primitive.getPrimitiveId());
    145137        return this;
     
    154146     * @throws IllegalArgumentException thrown if one of the ids in the collection <= 0
    155147     */
    156     public HistoryLoadTask add(Collection<? extends OsmPrimitive> primitives) throws IllegalArgumentException{
    157         if (primitives == null)
    158             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitives"));
     148    public HistoryLoadTask add(Collection<? extends OsmPrimitive> primitives) {
     149        CheckParameterUtil.ensureParameterNotNull(primitives, "primitives");
    159150        for (OsmPrimitive primitive: primitives) {
    160151            if (primitive == null) {
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r2512 r2850  
    2323import org.openstreetmap.josm.gui.JMultilineLabel;
    2424import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     25import org.openstreetmap.josm.tools.CheckParameterUtil;
    2526import org.openstreetmap.josm.tools.UrlLabel;
    2627
     
    118119     */
    119120    public VersionInfoPanel(HistoryBrowserModel model, PointInTimeType pointInTimeType) throws IllegalArgumentException {
    120         if (pointInTimeType == null)
    121             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType"));
    122         if (model == null)
    123             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "model"));
     121        CheckParameterUtil.ensureParameterNotNull(pointInTimeType, "pointInTimeType");
     122        CheckParameterUtil.ensureParameterNotNull(model, "model");
    124123
    125124        this.model = model;
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r2702 r2850  
    218218            private void warnCantImportIntoServerLayer(GpxLayer layer) {
    219219                String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>"
    220                         + "Because its way points don''t include a timestamp we can''t correlate them with audio data.</html>",
     220                        + "Because its way points do not include a timestamp we cannot correlate them with audio data.</html>",
    221221                        layer.getName()
    222222                );
     
    305305            private void warnCantImportIntoServerLayer(GpxLayer layer) {
    306306                String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>"
    307                         + "Because its way points don''t include a timestamp we can''t correlate them with images.</html>",
     307                        + "Because its way points do not include a timestamp we cannot correlate them with images.</html>",
    308308                        layer.getName()
    309309                );
     
    946946            msg = new JPanel(new GridBagLayout());
    947947
    948             msg
    949             .add(
    950                     new JLabel(
    951                             tr(
    952                                     "<html>This action will require {0} individual<br>download requests. Do you wish<br>to continue?</html>",
    953                                     toDownload.size())), GBC.eol());
     948            msg.add(new JLabel(
     949                    tr("<html>This action will require {0} individual<br>"
     950                            + "download requests. Do you wish<br>to continue?</html>",
     951                            toDownload.size())), GBC.eol());
    954952
    955953            if (toDownload.size() > 1) {
  • trunk/src/org/openstreetmap/josm/gui/layer/RawGpsLayer.java

    r2618 r2850  
    237237        color.addActionListener(new ActionListener(){
    238238            public void actionPerformed(ActionEvent e) {
    239                 JColorChooser c = new JColorChooser(Main.pref.getColor(marktr("gps point"), "layer "+getName(), Color.gray));
     239                JColorChooser c = new JColorChooser(Main.pref.getColor(marktr("GPS point"), "layer "+getName(), Color.gray));
    240240                Object[] options = new Object[]{tr("OK"), tr("Cancel"), tr("Default")};
    241241                int answer = JOptionPane.showOptionDialog(
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r2795 r2850  
    289289            gc.fill = GridBagConstraints.NONE;
    290290            gc.anchor = GridBagConstraints.WEST;
    291             panelTf.add(new JLabel(tr("I'm in the timezone of: ")), gc);
     291            panelTf.add(new JLabel(tr("I am in the timezone of: ")), gc);
    292292
    293293            Vector<String> vtTimezones = new Vector<String>();
     
    362362            panelLst.add(new JScrollPane(imgList), BorderLayout.CENTER);
    363363
    364             JButton openButton = new JButton(tr("Open an other photo"));
     364            JButton openButton = new JButton(tr("Open another photo"));
    365365            openButton.addActionListener(new ActionListener() {
    366366
     
    650650                lastNumMatched = matchGpxTrack(dateImgLst, selGpx.data, (long) (timezone * 3600) + delta);
    651651
    652                 return tr("<html>Matched <b>{0}</b> of <b>{1}</b> photos to GPX track.</html>", lastNumMatched, dateImgLst.size());
     652                return trn("<html>Matched <b>{0}</b> of <b>{1}</b> photo to GPX track.</html>",
     653                        "<html>Matched <b>{0}</b> of <b>{1}</b> photos to GPX track.</html>",
     654                        dateImgLst.size(), lastNumMatched, dateImgLst.size());
    653655            }
    654656        };
     
    881883                    tfOffset.getDocument().addDocumentListener(statusBarListener);
    882884
    883                     lblMatches.setText(statusBarText.getText() + "<br>" + trn("(Time difference of {0} day)", "Time difference of {0} days", Math.abs(dayOffset)));
     885                    lblMatches.setText(statusBarText.getText() + "<br>" + trn("(Time difference of {0} day)", "Time difference of {0} days", Math.abs(dayOffset), Math.abs(dayOffset)));
    884886
    885887                    statusBarListener.updateStatusBar();
     
    946948            if(imgs.size() <= 0) {
    947949                JOptionPane.showMessageDialog(Main.parent,
    948                         tr("The selected photos don't contain time information."),
    949                         tr("Photos don't contain time information"), JOptionPane.WARNING_MESSAGE);
     950                        tr("The selected photos do not contain time information."),
     951                        tr("Photos do not contain time information"), JOptionPane.WARNING_MESSAGE);
    950952                return;
    951953            }
     
    975977            if(firstGPXDate < 0) {
    976978                JOptionPane.showMessageDialog(Main.parent,
    977                         tr("The selected GPX track doesn't contain timestamps. Please select another one."),
     979                        tr("The selected GPX track does not contain timestamps. Please select another one."),
    978980                        tr("GPX Track has no time information"), JOptionPane.WARNING_MESSAGE);
    979981                return;
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r2749 r2850  
    318318                i++;
    319319            }
    320         return data.size() + " " + trn("image", "images", data.size())
    321         + " loaded. " + tr("{0} were found to be gps tagged.", i);
     320        return trn("{0} image loaded.", "{0} images loaded.", data.size(), data.size())
     321        + " " + trn("{0} was found to be GPS tagged.", "{0} were found to be GPS tagged.", i, i);
    322322    }
    323323
  • trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorisationUI.java

    r2828 r2850  
    236236        String lbl = tr("Accept Access Token");
    237237        msg.setText(tr("<html>"
    238                 + "You''ve sucessfully retrieved an OAuth Access Token from the OSM website. "
     238                + "You have sucessfully retrieved an OAuth Access Token from the OSM website. "
    239239                + "Click on <strong>{0}</strong> to accept the token. JOSM will use it in "
    240240                + "subsequent requests to gain access to the OSM API."
     
    409409                feedbackValid(tr("Please enter your OSM user name"));
    410410            } else {
    411                 feedbackInvalid(tr("The user name can't be empty. Please enter your OSM user name"));
     411                feedbackInvalid(tr("The user name cannot be empty. Please enter your OSM user name"));
    412412            }
    413413        }
     
    430430                feedbackValid(tr("Please enter your OSM password"));
    431431            } else {
    432                 feedbackInvalid(tr("The password can't be empty. Please enter your OSM password"));
     432                feedbackInvalid(tr("The password cannot be empty. Please enter your OSM password"));
    433433            }
    434434        }
     
    472472                    tr("<html>"
    473473                            + "The automatic process for retrieving an OAuth Access Token<br>"
    474                             + "from the OSM server failed because JOSM wasn't able to build<br>"
     474                            + "from the OSM server failed because JOSM was not able to build<br>"
    475475                            + "a valid login URL from the OAuth Authorise Endpoint URL ''{0}''.<br><br>"
    476476                            + "Please check your advanced setting and try again."
    477                             +"</html>",
     477                            + "</html>",
    478478                            getAdvancedPropertiesPanel().getAdvancedParameters().getAuthoriseUrl()
    479479                    ),
  • trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java

    r2801 r2850  
    9595                feedbackValid(tr("Please enter your OSM user name"));
    9696            } else {
    97                 feedbackInvalid(tr("The user name can't be empty. Please enter your OSM user name"));
     97                feedbackInvalid(tr("The user name cannot be empty. Please enter your OSM user name"));
    9898            }
    9999        }
  • trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorisationUI.java

    r2801 r2850  
    5555        gc.insets = new Insets(0,0,5,0);
    5656        pnlMessage= new HtmlPanel();
    57         pnlMessage.setText(tr("<html><body>"
    58                 + "Please enter an OAuth Access Token which is authorised to access the OSM server "
    59                 + "''{0}''."
    60                 + "</body></html>",
    61                 getApiUrl()
    62         ));
     57        pnlMessage.setText("<html><body>"
     58                + tr("Please enter an OAuth Access Token which is authorised to access the OSM server "
     59                + "''{0}''.",
     60                getApiUrl()) + "</body></html>");
    6361        pnl.add(pnlMessage, gc);
    6462
  • trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorisationClient.java

    r2804 r2850  
    297297            String sessionId = extractOsmSession(connection);
    298298            if (sessionId == null)
    299                 throw new OsmOAuthAuthorisationException(tr("OSM website didn''t reply a session cookie in response to ''{0}'',", url.toString()));
     299                throw new OsmOAuthAuthorisationException(tr("OSM website did not return a session cookie in response to ''{0}'',", url.toString()));
    300300            return sessionId;
    301301        } catch(IOException e) {
  • trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorisationUI.java

    r2804 r2850  
    218218            gc.gridwidth = 2;
    219219            HtmlPanel html = new HtmlPanel();
    220             html.setText(tr("<html><body>"
     220            html.setText(tr("<html>"
    221221                    + "JOSM successfully retrieved a Request Token. "
    222222                    + "JOSM is now launching an authorisation page in an external browser. "
     
    225225                    + "<strong>{0}</strong><br><br>"
    226226                    + "If launching the external browser fails you can copy the following authorise URL "
    227                     + "and paste it into the address field of your browser.",
     227                    + "and paste it into the address field of your browser.</html>",
    228228                    tr("Request Access Token")
    229229            ));
     
    304304            gc.weightx = 1.0;
    305305            HtmlPanel html = new HtmlPanel();
    306             html.setText(tr("<html><body>"
     306            html.setText(tr("<html>"
    307307                    + "JOSM has successfully retrieved an Access Token. "
    308                     + "You can now accept this token. JOSM will used it the future for authentication "
    309                     + "and authorisation at the OSM server.<br><br>"
    310                     + "The access token is: "
     308                    + "You can now accept this token. JOSM will use it in the future for authentication "
     309                    + "and authorisation to the OSM server.<br><br>"
     310                    + "The access token is: </html>"
    311311            ));
    312312            pnl.add(html, gc);
  • trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java

    r2840 r2850  
    118118
    119119            if (connection.getResponseCode() == HttpURLConnection.HTTP_FORBIDDEN)
    120                 throw new OsmApiException(HttpURLConnection.HTTP_FORBIDDEN, tr("Retrieving user details with Access Token Key ''{0}'' was forbidded.", token.getKey()), null);
     120                throw new OsmApiException(HttpURLConnection.HTTP_FORBIDDEN, tr("Retrieving user details with Access Token Key ''{0}'' was forbidden.", token.getKey()), null);
    121121
    122122            if (connection.getResponseCode() != HttpURLConnection.HTTP_OK)
     
    145145                        + "Successfully used the Access Token ''{0}'' to<br>"
    146146                        + "access the OSM server at ''{1}''.<br>"
    147                         + "You''re accessing the OSM server as user ''{2}'' with id ''{3}''."
    148                         +"</html>",
     147                        + "You are accessing the OSM server as user ''{2}'' with id ''{3}''."
     148                        + "</html>",
    149149                        token.getKey(),
    150150                        apiUrl,
     
    235235                tr("<html>"
    236236                        + "The test failed because the server responded with an internal error.<br>"
    237                         + "JOSM couldn''t decide whether the token is valid. Please try again later."
    238                         +"</html>",
     237                        + "JOSM could not decide whether the token is valid. Please try again later."
     238                        + "</html>",
    239239                        apiUrl,
    240240                        token.getKey()
  • trunk/src/org/openstreetmap/josm/gui/progress/SwingRenderingProgressMonitor.java

    r2512 r2850  
    33
    44import javax.swing.SwingUtilities;
     5
     6import org.openstreetmap.josm.tools.CheckParameterUtil;
     7
    58import static org.openstreetmap.josm.tools.I18n.tr;
    69
     
    2427    public SwingRenderingProgressMonitor(ProgressRenderer delegate) {
    2528        super(new CancelHandler());
    26         if (delegate == null)
    27             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "delegate"));
     29        CheckParameterUtil.ensureParameterNotNull(delegate, "delegate");
    2830        this.delegate = delegate;
    2931    }
  • trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java

    r2711 r2850  
    158158                value = Double.parseDouble(getComponent().getText());
    159159            } catch(NumberFormatException ex) {
    160                 feedbackInvalid(tr("The string ''{0}'' isn''t a valid double value.", getComponent().getText()));
     160                feedbackInvalid(tr("The string ''{0}'' is not a valid double value.", getComponent().getText()));
    161161                return;
    162162            }
     
    198198                value = Double.parseDouble(getComponent().getText());
    199199            } catch(NumberFormatException ex) {
    200                 feedbackInvalid(tr("The string ''{0}'' isn''t a valid double value.", getComponent().getText()));
     200                feedbackInvalid(tr("The string ''{0}'' is not a valid double value.", getComponent().getText()));
    201201                return;
    202202            }
Note: See TracChangeset for help on using the changeset viewer.