diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-13 18:09:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-13 18:09:21 +0300 |
commit | c36152ff8c41fad2f413f253eb7ac5c927e47c56 (patch) | |
tree | bbf300da207de3e8bbf272d44111ceedb18f5833 /app/assets/javascripts/reports | |
parent | 286fe61013674fe2d245ffc8d2233baf09923e70 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/reports')
-rw-r--r-- | app/assets/javascripts/reports/store/utils.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/app/assets/javascripts/reports/store/utils.js b/app/assets/javascripts/reports/store/utils.js index ce3ffaae703..5d3d9ddda3b 100644 --- a/app/assets/javascripts/reports/store/utils.js +++ b/app/assets/javascripts/reports/store/utils.js @@ -11,9 +11,10 @@ const textBuilder = results => { const { failed, errored, resolved, total } = results; const failedOrErrored = (failed || 0) + (errored || 0); - const failedString = failedOrErrored - ? n__('%d failed/error test result', '%d failed/error test results', failedOrErrored) - : null; + const failedString = failed ? n__('%d failed', '%d failed', failed) : null; + const erroredString = errored ? n__('%d error', '%d errors', errored) : null; + const combinedString = + failed && errored ? `${failedString}, ${erroredString}` : failedString || erroredString; const resolvedString = resolved ? n__('%d fixed test result', '%d fixed test results', resolved) : null; @@ -23,12 +24,12 @@ const textBuilder = results => { if (failedOrErrored) { if (resolved) { - resultsString = sprintf(s__('Reports|%{failedString} and %{resolvedString}'), { - failedString, + resultsString = sprintf(s__('Reports|%{combinedString} and %{resolvedString}'), { + combinedString, resolvedString, }); } else { - resultsString = failedString; + resultsString = combinedString; } } else if (resolved) { resultsString = resolvedString; |