Merge "Add lang and dir attributes to language search result rows"

This commit is contained in:
jenkins-bot 2024-06-07 02:15:24 +00:00 committed by Gerrit Code Review
commit 563828f594
2 changed files with 13 additions and 8 deletions

View file

@ -94,15 +94,19 @@
}
}
/* LanguageSearchWidget */
.tdg-languageResultWidget {
&-name {
text-align: left;
}
.tdg-languageResultWidget-otherMatch {
float: right;
color: #777;
}
&-otherMatch {
float: right;
color: #777;
}
.tdg-languageResultWidget-highlight {
font-weight: bold;
&-highlight {
font-weight: bold;
}
}
.mw-templateData-template-add-map-button .oo-ui-buttonElement-button {

View file

@ -20,7 +20,8 @@ function LanguageResultWidget( config ) {
// Initialization
this.$element.addClass( 'tdg-languageResultWidget' );
this.$name = $( '<div>' ).addClass( 'tdg-languageResultWidget-name' );
this.$name = $( '<div>' ).addClass( 'tdg-languageResultWidget-name' )
.attr( { lang: mw.language.bcp47( config.data.code ), dir: 'auto' } );
this.$otherMatch = $( '<div>' ).addClass( 'tdg-languageResultWidget-otherMatch' );
this.setLabel( this.$otherMatch.add( this.$name ) );
}