Modify

Opened 4 years ago

Closed 4 years ago

#1961 closed enhancement (fixed)

Confusing validator message

Reported by: sanna Owned by: framm
Priority: minor Component: Core validator
Version: latest Keywords:
Cc:

Description

The string given at ../plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java:349 which comes from the code block:

           {
                List<String> values = presetsValueData.get(key);
                if( values != null && !values.contains(prop.getValue()) && !withErrors.contains(p, "UPV"))
                {
                    String i = marktr("Key ''{0}'' unknown.");
                    errors.add( new TestError(this, Severity.OTHER, tr("Unknown property values"),
                    tr(i, key), MessageFormat.format(i, key), INVALID_VALUE, p) );
                    withErrors.add(p, "UPV");
                }
            }

is confusing to me.

The errors afaict both from code and from encountering the error msg within JOSM writes out Key 'foo' unknown when in fact it is the value given to Key 'foo' that is unknown. Of course the clarification Unknown property values helps, but this is only shown as a popup on the actual error items themselves and as the name of the enclosing folder.

I think an error message of the type "Key 'foo' unknown value." would be much better even if it a tad bit long. Or, since the error messages occurs under a folder by the name of "Unknown property values" it is quite feasible to make it even shorter... "for key 'foo'." or some such.

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by stoecker

  • Owner set to framm

comment:2 Changed 4 years ago by stoecker

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.