mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-22 08:17:30 +02:00
Add quick fix to remove deprecated tags
This commit is contained in:
+8
-2
@@ -1267,12 +1267,18 @@ en:
|
||||
move_tags:
|
||||
title: Move the tags
|
||||
annotation: Moved tags.
|
||||
remove_deprecated_tag:
|
||||
annotation: Removed an old tag.
|
||||
remove_deprecated_tag_combo:
|
||||
annotation: Removed an old tag combination.
|
||||
remove_generic_name:
|
||||
title: Remove the name
|
||||
annotation: Removed a generic name.
|
||||
remove_tag:
|
||||
title: Remove the tag
|
||||
annotation: Removed tag.
|
||||
remove_tags:
|
||||
title: Remove the tags
|
||||
reposition_features:
|
||||
title: Reposition the features
|
||||
select_preset:
|
||||
@@ -1281,10 +1287,10 @@ en:
|
||||
title: Tag as disconnected
|
||||
annotation: Tagged very close features as disconnected.
|
||||
upgrade_tag:
|
||||
title: Upgrade this tag
|
||||
title: Upgrade the tag
|
||||
annotation: Upgraded an old tag.
|
||||
upgrade_tag_combo:
|
||||
title: Upgrade these tags
|
||||
title: Upgrade the tags
|
||||
annotation: Upgraded an old tag combination.
|
||||
use_bridge_or_tunnel:
|
||||
title: Use a bridge or tunnel
|
||||
|
||||
Vendored
+11
-2
@@ -1560,6 +1560,12 @@
|
||||
"title": "Move the tags",
|
||||
"annotation": "Moved tags."
|
||||
},
|
||||
"remove_deprecated_tag": {
|
||||
"annotation": "Removed an old tag."
|
||||
},
|
||||
"remove_deprecated_tag_combo": {
|
||||
"annotation": "Removed an old tag combination."
|
||||
},
|
||||
"remove_generic_name": {
|
||||
"title": "Remove the name",
|
||||
"annotation": "Removed a generic name."
|
||||
@@ -1568,6 +1574,9 @@
|
||||
"title": "Remove the tag",
|
||||
"annotation": "Removed tag."
|
||||
},
|
||||
"remove_tags": {
|
||||
"title": "Remove the tags"
|
||||
},
|
||||
"reposition_features": {
|
||||
"title": "Reposition the features"
|
||||
},
|
||||
@@ -1579,11 +1588,11 @@
|
||||
"annotation": "Tagged very close features as disconnected."
|
||||
},
|
||||
"upgrade_tag": {
|
||||
"title": "Upgrade this tag",
|
||||
"title": "Upgrade the tag",
|
||||
"annotation": "Upgraded an old tag."
|
||||
},
|
||||
"upgrade_tag_combo": {
|
||||
"title": "Upgrade these tags",
|
||||
"title": "Upgrade the tags",
|
||||
"annotation": "Upgraded an old tag combination."
|
||||
},
|
||||
"use_bridge_or_tunnel": {
|
||||
|
||||
@@ -82,6 +82,23 @@ export function validationDeprecatedTag() {
|
||||
t('issues.fix.' + fixTextID + '.annotation')
|
||||
);
|
||||
}
|
||||
}),
|
||||
new validationIssueFix({
|
||||
icon: 'iD-operation-delete',
|
||||
title: t('issues.fix.' + (isCombo ? 'remove_tags' : 'remove_tag') + '.title'),
|
||||
onClick: function() {
|
||||
var entity = this.issue.entities[0];
|
||||
var tags = _clone(entity.tags);
|
||||
var oldTags = this.issue.info.oldTags;
|
||||
for (var key in oldTags) {
|
||||
delete tags[key];
|
||||
}
|
||||
var fixTextID = Object.keys(oldTags).length > 1 ? 'remove_deprecated_tag_combo' : 'remove_deprecated_tag';
|
||||
context.perform(
|
||||
actionChangeTags(entity.id, tags),
|
||||
t('issues.fix.' + fixTextID + '.annotation')
|
||||
);
|
||||
}
|
||||
})
|
||||
]
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user