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:
@@ -66,13 +66,13 @@
|
||||
* Adds language to the language list.
|
||||
* @param {string} langCode
|
||||
* @param {string} [regionCode]
|
||||
* @return {bool} Whether the language was added.
|
||||
* @return {boolean} Whether the language was added.
|
||||
*/
|
||||
append: function ( langCode, regionCode ) {
|
||||
var lcd = this,
|
||||
i, regions;
|
||||
|
||||
if ( !this.options.languages[ langCode ] ) {
|
||||
if ( !$.uls.data.languages[ langCode ] ) {
|
||||
// Language is unknown or not in the list of languages for this context.
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user