X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-video-playlist%2Fvideo-playlist-element-miniature.component.ts;h=7c083ae260648aade304f38f161a43647f2f0232;hb=da2516fde1ad8f049c99ba5fd98c37425f379199;hp=57a5fbe619caca89a7c015e9011b1f6658cbfb25;hpb=67ed6552b831df66713bac9e672738796128d33f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts index 57a5fbe61..7c083ae26 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts @@ -2,7 +2,6 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, In import { AuthService, Notifier, ServerService } from '@app/core' import { Video } from '@app/shared/shared-main' import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap' -import { I18n } from '@ngx-translate/i18n-polyfill' import { ServerConfig, VideoPlaylistElementType, VideoPlaylistElementUpdate } from '@shared/models' import { secondsToTime } from '../../../assets/player/utils' import { VideoPlaylistElement } from './video-playlist-element.model' @@ -44,7 +43,6 @@ export class VideoPlaylistElementMiniatureComponent implements OnInit { private authService: AuthService, private serverService: ServerService, private notifier: Notifier, - private i18n: I18n, private videoPlaylistService: VideoPlaylistService, private cdr: ChangeDetectorRef ) {} @@ -80,7 +78,7 @@ export class VideoPlaylistElementMiniatureComponent implements OnInit { if (!this.playlistElement || !this.playlistElement.video) return {} return { - videoId: this.playlistElement.video.uuid, + playlistPosition: this.playlistElement.position, start: this.playlistElement.startTimestamp, stop: this.playlistElement.stopTimestamp, resume: true @@ -97,8 +95,7 @@ export class VideoPlaylistElementMiniatureComponent implements OnInit { this.videoPlaylistService.removeVideoFromPlaylist(this.playlist.id, playlistElement.id, videoId) .subscribe( () => { - this.notifier.success(this.i18n('Video removed from {{name}}', { name: this.playlist.displayName })) - + this.notifier.success($localize`Video removed from ${this.playlist.displayName}`) this.elementRemoved.emit(playlistElement) }, @@ -117,7 +114,7 @@ export class VideoPlaylistElementMiniatureComponent implements OnInit { this.videoPlaylistService.updateVideoOfPlaylist(this.playlist.id, playlistElement.id, body, this.playlistElement.video.id) .subscribe( () => { - this.notifier.success(this.i18n('Timestamps updated')) + this.notifier.success($localize`Timestamps updated`) playlistElement.startTimestamp = body.startTimestamp playlistElement.stopTimestamp = body.stopTimestamp @@ -140,10 +137,10 @@ export class VideoPlaylistElementMiniatureComponent implements OnInit { if (start === null && stop === null) return '' - if (start !== null && stop === null) return this.i18n('Starts at ') + startFormatted - if (start === null && stop !== null) return this.i18n('Stops at ') + stopFormatted + if (start !== null && stop === null) return $localize`Starts at ` + startFormatted + if (start === null && stop !== null) return $localize`Stops at ` + stopFormatted - return this.i18n('Starts at ') + startFormatted + this.i18n(' and stops at ') + stopFormatted + return $localize`Starts at ` + startFormatted + $localize` and stops at ` + stopFormatted } onDropdownOpenChange () {