From bdf825cae85274175fad12195d640f1afc8d8135 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Mon, 12 Sep 2011 12:46:20 +0000 Subject: [PATCH] * Move styling from message to shared.css * Wrap complete section into a div * Wrap "Other resolutions:" into a span and remove it from printing. Useless on paper. * Add plural to 'show-big-image-other' --- includes/ImagePage.php | 10 ++++++---- languages/messages/MessagesEn.php | 6 +++--- skins/common/commonPrint.css | 3 ++- skins/common/shared.css | 8 ++++++++ 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index f461fa7314..9a017daae2 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -323,11 +323,13 @@ class ImagePage extends Article { $msgsmall = wfMessage( 'show-big-image-preview' )-> rawParams( $this->makeSizeLink( $params, $width, $height ) )-> parse() . ' ' . - wfMessage( 'show-big-image-other' )-> - rawParams( $wgLang->pipeList( $otherSizes ) )->parse(); + Html::rawElement( 'span', array( 'class' => 'mw-filepage-other-resolutions' ), + wfMessage( 'show-big-image-other' )-> + rawParams( $wgLang->pipeList( $otherSizes ), count( $otherSizes ) )->parse() + ); } else { # Image is small enough to show full size on image page - $msgsmall = wfMsgExt( 'file-nohires', array( 'parseinline' ) ); + $msgsmall = wfMessage( 'file-nohires' )->parse(); } $params['width'] = $width; @@ -335,7 +337,7 @@ class ImagePage extends Article { $thumbnail = $this->displayImg->transform( $params ); $showLink = true; - $anchorclose = '
' . $msgsmall; + $anchorclose = Html::rawElement( 'div', array( 'class' => 'mw-filepage-resolutioninfo' ), $msgsmall ); $isMulti = $this->displayImg->isMultipage() && $this->displayImg->pageCount() > 1; if ( $isMulti ) { diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index a563be7494..2563e517b5 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -3650,11 +3650,11 @@ By executing it, your system may be compromised.", 'file-info' => 'file size: $1, MIME type: $2', 'file-info-size' => '$1 × $2 pixels, file size: $3, MIME type: $4', 'file-info-size-pages' => '$1 × $2 pixels, file size: $3, MIME type: $4, $5 {{PLURAL:$5|page|pages}}', -'file-nohires' => 'No higher resolution available.', +'file-nohires' => 'No higher resolution available.', 'svg-long-desc' => 'SVG file, nominally $1 × $2 pixels, file size: $3', 'show-big-image' => 'Full resolution', -'show-big-image-preview' => 'Size of this preview: $1.', -'show-big-image-other' => 'Other resolutions: $1.', +'show-big-image-preview' => 'Size of this preview: $1.', +'show-big-image-other' => 'Other {{PLURAL:$2|resolution|resolutions}}: $1.', 'show-big-image-size' => '$1 × $2 pixels', 'file-info-gif-looped' => 'looped', 'file-info-gif-frames' => '$1 {{PLURAL:$1|frame|frames}}', diff --git a/skins/common/commonPrint.css b/skins/common/commonPrint.css index 9709cd59a3..84dee4c0e5 100644 --- a/skins/common/commonPrint.css +++ b/skins/common/commonPrint.css @@ -128,7 +128,8 @@ li#disclaimer, li#privacy, #footer-places, .mw-hidden-catlinks, -tr.mw-metadata-show-hide-extended { +tr.mw-metadata-show-hide-extended, +span.mw-filepage-other-resolutions { /* Hides all the elements irrelevant for printing */ display: none; } diff --git a/skins/common/shared.css b/skins/common/shared.css index ca5c60e5ee..04afcce7d8 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -155,6 +155,14 @@ div#mw-js-message { float: left; } +/** + * File description page + */ + +div.mw-filepage-resolutioninfo { + font-size: smaller; +} + /** * File histories */ -- 2.20.1