Add specific "no issues" message if the user has no edits

Don't use "other features" language since "my edits" validation checks are no longer per-feature
This commit is contained in:
Quincy Morgan
2019-10-11 13:22:53 +02:00
parent a66e21c76f
commit aba96f039f
3 changed files with 14 additions and 8 deletions
+3 -2
View File
@@ -1325,11 +1325,12 @@ en:
everything_in_view: Everything in view looks fine
edits: Your edits look fine
edits_in_view: Your edits in view look fine
no_edits: You have no edits yet
hidden_issues:
none: Detected issues will appear here
elsewhere: "Issues elsewhere: {count}"
other_features: "Issues with other features: {count}"
other_features_elsewhere: "Issues elsewhere with other features: {count}"
everything_else: "Issues with everything else: {count}"
everything_else_elsewhere: "Issues elsewhere with everything else: {count}"
disabled_rules: "Issues with disabled rules: {count}"
disabled_rules_elsewhere: "Issues elsewhere with disabled rules: {count}"
ignored_issues: "Ignored issues: {count}"
+4 -3
View File
@@ -1626,13 +1626,14 @@
"everything": "Everything looks fine",
"everything_in_view": "Everything in view looks fine",
"edits": "Your edits look fine",
"edits_in_view": "Your edits in view look fine"
"edits_in_view": "Your edits in view look fine",
"no_edits": "You have no edits yet"
},
"hidden_issues": {
"none": "Detected issues will appear here",
"elsewhere": "Issues elsewhere: {count}",
"other_features": "Issues with other features: {count}",
"other_features_elsewhere": "Issues elsewhere with other features: {count}",
"everything_else": "Issues with everything else: {count}",
"everything_else_elsewhere": "Issues elsewhere with everything else: {count}",
"disabled_rules": "Issues with disabled rules: {count}",
"disabled_rules_elsewhere": "Issues elsewhere with disabled rules: {count}",
"ignored_issues": "Ignored issues: {count}",
+7 -3
View File
@@ -422,9 +422,9 @@ export function uiIssues(context) {
checkForHiddenIssues({
elsewhere: { what: 'edited', where: 'all' },
other_features: { what: 'all', where: 'visible' },
everything_else: { what: 'all', where: 'visible' },
disabled_rules: { what: 'edited', where: 'visible', includeDisabledRules: 'only' },
other_features_elsewhere: { what: 'all', where: 'all' },
everything_else_elsewhere: { what: 'all', where: 'all' },
disabled_rules_elsewhere: { what: 'edited', where: 'all', includeDisabledRules: 'only' },
ignored_issues: { what: 'edited', where: 'visible', includeIgnored: 'only' },
ignored_issues_elsewhere: { what: 'edited', where: 'all', includeIgnored: 'only' }
@@ -435,7 +435,7 @@ export function uiIssues(context) {
messageType = 'edits';
checkForHiddenIssues({
other_features: { what: 'all', where: 'all' },
everything_else: { what: 'all', where: 'all' },
disabled_rules: { what: 'edited', where: 'all', includeDisabledRules: 'only' },
ignored_issues: { what: 'edited', where: 'all', includeIgnored: 'only' }
});
@@ -461,6 +461,10 @@ export function uiIssues(context) {
});
}
if (_options.what === 'edited' && context.history().difference().summary().length === 0) {
messageType = 'no_edits';
}
_pane.select('.issues-none .message')
.text(t('issues.no_issues.message.' + messageType));