Show better warning message if tags and incomplete rather than deprecated (close #6410)

This commit is contained in:
Quincy Morgan
2019-05-22 09:38:47 -04:00
parent aff47d8436
commit 82ab18dd8b
3 changed files with 13 additions and 4 deletions

View File

@@ -1410,9 +1410,12 @@ en:
reference: "Multipolygons should be tagged on their relation, not their outer way."
outdated_tags:
title: Outdated Tags
message: '{feature} has outdated tags'
message: "{feature} has outdated tags"
tip: "Find features with deprecated tags that can be updated"
reference: "Some tags change over time and should be updated."
incomplete:
message: "{feature} has incomplete tags"
reference: "Some features should have additional tags."
private_data:
title: Private Information
tip: "Find features that may contain private information"

View File

@@ -1747,7 +1747,11 @@
"title": "Outdated Tags",
"message": "{feature} has outdated tags",
"tip": "Find features with deprecated tags that can be updated",
"reference": "Some tags change over time and should be updated."
"reference": "Some tags change over time and should be updated.",
"incomplete": {
"message": "{feature} has incomplete tags",
"reference": "Some features should have additional tags."
}
},
"private_data": {
"title": "Private Information",

View File

@@ -80,13 +80,15 @@ export function validationOutdatedTags() {
var tagDiff = utilTagDiff(oldTags, newTags);
if (!tagDiff.length) return [];
var prefix = subtype === 'incomplete_tags' ? 'incomplete.' : '';
return [new validationIssue({
type: type,
subtype: subtype,
severity: 'warning',
message: function() {
var entity = context.hasEntity(this.entityIds[0]);
return entity ? t('issues.outdated_tags.message', { feature: utilDisplayLabel(entity, context) }) : '';
return entity ? t('issues.outdated_tags.' + prefix + 'message', { feature: utilDisplayLabel(entity, context) }) : '';
},
reference: showReference,
entityIds: [entity.id],
@@ -116,7 +118,7 @@ export function validationOutdatedTags() {
enter
.append('div')
.attr('class', 'issue-reference')
.text(t('issues.outdated_tags.reference'));
.text(t('issues.outdated_tags.' + prefix + 'reference'));
enter
.append('strong')