diff --git a/lib/jquery.uls/i18n/en-gb.json b/lib/jquery.uls/i18n/en-gb.json deleted file mode 100644 index 7b4e801b..00000000 --- a/lib/jquery.uls/i18n/en-gb.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "@metadata": { - "authors": [ - "Andibing", - "Chase me ladies, I'm the Cavalry" - ] - }, - "uls-region-WW": "Worldwide", - "uls-region-SP": "Special", - "uls-region-AM": "America", - "uls-region-AF": "Africa", - "uls-region-EU": "Europe", - "uls-region-AS": "Asia", - "uls-region-ME": "Middle East", - "uls-region-PA": "Pacific", - "uls-region-all": "All languages", - "uls-no-results-found": "No results found", - "uls-common-languages": "Suggested languages", - "uls-no-results-suggestion-title": "You may be interested in:", - "uls-search-help": "You can search by language name, script name, ISO code of language or you can browse by region.", - "uls-search-placeholder": "Search for a language" -} diff --git a/lib/jquery.uls/i18n/mnc-mong.json b/lib/jquery.uls/i18n/mnc-mong.json new file mode 100644 index 00000000..8176de54 --- /dev/null +++ b/lib/jquery.uls/i18n/mnc-mong.json @@ -0,0 +1,11 @@ +{ + "@metadata": { + "authors": [ + "Amire80" + ] + }, + "uls-region-AM": "᠇ᠮᡝᡵᡳᡴᠠ", + "uls-region-EU": "ᠣᡵᠣᠪᠠ", + "uls-region-all": "ᡝᡳ᠌ᡨᡝᠨ ᡤᡳᠰᡠᠨ", + "uls-no-results-suggestion-title": "ᠠᡳ᠌ᠨᠴᡳ ᠰᡳᠨᡳ ᠠᠮᡠᡵᠠᠩᡤᡝ ᠈" +} diff --git a/lib/jquery.uls/src/jquery.uls.lcd.js b/lib/jquery.uls/src/jquery.uls.lcd.js index 39bf8f71..c5f5da46 100644 --- a/lib/jquery.uls/src/jquery.uls.lcd.js +++ b/lib/jquery.uls/src/jquery.uls.lcd.js @@ -112,8 +112,15 @@ if ( this.navigationIndex === null ) { this.navigationIndex = 0; } else { - this.navigationIndex++; + // Auto-correct the index. It has been noticed that the navigationIndex goes beyond the + // max index sometimes. See: phab:T328956#8854835 + if ( this.navigationIndex > maxIndex ) { + this.navigationIndex = maxIndex; + } else { + this.navigationIndex++; + } } + this.highlightLanguageOption(); },