Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -2569,6 +2569,7 @@ |
2570 | 2570 | 'widthheightpage', |
2571 | 2571 | 'file-info', |
2572 | 2572 | 'file-info-size', |
| 2573 | + 'file-info-size-pages', |
2573 | 2574 | 'file-nohires', |
2574 | 2575 | 'svg-long-desc', |
2575 | 2576 | 'show-big-image', |
Index: trunk/phase3/includes/media/Generic.php |
— | — | @@ -655,11 +655,22 @@ |
656 | 656 | */ |
657 | 657 | function getLongDesc( $file ) { |
658 | 658 | global $wgLang; |
659 | | - return wfMsgExt('file-info-size', 'parseinline', |
660 | | - $wgLang->formatNum( $file->getWidth() ), |
661 | | - $wgLang->formatNum( $file->getHeight() ), |
662 | | - $wgLang->formatSize( $file->getSize() ), |
663 | | - $file->getMimeType() ); |
| 659 | + $pages = $file->pageCount(); |
| 660 | + if ( $pages === false || $pages <= 1 ) { |
| 661 | + $msg = wfMsgExt('file-info-size', 'parseinline', |
| 662 | + $wgLang->formatNum( $file->getWidth() ), |
| 663 | + $wgLang->formatNum( $file->getHeight() ), |
| 664 | + $wgLang->formatSize( $file->getSize() ), |
| 665 | + $file->getMimeType() ); |
| 666 | + } else { |
| 667 | + $msg = wfMsgExt('file-info-size-pages', 'parseinline', |
| 668 | + $wgLang->formatNum( $file->getWidth() ), |
| 669 | + $wgLang->formatNum( $file->getHeight() ), |
| 670 | + $wgLang->formatSize( $file->getSize() ), |
| 671 | + $file->getMimeType(), |
| 672 | + $wgLang->formatNum( $pages ) ); |
| 673 | + } |
| 674 | + return $msg; |
664 | 675 | } |
665 | 676 | |
666 | 677 | /** |
Index: trunk/phase3/languages/messages/MessagesQqq.php |
— | — | @@ -3067,6 +3067,7 @@ |
3068 | 3068 | '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.', |
3069 | 3069 | 'file-info' => 'File info displayed on file description page.', |
3070 | 3070 | 'file-info-size' => 'File info displayed on file description page.', |
| 3071 | +'file-info-size-pages' => 'File info displayed on file description page, when the file is a multi-page document, with at least two pages. Like {{msg-mw|file-info-size}} but $5 is the total number of pages in the document.', |
3071 | 3072 | 'file-nohires' => 'File info displayed on file description page. For example of message in use see [[:File:Mouse10.gif]].', |
3072 | 3073 | '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]].', |
3073 | 3074 | '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 |
— | — | @@ -3622,6 +3622,7 @@ |
3623 | 3623 | 'widthheightpage' => '$1×$2, $3 {{PLURAL:$3|page|pages}}', |
3624 | 3624 | 'file-info' => 'file size: $1, MIME type: $2', |
3625 | 3625 | 'file-info-size' => '$1 × $2 pixels, file size: $3, MIME type: $4', |
| 3626 | +'file-info-size-pages' => '$1 × $2 pixels, file size: $3, MIME type: $4, $5 pages', |
3626 | 3627 | 'file-nohires' => '<small>No higher resolution available.</small>', |
3627 | 3628 | 'svg-long-desc' => 'SVG file, nominally $1 × $2 pixels, file size: $3', |
3628 | 3629 | 'show-big-image' => 'Full resolution', |