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/+accounts/account-videos | |
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/+accounts/account-videos')
-rw-r--r-- | client/src/app/+accounts/account-videos/account-videos.component.ts | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/client/src/app/+accounts/account-videos/account-videos.component.ts b/client/src/app/+accounts/account-videos/account-videos.component.ts index 5a9241f8e..3134a8ee2 100644 --- a/client/src/app/+accounts/account-videos/account-videos.component.ts +++ b/client/src/app/+accounts/account-videos/account-videos.component.ts | |||
@@ -6,7 +6,6 @@ import { AuthService, ConfirmService, LocalStorageService, Notifier, ScreenServi | |||
6 | import { immutableAssign } from '@app/helpers' | 6 | import { immutableAssign } from '@app/helpers' |
7 | import { Account, AccountService, VideoService } from '@app/shared/shared-main' | 7 | import { Account, AccountService, VideoService } from '@app/shared/shared-main' |
8 | import { AbstractVideoList } from '@app/shared/shared-video-miniature' | 8 | import { AbstractVideoList } from '@app/shared/shared-video-miniature' |
9 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
10 | 9 | ||
11 | @Component({ | 10 | @Component({ |
12 | selector: 'my-account-videos', | 11 | selector: 'my-account-videos', |
@@ -23,7 +22,6 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit, | |||
23 | private accountSub: Subscription | 22 | private accountSub: Subscription |
24 | 23 | ||
25 | constructor ( | 24 | constructor ( |
26 | protected i18n: I18n, | ||
27 | protected router: Router, | 25 | protected router: Router, |
28 | protected serverService: ServerService, | 26 | protected serverService: ServerService, |
29 | protected route: ActivatedRoute, | 27 | protected route: ActivatedRoute, |
@@ -66,7 +64,7 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit, | |||
66 | .getAccountVideos(this.account, newPagination, this.sort) | 64 | .getAccountVideos(this.account, newPagination, this.sort) |
67 | .pipe( | 65 | .pipe( |
68 | tap(({ total }) => { | 66 | tap(({ total }) => { |
69 | this.titlePage = this.i18n('Published {{total}} videos', { total }) | 67 | this.titlePage = $localize`Published ${total} videos` |
70 | }) | 68 | }) |
71 | ) | 69 | ) |
72 | } | 70 | } |