Commit a845e88a authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera Committed by Clement Ho

Container registry update text for delete tag btn

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