From ea2a5620f673304c6c46229980fe442e55f144fe Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 1 Apr 2014 14:13:52 +0000 Subject: [PATCH] add config option to select available languages --- pandora/config.0xdb.jsonc | 1 + pandora/config.indiancinema.jsonc | 1 + pandora/config.padma.jsonc | 1 + pandora/config.pandora.jsonc | 1 + static/js/mainMenu.js | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora/config.0xdb.jsonc b/pandora/config.0xdb.jsonc index b6f83f9d..85906102 100644 --- a/pandora/config.0xdb.jsonc +++ b/pandora/config.0xdb.jsonc @@ -629,6 +629,7 @@ {"id": "media", "title": "Media"} ], "language": "en", + "languages": ["ar", "el", "en", "hi"], // fixme: should be renamed to annotationLayers "layers": [ { diff --git a/pandora/config.indiancinema.jsonc b/pandora/config.indiancinema.jsonc index 8a8c14c4..0a1624d9 100644 --- a/pandora/config.indiancinema.jsonc +++ b/pandora/config.indiancinema.jsonc @@ -646,6 +646,7 @@ {"id": "media", "title": "Media"} ], "language": "en", + "languages": ["ar", "el", "en", "hi"], // fixme: should be renamed to annotationLayers "layers": [ { diff --git a/pandora/config.padma.jsonc b/pandora/config.padma.jsonc index 79f46727..4d0076ec 100644 --- a/pandora/config.padma.jsonc +++ b/pandora/config.padma.jsonc @@ -520,6 +520,7 @@ {"id": "media", "title": "Media"} ], "language": "en", + "languages": ["ar", "el", "en", "hi"], "layers": [ { "id": "places", diff --git a/pandora/config.pandora.jsonc b/pandora/config.pandora.jsonc index dc6ab90a..6f5aba76 100644 --- a/pandora/config.pandora.jsonc +++ b/pandora/config.pandora.jsonc @@ -442,6 +442,7 @@ {"id": "media", "title": "Media"} ], "language": "en", + "languages": ["ar", "el", "en", "hi"], "layers": [ { "id": "keywords", diff --git a/static/js/mainMenu.js b/static/js/mainMenu.js index 1dcb83e8..22d6de99 100644 --- a/static/js/mainMenu.js +++ b/static/js/mainMenu.js @@ -190,7 +190,7 @@ pandora.ui.mainMenu = function() { ] }, { id: 'locale', title: Ox._('Language'), items: [ - { group: 'setlocale', min: 1, max: 1, items: Object.keys(Ox.LOCALE_NAMES).map(function(locale) { + { group: 'setlocale', min: 1, max: 1, items: pandora.site.languages.map(function(locale) { return {id: locale, title: Ox.LOCALE_NAMES[locale], checked: ui.locale == locale} }) } ] },