- Timestamp:
- 2019-04-14T17:29:33+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
r14968 r14990 40 40 41 41 // CHECKSTYLE.OFF: SingleSpaceSeparator 42 /** Role {0} unknownin templates{1}*/42 /** Role ''{0}'' is not in templates ''{1}'' */ 43 43 public static final int ROLE_UNKNOWN = 1701; 44 /** Empty role typefound when expecting one of{0}*/44 /** Empty role found when expecting one of ''{0}'' */ 45 45 public static final int ROLE_EMPTY = 1702; 46 /** Role member does not match expression {0} in template{1} */47 public static final int WRONG_ TYPE = 1703;48 /** Number of {0}roles too high ({1}) */46 /** Role of relation member does not match template expression ''{0}'' in preset {1} */ 47 public static final int WRONG_ROLE = 1708; 48 /** Number of ''{0}'' roles too high ({1}) */ 49 49 public static final int HIGH_COUNT = 1704; 50 /** Number of {0}roles too low ({1}) */50 /** Number of ''{0}'' roles too low ({1}) */ 51 51 public static final int LOW_COUNT = 1705; 52 /** Role {0}missing */52 /** Role ''{0}'' missing */ 53 53 public static final int ROLE_MISSING = 1706; 54 54 /** Relation type is unknown */ … … 56 56 /** Relation is empty */ 57 57 public static final int RELATION_EMPTY = 1708; 58 /** Type ''{0}'' of relation member with role ''{1}'' does not match accepted types ''{2}'' in preset {3} */ 59 public static final int WRONG_TYPE = 1709; 58 60 // CHECKSTYLE.ON: SingleSpaceSeparator 59 61 … … 211 213 String role = member.getRole(); 212 214 String name = null; 213 // Set of all accepted types in template215 // Set of all accepted types in preset 214 216 Collection<TaggingPresetType> types = EnumSet.noneOf(TaggingPresetType.class); 215 217 TestError possibleMatchError = null; … … 242 244 // possible match error 243 245 // we still need to iterate further, as we might have 244 // different prese nt, for which memberExpression will match246 // different preset, for which memberExpression will match 245 247 // but stash the error in case no better reason will be found later 246 possibleMatchError = TestError.builder(this, Severity.WARNING, WRONG_ TYPE)248 possibleMatchError = TestError.builder(this, Severity.WARNING, WRONG_ROLE) 247 249 .message(ROLE_VERIF_PROBLEM_MSG, 248 marktr("Role of relation member does not match expression ''{0}'' in template{1}"),250 marktr("Role of relation member does not match template expression ''{0}'' in preset {1}"), 249 251 r.memberExpression, name) 250 252 .primitives(member.getMember().isUsable() ? member.getMember() : n) … … 280 282 errors.add(TestError.builder(this, Severity.WARNING, WRONG_TYPE) 281 283 .message(ROLE_VERIF_PROBLEM_MSG, 282 marktr("Type ''{0}'' of relation member with role ''{1}'' does not match accepted types ''{2}'' in template{3}"),284 marktr("Type ''{0}'' of relation member with role ''{1}'' does not match accepted types ''{2}'' in preset {3}"), 283 285 member.getType(), member.getRole(), typesStr, name) 284 286 .primitives(member.getMember().isUsable() ? member.getMember() : n) … … 293 295 * @param n relation to validate 294 296 * @param allroles contains presets for specified relation 295 * @param map contains statistics of occurrences of specified role typesin relation297 * @param map contains statistics of occurrences of specified role in relation 296 298 */ 297 299 private void checkRoles(Relation n, Map<Role, String> allroles, Map<String, RoleInfo> map) { … … 333 335 } else { 334 336 errors.add(TestError.builder(this, Severity.WARNING, ROLE_EMPTY) 335 .message(ROLE_VERIF_PROBLEM_MSG, marktr("Empty role typefound when expecting one of ''{0}''"), templates)337 .message(ROLE_VERIF_PROBLEM_MSG, marktr("Empty role found when expecting one of ''{0}''"), templates) 336 338 .primitives(n) 337 339 .build());
Note:
See TracChangeset
for help on using the changeset viewer.