r96836 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96835‎ | r96836 | r96837 >
Date:12:46, 12 September 2011
Author:raymond
Status:ok
Tags:
Comment:
* Move <small> 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'
Modified paths:
  • /trunk/phase3/includes/ImagePage.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/skins/common/commonPrint.css (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/commonPrint.css
@@ -128,7 +128,8 @@
129129 li#privacy,
130130 #footer-places,
131131 .mw-hidden-catlinks,
132 -tr.mw-metadata-show-hide-extended {
 132+tr.mw-metadata-show-hide-extended,
 133+span.mw-filepage-other-resolutions {
133134 /* Hides all the elements irrelevant for printing */
134135 display: none;
135136 }
Index: trunk/phase3/skins/common/shared.css
@@ -156,6 +156,14 @@
157157 }
158158
159159 /**
 160+ * File description page
 161+ */
 162+
 163+div.mw-filepage-resolutioninfo {
 164+ font-size: smaller;
 165+}
 166+
 167+/**
160168 * File histories
161169 */
162170 h2#filehistory {
Index: trunk/phase3/includes/ImagePage.php
@@ -323,11 +323,13 @@
324324 $msgsmall = wfMessage( 'show-big-image-preview' )->
325325 rawParams( $this->makeSizeLink( $params, $width, $height ) )->
326326 parse() . ' ' .
327 - wfMessage( 'show-big-image-other' )->
328 - rawParams( $wgLang->pipeList( $otherSizes ) )->parse();
 327+ Html::rawElement( 'span', array( 'class' => 'mw-filepage-other-resolutions' ),
 328+ wfMessage( 'show-big-image-other' )->
 329+ rawParams( $wgLang->pipeList( $otherSizes ), count( $otherSizes ) )->parse()
 330+ );
329331 } else {
330332 # Image is small enough to show full size on image page
331 - $msgsmall = wfMsgExt( 'file-nohires', array( 'parseinline' ) );
 333+ $msgsmall = wfMessage( 'file-nohires' )->parse();
332334 }
333335
334336 $params['width'] = $width;
@@ -335,7 +337,7 @@
336338 $thumbnail = $this->displayImg->transform( $params );
337339
338340 $showLink = true;
339 - $anchorclose = '<br />' . $msgsmall;
 341+ $anchorclose = Html::rawElement( 'div', array( 'class' => 'mw-filepage-resolutioninfo' ), $msgsmall );
340342
341343 $isMulti = $this->displayImg->isMultipage() && $this->displayImg->pageCount() > 1;
342344 if ( $isMulti ) {
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -3650,11 +3650,11 @@
36513651 'file-info' => 'file size: $1, MIME type: $2',
36523652 'file-info-size' => '$1 × $2 pixels, file size: $3, MIME type: $4',
36533653 'file-info-size-pages' => '$1 × $2 pixels, file size: $3, MIME type: $4, $5 {{PLURAL:$5|page|pages}}',
3654 -'file-nohires' => '<small>No higher resolution available.</small>',
 3654+'file-nohires' => 'No higher resolution available.',
36553655 'svg-long-desc' => 'SVG file, nominally $1 × $2 pixels, file size: $3',
36563656 'show-big-image' => 'Full resolution',
3657 -'show-big-image-preview' => '<small>Size of this preview: $1.</small>',
3658 -'show-big-image-other' => '<small>Other resolutions: $1.</small>',
 3657+'show-big-image-preview' => 'Size of this preview: $1.',
 3658+'show-big-image-other' => 'Other {{PLURAL:$2|resolution|resolutions}}: $1.',
36593659 'show-big-image-size' => '$1 × $2 pixels',
36603660 'file-info-gif-looped' => 'looped',
36613661 'file-info-gif-frames' => '$1 {{PLURAL:$1|frame|frames}}',

Status & tagging log