Commit 2f7be07b authored by Illya Klymov's avatar Illya Klymov

Merge branch '213618-fix-inconsistent-translation-namespaces' into 'master'

Rename inconsistent namespace usage

See merge request gitlab-org/gitlab!30987
parents b1eb425e 3a396a13
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
anchor.click(); anchor.click();
}) })
.catch(() => { .catch(() => {
createFlash(s__('SecurityDashboard|There was an error while generating the report.')); createFlash(s__('SecurityReports|There was an error while generating the report.'));
}) })
.finally(() => { .finally(() => {
this.isPreparingCsvExport = false; this.isPreparingCsvExport = false;
......
...@@ -17,14 +17,14 @@ export default { ...@@ -17,14 +17,14 @@ export default {
}, },
}, },
DESCRIPTION: s__( DESCRIPTION: s__(
`SecurityDashboard|The security dashboard displays the latest security report. Use it to find and fix vulnerabilities.`, `SecurityReports|The security dashboard displays the latest security report. Use it to find and fix vulnerabilities.`,
), ),
}; };
</script> </script>
<template> <template>
<gl-empty-state <gl-empty-state
:title="s__('SecurityDashboard|Monitor vulnerabilities in your code')" :title="s__('SecurityReports|Monitor vulnerabilities in your code')"
:svg-path="svgPath" :svg-path="svgPath"
:description="$options.DESCRIPTION" :description="$options.DESCRIPTION"
:primary-button-link="helpPath" :primary-button-link="helpPath"
......
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
@setFilter="setFilter" @setFilter="setFilter"
/> />
<div class="ml-lg-auto p-2"> <div class="ml-lg-auto p-2">
<strong>{{ s__('SecurityDashboard|Hide dismissed') }}</strong> <strong>{{ s__('SecurityReports|Hide dismissed') }}</strong>
<gl-toggle-vuex <gl-toggle-vuex
class="d-block mt-1 js-toggle" class="d-block mt-1 js-toggle"
store-module="filters" store-module="filters"
......
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
}, },
}, },
emptyStateDescription: s__( emptyStateDescription: s__(
`While it's rare to have no vulnerabilities for your group, it can happen. In any event, we ask that you double check your settings to make sure you've set up your dashboard correctly.`, `SecurityReports|While it's rare to have no vulnerabilities for your group, it can happen. In any event, we ask that you double check your settings to make sure you've set up your dashboard correctly.`,
), ),
}; };
</script> </script>
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
> >
{{ {{
s__( s__(
'Security Dashboard|Error fetching the vulnerability list. Please check your network connection and try again.', 'SecurityReports|Error fetching the vulnerability list. Please check your network connection and try again.',
) )
}} }}
</gl-alert> </gl-alert>
...@@ -114,11 +114,11 @@ export default { ...@@ -114,11 +114,11 @@ export default {
> >
<template #emptyState> <template #emptyState>
<gl-empty-state <gl-empty-state
:title="s__(`No vulnerabilities found for this group`)" :title="s__(`SecurityReports|No vulnerabilities found for this group`)"
:svg-path="emptyStateSvgPath" :svg-path="emptyStateSvgPath"
:description="$options.emptyStateDescription" :description="$options.emptyStateDescription"
:primary-button-link="dashboardDocumentation" :primary-button-link="dashboardDocumentation"
:primary-button-text="s__('Security Reports|Learn more about setting up your dashboard')" :primary-button-text="s__('SecurityReports|Learn more about setting up your dashboard')"
/> />
</template> </template>
</vulnerability-list> </vulnerability-list>
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
@appear="fetchNextPage" @appear="fetchNextPage"
> >
<gl-button :loading="isLoadingQuery" :disabled="isLoadingQuery" @click="fetchNextPage">{{ <gl-button :loading="isLoadingQuery" :disabled="isLoadingQuery" @click="fetchNextPage">{{
__('Load more vulnerabilities') s__('SecurityReports|Load more vulnerabilities')
}}</gl-button> }}</gl-button>
</gl-intersection-observer> </gl-intersection-observer>
</div> </div>
......
...@@ -64,10 +64,10 @@ export default { ...@@ -64,10 +64,10 @@ export default {
return this.showProjectSelector return this.showProjectSelector
? { ? {
variant: 'success', variant: 'success',
text: s__('SecurityDashboard|Return to dashboard'), text: s__('SecurityReports|Return to dashboard'),
} }
: { : {
text: s__('SecurityDashboard|Edit dashboard'), text: s__('SecurityReports|Edit dashboard'),
}; };
}, },
}, },
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
<security-dashboard-layout> <security-dashboard-layout>
<template #header> <template #header>
<header class="page-title-holder flex-fill d-flex align-items-center"> <header class="page-title-holder flex-fill d-flex align-items-center">
<h2 class="page-title">{{ s__('SecurityDashboard|Security Dashboard') }}</h2> <h2 class="page-title">{{ s__('SecurityReports|Security Dashboard') }}</h2>
<gl-button <gl-button
class="page-title-controls js-project-selector-toggle" class="page-title-controls js-project-selector-toggle"
:variant="toggleButtonProps.variant" :variant="toggleButtonProps.variant"
...@@ -114,22 +114,22 @@ export default { ...@@ -114,22 +114,22 @@ export default {
/> />
<gl-empty-state <gl-empty-state
v-else-if="shouldShowEmptyState" v-else-if="shouldShowEmptyState"
:title="s__('SecurityDashboard|Add a project to your dashboard')" :title="s__('SecurityReports|Add a project to your dashboard')"
:svg-path="emptyStateSvgPath" :svg-path="emptyStateSvgPath"
> >
<template #description> <template #description>
{{ {{
s__( s__(
'SecurityDashboard|The security dashboard displays the latest security findings for projects you wish to monitor. Select "Edit dashboard" to add and remove projects.', 'SecurityReports|The security dashboard displays the latest security findings for projects you wish to monitor. Select "Edit dashboard" to add and remove projects.',
) )
}} }}
<gl-link :href="dashboardDocumentation">{{ <gl-link :href="dashboardDocumentation">{{
s__('SecurityDashboard|More information') s__('SecurityReports|More information')
}}</gl-link> }}</gl-link>
</template> </template>
<template #actions> <template #actions>
<gl-button variant="success" @click="toggleProjectSelector"> <gl-button variant="success" @click="toggleProjectSelector">
{{ s__('SecurityDashboard|Add projects') }} {{ s__('SecurityReports|Add projects') }}
</gl-button> </gl-button>
</template> </template>
</gl-empty-state> </gl-empty-state>
......
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
}, },
}, },
emptyStateDescription: s__( emptyStateDescription: s__(
`While it's rare to have no vulnerabilities, it can happen. In any event, we ask that you please double check your settings to make sure you've set up your dashboard correctly.`, `SecurityReports|While it's rare to have no vulnerabilities, it can happen. In any event, we ask that you please double check your settings to make sure you've set up your dashboard correctly.`,
), ),
}; };
</script> </script>
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
> >
{{ {{
s__( s__(
'Security Dashboard|Error fetching the vulnerability list. Please check your network connection and try again.', 'SecurityReports|Error fetching the vulnerability list. Please check your network connection and try again.',
) )
}} }}
</gl-alert> </gl-alert>
...@@ -109,11 +109,11 @@ export default { ...@@ -109,11 +109,11 @@ export default {
> >
<template #emptyState> <template #emptyState>
<gl-empty-state <gl-empty-state
:title="s__(`SecurityDashboard|No vulnerabilities found for dashboard`)" :title="s__(`SecurityReports|No vulnerabilities found for dashboard`)"
:svg-path="emptyStateSvgPath" :svg-path="emptyStateSvgPath"
:description="$options.emptyStateDescription" :description="$options.emptyStateDescription"
:primary-button-link="dashboardDocumentation" :primary-button-link="dashboardDocumentation"
:primary-button-text="s__('Security Reports|Learn more about setting up your dashboard')" :primary-button-text="s__('SecurityReports|Learn more about setting up your dashboard')"
/> />
</template> </template>
</vulnerability-list> </vulnerability-list>
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
> >
<gl-button :disabled="isFirstResultLoading" @click="fetchNextPage"> <gl-button :disabled="isFirstResultLoading" @click="fetchNextPage">
<gl-loading-icon v-if="isQueryLoading" size="md" /> <gl-loading-icon v-if="isQueryLoading" size="md" />
<template v-else>{{ __('Load more vulnerabilities') }}</template> <template v-else>{{ s__('SecurityReports|Load more vulnerabilities') }}</template>
</gl-button> </gl-button>
</gl-intersection-observer> </gl-intersection-observer>
</div> </div>
......
...@@ -77,15 +77,15 @@ export default { ...@@ -77,15 +77,15 @@ export default {
v-if="isBannerVisible" v-if="isBannerVisible"
class="mt-4" class="mt-4"
variant="introduction" variant="introduction"
:title="s__('SecurityDashboard|Introducing standalone vulnerabilities')" :title="s__('SecurityReports|Introducing standalone vulnerabilities')"
:button-text="s__('SecurityDashboard|Learn More')" :button-text="s__('SecurityReports|Learn More')"
:button-link="dashboardDocumentation" :button-link="dashboardDocumentation"
@close="handleBannerClose" @close="handleBannerClose"
> >
<div class="mb-2"> <div class="mb-2">
{{ {{
s__( s__(
'SecurityDashboard|Each vulnerability now has a unique page that can be directly linked to, shared, referenced, and tracked as the single source of truth. Vulnerability occurrences also persist across scanner runs, which improves tracking and visibility and reduces duplicates between scans.', 'SecurityReports|Each vulnerability now has a unique page that can be directly linked to, shared, referenced, and tracked as the single source of truth. Vulnerability occurrences also persist across scanner runs, which improves tracking and visibility and reduces duplicates between scans.',
) )
}} }}
</div> </div>
......
...@@ -58,15 +58,15 @@ export default { ...@@ -58,15 +58,15 @@ export default {
> >
<template #emptyState> <template #emptyState>
<gl-empty-state <gl-empty-state
:title="s__(`No vulnerabilities found for this group`)" :title="s__(`SecurityReports|No vulnerabilities found for this group`)"
:svg-path="emptyStateSvgPath" :svg-path="emptyStateSvgPath"
:description=" :description="
s__( s__(
`While it's rare to have no vulnerabilities for your group, it can happen. In any event, we ask that you double check your settings to make sure you've set up your dashboard correctly.`, `SecurityReports|While it's rare to have no vulnerabilities for your group, it can happen. In any event, we ask that you double check your settings to make sure you've set up your dashboard correctly.`,
) )
" "
:primary-button-link="dashboardDocumentation" :primary-button-link="dashboardDocumentation"
:primary-button-text="s__('Security Reports|Learn more about setting up your dashboard')" :primary-button-text="s__('SecurityReports|Learn more about setting up your dashboard')"
/> />
</template> </template>
</security-dashboard> </security-dashboard>
......
...@@ -66,11 +66,11 @@ export default { ...@@ -66,11 +66,11 @@ export default {
return this.showProjectSelector return this.showProjectSelector
? { ? {
variant: 'success', variant: 'success',
text: s__('SecurityDashboard|Return to dashboard'), text: s__('SecurityReports|Return to dashboard'),
} }
: { : {
variant: 'secondary', variant: 'secondary',
text: s__('SecurityDashboard|Edit dashboard'), text: s__('SecurityReports|Edit dashboard'),
}; };
}, },
shouldShowEmptyState() { shouldShowEmptyState() {
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
<template> <template>
<article> <article>
<header class="page-title-holder flex-fill d-flex align-items-center"> <header class="page-title-holder flex-fill d-flex align-items-center">
<h2 class="page-title">{{ s__('SecurityDashboard|Security Dashboard') }}</h2> <h2 class="page-title">{{ s__('SecurityReports|Security Dashboard') }}</h2>
<gl-deprecated-button <gl-deprecated-button
v-if="isInitialized" v-if="isInitialized"
class="page-title-controls js-project-selector-toggle" class="page-title-controls js-project-selector-toggle"
...@@ -117,23 +117,23 @@ export default { ...@@ -117,23 +117,23 @@ export default {
<template v-else> <template v-else>
<gl-empty-state <gl-empty-state
v-if="shouldShowEmptyState" v-if="shouldShowEmptyState"
:title="s__('SecurityDashboard|Add a project to your dashboard')" :title="s__('SecurityReports|Add a project to your dashboard')"
:svg-path="emptyStateSvgPath" :svg-path="emptyStateSvgPath"
> >
<template #description> <template #description>
{{ {{
s__( s__(
'SecurityDashboard|The security dashboard displays the latest security findings for projects you wish to monitor. Select "Edit dashboard" to add and remove projects.', 'SecurityReports|The security dashboard displays the latest security findings for projects you wish to monitor. Select "Edit dashboard" to add and remove projects.',
) )
}} }}
<gl-link :href="dashboardDocumentation">{{ <gl-link :href="dashboardDocumentation">{{
s__('SecurityDashboard|More information') s__('SecurityReports|More information')
}}</gl-link }}</gl-link
>. >.
</template> </template>
<template #actions> <template #actions>
<gl-deprecated-button variant="success" @click="toggleProjectSelector"> <gl-deprecated-button variant="success" @click="toggleProjectSelector">
{{ s__('SecurityDashboard|Add projects') }} {{ s__('SecurityReports|Add projects') }}
</gl-deprecated-button> </gl-deprecated-button>
</template> </template>
</gl-empty-state> </gl-empty-state>
......
...@@ -4,19 +4,19 @@ import { s__, __ } from '~/locale'; ...@@ -4,19 +4,19 @@ import { s__, __ } from '~/locale';
import { LOADING_VULNERABILITIES_ERROR_CODES as ERROR_CODES } from '../store/modules/vulnerabilities/constants'; import { LOADING_VULNERABILITIES_ERROR_CODES as ERROR_CODES } from '../store/modules/vulnerabilities/constants';
const description = s__( const description = s__(
'Security Reports|Security reports can only be accessed by authorized users.', 'SecurityReports|Security reports can only be accessed by authorized users.',
); );
export default { export default {
emptyStatePropsMap: { emptyStatePropsMap: {
[ERROR_CODES.UNAUTHORIZED]: { [ERROR_CODES.UNAUTHORIZED]: {
title: s__('Security Reports|You must sign in as an authorized user to see this report'), title: s__('SecurityReports|You must sign in as an authorized user to see this report'),
description, description,
primaryButtonText: __('Sign in'), primaryButtonText: __('Sign in'),
primaryButtonLink: '/users/sign_in', primaryButtonLink: '/users/sign_in',
}, },
[ERROR_CODES.FORBIDDEN]: { [ERROR_CODES.FORBIDDEN]: {
title: s__('Security Reports|You do not have sufficient permissions to access this report'), title: s__('SecurityReports|You do not have sufficient permissions to access this report'),
description, description,
}, },
}, },
......
...@@ -62,15 +62,15 @@ export default { ...@@ -62,15 +62,15 @@ export default {
> >
<template #emptyState> <template #emptyState>
<gl-empty-state <gl-empty-state
:title="s__('No vulnerabilities found for this pipeline')" :title="s__('SecurityReports|No vulnerabilities found for this pipeline')"
:svg-path="emptyStateSvgPath" :svg-path="emptyStateSvgPath"
:description=" :description="
s__( s__(
`While it's rare to have no vulnerabilities for your pipeline, it can happen. In any event, we ask that you double check your settings to make sure all security scanning jobs have passed successfully.`, `SecurityReports|While it's rare to have no vulnerabilities for your pipeline, it can happen. In any event, we ask that you double check your settings to make sure all security scanning jobs have passed successfully.`,
) )
" "
:primary-button-link="dashboardDocumentation" :primary-button-link="dashboardDocumentation"
:primary-button-text="s__('Security Reports|Learn more about setting up your dashboard')" :primary-button-text="s__('SecurityReports|Learn more about setting up your dashboard')"
/> />
</template> </template>
</security-dashboard> </security-dashboard>
......
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
<section> <section>
<div> <div>
<h4 class="h5 font-weight-bold text-secondary border-bottom mb-3 pb-2"> <h4 class="h5 font-weight-bold text-secondary border-bottom mb-3 pb-2">
{{ s__('SecurityDashboard|Projects added') }} {{ s__('SecurityReports|Projects added') }}
<gl-badge pill class="font-weight-bold">{{ projects.length }}</gl-badge> <gl-badge pill class="font-weight-bold">{{ projects.length }}</gl-badge>
<gl-loading-icon v-if="showLoadingIndicator" size="sm" class="float-right" /> <gl-loading-icon v-if="showLoadingIndicator" size="sm" class="float-right" />
</h4> </h4>
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
<gl-deprecated-button <gl-deprecated-button
v-gl-tooltip v-gl-tooltip
class="ml-auto bg-transparent border-0 p-0 text-secondary js-projects-list-project-remove" class="ml-auto bg-transparent border-0 p-0 text-secondary js-projects-list-project-remove"
:title="s__('SecurityDashboard|Remove project from dashboard')" :title="s__('SecurityReports|Remove project from dashboard')"
@click="projectRemoved(project)" @click="projectRemoved(project)"
> >
<icon name="remove" /> <icon name="remove" />
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
</ul> </ul>
<p v-else class="text-secondary js-projects-list-empty-message"> <p v-else class="text-secondary js-projects-list-empty-message">
{{ {{
s__('SecurityDashboard|Select a project to add by using the project search field above.') s__('SecurityReports|Select a project to add by using the project search field above.')
}} }}
</p> </p>
</div> </div>
......
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
<div class="row justify-content-center mt-md-4"> <div class="row justify-content-center mt-md-4">
<div class="col col-lg-7"> <div class="col col-lg-7">
<h3 class="text-3 font-weight-bold border-bottom mb-4 pb-3"> <h3 class="text-3 font-weight-bold border-bottom mb-4 pb-3">
{{ s__('SecurityDashboard|Add or remove projects from your dashboard') }} {{ s__('SecurityReports|Add or remove projects from your dashboard') }}
</h3> </h3>
<div class="d-flex flex-column flex-md-row"> <div class="d-flex flex-column flex-md-row">
<project-selector <project-selector
...@@ -75,7 +75,7 @@ export default { ...@@ -75,7 +75,7 @@ export default {
variant="success" variant="success"
@click="addProjects" @click="addProjects"
> >
{{ s__('SecurityDashboard|Add projects') }} {{ s__('SecurityReports|Add projects') }}
</gl-deprecated-button> </gl-deprecated-button>
</div> </div>
</div> </div>
......
...@@ -90,7 +90,7 @@ export default { ...@@ -90,7 +90,7 @@ export default {
<span class="js-security-dashboard-left"> <span class="js-security-dashboard-left">
<gl-sprintf <gl-sprintf
:message=" :message="
s__('SecurityDashboard|Pipeline %{pipelineLink} triggered %{timeago} by %{user}') s__('SecurityReports|Pipeline %{pipelineLink} triggered %{timeago} by %{user}')
" "
> >
<template #pipelineLink> <template #pipelineLink>
...@@ -129,17 +129,15 @@ export default { ...@@ -129,17 +129,15 @@ export default {
> >
<template #emptyState> <template #emptyState>
<gl-empty-state <gl-empty-state
:title="s__(`No vulnerabilities found for this project`)" :title="s__(`SecurityReports|No vulnerabilities found for this project`)"
:svg-path="emptyStateSvgPath" :svg-path="emptyStateSvgPath"
:description=" :description="
s__( s__(
`While it's rare to have no vulnerabilities for your project, it can happen. In any event, we ask that you double check your settings to make sure you've set up your dashboard correctly.`, `SecurityReports|While it's rare to have no vulnerabilities for your project, it can happen. In any event, we ask that you double check your settings to make sure you've set up your dashboard correctly.`,
) )
" "
:primary-button-link="dashboardDocumentation" :primary-button-link="dashboardDocumentation"
:primary-button-text=" :primary-button-text="s__('SecurityReports|Learn more about setting up your dashboard')"
s__('Security Reports|Learn more about setting up your dashboard')
"
/> />
</template> </template>
</security-dashboard> </security-dashboard>
......
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
<div class="flash-text container-fluid container-limited limit-container-width"> <div class="flash-text container-fluid container-limited limit-container-width">
{{ {{
s__( s__(
'Security Dashboard|Error fetching the vulnerability list. Please check your network connection and try again.', 'SecurityReports|Error fetching the vulnerability list. Please check your network connection and try again.',
) )
}} }}
</div> </div>
......
...@@ -5,9 +5,9 @@ import toast from '~/vue_shared/plugins/global_toast'; ...@@ -5,9 +5,9 @@ import toast from '~/vue_shared/plugins/global_toast';
import createFlash from '~/flash'; import createFlash from '~/flash';
import dismissVulnerability from '../graphql/dismissVulnerability.graphql'; import dismissVulnerability from '../graphql/dismissVulnerability.graphql';
const REASON_NONE = s__('Security Reports|[No reason]'); const REASON_NONE = s__('SecurityReports|[No reason]');
const REASON_WONT_FIX = s__("Security Reports|Won't fix / Accept risk"); const REASON_WONT_FIX = s__("SecurityReports|Won't fix / Accept risk");
const REASON_FALSE_POSITIVE = s__('Security Reports|False positive'); const REASON_FALSE_POSITIVE = s__('SecurityReports|False positive');
export default { export default {
name: 'SelectionSummary', name: 'SelectionSummary',
...@@ -71,14 +71,14 @@ export default { ...@@ -71,14 +71,14 @@ export default {
}) })
.catch(() => { .catch(() => {
createFlash( createFlash(
s__('Security Reports|There was an error dismissing the vulnerabilities.'), s__('SecurityReports|There was an error dismissing the vulnerabilities.'),
'alert', 'alert',
); );
}); });
}, },
}, },
dismissalReasons: [ dismissalReasons: [
{ value: null, text: s__('Security Reports|Select a reason') }, { value: null, text: s__('SecurityReports|Select a reason') },
REASON_FALSE_POSITIVE, REASON_FALSE_POSITIVE,
REASON_WONT_FIX, REASON_WONT_FIX,
REASON_NONE, REASON_NONE,
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
variant="warning" variant="warning"
:disabled="!canDismissVulnerability" :disabled="!canDismissVulnerability"
> >
{{ s__('Security Reports|Dismiss Selected') }} {{ s__('SecurityReports|Dismiss Selected') }}
</gl-button> </gl-button>
</form> </form>
</div> </div>
......
...@@ -20,13 +20,13 @@ export default { ...@@ -20,13 +20,13 @@ export default {
<template> <template>
<gl-empty-state <gl-empty-state
:svg-path="svgPath" :svg-path="svgPath"
:title="s__('Security Reports|Oops, something doesn\'t seem right.')" :title="s__('SecurityReports|Oops, something doesn\'t seem right.')"
:description=" :description="
s__( s__(
'Security Reports|Either you don\'t have permission to view this dashboard or the dashboard has not been setup. Please check your permission settings with your administrator or check your dashboard configurations to proceed.', 'SecurityReports|Either you don\'t have permission to view this dashboard or the dashboard has not been setup. Please check your permission settings with your administrator or check your dashboard configurations to proceed.',
) )
" "
:primary-button-link="link" :primary-button-link="link"
:primary-button-text="s__('Security Reports|Learn more about setting up your dashboard')" :primary-button-text="s__('SecurityReports|Learn more about setting up your dashboard')"
/> />
</template> </template>
...@@ -65,8 +65,8 @@ export default { ...@@ -65,8 +65,8 @@ export default {
<button <button
key="more-info" key="more-info"
v-gl-tooltip v-gl-tooltip
:aria-label="s__('Security Reports|More info')" :aria-label="s__('SecurityReports|More info')"
:title="s__('Security Reports|More info')" :title="s__('SecurityReports|More info')"
class="btn btn-inverted btn-info btn-secondary btn-border-color btn-icon js-more-info" class="btn btn-inverted btn-info btn-secondary btn-border-color btn-icon js-more-info"
type="button" type="button"
@click="openModal({ vulnerability })" @click="openModal({ vulnerability })"
...@@ -77,9 +77,9 @@ export default { ...@@ -77,9 +77,9 @@ export default {
v-if="canCreateIssue" v-if="canCreateIssue"
key="create-issue" key="create-issue"
v-gl-tooltip v-gl-tooltip
:aria-label="s__('Security Reports|Create issue')" :aria-label="s__('SecurityReports|Create issue')"
:loading="isCreatingIssue" :loading="isCreatingIssue"
:title="s__('Security Reports|Create issue')" :title="s__('SecurityReports|Create issue')"
container-class="btn btn-inverted btn-success btn-border-color js-create-issue" container-class="btn btn-inverted btn-success btn-border-color js-create-issue"
type="button" type="button"
@click="handleCreateIssue" @click="handleCreateIssue"
...@@ -91,9 +91,9 @@ export default { ...@@ -91,9 +91,9 @@ export default {
v-if="isDismissed" v-if="isDismissed"
key="undo-dismiss" key="undo-dismiss"
v-gl-tooltip v-gl-tooltip
:aria-label="s__('Security Reports|Undo dismiss')" :aria-label="s__('SecurityReports|Undo dismiss')"
:loading="isDismissingVulnerability" :loading="isDismissingVulnerability"
:title="s__('Security Reports|Undo dismiss')" :title="s__('SecurityReports|Undo dismiss')"
container-class="btn btn-inverted btn-warning btn-border-color js-undo-dismiss" container-class="btn btn-inverted btn-warning btn-border-color js-undo-dismiss"
type="button" type="button"
@click="handleUndoDismiss" @click="handleUndoDismiss"
...@@ -104,9 +104,9 @@ export default { ...@@ -104,9 +104,9 @@ export default {
v-else v-else
key="dismiss-vulnerability" key="dismiss-vulnerability"
v-gl-tooltip v-gl-tooltip
:aria-label="s__('Security Reports|Dismiss vulnerability')" :aria-label="s__('SecurityReports|Dismiss vulnerability')"
:loading="isDismissingVulnerability" :loading="isDismissingVulnerability"
:title="s__('Security Reports|Dismiss vulnerability')" :title="s__('SecurityReports|Dismiss vulnerability')"
container-class="btn btn-inverted btn-warning btn-border-color js-dismiss-vulnerability" container-class="btn btn-inverted btn-warning btn-border-color js-dismiss-vulnerability"
type="button" type="button"
@click="handleDismissVulnerability" @click="handleDismissVulnerability"
......
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
<gl-alert v-if="showAlert" class="mb-4" variant="danger" @dismiss="onErrorDismiss"> <gl-alert v-if="showAlert" class="mb-4" variant="danger" @dismiss="onErrorDismiss">
{{ {{
s__( s__(
'Security Dashboard|Error fetching the vulnerability counts. Please check your network connection and try again.', 'SecurityReports|Error fetching the vulnerability counts. Please check your network connection and try again.',
) )
}} }}
</gl-alert> </gl-alert>
......
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
v-gl-tooltip v-gl-tooltip
name="issue-created" name="issue-created"
class="text-success vertical-align-middle" class="text-success vertical-align-middle"
:title="s__('Security Dashboard|Issue Created')" :title="s__('SecurityReports|Issue Created')"
/> />
<a :href="issue.issue_url" class="vertical-align-middle">{{ linkText }}</a> <a :href="issue.issue_url" class="vertical-align-middle">{{ linkText }}</a>
</div> </div>
......
...@@ -8,7 +8,7 @@ const parseOptions = obj => ...@@ -8,7 +8,7 @@ const parseOptions = obj =>
export const initFirstClassVulnerabilityFilters = () => [ export const initFirstClassVulnerabilityFilters = () => [
{ {
name: s__('SecurityDashboard|Status'), name: s__('SecurityReports|Status'),
id: 'state', id: 'state',
options: [ options: [
{ id: ALL, name: s__('VulnerabilityStatusTypes|All') }, { id: ALL, name: s__('VulnerabilityStatusTypes|All') },
...@@ -17,13 +17,13 @@ export const initFirstClassVulnerabilityFilters = () => [ ...@@ -17,13 +17,13 @@ export const initFirstClassVulnerabilityFilters = () => [
selection: new Set([ALL]), selection: new Set([ALL]),
}, },
{ {
name: s__('SecurityDashboard|Severity'), name: s__('SecurityReports|Severity'),
id: 'severity', id: 'severity',
options: [BASE_FILTERS.severity, ...parseOptions(SEVERITY_LEVELS)], options: [BASE_FILTERS.severity, ...parseOptions(SEVERITY_LEVELS)],
selection: new Set([ALL]), selection: new Set([ALL]),
}, },
{ {
name: s__('SecurityDashboard|Report type'), name: s__('SecurityReports|Report type'),
id: 'reportType', id: 'reportType',
options: [BASE_FILTERS.report_type, ...parseOptions(REPORT_TYPES)], options: [BASE_FILTERS.report_type, ...parseOptions(REPORT_TYPES)],
selection: new Set([ALL]), selection: new Set([ALL]),
......
...@@ -7,21 +7,21 @@ const optionsObjectToArray = obj => Object.entries(obj).map(([id, name]) => ({ i ...@@ -7,21 +7,21 @@ const optionsObjectToArray = obj => Object.entries(obj).map(([id, name]) => ({ i
export default () => ({ export default () => ({
filters: [ filters: [
{ {
name: s__('SecurityDashboard|Severity'), name: s__('SecurityReports|Severity'),
id: 'severity', id: 'severity',
options: [BASE_FILTERS.severity, ...optionsObjectToArray(SEVERITY_LEVELS)], options: [BASE_FILTERS.severity, ...optionsObjectToArray(SEVERITY_LEVELS)],
hidden: false, hidden: false,
selection: new Set([BASE_FILTERS.severity.id]), selection: new Set([BASE_FILTERS.severity.id]),
}, },
{ {
name: s__('SecurityDashboard|Report type'), name: s__('SecurityReports|Report type'),
id: 'report_type', id: 'report_type',
options: [BASE_FILTERS.report_type, ...optionsObjectToArray(REPORT_TYPES)], options: [BASE_FILTERS.report_type, ...optionsObjectToArray(REPORT_TYPES)],
hidden: false, hidden: false,
selection: new Set([BASE_FILTERS.report_type.id]), selection: new Set([BASE_FILTERS.report_type.id]),
}, },
{ {
name: s__('SecurityDashboard|Project'), name: s__('SecurityReports|Project'),
id: 'project_id', id: 'project_id',
options: [BASE_FILTERS.project_id], options: [BASE_FILTERS.project_id],
hidden: false, hidden: false,
......
...@@ -65,19 +65,19 @@ export const receiveAddProjectsSuccess = ({ commit, dispatch, state }, data) => ...@@ -65,19 +65,19 @@ export const receiveAddProjectsSuccess = ({ commit, dispatch, state }, data) =>
let invalidProjects; let invalidProjects;
if (rest.length > 0) { if (rest.length > 0) {
invalidProjects = sprintf( invalidProjects = sprintf(
s__('SecurityDashboard|%{firstProject}, %{secondProject}, and %{rest}'), s__('SecurityReports|%{firstProject}, %{secondProject}, and %{rest}'),
translationValues, translationValues,
); );
} else if (secondProject) { } else if (secondProject) {
invalidProjects = sprintf( invalidProjects = sprintf(
s__('SecurityDashboard|%{firstProject} and %{secondProject}'), s__('SecurityReports|%{firstProject} and %{secondProject}'),
translationValues, translationValues,
); );
} else { } else {
invalidProjects = firstProject; invalidProjects = firstProject;
} }
createFlash( createFlash(
sprintf(s__('SecurityDashboard|Unable to add %{invalidProjects}'), { sprintf(s__('SecurityReports|Unable to add %{invalidProjects}'), {
invalidProjects, invalidProjects,
}), }),
); );
......
...@@ -149,7 +149,7 @@ export const receiveCreateIssueError = ({ commit }, { flashError }) => { ...@@ -149,7 +149,7 @@ export const receiveCreateIssueError = ({ commit }, { flashError }) => {
if (flashError) { if (flashError) {
createFlash( createFlash(
s__('Security Reports|There was an error creating the issue.'), s__('SecurityReports|There was an error creating the issue.'),
'alert', 'alert',
document.querySelector('.ci-table'), document.querySelector('.ci-table'),
); );
...@@ -220,7 +220,7 @@ export const receiveDismissSelectedVulnerabilitiesError = ({ commit }, { flashEr ...@@ -220,7 +220,7 @@ export const receiveDismissSelectedVulnerabilitiesError = ({ commit }, { flashEr
commit(types.RECEIVE_DISMISS_SELECTED_VULNERABILITIES_ERROR); commit(types.RECEIVE_DISMISS_SELECTED_VULNERABILITIES_ERROR);
if (flashError) { if (flashError) {
createFlash( createFlash(
s__('Security Reports|There was an error dismissing the vulnerabilities.'), s__('SecurityReports|There was an error dismissing the vulnerabilities.'),
'alert', 'alert',
document.querySelector('.ci-table'), document.querySelector('.ci-table'),
); );
...@@ -240,9 +240,9 @@ export const dismissVulnerability = ( ...@@ -240,9 +240,9 @@ export const dismissVulnerability = (
const toastMsg = sprintf( const toastMsg = sprintf(
dismissedVulnerabilitiesHidden dismissedVulnerabilitiesHidden
? s__( ? s__(
"Security Reports|Dismissed '%{vulnerabilityName}'. Turn off the hide dismissed toggle to view.", "SecurityReports|Dismissed '%{vulnerabilityName}'. Turn off the hide dismissed toggle to view.",
) )
: s__("Security Reports|Dismissed '%{vulnerabilityName}'"), : s__("SecurityReports|Dismissed '%{vulnerabilityName}'"),
{ {
vulnerabilityName: vulnerability.name, vulnerabilityName: vulnerability.name,
}, },
...@@ -250,7 +250,7 @@ export const dismissVulnerability = ( ...@@ -250,7 +250,7 @@ export const dismissVulnerability = (
const toastOptions = dismissedVulnerabilitiesHidden const toastOptions = dismissedVulnerabilitiesHidden
? { ? {
action: { action: {
text: s__('Security Reports|Undo dismiss'), text: s__('SecurityReports|Undo dismiss'),
onClick: (e, toastObject) => { onClick: (e, toastObject) => {
if (vulnerability.dismissal_feedback) { if (vulnerability.dismissal_feedback) {
dispatch('undoDismiss', { vulnerability }) dispatch('undoDismiss', { vulnerability })
...@@ -307,7 +307,7 @@ export const receiveDismissVulnerabilityError = ({ commit }, { flashError }) => ...@@ -307,7 +307,7 @@ export const receiveDismissVulnerabilityError = ({ commit }, { flashError }) =>
commit(types.RECEIVE_DISMISS_VULNERABILITY_ERROR); commit(types.RECEIVE_DISMISS_VULNERABILITY_ERROR);
if (flashError) { if (flashError) {
createFlash( createFlash(
s__('Security Reports|There was an error dismissing the vulnerability.'), s__('SecurityReports|There was an error dismissing the vulnerability.'),
'alert', 'alert',
document.querySelector('.ci-table'), document.querySelector('.ci-table'),
); );
...@@ -323,10 +323,10 @@ export const addDismissalComment = ({ dispatch }, { vulnerability, comment }) => ...@@ -323,10 +323,10 @@ export const addDismissalComment = ({ dispatch }, { vulnerability, comment }) =>
dismissal_feedback.comment_details && dismissal_feedback.comment_details.comment; dismissal_feedback.comment_details && dismissal_feedback.comment_details.comment;
const toastMsg = editingDismissalContent const toastMsg = editingDismissalContent
? sprintf(s__("Security Reports|Comment edited on '%{vulnerabilityName}'"), { ? sprintf(s__("SecurityReports|Comment edited on '%{vulnerabilityName}'"), {
vulnerabilityName: vulnerability.name, vulnerabilityName: vulnerability.name,
}) })
: sprintf(s__("Security Reports|Comment added to '%{vulnerabilityName}'"), { : sprintf(s__("SecurityReports|Comment added to '%{vulnerabilityName}'"), {
vulnerabilityName: vulnerability.name, vulnerabilityName: vulnerability.name,
}); });
...@@ -351,7 +351,7 @@ export const deleteDismissalComment = ({ dispatch }, { vulnerability }) => { ...@@ -351,7 +351,7 @@ export const deleteDismissalComment = ({ dispatch }, { vulnerability }) => {
const { dismissal_feedback } = vulnerability; const { dismissal_feedback } = vulnerability;
const url = `${vulnerability.create_vulnerability_feedback_dismissal_path}/${dismissal_feedback.id}`; const url = `${vulnerability.create_vulnerability_feedback_dismissal_path}/${dismissal_feedback.id}`;
const toastMsg = sprintf(s__("Security Reports|Comment deleted on '%{vulnerabilityName}'"), { const toastMsg = sprintf(s__("SecurityReports|Comment deleted on '%{vulnerabilityName}'"), {
vulnerabilityName: vulnerability.name, vulnerabilityName: vulnerability.name,
}); });
...@@ -433,7 +433,7 @@ export const receiveUndoDismissError = ({ commit }, { flashError }) => { ...@@ -433,7 +433,7 @@ export const receiveUndoDismissError = ({ commit }, { flashError }) => {
commit(types.RECEIVE_REVERT_DISMISSAL_ERROR); commit(types.RECEIVE_REVERT_DISMISSAL_ERROR);
if (flashError) { if (flashError) {
createFlash( createFlash(
s__('Security Reports|There was an error reverting this dismissal.'), s__('SecurityReports|There was an error reverting this dismissal.'),
'alert', 'alert',
document.querySelector('.ci-table'), document.querySelector('.ci-table'),
); );
...@@ -501,7 +501,7 @@ export const receiveCreateMergeRequestError = ({ commit }, { flashError }) => { ...@@ -501,7 +501,7 @@ export const receiveCreateMergeRequestError = ({ commit }, { flashError }) => {
if (flashError) { if (flashError) {
createFlash( createFlash(
s__('Security Reports|There was an error creating the merge request.'), s__('SecurityReports|There was an error creating the merge request.'),
'alert', 'alert',
document.querySelector('.ci-table'), document.querySelector('.ci-table'),
); );
......
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
Vue.set( Vue.set(
state.modal, state.modal,
'error', 'error',
s__('Security Reports|There was an error dismissing the vulnerability.'), s__('SecurityReports|There was an error dismissing the vulnerability.'),
); );
}, },
[types.REQUEST_DISMISS_SELECTED_VULNERABILITIES](state) { [types.REQUEST_DISMISS_SELECTED_VULNERABILITIES](state) {
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
}, },
[types.RECEIVE_ADD_DISMISSAL_COMMENT_ERROR](state) { [types.RECEIVE_ADD_DISMISSAL_COMMENT_ERROR](state) {
state.isDismissingVulnerability = false; state.isDismissingVulnerability = false;
Vue.set(state.modal, 'error', s__('Security Reports|There was an error adding the comment.')); Vue.set(state.modal, 'error', s__('SecurityReports|There was an error adding the comment.'));
}, },
[types.REQUEST_DELETE_DISMISSAL_COMMENT](state) { [types.REQUEST_DELETE_DISMISSAL_COMMENT](state) {
state.isDismissingVulnerability = true; state.isDismissingVulnerability = true;
...@@ -192,7 +192,7 @@ export default { ...@@ -192,7 +192,7 @@ export default {
}, },
[types.RECEIVE_DELETE_DISMISSAL_COMMENT_ERROR](state) { [types.RECEIVE_DELETE_DISMISSAL_COMMENT_ERROR](state) {
state.isDismissingVulnerability = false; state.isDismissingVulnerability = false;
Vue.set(state.modal, 'error', s__('Security Reports|There was an error deleting the comment.')); Vue.set(state.modal, 'error', s__('SecurityReports|There was an error deleting the comment.'));
}, },
[types.REQUEST_REVERT_DISMISSAL](state) { [types.REQUEST_REVERT_DISMISSAL](state) {
state.isDismissingVulnerability = true; state.isDismissingVulnerability = true;
...@@ -211,7 +211,7 @@ export default { ...@@ -211,7 +211,7 @@ export default {
Vue.set( Vue.set(
state.modal, state.modal,
'error', 'error',
s__('Security Reports|There was an error reverting the dismissal.'), s__('SecurityReports|There was an error reverting the dismissal.'),
); );
}, },
[types.SHOW_DISMISSAL_DELETE_BUTTONS](state) { [types.SHOW_DISMISSAL_DELETE_BUTTONS](state) {
......
...@@ -216,7 +216,7 @@ export const receiveDismissVulnerabilityError = ({ commit }, error) => ...@@ -216,7 +216,7 @@ export const receiveDismissVulnerabilityError = ({ commit }, error) =>
export const dismissVulnerability = ({ state, dispatch }, comment) => { export const dismissVulnerability = ({ state, dispatch }, comment) => {
dispatch('requestDismissVulnerability'); dispatch('requestDismissVulnerability');
const toastMsg = sprintf(s__("Security Reports|Dismissed '%{vulnerabilityName}'"), { const toastMsg = sprintf(s__("SecurityReports|Dismissed '%{vulnerabilityName}'"), {
vulnerabilityName: state.modal.vulnerability.name, vulnerabilityName: state.modal.vulnerability.name,
}); });
...@@ -262,10 +262,10 @@ export const addDismissalComment = ({ state, dispatch }, { comment }) => { ...@@ -262,10 +262,10 @@ export const addDismissalComment = ({ state, dispatch }, { comment }) => {
dismissalFeedback.comment_details && dismissalFeedback.comment_details.comment; dismissalFeedback.comment_details && dismissalFeedback.comment_details.comment;
const toastMsg = editingDismissalContent const toastMsg = editingDismissalContent
? sprintf(s__("Security Reports|Comment edited on '%{vulnerabilityName}'"), { ? sprintf(s__("SecurityReports|Comment edited on '%{vulnerabilityName}'"), {
vulnerabilityName: vulnerability.name, vulnerabilityName: vulnerability.name,
}) })
: sprintf(s__("Security Reports|Comment added to '%{vulnerabilityName}'"), { : sprintf(s__("SecurityReports|Comment added to '%{vulnerabilityName}'"), {
vulnerabilityName: vulnerability.name, vulnerabilityName: vulnerability.name,
}); });
...@@ -283,7 +283,7 @@ export const addDismissalComment = ({ state, dispatch }, { comment }) => { ...@@ -283,7 +283,7 @@ export const addDismissalComment = ({ state, dispatch }, { comment }) => {
.catch(() => { .catch(() => {
dispatch( dispatch(
'receiveAddDismissalCommentError', 'receiveAddDismissalCommentError',
s__('Security Reports|There was an error adding the comment.'), s__('SecurityReports|There was an error adding the comment.'),
); );
}); });
}; };
...@@ -294,7 +294,7 @@ export const deleteDismissalComment = ({ state, dispatch }) => { ...@@ -294,7 +294,7 @@ export const deleteDismissalComment = ({ state, dispatch }) => {
const { vulnerability } = state.modal; const { vulnerability } = state.modal;
const { dismissalFeedback } = vulnerability; const { dismissalFeedback } = vulnerability;
const url = `${state.createVulnerabilityFeedbackDismissalPath}/${dismissalFeedback.id}`; const url = `${state.createVulnerabilityFeedbackDismissalPath}/${dismissalFeedback.id}`;
const toastMsg = sprintf(s__("Security Reports|Comment deleted on '%{vulnerabilityName}'"), { const toastMsg = sprintf(s__("SecurityReports|Comment deleted on '%{vulnerabilityName}'"), {
vulnerabilityName: vulnerability.name, vulnerabilityName: vulnerability.name,
}); });
...@@ -311,7 +311,7 @@ export const deleteDismissalComment = ({ state, dispatch }) => { ...@@ -311,7 +311,7 @@ export const deleteDismissalComment = ({ state, dispatch }) => {
.catch(() => { .catch(() => {
dispatch( dispatch(
'receiveDeleteDismissalCommentError', 'receiveDeleteDismissalCommentError',
s__('Security Reports|There was an error deleting the comment.'), s__('SecurityReports|There was an error deleting the comment.'),
); );
}); });
}; };
......
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
}, },
}, },
emptyStateDescription: s__( emptyStateDescription: s__(
`While it's rare to have no vulnerabilities for your project, it can happen. In any event, we ask that you double check your settings to make sure you've set up your dashboard correctly.`, `SecurityReports|While it's rare to have no vulnerabilities for your project, it can happen. In any event, we ask that you double check your settings to make sure you've set up your dashboard correctly.`,
), ),
}; };
</script> </script>
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
<gl-alert v-if="errorLoadingVulnerabilities" :dismissible="false" variant="danger"> <gl-alert v-if="errorLoadingVulnerabilities" :dismissible="false" variant="danger">
{{ {{
s__( s__(
'Security Dashboard|Error fetching the vulnerability list. Please check your network connection and try again.', 'SecurityReports|Error fetching the vulnerability list. Please check your network connection and try again.',
) )
}} }}
</gl-alert> </gl-alert>
...@@ -114,11 +114,11 @@ export default { ...@@ -114,11 +114,11 @@ export default {
> >
<template #emptyState> <template #emptyState>
<gl-empty-state <gl-empty-state
:title="s__(`No vulnerabilities found for this project`)" :title="s__(`SecurityReports|No vulnerabilities found for this project`)"
:svg-path="emptyStateSvgPath" :svg-path="emptyStateSvgPath"
:description="$options.emptyStateDescription" :description="$options.emptyStateDescription"
:primary-button-link="dashboardDocumentation" :primary-button-link="dashboardDocumentation"
:primary-button-text="s__('Security Reports|Learn more about setting up your dashboard')" :primary-button-text="s__('SecurityReports|Learn more about setting up your dashboard')"
/> />
</template> </template>
</vulnerability-list> </vulnerability-list>
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
:loading="isLoadingVulnerabilities" :loading="isLoadingVulnerabilities"
:disabled="isLoadingVulnerabilities" :disabled="isLoadingVulnerabilities"
@click="fetchNextPage" @click="fetchNextPage"
>{{ __('Load more vulnerabilities') }}</gl-deprecated-button >{{ s__('SecurityReports|Load more vulnerabilities') }}</gl-deprecated-button
> >
</gl-intersection-observer> </gl-intersection-observer>
</div> </div>
......
...@@ -87,7 +87,7 @@ describe 'Group overview', :js, :aggregate_failures do ...@@ -87,7 +87,7 @@ describe 'Group overview', :js, :aggregate_failures do
visit_page visit_page
page.within(find('.content')) do page.within(find('.content')) do
expect(page).to have_content s_("Security Reports|Either you don't have permission to view this dashboard or "\ expect(page).to have_content s_("SecurityReports|Either you don't have permission to view this dashboard or "\
'the dashboard has not been setup. Please check your permission settings '\ 'the dashboard has not been setup. Please check your permission settings '\
'with your administrator or check your dashboard configurations to proceed.') 'with your administrator or check your dashboard configurations to proceed.')
end end
......
This diff is collapsed.
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