Changeset 17168 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2020-10-11T22:03:06+02:00 (4 years ago)
Author:
simon04
Message:

fix #18721 - PropertiesDialog: improve "overwrite key" dialog (based on patch by StephaneP)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r17061 r17168  
    408408        return new ExtendedDialog(
    409409                MainApplication.getMainFrame(),
    410                 tr("Overwrite key"),
    411                 tr("Replace"), tr("Cancel"))
     410                tr("Overwrite tag"),
     411                tr("Overwrite"), tr("Cancel"))
    412412            .setButtonIcons("ok", "cancel")
    413             .setContent(action+'\n'+ tr("The new key is already used, overwrite values?"))
     413            .setContent(action)
    414414            .setCancelButton(2)
    415415            .toggleEnable(togglePref)
     
    544544                for (OsmPrimitive osm: sel) {
    545545                    if (osm.get(newkey) != null) {
    546                         if (!warnOverwriteKey(tr("You changed the key from ''{0}'' to ''{1}''.", key, newkey),
     546                        if (!warnOverwriteKey(tr("You changed the key from ''{0}'' to ''{1}''.", key, newkey)
     547                                + "\n" + tr("The new key is already used, overwrite values?"),
    547548                                "overwriteEditKey"))
    548549                            return;
     
    11001101                String val = osm.get(key);
    11011102                if (val != null && !val.equals(value)) {
    1102                     if (!warnOverwriteKey(tr("You changed the value of ''{0}'' from ''{1}'' to ''{2}''.", key, val, value),
    1103                             "overwriteAddKey"))
     1103                    String valueHtmlString = Utils.joinAsHtmlUnorderedList(Arrays.asList("<strike>" + val + "</strike>", value));
     1104                    if (!warnOverwriteKey("<html>"
     1105                            + tr("You changed the value of ''{0}'': {1}", key, valueHtmlString)
     1106                            + tr("Overwrite?"), "overwriteAddKey"))
    11041107                        return;
    11051108                    break;
Note: See TracChangeset for help on using the changeset viewer.