Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -2560,6 +2560,7 @@ |
2561 | 2561 | 'widthheightpage', |
2562 | 2562 | 'file-info', |
2563 | 2563 | 'file-info-size', |
| 2564 | + 'file-info-wrapper', |
2564 | 2565 | 'file-nohires', |
2565 | 2566 | 'svg-long-desc', |
2566 | 2567 | 'show-big-image', |
Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -330,7 +330,7 @@ |
331 | 331 | $height_orig = $this->displayImg->getHeight( $page ); |
332 | 332 | $height = $height_orig; |
333 | 333 | |
334 | | - $longDesc = $this->displayImg->getLongDesc(); |
| 334 | + $longDesc = wfMsgExt( 'file-info-wrapper', 'parseinline', $this->displayImg->getLongDesc() ); |
335 | 335 | |
336 | 336 | wfRunHooks( 'ImageOpenShowImageInlineBefore', array( &$this, &$wgOut ) ); |
337 | 337 | |
Index: trunk/phase3/includes/media/Generic.php |
— | — | @@ -240,8 +240,8 @@ |
241 | 241 | |
242 | 242 | function getShortDesc( $file ) { |
243 | 243 | global $wgLang; |
244 | | - $nbytes = '(' . wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), |
245 | | - $wgLang->formatNum( $file->getSize() ) ) . ')'; |
| 244 | + $nbytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), |
| 245 | + $wgLang->formatNum( $file->getSize() ) ); |
246 | 246 | return "$nbytes"; |
247 | 247 | } |
248 | 248 | |
— | — | @@ -255,8 +255,8 @@ |
256 | 256 | |
257 | 257 | static function getGeneralShortDesc( $file ) { |
258 | 258 | global $wgLang; |
259 | | - $nbytes = '(' . wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), |
260 | | - $wgLang->formatNum( $file->getSize() ) ) . ')'; |
| 259 | + $nbytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), |
| 260 | + $wgLang->formatNum( $file->getSize() ) ); |
261 | 261 | return "$nbytes"; |
262 | 262 | } |
263 | 263 | |
Index: trunk/phase3/includes/media/PNG.php |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | return $original; |
65 | 65 | |
66 | 66 | $info = array(); |
67 | | - $info[] = substr( $original, 1, strlen( $original )-2 ); |
| 67 | + $info[] = $original; |
68 | 68 | |
69 | 69 | if ($metadata['loopCount'] == 0) |
70 | 70 | $info[] = wfMsgExt( 'file-info-png-looped', 'parseinline' ); |
— | — | @@ -76,9 +76,7 @@ |
77 | 77 | if ($metadata['duration']) |
78 | 78 | $info[] = $wgLang->formatTimePeriod( $metadata['duration'] ); |
79 | 79 | |
80 | | - $infoString = $wgLang->commaList( $info ); |
81 | | - |
82 | | - return "($infoString)"; |
| 80 | + return $wgLang->commaList( $info ); |
83 | 81 | } |
84 | 82 | |
85 | 83 | } |
Index: trunk/phase3/includes/media/GIF.php |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | |
78 | 78 | /* Preserve original image info string, but strip the last char ')' so we can add even more */ |
79 | 79 | $info = array(); |
80 | | - $info[] = substr( $original, 1, strlen( $original )-2 ); |
| 80 | + $info[] = $original; |
81 | 81 | |
82 | 82 | if ($metadata['looped']) |
83 | 83 | $info[] = wfMsgExt( 'file-info-gif-looped', 'parseinline' ); |
— | — | @@ -87,8 +87,6 @@ |
88 | 88 | if ($metadata['duration']) |
89 | 89 | $info[] = $wgLang->formatTimePeriod( $metadata['duration'] ); |
90 | 90 | |
91 | | - $infoString = $wgLang->commaList( $info ); |
92 | | - |
93 | | - return "($infoString)"; |
| 91 | + return $wgLang->commaList( $info ); |
94 | 92 | } |
95 | 93 | } |
Index: trunk/phase3/includes/specials/SpecialSearch.php |
— | — | @@ -594,7 +594,7 @@ |
595 | 595 | if( $img ) { |
596 | 596 | $thumb = $img->transform( array( 'width' => 120, 'height' => 120 ) ); |
597 | 597 | if( $thumb ) { |
598 | | - $desc = $img->getShortDesc(); |
| 598 | + $desc = wfMsgExt( 'file-info-wrapper', 'parseinline', $img->getShortDesc() ); |
599 | 599 | wfProfileOut( __METHOD__ ); |
600 | 600 | // Float doesn't seem to interact well with the bullets. |
601 | 601 | // Table messes up vertical alignment of the bullets. |
Index: trunk/phase3/languages/messages/MessagesQqq.php |
— | — | @@ -3059,6 +3059,7 @@ |
3060 | 3060 | 'widthheightpage' => 'This message is used on image pages in the dimensions column in the file history section for images with more than one page. Parameter $1 is the image width (in pixels), parameter $2 is the image height, and parameter $3 is the number of pages.', |
3061 | 3061 | 'file-info' => 'File info displayed on file description page.', |
3062 | 3062 | 'file-info-size' => 'File info displayed on file description page.', |
| 3063 | +'file-info-wrapper' => 'Surrounds file info descriptions', |
3063 | 3064 | 'file-nohires' => 'File info displayed on file description page. For example of message in use see [[:File:Mouse10.gif]].', |
3064 | 3065 | 'svg-long-desc' => 'Displayed under an SVG image at the image description page. Note that argument 3 is a string that includes the file size unit symbol. See for example [[:File:Yes check.svg]].', |
3065 | 3066 | 'show-big-image' => 'Displayed under an image at the image description page, when it is displayed smaller there than it was uploaded.', |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -3602,10 +3602,11 @@ |
3603 | 3603 | 'thumbsize' => 'Thumbnail size:', |
3604 | 3604 | 'widthheight' => '$1×$2', # only translate this message to other languages if you have to change it |
3605 | 3605 | 'widthheightpage' => '$1×$2, $3 {{PLURAL:$3|page|pages}}', |
3606 | | -'file-info' => '(file size: $1, MIME type: $2)', |
3607 | | -'file-info-size' => '($1 × $2 pixels, file size: $3, MIME type: $4)', |
| 3606 | +'file-info' => 'file size: $1, MIME type: $2', |
| 3607 | +'file-info-size' => '$1 × $2 pixels, file size: $3, MIME type: $4', |
| 3608 | +'file-info-wrapper' => '($1)', |
3608 | 3609 | 'file-nohires' => '<small>No higher resolution available.</small>', |
3609 | | -'svg-long-desc' => '(SVG file, nominally $1 × $2 pixels, file size: $3)', |
| 3610 | +'svg-long-desc' => 'SVG file, nominally $1 × $2 pixels, file size: $3', |
3610 | 3611 | 'show-big-image' => 'Full resolution', |
3611 | 3612 | 'show-big-image-thumb' => '<small>Size of this preview: $1 × $2 pixels</small>', |
3612 | 3613 | 'file-info-gif-looped' => 'looped', |