[ACA-1016] translate Undo action text (#72)

This commit is contained in:
Cilibiu Bogdan 2017-11-21 18:29:01 +02:00 committed by Denys Vuika
parent 025210fcce
commit 41aec25b91
2 changed files with 5 additions and 5 deletions

View File

@ -84,7 +84,7 @@ describe('NodeDeleteDirective', () => {
element.triggerEventHandler('click', null);
expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith(
'APP.MESSAGES.INFO.NODE_DELETION.SINGULAR', 'Undo', 10000
'APP.MESSAGES.INFO.NODE_DELETION.SINGULAR', 'APP.ACTIONS.UNDO', 10000
);
});
@ -113,7 +113,7 @@ describe('NodeDeleteDirective', () => {
element.triggerEventHandler('click', null);
expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith(
'APP.MESSAGES.INFO.NODE_DELETION.PLURAL', 'Undo', 10000
'APP.MESSAGES.INFO.NODE_DELETION.PLURAL', 'APP.ACTIONS.UNDO', 10000
);
});
@ -151,7 +151,7 @@ describe('NodeDeleteDirective', () => {
element.triggerEventHandler('click', null);
expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith(
'APP.MESSAGES.INFO.NODE_DELETION.PARTIAL_SINGULAR', 'Undo', 10000
'APP.MESSAGES.INFO.NODE_DELETION.PARTIAL_SINGULAR', 'APP.ACTIONS.UNDO', 10000
);
});
@ -180,7 +180,7 @@ describe('NodeDeleteDirective', () => {
element.triggerEventHandler('click', null);
expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith(
'APP.MESSAGES.INFO.NODE_DELETION.PARTIAL_PLURAL', 'Undo', 10000
'APP.MESSAGES.INFO.NODE_DELETION.PARTIAL_PLURAL', 'APP.ACTIONS.UNDO', 10000
);
});
});

View File

@ -59,7 +59,7 @@ export class NodeDeleteDirective {
this.getDeleteMesssage(processedData)
.subscribe((message) => {
const withUndo = processedData.someSucceeded ? 'Undo' : '';
const withUndo = processedData.someSucceeded ? this.translation.translate.instant('APP.ACTIONS.UNDO') : '';
this.notification.openSnackMessageAction(message, withUndo, NodeDeleteDirective.DELETE_MESSAGE_DURATION)
.onAction()