Support language codes that are redirects

Addressing issue #207

Such language codes were not listed in ULS language list.

Root cause was $.uls.data.getLanguagesByScriptGroup was returning
a map of script groups, which contained only resolved language codes.
And later in append method of jquery.uls.lcd.js, there is a check if
that language code is part of languages list passed as option to uls()
call. This test fails and the language code does not get added to display.

Change-Id: Iec914a9694a46eef5750ef3af7346d66e052ab77
This commit is contained in:
Santhosh Thottingal
2016-04-04 16:29:25 +05:30
parent 1e8c2168f6
commit 8b3d77dae1
3 changed files with 8 additions and 11 deletions

View File

@@ -227,8 +227,8 @@
'vro': 'Võro' // Target after alias
};
groupedLanguages = {
Latin: [ 'en', 'vro', 'sr-latn' ],
Cyrillic: [ 'ru', 'sr-cyrl' ]
Latin: [ 'en', 'fiu-vro', 'sr-latn', 'sr-el', 'vro' ],
Cyrillic: [ 'ru', 'sr', 'sr-cyrl' ]
};
assert.deepEqual( $.uls.data.getLanguagesByScriptGroup( languagesToGroup ), groupedLanguages,