Bug 23733 - Add IDs to messages used on CSS/JS pages

This commit is contained in:
Raimond Spekking 2010-06-02 19:30:55 +00:00
parent 3d57cb9db8
commit 22bb560509
3 changed files with 8 additions and 7 deletions

View file

@ -76,7 +76,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
* (bug 23580) Add two new events to LivePreview so that scripts can be
notified about the beginning and finishing of LivePreview actions.
* (bug 21278) Now the sidebar allows inclusion of wiki markup.
* (bug 23733) Add IDs to messages used on CSS/JS pages
=== Bug fixes in 1.17 ===
* (bug 17560) Half-broken deletion moved image files to deletion archive
without updating database.

View file

@ -1084,7 +1084,7 @@ class Article {
public function showCssOrJsPage() {
global $wgOut;
$wgOut->addHTML( wfMsgExt( 'clearyourcache', 'parse' ) );
$wgOut->wrapWikiMsg( "<div class='mw-clearyourcache'>\n$1\n</div>", 'clearyourcache' );
// Give hooks a chance to customise the output
if ( wfRunHooks( 'ShowRawCssJs', array( $this->mContent, $this->mTitle, $wgOut ) ) ) {

View file

@ -1411,13 +1411,13 @@ HTML
if ( $this->isCssJsSubpage ) {
# Check the skin exists
if ( !$this->isValidCssJsSubpage ) {
$wgOut->addWikiMsg( 'userinvalidcssjstitle', $wgTitle->getSkinFromCssJsSubpage() );
$wgOut->wrapWikiMsg( "<div class='error' id='mw-userinvalidcssjstitle'>\n$1\n</div>", array( 'userinvalidcssjstitle', $wgTitle->getSkinFromCssJsSubpage() ) );
}
if ( $this->formtype !== 'preview' ) {
if ( $this->isCssSubpage )
$wgOut->addWikiMsg( 'usercssyoucanpreview' );
$wgOut->wrapWikiMsg( "<div id='mw-usercssyoucanpreview'>\n$1\n</div>", array( 'usercssyoucanpreview' ) );
if ( $this->isJsSubpage )
$wgOut->addWikiMsg( 'userjsyoucanpreview' );
$wgOut->wrapWikiMsg( "<div id='mw-userjsyoucanpreview'>\n$1\n</div>", array( 'userjsyoucanpreview' ) );
}
}
}
@ -1866,9 +1866,9 @@ INPUTS
if ( $this->isCssJsSubpage ) {
if (preg_match( "/\\.css$/", $this->mTitle->getText() ) ) {
$previewtext = wfMsg( 'usercsspreview' );
$previewtext = "<div id='mw-usercsspreview'>\n" . wfMsg( 'usercsspreview' ) . "\n</div>";
} else if (preg_match( "/\\.js$/", $this->mTitle->getText() ) ) {
$previewtext = wfMsg( 'userjspreview' );
$previewtext = "<div id='mw-userjspreview'>\n" . wfMsg( 'userjspreview' ) . "\n</div>";
}
$parserOptions->setTidy( true );
$parserOutput = $wgParser->parse( $previewtext, $this->mTitle, $parserOptions );