Skip to content

Commit

Permalink
Added "zxx" (no linguistic content) in available video languages (#4631)
Browse files Browse the repository at this point in the history
* Added "zxx" (no linguistic content) in available video languages

Implements #1489

* FIx lint

* Fix lint

* Put other languages below instance languages

Co-authored-by: Chocobozzz <me@florianbigard.com>
  • Loading branch information
Poslovitch and Chocobozzz authored Dec 13, 2021
1 parent a37e9e7 commit 81547ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down
4 changes: 3 additions & 1 deletion server/initializers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 81547ac

Please sign in to comment.