[#5561] Translate notification action value (#5604)

* [#5561] Translate action value

* Fix lint issues
This commit is contained in:
Arik Sidney Guggenheim
2020-04-14 13:34:38 +02:00
committed by GitHub
parent 63063699fd
commit d089283aa4
2 changed files with 14 additions and 1 deletions

View File

@@ -104,10 +104,11 @@ export class NotificationService {
private dispatchNotification(message: string, action?: string, config?: number | MatSnackBarConfig, interpolateArgs?: any): MatSnackBarRef<any> {
const translatedMessage: string = this.translationService.instant(message, interpolateArgs);
const translatedAction: string = this.translationService.instant(action, interpolateArgs);
const createNotification = this.getNotificationCreator(config);
this.notifications$.next(createNotification(translatedMessage));
return this.snackBar.open(translatedMessage, action, {
return this.snackBar.open(translatedMessage, translatedAction, {
duration: (typeof config === 'number') ? config : this.DEFAULT_DURATION_MESSAGE,
panelClass: INFO_SNACK_CLASS,
...( (typeof config === 'object') ? config : {} )