diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-12 10:40:04 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-08-14 10:28:30 +0200 |
commit | 66357162f8e1227495f09bd4f68446aad7071c6d (patch) | |
tree | 7d4429506deb512b2fe1d0267f38a28cda20af55 /client/src/app/shared/shared-forms/preview-upload.component.ts | |
parent | 8c360747995e17eb5520e22fc3d7bd4c3d26eeee (diff) | |
download | PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.gz PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.zst PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.zip |
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
Diffstat (limited to 'client/src/app/shared/shared-forms/preview-upload.component.ts')
-rw-r--r-- | client/src/app/shared/shared-forms/preview-upload.component.ts | 6 |
1 files changed, 2 insertions, 4 deletions
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' | |||
2 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' | 2 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' |
3 | import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser' | 3 | import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser' |
4 | import { ServerService } from '@app/core' | 4 | import { ServerService } from '@app/core' |
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
6 | import { ServerConfig } from '@shared/models' | 5 | import { ServerConfig } from '@shared/models' |
7 | import { BytesPipe } from '../shared-main' | 6 | import { BytesPipe } from '../shared-main' |
8 | 7 | ||
@@ -34,11 +33,10 @@ export class PreviewUploadComponent implements OnInit, ControlValueAccessor { | |||
34 | 33 | ||
35 | constructor ( | 34 | constructor ( |
36 | private sanitizer: DomSanitizer, | 35 | private sanitizer: DomSanitizer, |
37 | private serverService: ServerService, | 36 | private serverService: ServerService |
38 | private i18n: I18n | ||
39 | ) { | 37 | ) { |
40 | this.bytesPipe = new BytesPipe() | 38 | this.bytesPipe = new BytesPipe() |
41 | this.maxSizeText = this.i18n('max size') | 39 | this.maxSizeText = $localize`max size` |
42 | } | 40 | } |
43 | 41 | ||
44 | get videoImageExtensions () { | 42 | get videoImageExtensions () { |