Commit 22aa45c8 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch 'js-i18n-reports' into 'master'

Internationalisation of reports directory

See merge request gitlab-org/gitlab-ce!27742
parents 9f8123d9 f947ac92
import { sprintf, n__, s__ } from '~/locale'; import { sprintf, n__, s__, __ } from '~/locale';
import { import {
STATUS_FAILED, STATUS_FAILED,
STATUS_SUCCESS, STATUS_SUCCESS,
...@@ -38,12 +38,12 @@ const textBuilder = results => { ...@@ -38,12 +38,12 @@ const textBuilder = results => {
export const summaryTextBuilder = (name = '', results = {}) => { export const summaryTextBuilder = (name = '', results = {}) => {
const resultsString = textBuilder(results); const resultsString = textBuilder(results);
return `${name} contained ${resultsString}`; return sprintf(__('%{name} contained %{resultsString}'), { name, resultsString });
}; };
export const reportTextBuilder = (name = '', results = {}) => { export const reportTextBuilder = (name = '', results = {}) => {
const resultsString = textBuilder(results); const resultsString = textBuilder(results);
return `${name} found ${resultsString}`; return sprintf(__('%{name} found %{resultsString}'), { name, resultsString });
}; };
export const statusIcon = status => { export const statusIcon = status => {
......
...@@ -172,6 +172,12 @@ msgstr "" ...@@ -172,6 +172,12 @@ msgstr ""
msgid "%{mrText}, this issue will be closed automatically." msgid "%{mrText}, this issue will be closed automatically."
msgstr "" msgstr ""
msgid "%{name} contained %{resultsString}"
msgstr ""
msgid "%{name} found %{resultsString}"
msgstr ""
msgid "%{number_commits_behind} commits behind %{default_branch}, %{number_commits_ahead} commits ahead" msgid "%{number_commits_behind} commits behind %{default_branch}, %{number_commits_ahead} commits ahead"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment