diff --git a/src/app/common/services/node-actions.service.spec.ts b/src/app/common/services/node-actions.service.spec.ts index d7c7f8e69..3f01eb5fa 100644 --- a/src/app/common/services/node-actions.service.spec.ts +++ b/src/app/common/services/node-actions.service.spec.ts @@ -324,7 +324,7 @@ describe('NodeActionsService', () => { expect(testContentNodeSelectorComponentData.data.rowFilter({node: destinationFolder})).toBeDefined(); expect(testContentNodeSelectorComponentData.data.imageResolver({node: destinationFolder})).toBeDefined(); expect(testContentNodeSelectorComponentData.data.title).toBe('NODE_SELECTOR.COPY_ITEMS'); - expect(translationService.instant).toHaveBeenCalledWith('NODE_SELECTOR.COPY_ITEMS', {name: ''}); + expect(translationService.instant).toHaveBeenCalledWith('NODE_SELECTOR.COPY_ITEMS', {name: '', number: 2}); destinationFolder.entry['allowableOperations'] = ['update']; expect(testContentNodeSelectorComponentData.data.imageResolver({node: destinationFolder})).toBeDefined(); @@ -347,7 +347,7 @@ describe('NodeActionsService', () => { expect(spyOnBatchOperation).toHaveBeenCalled(); expect(testContentNodeSelectorComponentData).toBeDefined(); expect(testContentNodeSelectorComponentData.data.title).toBe('NODE_SELECTOR.COPY_ITEM'); - expect(translationService.instant).toHaveBeenCalledWith('NODE_SELECTOR.COPY_ITEM', {name: 'entry-name'}); + expect(translationService.instant).toHaveBeenCalledWith('NODE_SELECTOR.COPY_ITEM', {name: 'entry-name', number: 1}); }); it('should use the ContentNodeSelectorComponentData object without file name in title, if no name exists', () => { @@ -367,7 +367,7 @@ describe('NodeActionsService', () => { expect(spyOnBatchOperation).toHaveBeenCalled(); expect(testContentNodeSelectorComponentData).toBeDefined(); expect(testContentNodeSelectorComponentData.data.title).toBe('NODE_SELECTOR.COPY_ITEMS'); - expect(translationService.instant).toHaveBeenCalledWith('NODE_SELECTOR.COPY_ITEMS', {name: ''}); + expect(translationService.instant).toHaveBeenCalledWith('NODE_SELECTOR.COPY_ITEMS', {name: '', number: 1}); }); }); diff --git a/src/app/common/services/node-actions.service.ts b/src/app/common/services/node-actions.service.ts index 63e301af5..fa13a5b56 100644 --- a/src/app/common/services/node-actions.service.ts +++ b/src/app/common/services/node-actions.service.ts @@ -229,7 +229,9 @@ export class NodeActionsService { name = nodes[0].entry.name; keyPrefix = 'ITEM'; } - return this.translation.instant(`NODE_SELECTOR.${action.toUpperCase()}_${keyPrefix}`, {name}); + + const number = nodes.length; + return this.translation.instant(`NODE_SELECTOR.${action.toUpperCase()}_${keyPrefix}`, {name, number}); } private canCopyMoveInsideIt(entry: MinimalNodeEntryEntity): boolean { diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index b3a09d6dd..1eb6a59f8 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -188,9 +188,9 @@ }, "NODE_SELECTOR": { "COPY_ITEM": "Copy '{{ name }}' to ...", - "COPY_ITEMS": "Copy to ...", + "COPY_ITEMS": "Copy {{ number }} items to ...", "MOVE_ITEM": "Move '{{ name }}' to ...", - "MOVE_ITEMS": "Move to ...", + "MOVE_ITEMS": "Move {{ number }} items to ...", "SEARCH": "Search" } }