mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Show better warning message if tags and incomplete rather than deprecated (close #6410)
This commit is contained in:
@@ -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"
|
||||
|
||||
6
dist/locales/en.json
vendored
6
dist/locales/en.json
vendored
@@ -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",
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user