Show more specific message when nonstandard brand has simply incomplete tags (close #6909)

This commit is contained in:
Quincy Morgan
2019-10-03 15:25:18 +02:00
parent cc6852eead
commit 0dc890a9ee
3 changed files with 11 additions and 1 deletions

View File

@@ -1464,6 +1464,7 @@ en:
reference: "Some features should have additional tags."
noncanonical_brand:
message: "{feature} looks like a brand with nonstandard tags"
message_incomplete: "{feature} looks like a brand with incomplete tags"
reference: "All features of the same brand should be tagged the same way."
point_as_vertex:
message: '{feature} should be a standalone point based on its tags'

View File

@@ -1813,6 +1813,7 @@
},
"noncanonical_brand": {
"message": "{feature} looks like a brand with nonstandard tags",
"message_incomplete": "{feature} looks like a brand with incomplete tags",
"reference": "All features of the same brand should be tagged the same way."
}
},

View File

@@ -173,7 +173,15 @@ export function validationOutdatedTags(context) {
var currEntity = context.hasEntity(entity.id);
if (!currEntity) return '';
return t('issues.outdated_tags.' + prefix + 'message',
var messageID = 'issues.outdated_tags.' + prefix + 'message';
if (subtype === 'noncanonical_brand' && tagDiff.every(function(d) {
return d.type === '+';
})) {
messageID += '_incomplete';
}
return t(messageID,
{ feature: utilDisplayLabel(currEntity, context) }
);
}