aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-video-miniature/video-miniature.component.ts')
-rw-r--r--client/src/app/shared/shared-video-miniature/video-miniature.component.ts17
1 files changed, 6 insertions, 11 deletions
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
index 3c7046de5..cc5665ab1 100644
--- a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
+++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
@@ -11,7 +11,6 @@ import {
11 Output 11 Output
12} from '@angular/core' 12} from '@angular/core'
13import { AuthService, ScreenService, ServerService, User } from '@app/core' 13import { AuthService, ScreenService, ServerService, User } from '@app/core'
14import { I18n } from '@ngx-translate/i18n-polyfill'
15import { ServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '@shared/models' 14import { ServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '@shared/models'
16import { Video } from '../shared-main' 15import { Video } from '../shared-main'
17import { VideoPlaylistService } from '../shared-video-playlist' 16import { VideoPlaylistService } from '../shared-video-playlist'
@@ -95,7 +94,6 @@ export class VideoMiniatureComponent implements OnInit {
95 constructor ( 94 constructor (
96 private screenService: ScreenService, 95 private screenService: ScreenService,
97 private serverService: ServerService, 96 private serverService: ServerService,
98 private i18n: I18n,
99 private authService: AuthService, 97 private authService: AuthService,
100 private videoPlaylistService: VideoPlaylistService, 98 private videoPlaylistService: VideoPlaylistService,
101 private cd: ChangeDetectorRef, 99 private cd: ChangeDetectorRef,
@@ -116,10 +114,7 @@ export class VideoMiniatureComponent implements OnInit {
116 114
117 this.setUpBy() 115 this.setUpBy()
118 116
119 this.channelLinkTitle = this.i18n( 117 this.channelLinkTitle = $localize`${this.video.channel.name} (channel page)`
120 '{{name}} (channel page)',
121 { name: this.video.channel.name, handle: this.video.byVideoChannel }
122 )
123 118
124 // We rely on mouseenter to lazy load actions 119 // We rely on mouseenter to lazy load actions
125 if (this.screenService.isInTouchScreen()) { 120 if (this.screenService.isInTouchScreen()) {
@@ -164,24 +159,24 @@ export class VideoMiniatureComponent implements OnInit {
164 if (!video.state) return '' 159 if (!video.state) return ''
165 160
166 if (video.privacy.id !== VideoPrivacy.PRIVATE && video.state.id === VideoState.PUBLISHED) { 161 if (video.privacy.id !== VideoPrivacy.PRIVATE && video.state.id === VideoState.PUBLISHED) {
167 return this.i18n('Published') 162 return $localize`Published`
168 } 163 }
169 164
170 if (video.scheduledUpdate) { 165 if (video.scheduledUpdate) {
171 const updateAt = new Date(video.scheduledUpdate.updateAt.toString()).toLocaleString(this.localeId) 166 const updateAt = new Date(video.scheduledUpdate.updateAt.toString()).toLocaleString(this.localeId)
172 return this.i18n('Publication scheduled on ') + updateAt 167 return $localize`Publication scheduled on ` + updateAt
173 } 168 }
174 169
175 if (video.state.id === VideoState.TO_TRANSCODE && video.waitTranscoding === true) { 170 if (video.state.id === VideoState.TO_TRANSCODE && video.waitTranscoding === true) {
176 return this.i18n('Waiting transcoding') 171 return $localize`Waiting transcoding`
177 } 172 }
178 173
179 if (video.state.id === VideoState.TO_TRANSCODE) { 174 if (video.state.id === VideoState.TO_TRANSCODE) {
180 return this.i18n('To transcode') 175 return $localize`To transcode`
181 } 176 }
182 177
183 if (video.state.id === VideoState.TO_IMPORT) { 178 if (video.state.id === VideoState.TO_IMPORT) {
184 return this.i18n('To import') 179 return $localize`To import`
185 } 180 }
186 181
187 return '' 182 return ''