diff options
author | Brandon Labuschagne <blabuschagne@gitlab.com> | 2019-05-03 12:50:57 +0000 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2019-05-03 12:50:57 +0000 |
commit | f947ac92f27ef8ae52202e91a305ee3c04363e21 (patch) | |
tree | 6308d8b12d5a0ae4f6d35b46df41af35e3596feb | |
parent | 9f8123d935679582ac4f1487e1dcb559863372cb (diff) | |
download | gitlab-ce-f947ac92f27ef8ae52202e91a305ee3c04363e21.tar.gz |
Internationalisation of reports directory
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.js | 6 | ||||
-rw-r--r-- | locale/gitlab.pot | 6 |
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 "" |