X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-forms%2Freactive-file.component.ts;h=eeb2a3fd8fb869c06f9143434e6070ea8b221eb6;hb=7ed1edbbe4ffbef28093e4f5630751cb652814e4;hp=9ebf487ce24396de691d8758801098c01ab898a1;hpb=67ed6552b831df66713bac9e672738796128d33f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-forms/reactive-file.component.ts b/client/src/app/shared/shared-forms/reactive-file.component.ts index 9ebf487ce..eeb2a3fd8 100644 --- a/client/src/app/shared/shared-forms/reactive-file.component.ts +++ b/client/src/app/shared/shared-forms/reactive-file.component.ts @@ -2,7 +2,6 @@ import { Component, EventEmitter, forwardRef, Input, OnInit, Output } from '@ang import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' import { Notifier } from '@app/core' import { GlobalIconName } from '@app/shared/shared-icons' -import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ selector: 'my-reactive-file', @@ -31,10 +30,7 @@ export class ReactiveFileComponent implements OnInit, ControlValueAccessor { private file: File - constructor ( - private notifier: Notifier, - private i18n: I18n - ) {} + constructor (private notifier: Notifier) { } get filename () { if (!this.file) return '' @@ -51,16 +47,13 @@ export class ReactiveFileComponent implements OnInit, ControlValueAccessor { const [ file ] = event.target.files if (file.size > this.maxFileSize) { - this.notifier.error(this.i18n('This file is too large.')) + this.notifier.error($localize`This file is too large.`) return } const extension = '.' + file.name.split('.').pop() if (this.extensions.includes(extension) === false) { - const message = this.i18n( - 'PeerTube cannot handle this kind of file. Accepted extensions are {{extensions}}.', - { extensions: this.allowedExtensionsMessage } - ) + const message = $localize`PeerTube cannot handle this kind of file. Accepted extensions are ${this.allowedExtensionsMessage}}.` this.notifier.error(message) return