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> <script>
/* eslint-disable @gitlab/require-string-literal-i18n-helpers */
import { GlLink, GlSprintf } from '@gitlab/ui'; import { GlLink, GlSprintf } from '@gitlab/ui';
import { first } from 'lodash'; import { first } from 'lodash';
import { truncateSha } from '~/lib/utils/text_utility'; import { truncateSha } from '~/lib/utils/text_utility';
...@@ -20,8 +19,6 @@ export default { ...@@ -20,8 +19,6 @@ export default {
combinedUpdateText: s__( combinedUpdateText: s__(
'PackageRegistry|Package updated by commit %{link} on branch %{branch}, built by pipeline %{pipeline}, and published to the registry %{datetime}', '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: { components: {
GlLink, GlLink,
...@@ -57,14 +54,14 @@ export default { ...@@ -57,14 +54,14 @@ export default {
showPipelinesInfo() { showPipelinesInfo() {
return Boolean(this.firstPipeline?.id); return Boolean(this.firstPipeline?.id);
}, },
archiviedLines() { archivedLines() {
return Math.max(this.pipelines.length - HISTORY_PIPELINES_LIMIT - 1, 0); return Math.max(this.pipelines.length - HISTORY_PIPELINES_LIMIT - 1, 0);
}, },
archivedPipelineMessage() { archivedPipelineMessage() {
return n__( return n__(
this.$options.i18n.archivedPipelineMessageSingular, 'PackageRegistry|Package has %{updatesCount} archived update',
this.$options.i18n.archivedPipelineMessagePlural, 'PackageRegistry|Package has %{updatesCount} archived updates',
this.archiviedLines, this.archivedLines,
); );
}, },
}, },
...@@ -133,10 +130,10 @@ export default { ...@@ -133,10 +130,10 @@ export default {
</gl-sprintf> </gl-sprintf>
</history-item> </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"> <gl-sprintf :message="archivedPipelineMessage">
<template #number> <template #updatesCount>
<strong>{{ archiviedLines }}</strong> <strong>{{ archivedLines }}</strong>
</template> </template>
</gl-sprintf> </gl-sprintf>
</history-item> </history-item>
......
...@@ -24417,6 +24417,11 @@ msgstr "" ...@@ -24417,6 +24417,11 @@ msgstr ""
msgid "PackageRegistry|Package has %{number} archived updates" msgid "PackageRegistry|Package has %{number} archived updates"
msgstr "" 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}" msgid "PackageRegistry|Package updated by commit %{link} on branch %{branch}, built by pipeline %{pipeline}, and published to the registry %{datetime}"
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