Ticket #17567: 17567-rephrase.patch
| File 17567-rephrase.patch, 3.3 KB (added by , 7 years ago) |
|---|
-
src/org/openstreetmap/josm/data/validation/tests/TurnrestrictionTest.java
28 28 protected static final int MORE_VIA = 1804; 29 29 protected static final int MORE_FROM = 1805; 30 30 protected static final int MORE_TO = 1806; 31 protected static final int UN KNOWN_ROLE = 1807;32 protected static final int UN KNOWN_TYPE = 1808;31 protected static final int UNEXPECTED_ROLE = 1807; 32 protected static final int UNEXPECTED_TYPE = 1808; 33 33 protected static final int FROM_VIA_NODE = 1809; 34 34 protected static final int TO_VIA_NODE = 1810; 35 35 protected static final int FROM_VIA_WAY = 1811; … … 114 114 } 115 115 break; 116 116 default: 117 errors.add(TestError.builder(this, Severity.WARNING, UN KNOWN_ROLE)118 .message(tr("Un known role in restriction"))117 errors.add(TestError.builder(this, Severity.WARNING, UNEXPECTED_ROLE) 118 .message(tr("Unexpected role ''{0}'' in restriction", m.getRole())) 119 119 .primitives(l) 120 120 .highlight(m.getMember()) 121 121 .build()); … … 122 122 } 123 123 } else if (m.isNode()) { 124 124 Node n = m.getNode(); 125 switch (m.getRole()) { 126 case "via": 125 if ("via".equals(m.getRole())) { 127 126 if (!via.isEmpty()) { 128 127 if (via.get(0) instanceof Node) { 129 128 morevia = true; … … 133 132 } else { 134 133 via.add(n); 135 134 } 136 break; 137 case "location_hint": 138 errors.add(TestError.builder(this, Severity.WARNING, UNKNOWN_ROLE) 139 .message(tr("Role ''{0}'' is not in templates", m.getRole())) 135 } else { 136 errors.add(TestError.builder(this, Severity.WARNING, UNEXPECTED_ROLE) 137 .message(tr("Unexpected role ''{0}'' in restriction", m.getRole())) 140 138 .primitives(l) 141 139 .highlight(m.getMember()) 142 140 .build()); 143 break;144 default:145 errors.add(TestError.builder(this, Severity.WARNING, UNKNOWN_ROLE)146 .message(tr("Unknown role in restriction"))147 .primitives(l)148 .highlight(m.getMember())149 .build());150 141 } 151 142 } else { 152 errors.add(TestError.builder(this, Severity.WARNING, UN KNOWN_TYPE)153 .message(tr("Un known member type"))143 errors.add(TestError.builder(this, Severity.WARNING, UNEXPECTED_TYPE) 144 .message(tr("Unexpected member type in restriction")) 154 145 .primitives(l) 155 146 .highlight(m.getMember()) 156 147 .build());
