Prevent appearance of redirects in the rendered list
utils.getLanguagesByScriptGroup() runs on the object's languages property and not on all the langdb languages. This caused the redirects to be counted as languages. I fixed this, and added a test to prevent it. Also update JS langdb, because it went out of sync in of the previous commits.
This commit is contained in:
@@ -80,10 +80,17 @@
|
||||
// Get the languages grouped by script group
|
||||
var languagesByScriptGroup = $.uls.data.getLanguagesByScriptGroup( this.options.languages );
|
||||
|
||||
for ( var scriptGroup in languagesByScriptGroup ) {
|
||||
// Make sure that we go by the original order
|
||||
// of script groups
|
||||
for ( var scriptGroup in $.uls.data.scriptgroups ) {
|
||||
// Get the languages for the script group
|
||||
var languages = languagesByScriptGroup[scriptGroup];
|
||||
|
||||
// It's possible that some script groups are missing
|
||||
if ( !languages ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Sort it based on autonym
|
||||
languages.sort( $.uls.data.sortByAutonym );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user