Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/packages_and_registries/package_registry/components/details/package_history.vue')
-rw-r--r--app/assets/javascripts/packages_and_registries/package_registry/components/details/package_history.vue19
1 files changed, 8 insertions, 11 deletions
diff --git a/app/assets/javascripts/packages_and_registries/package_registry/components/details/package_history.vue b/app/assets/javascripts/packages_and_registries/package_registry/components/details/package_history.vue
index 408bd2e3dfe..af6bd7079ba 100644
--- a/app/assets/javascripts/packages_and_registries/package_registry/components/details/package_history.vue
+++ b/app/assets/javascripts/packages_and_registries/package_registry/components/details/package_history.vue
@@ -1,11 +1,10 @@
<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';
import { truncateSha } from '~/lib/utils/text_utility';
import { s__, n__ } from '~/locale';
-import { HISTORY_PIPELINES_LIMIT } from '~/packages/details/constants';
+import { HISTORY_PIPELINES_LIMIT } from '~/packages_and_registries/shared/constants';
import HistoryItem from '~/vue_shared/components/registry/history_item.vue';
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
@@ -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>