Add lang="…" and dir="auto" to inputs that support languages

This might not be perfect but hopefully helps a lot already.

Bug: T238329
Change-Id: I5f52fe3b69c8477550d844cce18ab142e0ec6f4b
This commit is contained in:
thiemowmde 2023-08-23 14:11:08 +02:00
parent 10f2f21e86
commit 7650219451

View file

@ -697,7 +697,8 @@ Dialog.prototype.onLanguageDropdownWidgetSelect = function ( item ) {
this.templateDescriptionFieldset.setLabel( mw.msg( 'templatedata-modal-title-templatedesc', this.language ) );
// Update description value
this.descriptionInput.setValue( this.model.getTemplateDescription( language ) );
this.descriptionInput.setValue( this.model.getTemplateDescription( language ) )
.$input.attr( { lang: language, dir: 'auto' } );
// Update all param descriptions in the param select widget
this.repopulateParamSelectWidget();
@ -1089,7 +1090,9 @@ Dialog.prototype.changeParamPropertyInput = function ( paramKey, propName, value
break;
default:
if ( typeof value === 'object' ) {
value = value[ lang || this.language ];
lang = lang || this.language;
value = value[ lang ];
propInput.$input.attr( { lang: lang, dir: 'auto' } );
}
propInput.setValue( value || '' );
}