Modify

Opened 15 years ago

Closed 15 years ago

#1961 closed enhancement (fixed)

Confusing validator message

Reported by: sanna Owned by: framm
Priority: minor Milestone:
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 by stoecker, 15 years ago

Owner: set to framm

comment:2 by stoecker, 15 years ago

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain framm.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.