Allow ULS language settings accessed from user preference screen.
Adds a link in 'personal/i18n' section of user preferences Bug: 47240 Change-Id: I04d1ea7d36db45f9a0af04e11dade9ae0b524e8e
This commit is contained in:
committed by
Amir E. Aharoni
parent
8655504371
commit
8b46d34004
@@ -308,6 +308,16 @@ class UniversalLanguageSelectorHooks {
|
|||||||
'type' => 'api',
|
'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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,5 +46,6 @@
|
|||||||
"ext-uls-input-disable-notification": "Input tools have been disabled",
|
"ext-uls-input-disable-notification": "Input tools have been disabled",
|
||||||
"ext-uls-input-disable-notification-undo": "Undo",
|
"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-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"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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-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-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-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"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -248,6 +248,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ULS options that are common to all modes of showing
|
// ULS options that are common to all modes of showing
|
||||||
ulsOptions = {
|
ulsOptions = {
|
||||||
onReady: function () {
|
onReady: function () {
|
||||||
@@ -289,6 +290,18 @@
|
|||||||
$ulsTrigger.uls( ulsOptions );
|
$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();
|
showULSTooltip();
|
||||||
} );
|
} );
|
||||||
}( jQuery, mediaWiki ) );
|
}( jQuery, mediaWiki ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user