Commit b48f2518 authored by Paul Gascou-Vaillancourt's avatar Paul Gascou-Vaillancourt Committed by Nicolò Maria Mezzopera

Address require-string-literal-i18n-helpers offenses

parent d59ee459
<script>
/* eslint-disable @gitlab/require-string-literal-i18n-helpers */
import { GlLink, GlSprintf } from '@gitlab/ui';
import { first } from 'lodash';
import { truncateSha } from '~/lib/utils/text_utility';
......@@ -20,8 +19,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,
......@@ -57,14 +54,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,
);
},
},
......@@ -133,10 +130,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>
......
......@@ -24417,6 +24417,11 @@ msgstr ""
msgid "PackageRegistry|Package has %{number} archived updates"
msgstr ""
msgid "PackageRegistry|Package has %{updatesCount} archived update"
msgid_plural "PackageRegistry|Package has %{updatesCount} archived updates"
msgstr[0] ""
msgstr[1] ""
msgid "PackageRegistry|Package updated by commit %{link} on branch %{branch}, built by pipeline %{pipeline}, and published to the registry %{datetime}"
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