Changeset 7523 in josm


Ignore:
Timestamp:
2014-09-11T15:40:26+02:00 (10 years ago)
Author:
Don-vip
Message:

fix #10398 - clarify warning about missing public_transport:version tag in route relations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java

    r7308 r7523  
    100100                && n.hasTag("route", "train", "subway", "monorail", "tram", "bus", "trolleybus", "aerialway", "ferry")) {
    101101            errors.add(new TestError(this, Severity.WARNING,
    102                     tr("Route scheme (public_transport or legacy) is unspecified. Add {0}", "public_transport:version"),
     102                    tr("Route scheme is unspecified. Add {0} ({1}=public_transport; {2}=legacy)", "public_transport:version", "2", "1"),
    103103                    RELATION_UNKNOWN, n));
    104104        } else if (allroles.isEmpty()) {
    105105            errors.add(new TestError(this, Severity.WARNING, tr("Relation type is unknown"), RELATION_UNKNOWN, n));
    106         } else {
    107             HashMap<String, RoleInfo> map = buildRoleInfoMap(n);
    108             if (map.isEmpty()) {
    109                 errors.add(new TestError(this, Severity.ERROR, tr("Relation is empty"), RELATION_EMPTY, n));
    110             } else {
    111                 checkRoles(n, allroles, map);
    112             }
     106        }
     107
     108        HashMap<String, RoleInfo> map = buildRoleInfoMap(n);
     109        if (map.isEmpty()) {
     110            errors.add(new TestError(this, Severity.ERROR, tr("Relation is empty"), RELATION_EMPTY, n));
     111        } else if (!allroles.isEmpty()) {
     112            checkRoles(n, allroles, map);
    113113        }
    114114    }
Note: See TracChangeset for help on using the changeset viewer.