aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-23 14:39:52 +0200
committerChocobozzz <me@florianbigard.com>2018-04-23 14:39:52 +0200
commit9d3ef9fe052ed29bd67566754cb28662bd122234 (patch)
tree7b704dbc0b2c8b4ca18bef2409d640d0019c3d0a /client/src
parent2a2c19dfef7a9aa313c6ca0798f271c9a63449a9 (diff)
downloadPeerTube-9d3ef9fe052ed29bd67566754cb28662bd122234.tar.gz
PeerTube-9d3ef9fe052ed29bd67566754cb28662bd122234.tar.zst
PeerTube-9d3ef9fe052ed29bd67566754cb28662bd122234.zip
Use ISO 639 for languages
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/core/server/server.service.ts13
-rw-r--r--client/src/app/shared/video/video-edit.model.ts2
-rw-r--r--client/src/app/shared/video/video.model.ts2
3 files changed, 9 insertions, 8 deletions
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts
index a8beb242d..a71c6d0bf 100644
--- a/client/src/app/core/server/server.service.ts
+++ b/client/src/app/core/server/server.service.ts
@@ -6,6 +6,7 @@ import { ReplaySubject } from 'rxjs/ReplaySubject'
6import { ServerConfig } from '../../../../../shared' 6import { ServerConfig } from '../../../../../shared'
7import { About } from '../../../../../shared/models/server/about.model' 7import { About } from '../../../../../shared/models/server/about.model'
8import { environment } from '../../../environments/environment' 8import { environment } from '../../../environments/environment'
9import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos'
9 10
10@Injectable() 11@Injectable()
11export class ServerService { 12export class ServerService {
@@ -57,10 +58,10 @@ export class ServerService {
57 videoQuota: -1 58 videoQuota: -1
58 } 59 }
59 } 60 }
60 private videoCategories: Array<{ id: number, label: string }> = [] 61 private videoCategories: Array<VideoConstant<number>> = []
61 private videoLicences: Array<{ id: number, label: string }> = [] 62 private videoLicences: Array<VideoConstant<number>> = []
62 private videoLanguages: Array<{ id: number, label: string }> = [] 63 private videoLanguages: Array<VideoConstant<string>> = []
63 private videoPrivacies: Array<{ id: number, label: string }> = [] 64 private videoPrivacies: Array<VideoConstant<VideoPrivacy>> = []
64 65
65 constructor (private http: HttpClient) { 66 constructor (private http: HttpClient) {
66 this.loadConfigLocally() 67 this.loadConfigLocally()
@@ -118,7 +119,7 @@ export class ServerService {
118 119
119 private loadVideoAttributeEnum ( 120 private loadVideoAttributeEnum (
120 attributeName: 'categories' | 'licences' | 'languages' | 'privacies', 121 attributeName: 'categories' | 'licences' | 'languages' | 'privacies',
121 hashToPopulate: { id: number, label: string }[], 122 hashToPopulate: VideoConstant<number | string>[],
122 notifier: ReplaySubject<boolean>, 123 notifier: ReplaySubject<boolean>,
123 sort = false 124 sort = false
124 ) { 125 ) {
@@ -127,7 +128,7 @@ export class ServerService {
127 Object.keys(data) 128 Object.keys(data)
128 .forEach(dataKey => { 129 .forEach(dataKey => {
129 hashToPopulate.push({ 130 hashToPopulate.push({
130 id: parseInt(dataKey, 10), 131 id: dataKey,
131 label: data[dataKey] 132 label: data[dataKey]
132 }) 133 })
133 }) 134 })
diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts
index c1a70d1b3..39826d71e 100644
--- a/client/src/app/shared/video/video-edit.model.ts
+++ b/client/src/app/shared/video/video-edit.model.ts
@@ -4,7 +4,7 @@ import { VideoPrivacy } from '../../../../../shared/models/videos/video-privacy.
4export class VideoEdit { 4export class VideoEdit {
5 category: number 5 category: number
6 licence: number 6 licence: number
7 language: number 7 language: string
8 description: string 8 description: string
9 name: string 9 name: string
10 tags: string[] 10 tags: string[]
diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts
index e25c172e0..a284c1688 100644
--- a/client/src/app/shared/video/video.model.ts
+++ b/client/src/app/shared/video/video.model.ts
@@ -13,7 +13,7 @@ export class Video implements VideoServerModel {
13 publishedAt: Date 13 publishedAt: Date
14 category: VideoConstant<number> 14 category: VideoConstant<number>
15 licence: VideoConstant<number> 15 licence: VideoConstant<number>
16 language: VideoConstant<number> 16 language: VideoConstant<string>
17 privacy: VideoConstant<VideoPrivacy> 17 privacy: VideoConstant<VideoPrivacy>
18 description: string 18 description: string
19 duration: number 19 duration: number