Commit 5fbc646f authored by Clement Ho's avatar Clement Ho

Merge branch '33405-container-registry-improve-delete-modal-button' into 'master'

Resolve "Container registry, improve delete modal button"

Closes #33405

See merge request gitlab-org/gitlab!18260
parents 3d311509 a845e88a
......@@ -51,7 +51,7 @@ export default {
shouldRenderPagination() {
return this.repo.pagination.total > this.repo.pagination.perPage;
},
modalTitle() {
modalAction() {
return n__(
'ContainerRegistry|Remove tag',
'ContainerRegistry|Remove tags',
......@@ -269,8 +269,8 @@ export default {
/>
<gl-modal ref="deleteModal" :modal-id="modalId" ok-variant="danger">
<template v-slot:modal-title>{{ modalTitle }}</template>
<template v-slot:modal-ok>{{ s__('ContainerRegistry|Remove tag(s)') }}</template>
<template v-slot:modal-title>{{ modalAction }}</template>
<template v-slot:modal-ok>{{ modalAction }}</template>
<p v-html="modalDescription"></p>
</gl-modal>
</div>
......
---
title: Container registry tag(s) delete button pluralization
merge_request: 18260
author:
type: changed
......@@ -4258,9 +4258,6 @@ msgid_plural "ContainerRegistry|Remove tags"
msgstr[0] ""
msgstr[1] ""
msgid "ContainerRegistry|Remove tag(s)"
msgstr ""
msgid "ContainerRegistry|Size"
msgstr ""
......
......@@ -196,7 +196,7 @@ describe('table registry', () => {
it('should show the singular title and image name when deleting a single image', () => {
wrapper.setData({ itemsToBeDeleted: [1] });
wrapper.vm.setModalDescription(0);
expect(wrapper.vm.modalTitle).toBe('Remove tag');
expect(wrapper.vm.modalAction).toBe('Remove tag');
expect(wrapper.vm.modalDescription).toContain(firstImage.tag);
});
......@@ -204,7 +204,7 @@ describe('table registry', () => {
wrapper.setData({ itemsToBeDeleted: [1, 2] });
wrapper.vm.setModalDescription();
expect(wrapper.vm.modalTitle).toBe('Remove tags');
expect(wrapper.vm.modalAction).toBe('Remove tags');
expect(wrapper.vm.modalDescription).toContain('<b>2</b> tags');
});
});
......
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