mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-27 04:06:51 +00:00
Merge "mw.Platform: Only add split lang codes with a dash"
This commit is contained in:
commit
519a35dfe4
|
@ -85,7 +85,7 @@ ve.init.mw.Platform.prototype.getUserLanguages = function () {
|
|||
langParts = lang.split( '-' ),
|
||||
langs = [ lang ];
|
||||
|
||||
if ( langParts.length > 0 ) {
|
||||
if ( langParts.length > 1 ) {
|
||||
langs.push( langParts[0] );
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ ve.init.sa.Platform.prototype.getUserLanguages = function () {
|
|||
langParts = lang.split( '-' ),
|
||||
langs = [ lang ];
|
||||
|
||||
if ( langParts.length > 0 ) {
|
||||
if ( langParts.length > 1 ) {
|
||||
langs.push( langParts[0] );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue