Changeset 8989 in josm


Ignore:
Timestamp:
2015-11-04T18:45:47+01:00 (6 years ago)
Author:
simon04
Message:

fix #12041 - Wrong message in relation member deletion confirmation (by holgermappt)

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

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

    r8975 r8989  
    107107        int numObjectsToDelete = model.getNumObjectsToDelete();
    108108        int numParentRelations = model.getNumParentRelations();
     109        final String msg1 = trn(
     110                "Please confirm to remove <strong>{0} object</strong>.",
     111                "Please confirm to remove <strong>{0} objects</strong>.",
     112                numObjectsToDelete, numObjectsToDelete);
     113        final String msg2 = trn(
     114                "{0} relation is affected.",
     115                "{0} relations are affected.",
     116                numParentRelations, numParentRelations);
    109117        @I18n.QuirkyPluralString
    110         final String msg;
    111         if (numParentRelations == 1) {
    112             msg = trn(
    113                     "<html>Please confirm to remove <strong>{0} object</strong> from <strong>1 relation</strong>.</html>",
    114                     "<html>Please confirm to remove <strong>{0} objects</strong> from <strong>1 relation</strong>.</html>",
    115                     numObjectsToDelete, numObjectsToDelete);
    116         } else {
    117             msg = trn(
    118                     "<html>Please confirm to remove <strong>{0} object</strong> from <strong>{1} relations</strong>.</html>",
    119                     "<html>Please confirm to remove <strong>{0} objects</strong> from <strong>{1} relations</strong>.</html>",
    120                     numObjectsToDelete, numObjectsToDelete, numParentRelations);
    121         }
     118        final String msg = "<html>" + msg1 + " " + msg2 + "</html>";
    122119        htmlPanel.getEditorPane().setText(msg);
    123120        invalidate();
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r8975 r8989  
    4242     * This annotates strings which do not permit a clean i18n. This is mostly due to strings
    4343     * containing two nouns which can occur in singular or plural form.
     44     * <br>
     45     * No behaviour is associated with this annotation.
    4446     */
    4547    @Retention(RetentionPolicy.SOURCE)
Note: See TracChangeset for help on using the changeset viewer.