From 1d94c154689b89b2c5e55f6e12ec25f49b369d52 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Jul 2018 19:22:03 +0200 Subject: [PATCH] Add esperanto, lojban, klingon and kotava (audio/subtitle) languages --- server/initializers/constants.ts | 41 ++++++++++++++++++-------------- 1 file 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 () { const languages: { [ id: string ]: string } = {} - const signLanguages = [ - 'sgn', // Sign languages (macro language) - 'ase', // American - 'sdl', // Arabian - 'bfi', // British - 'bzs', // Brazilian - 'csl', // Chinese - 'cse', // Czech - 'dsl', // Danish - 'fsl', // French - 'gsg', // German - 'pks', // Pakistan - 'jsl', // Japanese - 'sfs', // South African - 'swl', // Swedish - 'rsl' // Russian - ] + const additionalLanguages = { + 'sgn': true, // Sign languages (macro language) + 'ase': true, // American sign language + 'sdl': true, // Arabian sign language + 'bfi': true, // British sign language + 'bzs': true, // Brazilian sign language + 'csl': true, // Chinese sign language + 'cse': true, // Czech sign language + 'dsl': true, // Danish sign language + 'fsl': true, // French sign language + 'gsg': true, // German sign language + 'pks': true, // Pakistan sign language + 'jsl': true, // Japanese sign language + 'sfs': true, // South African sign language + 'swl': true, // Swedish sign language + 'rsl': true, // Russian sign language: true + + 'epo': true, // Esperanto + 'tlh': true, // Klingon + 'jbo': true, // Lojban + 'avk': true // Kotava + } // Only add ISO639-1 languages and some sign languages (ISO639-3) iso639 .filter(l => { return (l.iso6391 !== null && l.type === 'living') || - signLanguages.indexOf(l.iso6393) !== -1 + additionalLanguages[l.iso6393] === true }) .forEach(l => languages[l.iso6391 || l.iso6393] = l.name) -- 2.25.1