mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-22 11:46:11 +02:00
Don't add ignore fix more than once
Tweak hidden issues text
This commit is contained in:
+2
-2
@@ -1290,9 +1290,9 @@ en:
|
||||
none: Detected issues will appear here
|
||||
elsewhere: "Issues elsewhere: {count}"
|
||||
other_features: "Issues with other features: {count}"
|
||||
other_features_elsewhere: "Issues with other features elsewhere: {count}"
|
||||
other_features_elsewhere: "Issues elsewhere with other features: {count}"
|
||||
disabled_rules: "Issues with disabled rules: {count}"
|
||||
disabled_rules_elsewhere: "Issues with disabled rules elsewhere: {count}"
|
||||
disabled_rules_elsewhere: "Issues elsewhere with disabled rules: {count}"
|
||||
ignored_issues: "Ignored issues: {count}"
|
||||
ignored_issues_elsewhere: "Ignored issues elsewhere: {count}"
|
||||
options:
|
||||
|
||||
Vendored
+2
-2
@@ -1581,9 +1581,9 @@
|
||||
"none": "Detected issues will appear here",
|
||||
"elsewhere": "Issues elsewhere: {count}",
|
||||
"other_features": "Issues with other features: {count}",
|
||||
"other_features_elsewhere": "Issues with other features elsewhere: {count}",
|
||||
"other_features_elsewhere": "Issues elsewhere with other features: {count}",
|
||||
"disabled_rules": "Issues with disabled rules: {count}",
|
||||
"disabled_rules_elsewhere": "Issues with disabled rules elsewhere: {count}",
|
||||
"disabled_rules_elsewhere": "Issues elsewhere with disabled rules: {count}",
|
||||
"ignored_issues": "Ignored issues: {count}",
|
||||
"ignored_issues_elsewhere": "Ignored issues elsewhere: {count}"
|
||||
}
|
||||
|
||||
@@ -221,7 +221,8 @@ export function coreValidator(context) {
|
||||
|
||||
var detected = fn(entity, context);
|
||||
detected.forEach(function(issue) {
|
||||
if (issue.severity === 'warning') {
|
||||
var hasIgnoreFix = issue.fixes && issue.fixes.length && issue.fixes[issue.fixes.length - 1].type === 'ignore';
|
||||
if (issue.severity === 'warning' && !hasIgnoreFix) {
|
||||
var ignoreFix = new validationIssueFix({
|
||||
title: t('issues.fix.ignore_issue.title'),
|
||||
icon: 'iD-icon-close',
|
||||
@@ -229,6 +230,7 @@ export function coreValidator(context) {
|
||||
ignoreIssue(this.issue.id);
|
||||
}
|
||||
});
|
||||
ignoreFix.type = 'ignore';
|
||||
ignoreFix.issue = issue;
|
||||
issue.fixes.push(ignoreFix);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user