aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-edit
diff options
context:
space:
mode:
authorFlorian CUNY <poslovitch@bentobox.world>2021-12-13 15:32:14 +0100
committerGitHub <noreply@github.com>2021-12-13 15:32:14 +0100
commit81547acb25365ed90e8bee4d736906cdfc6d16fa (patch)
tree509570762a3cbf52253896e0c11437383238b4ad /client/src/app/+videos/+video-edit
parenta37e9e74ff07b057370d1ed6c0b391a02be8a6d2 (diff)
downloadPeerTube-81547acb25365ed90e8bee4d736906cdfc6d16fa.tar.gz
PeerTube-81547acb25365ed90e8bee4d736906cdfc6d16fa.tar.zst
PeerTube-81547acb25365ed90e8bee4d736906cdfc6d16fa.zip
Added "zxx" (no linguistic content) in available video languages (#4631)
* Added "zxx" (no linguistic content) in available video languages Implements https://github.com/Chocobozzz/PeerTube/issues/1489 * FIx lint * Fix lint * Put other languages below instance languages Co-authored-by: Chocobozzz <me@florianbigard.com>
Diffstat (limited to 'client/src/app/+videos/+video-edit')
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
index b4638c2df..39767f258 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
@@ -178,9 +178,11 @@ export class VideoEditComponent implements OnInit, OnDestroy {
178 .subscribe(res => { 178 .subscribe(res => {
179 this.videoLanguages = res.languages 179 this.videoLanguages = res.languages
180 .map(l => { 180 .map(l => {
181 if (l.id === 'zxx') return { ...l, group: $localize`Other`, groupOrder: 1 }
182
181 return res.about.instance.languages.includes(l.id) 183 return res.about.instance.languages.includes(l.id)
182 ? { ...l, group: $localize`Instance languages`, groupOrder: 0 } 184 ? { ...l, group: $localize`Instance languages`, groupOrder: 0 }
183 : { ...l, group: $localize`All languages`, groupOrder: 1 } 185 : { ...l, group: $localize`All languages`, groupOrder: 2 }
184 }) 186 })
185 .sort((a, b) => a.groupOrder - b.groupOrder) 187 .sort((a, b) => a.groupOrder - b.groupOrder)
186 }) 188 })