Commit 89d01f5d authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'bvl-port-of-po-validation' into 'master'

Port of PO validation

See merge request gitlab-org/gitlab-ee!6183
parent 01747f6a
......@@ -177,8 +177,8 @@ export default {
});
}
return sprintf(
n__('%{type} detected %d vulnerability', '%{type} detected %d vulnerabilities', issuesCount),
{ type },
n__('%{type} detected 1 vulnerability', '%{type} detected %{vulnerabilityCount} vulnerabilities', issuesCount),
{ type, vulnerabilityCount: issuesCount },
);
},
translateText(type) {
......
......@@ -268,11 +268,11 @@ export const textBuilder = (
if (newIssues > 0) {
return sprintf(
n__(
'%{type} detected %d vulnerability for the source branch only',
'%{type} detected %d vulnerabilities for the source branch only',
'%{type} detected 1 vulnerability for the source branch only',
'%{type} detected %{vulnerabilityCount} vulnerabilities for the source branch only',
newIssues,
),
{ type },
{ type, vulnerabilityCount: newIssues },
);
}
......@@ -287,11 +287,11 @@ export const textBuilder = (
if (newIssues > 0 && resolvedIssues === 0) {
return sprintf(
n__(
'%{type} detected %d new vulnerability',
'%{type} detected %d new vulnerabilities',
'%{type} detected 1 new vulnerability',
'%{type} detected %{vulnerabilityCount} new vulnerabilities',
newIssues,
),
{ type },
{ type, vulnerabilityCount: newIssues },
);
}
......@@ -299,24 +299,24 @@ export const textBuilder = (
if (newIssues > 0 && resolvedIssues > 0) {
return `${sprintf(
n__(
'%{type} detected %d new vulnerability',
'%{type} detected %d new vulnerabilities',
'%{type} detected 1 new vulnerability',
'%{type} detected %{vulnerabilityCount} new vulnerabilities',
newIssues,
),
{ type },
{ type, vulnerabilityCount: newIssues },
)}
${n__('and %d fixed vulnerability', 'and %d fixed vulnerabilities', resolvedIssues)}`;
${n__('and 1 fixed vulnerability', 'and %d fixed vulnerabilities', resolvedIssues)}`;
}
// with only fixed issues
if (newIssues === 0 && resolvedIssues > 0) {
return sprintf(
n__(
'%{type} detected %d fixed vulnerability',
'%{type} detected %d fixed vulnerabilities',
'%{type} detected 1 fixed vulnerability',
'%{type} detected %{vulnerabilityCount} fixed vulnerabilities',
resolvedIssues,
),
{ type },
{ type, vulnerabilityCount: resolvedIssues },
);
}
}
......
......@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-06-13 14:05+0200\n"
"PO-Revision-Date: 2018-06-13 14:05+0200\n"
"POT-Creation-Date: 2018-06-19 13:14+0200\n"
"PO-Revision-Date: 2018-06-19 13:14+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
......@@ -140,8 +140,8 @@ msgstr ""
msgid "%{title} changes"
msgstr ""
msgid "%{type} detected %d vulnerability"
msgid_plural "%{type} detected %d vulnerabilities"
msgid "%{type} detected 1 vulnerability"
msgid_plural "%{type} detected %{vulnerabilityCount} vulnerabilities"
msgstr[0] ""
msgstr[1] ""
......@@ -1411,6 +1411,12 @@ msgstr ""
msgid "ClusterIntegration|Kubernetes clusters can be used to deploy applications and to provide Review Apps for this project"
msgstr ""
msgid "ClusterIntegration|Learn more about %{help_link_start_machine_type}machine types%{help_link_end} and %{help_link_start_pricing}pricing%{help_link_end}."
msgstr ""
msgid "ClusterIntegration|Learn more about %{help_link_start}zones%{help_link_end}."
msgstr ""
msgid "ClusterIntegration|Learn more about %{link_to_documentation}"
msgstr ""
......@@ -1507,9 +1513,6 @@ msgstr ""
msgid "ClusterIntegration|See and edit the details for your Kubernetes cluster"
msgstr ""
msgid "ClusterIntegration|See zones"
msgstr ""
msgid "ClusterIntegration|Select machine type"
msgstr ""
......@@ -1826,6 +1829,9 @@ msgstr ""
msgid "Control the maximum concurrency of repository backfill for this secondary node"
msgstr ""
msgid "Control the maximum concurrency of verification operations for this Geo node"
msgstr ""
msgid "Copy SSH public key to clipboard"
msgstr ""
......@@ -2368,9 +2374,6 @@ msgstr ""
msgid "Error Reporting and Logging"
msgstr ""
msgid "Error checking branch data. Please try again."
msgstr ""
msgid "Error committing changes. Please try again."
msgstr ""
......@@ -2784,6 +2787,9 @@ msgstr ""
msgid "Geo|Shards to synchronize"
msgstr ""
msgid "Geo|Verification capacity"
msgstr ""
msgid "Git repository URL"
msgstr ""
......@@ -3516,6 +3522,9 @@ msgstr ""
msgid "Months"
msgstr ""
msgid "More actions"
msgstr ""
msgid "More info"
msgstr ""
......@@ -4962,7 +4971,7 @@ msgstr ""
msgid "Stage"
msgstr ""
msgid "Stage all"
msgid "Stage all changes"
msgstr ""
msgid "Stage changes"
......@@ -5643,7 +5652,7 @@ msgstr ""
msgid "Unresolve discussion"
msgstr ""
msgid "Unstage all"
msgid "Unstage all changes"
msgstr ""
msgid "Unstage changes"
......@@ -5994,7 +6003,7 @@ msgstr ""
msgid "You are on a read-only GitLab instance."
msgstr ""
msgid "You are on a secondary (read-only) Geo node. If you want to make any changes, you must visit the %{primary_node}."
msgid "You are on a secondary, <b>read-only</b> Geo node. If you want to make changes, you must visit this page on the %{primary_node}."
msgstr ""
msgid "You can also create a project from the command line."
......@@ -6126,7 +6135,7 @@ msgstr ""
msgid "among other things"
msgstr ""
msgid "and %d fixed vulnerability"
msgid "and 1 fixed vulnerability"
msgid_plural "and %d fixed vulnerabilities"
msgstr[0] ""
msgstr[1] ""
......
......@@ -232,6 +232,9 @@ describe('security reports utils', () => {
expect(textBuilder('', { head: 'foo', base: 'foo' }, 1, 0, 0)).toEqual(
' detected 1 new vulnerability',
);
expect(textBuilder('', { head: 'foo', base: 'foo' }, 2, 0, 0)).toEqual(
' detected 2 new vulnerabilities',
);
});
});
......@@ -240,6 +243,9 @@ describe('security reports utils', () => {
expect(
textBuilder('', { head: 'foo', base: 'foo' }, 1, 1, 0).replace(/\n+\s+/m, ' '),
).toEqual(' detected 1 new vulnerability and 1 fixed vulnerability');
expect(
textBuilder('', { head: 'foo', base: 'foo' }, 2, 2, 0).replace(/\n+\s+/m, ' '),
).toEqual(' detected 2 new vulnerabilities and 2 fixed vulnerabilities');
});
});
......@@ -248,6 +254,9 @@ describe('security reports utils', () => {
expect(textBuilder('', { head: 'foo', base: 'foo' }, 0, 1, 0)).toEqual(
' detected 1 fixed vulnerability',
);
expect(textBuilder('', { head: 'foo', base: 'foo' }, 0, 2, 0)).toEqual(
' detected 2 fixed vulnerabilities',
);
});
});
});
......
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