From 81547acb25365ed90e8bee4d736906cdfc6d16fa Mon Sep 17 00:00:00 2001 From: Florian CUNY Date: Mon, 13 Dec 2021 15:32:14 +0100 Subject: 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 --- client/src/app/+videos/+video-edit/shared/video-edit.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client/src') 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 { .subscribe(res => { this.videoLanguages = res.languages .map(l => { + if (l.id === 'zxx') return { ...l, group: $localize`Other`, groupOrder: 1 } + return res.about.instance.languages.includes(l.id) ? { ...l, group: $localize`Instance languages`, groupOrder: 0 } - : { ...l, group: $localize`All languages`, groupOrder: 1 } + : { ...l, group: $localize`All languages`, groupOrder: 2 } }) .sort((a, b) => a.groupOrder - b.groupOrder) }) -- cgit v1.2.3