Merge "Allow ULS language settings accessed from user preference screen."

This commit is contained in:
jenkins-bot
2013-05-28 06:14:13 +00:00
committed by Gerrit Code Review
4 changed files with 26 additions and 1 deletions

View File

@@ -308,6 +308,16 @@ class UniversalLanguageSelectorHooks {
'type' => 'api',
);
// A link shown for accessing ULS language settings from preferences screen
$preferences['languagesettings'] = array(
'type' => 'info',
'raw' => true,
'section' => 'personal/i18n',
'default' => "<a id='uls-preferences-link' href='#'></a>",
// The above link will have text set from javascript. Just to avoid
// showing the link when javascript is disabled.
);
return true;
}

View File

@@ -46,5 +46,6 @@
"ext-uls-input-disable-notification": "Input tools have been disabled",
"ext-uls-input-disable-notification-undo": "Undo",
"ext-uls-input-disable-notification-info-personal": "You can enable the input tools at any time from the language settings.",
"ext-uls-input-disable-notification-info-interlanguage": "You can enable the input tools at any time from the language settings next to the language list."
"ext-uls-input-disable-notification-info-interlanguage": "You can enable the input tools at any time from the language settings next to the language list.",
"ext-uls-language-settings-preferences-link": "More language settings"
}

View File

@@ -52,4 +52,5 @@
"ext-uls-input-disable-notification-undo": "Undo link text in the input method disable notification bubble",
"ext-uls-input-disable-notification-info-personal": "Notification bubble text when input methods are disabled, appears if the ULS is at personal toolbar",
"ext-uls-input-disable-notification-info-interlanguage": "Notification bubble text when input methods are disabled, appears if the ULS is at interlanguage toolbar",
"ext-uls-language-settings-preferences-link": "Text for the link showin in user preference screen"
}

View File

@@ -248,6 +248,7 @@
}
}
}
// ULS options that are common to all modes of showing
ulsOptions = {
onReady: function () {
@@ -289,6 +290,18 @@
$ulsTrigger.uls( ulsOptions );
}
// Bind language settings to preferences page link
$( '#uls-preferences-link' )
.text( $.i18n( 'ext-uls-language-settings-preferences-link' ) )
.click( function () {
if ( $ulsTrigger.length ) {
$ulsTrigger.click();
} else {
$( '.uls-settings-trigger' ).click();
}
return false;
} );
showULSTooltip();
} );
}( jQuery, mediaWiki ) );