From 712f8bcb039f2dea4d2faf23ab779867dc51ce27 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 1 May 2019 20:13:09 -0700 Subject: [PATCH] Avoid having hidden issues strings for both singular and multiple variations --- data/core.yaml | 28 +++++++--------------------- dist/locales/en.json | 35 +++++++---------------------------- modules/ui/issues.js | 3 +-- 3 files changed, 15 insertions(+), 51 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index 8db65b9c4..c087bf79a 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -1288,27 +1288,13 @@ en: edits_in_view: Your edits in view look fine hidden_issues: none: Detected issues will appear here - elsewhere: - single: "1 issue elsewhere" - multiple: "{count} issues elsewhere" - other_features: - single: "1 issue with other features" - multiple: "{count} issues with other features" - other_features_elsewhere: - single: "1 issue with other features elsewhere" - multiple: "{count} issues with other features elsewhere" - disabled_rules: - single: "1 issue with disabled rules" - multiple: "{count} issues with disabled rules" - disabled_rules_elsewhere: - single: "1 issue with disabled rules elsewhere" - multiple: "{count} issues with disabled rules elsewhere" - ignored_issues: - single: "1 ignored issue" - multiple: "{count} ignored issues" - ignored_issues_elsewhere: - single: "1 ignored issue elsewhere" - multiple: "{count} ignored issues elsewhere" + elsewhere: "Issues elsewhere: {count}" + other_features: "Issues with other features: {count}" + other_features_elsewhere: "Issues with other features elsewhere: {count}" + disabled_rules: "Issues with disabled rules: {count}" + disabled_rules_elsewhere: "Issues with disabled rules elsewhere: {count}" + ignored_issues: "Ignored issues: {count}" + ignored_issues_elsewhere: "Ignored issues elsewhere: {count}" options: what: title: "Check:" diff --git a/dist/locales/en.json b/dist/locales/en.json index 4b4035e0a..332608453 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1579,34 +1579,13 @@ }, "hidden_issues": { "none": "Detected issues will appear here", - "elsewhere": { - "single": "1 issue elsewhere", - "multiple": "{count} issues elsewhere" - }, - "other_features": { - "single": "1 issue with other features", - "multiple": "{count} issues with other features" - }, - "other_features_elsewhere": { - "single": "1 issue with other features elsewhere", - "multiple": "{count} issues with other features elsewhere" - }, - "disabled_rules": { - "single": "1 issue with disabled rules", - "multiple": "{count} issues with disabled rules" - }, - "disabled_rules_elsewhere": { - "single": "1 issue with disabled rules elsewhere", - "multiple": "{count} issues with disabled rules elsewhere" - }, - "ignored_issues": { - "single": "1 ignored issue", - "multiple": "{count} ignored issues" - }, - "ignored_issues_elsewhere": { - "single": "1 ignored issue elsewhere", - "multiple": "{count} ignored issues elsewhere" - } + "elsewhere": "Issues elsewhere: {count}", + "other_features": "Issues with other features: {count}", + "other_features_elsewhere": "Issues with other features elsewhere: {count}", + "disabled_rules": "Issues with disabled rules: {count}", + "disabled_rules_elsewhere": "Issues with disabled rules elsewhere: {count}", + "ignored_issues": "Ignored issues: {count}", + "ignored_issues_elsewhere": "Ignored issues elsewhere: {count}" } }, "options": { diff --git a/modules/ui/issues.js b/modules/ui/issues.js index 7806ceb14..645c397fb 100644 --- a/modules/ui/issues.js +++ b/modules/ui/issues.js @@ -402,10 +402,9 @@ export function uiIssues(context) { var opts = cases[type]; var hiddenIssues = context.validator().getIssues(opts); if (hiddenIssues.length) { - var quantity = hiddenIssues.length === 1 ? 'single' : 'multiple'; _pane.select('.issues-none .details') .text(t( - 'issues.no_issues.hidden_issues.' + type + '.' + quantity, + 'issues.no_issues.hidden_issues.' + type, { count: hiddenIssues.length.toString() } )); return;