Commit 358a6b40 authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera

Merge branch '339499-require-string-literal-i18n-helper' into 'master'

Address require-string-literal-i18n-helpers offenses

See merge request gitlab-org/gitlab!72389
parents b07515ab 66dc6d76
<script>
/* eslint-disable @gitlab/require-string-literal-i18n-helpers */
import { GlLink, GlSprintf } from '@gitlab/ui';
import { first } from 'lodash';
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
......@@ -21,8 +20,6 @@ export default {
combinedUpdateText: s__(
'PackageRegistry|Package updated by commit %{link} on branch %{branch}, built by pipeline %{pipeline}, and published to the registry %{datetime}',
),
archivedPipelineMessageSingular: s__('PackageRegistry|Package has %{number} archived update'),
archivedPipelineMessagePlural: s__('PackageRegistry|Package has %{number} archived updates'),
},
components: {
GlLink,
......@@ -58,14 +55,14 @@ export default {
showPipelinesInfo() {
return Boolean(this.firstPipeline?.id);
},
archiviedLines() {
archivedLines() {
return Math.max(this.pipelines.length - HISTORY_PIPELINES_LIMIT - 1, 0);
},
archivedPipelineMessage() {
return n__(
this.$options.i18n.archivedPipelineMessageSingular,
this.$options.i18n.archivedPipelineMessagePlural,
this.archiviedLines,
'PackageRegistry|Package has %{updatesCount} archived update',
'PackageRegistry|Package has %{updatesCount} archived updates',
this.archivedLines,
);
},
},
......@@ -135,10 +132,10 @@ export default {
</gl-sprintf>
</history-item>
<history-item v-if="archiviedLines" icon="history" data-testid="archived">
<history-item v-if="archivedLines" icon="history" data-testid="archived">
<gl-sprintf :message="archivedPipelineMessage">
<template #number>
<strong>{{ archiviedLines }}</strong>
<template #updatesCount>
<strong>{{ archivedLines }}</strong>
</template>
</gl-sprintf>
</history-item>
......
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