public class NameMismatch extends Test
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.
| Modifier and Type | Field and Description |
|---|---|
protected static int |
NAME_MISSING |
protected static int |
NAME_TRANSLATION_MISSING |
checkBeforeUpload, checkEnabled, description, enabled, errors, isBeforeUpload, name, partialSelection, progressMonitor, startTime, 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)
Report a missing translation.
|
void |
visit(Collection<OsmPrimitive> selection)
Checks a name mismatch in all primitives.
|
addGui, deletePrimitivesIfNeeded, endTest, fixError, getErrors, getName, initialize, isBuilding, isCanceled, isFixable, isPrimitiveUsable, ok, setBeforeUpload, setPartialSelection, startTest, testBeforeUpload, visit, visit, visitvisitprotected static final int NAME_MISSING
protected static final int NAME_TRANSLATION_MISSING
public NameMismatch()
NameMismatch test.private void missingTranslation(OsmPrimitive p)
p - The primitive whose translation is missingpublic void check(OsmPrimitive p)
p - The primitive to be testedpublic void visit(Collection<OsmPrimitive> selection)