public class NameMismatch extends Test.TagTest
This test finds multilingual objects whose 'name' attribute is not equal to any 'name:*' attribute and not a composition of some 'name:*' attributes separated by ' - '.
For example, a node with name=Europe, name:de=Europa should have name:en=Europe to avoid triggering this test. An object with name='Suomi - Finland' should have at least name:fi=Suomi and name:sv=Finland to avoid a warning (name:et=Soome would not matter). Also, complain if an object has some name:* attribute but no name.
Test.TagTest
Modifier and Type | Field and Description |
---|---|
private static java.util.List<java.lang.String> |
EXCLUSIONS |
protected static int |
NAME_MISSING |
private static java.util.regex.Pattern |
NAME_SPLIT_PATTERN |
protected static int |
NAME_TRANSLATION_MISSING |
checkBeforeUpload, checkEnabled, description, enabled, errors, IN_DOWNLOADED_AREA, IN_DOWNLOADED_AREA_STRICT, isBeforeUpload, name, partialSelection, progressMonitor, stopwatch, testBeforeUpload
Constructor and Description |
---|
NameMismatch()
Constructs a new
NameMismatch test. |
Modifier and Type | Method and Description |
---|---|
void |
check(OsmPrimitive p)
Check a primitive for a name mismatch.
|
private void |
missingTranslation(OsmPrimitive p,
java.lang.String name)
Report a missing translation.
|
includeOtherSeverityChecks, isPrimitiveUsable, visit, visit, visit
addGui, clear, deletePrimitivesIfNeeded, endTest, fixError, getErrors, getName, initialize, isBuilding, isCanceled, isFixable, isResidentialArea, ok, setBeforeUpload, setPartialSelection, setShowElements, startTest, testBeforeUpload, visit
protected static final int NAME_MISSING
protected static final int NAME_TRANSLATION_MISSING
private static final java.util.regex.Pattern NAME_SPLIT_PATTERN
private static final java.util.List<java.lang.String> EXCLUSIONS
public NameMismatch()
NameMismatch
test.private void missingTranslation(OsmPrimitive p, java.lang.String name)
p
- The primitive whose translation is missingname
- The name whose translation is missingpublic void check(OsmPrimitive p)
check
in class Test.TagTest
p
- The primitive to be tested