aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-07-17 19:22:03 +0200
committerChocobozzz <me@florianbigard.com>2018-07-17 19:22:03 +0200
commit1d94c154689b89b2c5e55f6e12ec25f49b369d52 (patch)
treecdad3ca5f2cb0d306f301beca225fa5d912a0206 /server/initializers/constants.ts
parent57a81ff649fa8c0d17505e4a7c5ab1001887b22a (diff)
downloadPeerTube-1d94c154689b89b2c5e55f6e12ec25f49b369d52.tar.gz
PeerTube-1d94c154689b89b2c5e55f6e12ec25f49b369d52.tar.zst
PeerTube-1d94c154689b89b2c5e55f6e12ec25f49b369d52.zip
Add esperanto, lojban, klingon and kotava (audio/subtitle) languages
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts41
1 files changed, 23 insertions, 18 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index b11f0753f..e844c8203 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -590,29 +590,34 @@ function buildLanguages () {
590 590
591 const languages: { [ id: string ]: string } = {} 591 const languages: { [ id: string ]: string } = {}
592 592
593 const signLanguages = [ 593 const additionalLanguages = {
594 'sgn', // Sign languages (macro language) 594 'sgn': true, // Sign languages (macro language)
595 'ase', // American 595 'ase': true, // American sign language
596 'sdl', // Arabian 596 'sdl': true, // Arabian sign language
597 'bfi', // British 597 'bfi': true, // British sign language
598 'bzs', // Brazilian 598 'bzs': true, // Brazilian sign language
599 'csl', // Chinese 599 'csl': true, // Chinese sign language
600 'cse', // Czech 600 'cse': true, // Czech sign language
601 'dsl', // Danish 601 'dsl': true, // Danish sign language
602 'fsl', // French 602 'fsl': true, // French sign language
603 'gsg', // German 603 'gsg': true, // German sign language
604 'pks', // Pakistan 604 'pks': true, // Pakistan sign language
605 'jsl', // Japanese 605 'jsl': true, // Japanese sign language
606 'sfs', // South African 606 'sfs': true, // South African sign language
607 'swl', // Swedish 607 'swl': true, // Swedish sign language
608 'rsl' // Russian 608 'rsl': true, // Russian sign language: true
609 ] 609
610 'epo': true, // Esperanto
611 'tlh': true, // Klingon
612 'jbo': true, // Lojban
613 'avk': true // Kotava
614 }
610 615
611 // Only add ISO639-1 languages and some sign languages (ISO639-3) 616 // Only add ISO639-1 languages and some sign languages (ISO639-3)
612 iso639 617 iso639
613 .filter(l => { 618 .filter(l => {
614 return (l.iso6391 !== null && l.type === 'living') || 619 return (l.iso6391 !== null && l.type === 'living') ||
615 signLanguages.indexOf(l.iso6393) !== -1 620 additionalLanguages[l.iso6393] === true
616 }) 621 })
617 .forEach(l => languages[l.iso6391 || l.iso6393] = l.name) 622 .forEach(l => languages[l.iso6391 || l.iso6393] = l.name)
618 623