Changeset 6240 in josm for trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java
- Timestamp:
- 2013-09-20T22:44:07+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java
r6085 r6240 33 33 protected static final int NAME_TRANSLATION_MISSING = 1502; 34 34 35 /** 36 * Constructs a new {@code NameMismatch} test. 37 */ 35 38 public NameMismatch() { 36 39 super(tr("Missing name:* translation"), … … 59 62 for (Entry<String, String> entry : p.getKeys().entrySet()) { 60 63 if (entry.getKey().startsWith("name:")) { 61 String n ame_s= entry.getValue();62 if (n ame_s!= null) {63 names.add(n ame_s);64 String n = entry.getValue(); 65 if (n != null) { 66 names.add(n); 64 67 } 65 68 } … … 74 77 tr("A name is missing, even though name:* exists."), 75 78 NAME_MISSING, p)); 76 return; 77 } 79 return; 80 } 78 81 79 82 if (names.contains(name)) return; … … 82 85 Check if this is the case. */ 83 86 84 String[] split _names = name.split(" - ");85 if (split _names.length == 1) {87 String[] splitNames = name.split(" - "); 88 if (splitNames.length == 1) { 86 89 /* The name is not composed of multiple parts. Complain. */ 87 90 missingTranslation(p); … … 90 93 91 94 /* Check that each part corresponds to a translated name:*. */ 92 for (String n : split _names) {95 for (String n : splitNames) { 93 96 if (!names.contains(n)) { 94 97 missingTranslation(p);
Note:
See TracChangeset
for help on using the changeset viewer.
