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>
This commit is contained in:
Florian CUNY 2021-12-13 15:32:14 +01:00 committed by GitHub
parent a37e9e74ff
commit 81547acb25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -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)
})

View File

@ -1075,7 +1075,9 @@ function buildLanguages () {
epo: true, // Esperanto
tlh: true, // Klingon
jbo: true, // Lojban
avk: true // Kotava
avk: true, // Kotava
zxx: true // No linguistic content (ISO-639-2)
}
// Only add ISO639-1 languages and some sign languages (ISO639-3)