aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-watch/video-watch-playlist.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-12 10:40:04 +0200
committerChocobozzz <me@florianbigard.com>2020-08-14 10:28:30 +0200
commit66357162f8e1227495f09bd4f68446aad7071c6d (patch)
tree7d4429506deb512b2fe1d0267f38a28cda20af55 /client/src/app/+videos/+video-watch/video-watch-playlist.component.ts
parent8c360747995e17eb5520e22fc3d7bd4c3d26eeee (diff)
downloadPeerTube-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/+videos/+video-watch/video-watch-playlist.component.ts')
-rw-r--r--client/src/app/+videos/+video-watch/video-watch-playlist.component.ts12
1 files changed, 5 insertions, 7 deletions
diff --git a/client/src/app/+videos/+video-watch/video-watch-playlist.component.ts b/client/src/app/+videos/+video-watch/video-watch-playlist.component.ts
index 519ce2974..c60ca4671 100644
--- a/client/src/app/+videos/+video-watch/video-watch-playlist.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch-playlist.component.ts
@@ -1,9 +1,8 @@
1import { Component, Input } from '@angular/core' 1import { Component, Input } from '@angular/core'
2import { Router } from '@angular/router' 2import { Router } from '@angular/router'
3import { AuthService, ComponentPagination, LocalStorageService, Notifier, SessionStorageService, UserService } from '@app/core' 3import { AuthService, ComponentPagination, LocalStorageService, Notifier, SessionStorageService, UserService } from '@app/core'
4import { peertubeLocalStorage, peertubeSessionStorage } from '@root-helpers/peertube-web-storage'
5import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist' 4import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist'
6import { I18n } from '@ngx-translate/i18n-polyfill' 5import { peertubeLocalStorage, peertubeSessionStorage } from '@root-helpers/peertube-web-storage'
7import { VideoDetails, VideoPlaylistPrivacy } from '@shared/models' 6import { VideoDetails, VideoPlaylistPrivacy } from '@shared/models'
8 7
9@Component({ 8@Component({
@@ -36,7 +35,6 @@ export class VideoWatchPlaylistComponent {
36 private userService: UserService, 35 private userService: UserService,
37 private auth: AuthService, 36 private auth: AuthService,
38 private notifier: Notifier, 37 private notifier: Notifier,
39 private i18n: I18n,
40 private videoPlaylist: VideoPlaylistService, 38 private videoPlaylist: VideoPlaylistService,
41 private localStorageService: LocalStorageService, 39 private localStorageService: LocalStorageService,
42 private sessionStorageService: SessionStorageService, 40 private sessionStorageService: SessionStorageService,
@@ -189,13 +187,13 @@ export class VideoWatchPlaylistComponent {
189 187
190 private setAutoPlayNextVideoPlaylistSwitchText () { 188 private setAutoPlayNextVideoPlaylistSwitchText () {
191 this.autoPlayNextVideoPlaylistSwitchText = this.autoPlayNextVideoPlaylist 189 this.autoPlayNextVideoPlaylistSwitchText = this.autoPlayNextVideoPlaylist
192 ? this.i18n('Stop autoplaying next video') 190 ? $localize`Stop autoplaying next video`
193 : this.i18n('Autoplay next video') 191 : $localize`Autoplay next video`
194 } 192 }
195 193
196 private setLoopPlaylistSwitchText () { 194 private setLoopPlaylistSwitchText () {
197 this.loopPlaylistSwitchText = this.loopPlaylist 195 this.loopPlaylistSwitchText = this.loopPlaylist
198 ? this.i18n('Stop looping playlist videos') 196 ? $localize`Stop looping playlist videos`
199 : this.i18n('Loop playlist videos') 197 : $localize`Loop playlist videos`
200 } 198 }
201} 199}