summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2019-05-03 12:50:58 +0000
committerTim Zallmann <tzallmann@gitlab.com>2019-05-03 12:50:58 +0000
commit22aa45c8f290f9bcf2cefa194e9d2c25e366f8c5 (patch)
tree6308d8b12d5a0ae4f6d35b46df41af35e3596feb
parent9f8123d935679582ac4f1487e1dcb559863372cb (diff)
parentf947ac92f27ef8ae52202e91a305ee3c04363e21 (diff)
downloadgitlab-ce-22aa45c8f290f9bcf2cefa194e9d2c25e366f8c5.tar.gz
Merge branch 'js-i18n-reports' into 'master'
Internationalisation of reports directory See merge request gitlab-org/gitlab-ce!27742
-rw-r--r--app/assets/javascripts/reports/store/utils.js6
-rw-r--r--locale/gitlab.pot6
2 files changed, 9 insertions, 3 deletions
diff --git a/app/assets/javascripts/reports/store/utils.js b/app/assets/javascripts/reports/store/utils.js
index 35632218269..10560d0ae8e 100644
--- a/app/assets/javascripts/reports/store/utils.js
+++ b/app/assets/javascripts/reports/store/utils.js
@@ -1,4 +1,4 @@
-import { sprintf, n__, s__ } from '~/locale';
+import { sprintf, n__, s__, __ } from '~/locale';
import {
STATUS_FAILED,
STATUS_SUCCESS,
@@ -38,12 +38,12 @@ const textBuilder = results => {
export const summaryTextBuilder = (name = '', results = {}) => {
const resultsString = textBuilder(results);
- return `${name} contained ${resultsString}`;
+ return sprintf(__('%{name} contained %{resultsString}'), { name, resultsString });
};
export const reportTextBuilder = (name = '', results = {}) => {
const resultsString = textBuilder(results);
- return `${name} found ${resultsString}`;
+ return sprintf(__('%{name} found %{resultsString}'), { name, resultsString });
};
export const statusIcon = status => {
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 930fbb545d7..0ac7282baac 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -172,6 +172,12 @@ msgstr ""
msgid "%{mrText}, this issue will be closed automatically."
msgstr ""
+msgid "%{name} contained %{resultsString}"
+msgstr ""
+
+msgid "%{name} found %{resultsString}"
+msgstr ""
+
msgid "%{number_commits_behind} commits behind %{default_branch}, %{number_commits_ahead} commits ahead"
msgstr ""