- getStateLabel (video: Video) {
- let suffix: string
-
- if (video.privacy.id !== VideoPrivacy.PRIVATE && video.state.id === VideoState.PUBLISHED) {
- suffix = this.i18n('Published')
- } else if (video.scheduledUpdate) {
- const updateAt = new Date(video.scheduledUpdate.updateAt.toString()).toLocaleString(this.localeId)
- suffix = this.i18n('Publication scheduled on ') + updateAt
- } else if (video.state.id === VideoState.TO_TRANSCODE && video.waitTranscoding === true) {
- suffix = this.i18n('Waiting transcoding')
- } else if (video.state.id === VideoState.TO_TRANSCODE) {
- suffix = this.i18n('To transcode')
- } else if (video.state.id === VideoState.TO_IMPORT) {
- suffix = this.i18n('To import')
- } else {
- return ''
- }
-
- return ' - ' + suffix
- }
-