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/+my-account/my-account-video-playlists/my-account-video-playlist-update.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/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts index 6787fb757..149d0d94f 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts | |||
@@ -6,7 +6,6 @@ import { AuthService, Notifier, ServerService } from '@app/core' | |||
6 | import { populateAsyncUserVideoChannels } from '@app/helpers' | 6 | import { populateAsyncUserVideoChannels } from '@app/helpers' |
7 | import { FormValidatorService, VideoPlaylistValidatorsService } from '@app/shared/shared-forms' | 7 | import { FormValidatorService, VideoPlaylistValidatorsService } from '@app/shared/shared-forms' |
8 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' | 8 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' |
9 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
10 | import { VideoPlaylistUpdate } from '@shared/models' | 9 | import { VideoPlaylistUpdate } from '@shared/models' |
11 | import { MyAccountVideoPlaylistEdit } from './my-account-video-playlist-edit' | 10 | import { MyAccountVideoPlaylistEdit } from './my-account-video-playlist-edit' |
12 | 11 | ||
@@ -29,7 +28,6 @@ export class MyAccountVideoPlaylistUpdateComponent extends MyAccountVideoPlaylis | |||
29 | private router: Router, | 28 | private router: Router, |
30 | private route: ActivatedRoute, | 29 | private route: ActivatedRoute, |
31 | private videoPlaylistService: VideoPlaylistService, | 30 | private videoPlaylistService: VideoPlaylistService, |
32 | private i18n: I18n, | ||
33 | private serverService: ServerService | 31 | private serverService: ServerService |
34 | ) { | 32 | ) { |
35 | super() | 33 | super() |
@@ -91,10 +89,7 @@ export class MyAccountVideoPlaylistUpdateComponent extends MyAccountVideoPlaylis | |||
91 | 89 | ||
92 | this.videoPlaylistService.updateVideoPlaylist(this.videoPlaylistToUpdate, videoPlaylistUpdate).subscribe( | 90 | this.videoPlaylistService.updateVideoPlaylist(this.videoPlaylistToUpdate, videoPlaylistUpdate).subscribe( |
93 | () => { | 91 | () => { |
94 | this.notifier.success( | 92 | this.notifier.success($localize`Playlist ${videoPlaylistUpdate.displayName} updated.`) |
95 | this.i18n('Playlist {{videoPlaylistName}} updated.', { videoPlaylistName: videoPlaylistUpdate.displayName }) | ||
96 | ) | ||
97 | |||
98 | this.router.navigate([ '/my-account', 'video-playlists' ]) | 93 | this.router.navigate([ '/my-account', 'video-playlists' ]) |
99 | }, | 94 | }, |
100 | 95 | ||
@@ -107,7 +102,7 @@ export class MyAccountVideoPlaylistUpdateComponent extends MyAccountVideoPlaylis | |||
107 | } | 102 | } |
108 | 103 | ||
109 | getFormButtonTitle () { | 104 | getFormButtonTitle () { |
110 | return this.i18n('Update') | 105 | return $localize`Update` |
111 | } | 106 | } |
112 | 107 | ||
113 | private hydrateFormFromPlaylist () { | 108 | private hydrateFormFromPlaylist () { |