mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-23 23:43:54 +00:00
Use correct BCP 47 language codes in lang="…" attributes
A small mistake made in I7a82143. This is only relevant for very few (but critical) language codes. For example, the dialog allows to add the MediaWiki code "zh-classical". This needs to be translated to "lzh", but only when we use it directly in HTML. Bug: T238329 Change-Id: Ifcbb877fb6a348937e85a82459e924548f5ca856
This commit is contained in:
parent
10e1c26580
commit
f302f65dbb
|
@ -91,6 +91,7 @@
|
|||
],
|
||||
"dependencies": [
|
||||
"mediawiki.api",
|
||||
"mediawiki.language",
|
||||
"mediawiki.user",
|
||||
"oojs-ui-core",
|
||||
"oojs-ui-widgets",
|
||||
|
|
|
@ -698,7 +698,7 @@ Dialog.prototype.onLanguageDropdownWidgetSelect = function ( item ) {
|
|||
|
||||
// Update description value
|
||||
this.descriptionInput.setValue( this.model.getTemplateDescription( language ) )
|
||||
.$input.attr( { lang: language, dir: 'auto' } );
|
||||
.$input.attr( { lang: mw.language.bcp47( language ), dir: 'auto' } );
|
||||
|
||||
// Update all param descriptions in the param select widget
|
||||
this.repopulateParamSelectWidget();
|
||||
|
@ -1253,7 +1253,8 @@ Dialog.prototype.updateParamDetailsLanguage = function () {
|
|||
// * templatedata-modal-table-param-type
|
||||
var label = mw.msg( 'templatedata-modal-table-param-' + prop, this.language );
|
||||
this.propFieldLayout[ prop ].setLabel( label );
|
||||
this.propInputs[ prop ].$input.attr( { lang: this.language, dir: 'auto' } );
|
||||
this.propInputs[ prop ]
|
||||
.$input.attr( { lang: mw.language.bcp47( this.language ), dir: 'auto' } );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue