summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Labuschagne <blabuschagne@gitlab.com>2019-04-26 15:55:02 +0200
committerBrandon Labuschagne <blabuschagne@gitlab.com>2019-04-26 15:55:02 +0200
commitcfc78c870512b6b5675aa814d4d5ce2874954eb4 (patch)
treed08384e164ee6d59ae4794eab9a98ec9f829d162
parent77efa66cdf17740e28e996cdfee3a3a8d7b19ef4 (diff)
downloadgitlab-ce-js-i18n-reports.tar.gz
Internationalisation of reports directoryjs-i18n-reports
This is one of many MRs opened in order to improve the overall internationalisation of the GitLab codebase. i18n documentation https://docs.gitlab.com/ee/development/i18n/externalization.html
-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 06f2f848925..812cc3199b3 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -159,6 +159,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 ""