From 66357162f8e1227495f09bd4f68446aad7071c6d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 12 Aug 2020 10:40:04 +0200 Subject: Migrate to $localize * Remove i18n polyfill to translate things in components * Reduce bundle sizes * Improve runtime perf * Reduce a lot the time to make a full client build * Reduce client build complexity * We don't need a service to translate things anymore (so we will be able to translate title pages etc) Unfortunately we may loose some translations in the migration process. I'll put a message on weblate to notify translators --- client/src/app/shared/shared-forms/preview-upload.component.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'client/src/app/shared/shared-forms/preview-upload.component.ts') diff --git a/client/src/app/shared/shared-forms/preview-upload.component.ts b/client/src/app/shared/shared-forms/preview-upload.component.ts index 7afff0b31..a55dcdd9a 100644 --- a/client/src/app/shared/shared-forms/preview-upload.component.ts +++ b/client/src/app/shared/shared-forms/preview-upload.component.ts @@ -2,7 +2,6 @@ import { Component, forwardRef, Input, OnInit } from '@angular/core' import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser' import { ServerService } from '@app/core' -import { I18n } from '@ngx-translate/i18n-polyfill' import { ServerConfig } from '@shared/models' import { BytesPipe } from '../shared-main' @@ -34,11 +33,10 @@ export class PreviewUploadComponent implements OnInit, ControlValueAccessor { constructor ( private sanitizer: DomSanitizer, - private serverService: ServerService, - private i18n: I18n + private serverService: ServerService ) { this.bytesPipe = new BytesPipe() - this.maxSizeText = this.i18n('max size') + this.maxSizeText = $localize`max size` } get videoImageExtensions () { -- cgit v1.2.3