X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fcore%2Fnotification%2Fnotifier.service.ts;h=f736672bb5ce0a468135269df9cc91c739284a4a;hb=66357162f8e1227495f09bd4f68446aad7071c6d;hp=9833c65a02b1a7591f1ee4011dd186c3643299bb;hpb=88108880bbdba473cfe36ecbebc1c3c4f972e102;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/core/notification/notifier.service.ts b/client/src/app/core/notification/notifier.service.ts index 9833c65a0..f736672bb 100644 --- a/client/src/app/core/notification/notifier.service.ts +++ b/client/src/app/core/notification/notifier.service.ts @@ -1,30 +1,26 @@ -import { Injectable } from '@angular/core' import { MessageService } from 'primeng/api' -import { I18n } from '@ngx-translate/i18n-polyfill' +import { Injectable } from '@angular/core' @Injectable() export class Notifier { readonly TIMEOUT = 5000 - constructor ( - private i18n: I18n, - private messageService: MessageService) { - } + constructor (private messageService: MessageService) { } info (text: string, title?: string, timeout?: number) { - if (!title) title = this.i18n('Info') + if (!title) title = $localize`Info` return this.notify('info', text, title, timeout) } error (text: string, title?: string, timeout?: number) { - if (!title) title = this.i18n('Error') + if (!title) title = $localize`Error` return this.notify('error', text, title, timeout) } success (text: string, title?: string, timeout?: number) { - if (!title) title = this.i18n('Success') + if (!title) title = $localize`Success` return this.notify('success', text, title, timeout) }