Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -118,8 +118,8 @@ |
119 | 119 | $this->imageHistory(); |
120 | 120 | // TODO: Cleanup the following |
121 | 121 | |
122 | | - $wgOut->addHTML( Xml::element( 'h2', |
123 | | - array( 'id' => 'filelinks' ), |
| 122 | + $wgOut->addHTML( Xml::element( 'h2', |
| 123 | + array( 'id' => 'filelinks' ), |
124 | 124 | wfMsg( 'imagelinks' ) ) . "\n" ); |
125 | 125 | $this->imageDupes(); |
126 | 126 | // TODO: We may want to find local images redirecting to a foreign |
— | — | @@ -339,8 +339,10 @@ |
340 | 340 | # because of rounding. |
341 | 341 | } |
342 | 342 | $msgbig = wfMsgHtml( 'show-big-image' ); |
343 | | - $msgsmall = wfMsgExt( 'show-big-image-thumb', |
344 | | - array( 'parseinline' ), $wgLang->formatNum( $width ), $wgLang->formatNum( $height ) ); |
| 343 | + $msgsmall = wfMsgExt( 'show-big-image-thumb', 'parseinline', |
| 344 | + $wgLang->formatNum( $width ), |
| 345 | + $wgLang->formatNum( $height ) |
| 346 | + ); |
345 | 347 | } else { |
346 | 348 | # Image is small enough to show full size on image page |
347 | 349 | $msgbig = htmlspecialchars( $this->displayImg->getName() ); |
— | — | @@ -614,7 +616,7 @@ |
615 | 617 | } else { $s=''; } |
616 | 618 | $wgOut->addHTML( $s ); |
617 | 619 | |
618 | | - $this->img->resetHistory(); // free db resources |
| 620 | + $this->img->resetHistory(); // free db resources |
619 | 621 | |
620 | 622 | # Exist check because we don't want to show this on pages where an image |
621 | 623 | # doesn't exist along with the noimage message, that would suck. -ævar |
— | — | @@ -624,9 +626,8 @@ |
625 | 627 | |
626 | 628 | } |
627 | 629 | |
628 | | - function imageLinks() |
629 | | - { |
630 | | - global $wgUser, $wgOut; |
| 630 | + function imageLinks() { |
| 631 | + global $wgUser, $wgOut, $wgLang; |
631 | 632 | |
632 | 633 | $limit = 100; |
633 | 634 | |
— | — | @@ -652,7 +653,10 @@ |
653 | 654 | $wgOut->addWikiMsg( 'linkstoimage', $count ); |
654 | 655 | } else { |
655 | 656 | // More links than the limit. Add a link to [[Special:Whatlinkshere]] |
656 | | - $wgOut->addWikiMsg( 'linkstoimage-more', $limit, $this->mTitle->getPrefixedDBkey() ); |
| 657 | + $wgOut->addWikiMsg( 'linkstoimage-more', |
| 658 | + $wgLang->formatNum( $limit ), |
| 659 | + $this->mTitle->getPrefixedDBkey() |
| 660 | + ); |
657 | 661 | } |
658 | 662 | |
659 | 663 | $wgOut->addHTML( "<ul class='mw-imagepage-linkstoimage'>\n" ); |
— | — | @@ -675,15 +679,16 @@ |
676 | 680 | $wgOut->addWikiMsg( 'morelinkstoimage', $this->mTitle->getPrefixedDBkey() ); |
677 | 681 | } |
678 | 682 | |
679 | | - function imageRedirects() |
680 | | - { |
681 | | - global $wgUser, $wgOut; |
| 683 | + function imageRedirects() { |
| 684 | + global $wgUser, $wgOut, $wgLang; |
682 | 685 | |
683 | 686 | $redirects = $this->getTitle()->getRedirectsHere( NS_IMAGE ); |
684 | 687 | if ( count( $redirects ) == 0 ) return; |
685 | 688 | |
686 | 689 | $wgOut->addHTML( "<div id='mw-imagepage-section-redirectstofile'>\n" ); |
687 | | - $wgOut->addWikiMsg( 'redirectstofile', count( $redirects ) ); |
| 690 | + $wgOut->addWikiMsg( 'redirectstofile', |
| 691 | + $wgLang->formatNum( count( $redirects ) ) |
| 692 | + ); |
688 | 693 | $wgOut->addHTML( "<ul class='mw-imagepage-redirectstofile'>\n" ); |
689 | 694 | |
690 | 695 | $sk = $wgUser->getSkin(); |
— | — | @@ -696,7 +701,7 @@ |
697 | 702 | } |
698 | 703 | |
699 | 704 | function imageDupes() { |
700 | | - global $wgOut, $wgUser; |
| 705 | + global $wgOut, $wgUser, $wgLang; |
701 | 706 | |
702 | 707 | $this->loadFile(); |
703 | 708 | |
— | — | @@ -704,16 +709,19 @@ |
705 | 710 | if ( count( $dupes ) == 0 ) return; |
706 | 711 | |
707 | 712 | $wgOut->addHTML( "<div id='mw-imagepage-section-duplicates'>\n" ); |
708 | | - $wgOut->addWikiMsg( 'duplicatesoffile', count( $dupes ) ); |
| 713 | + $wgOut->addWikiMsg( 'duplicatesoffile', |
| 714 | + $wgLang->formatNum( count( $dupes ) ) |
| 715 | + ); |
709 | 716 | $wgOut->addHTML( "<ul class='mw-imagepage-duplicates'>\n" ); |
710 | 717 | |
711 | 718 | $sk = $wgUser->getSkin(); |
712 | 719 | foreach ( $dupes as $file ) { |
713 | 720 | if ( $file->isLocal() ) |
714 | 721 | $link = $sk->makeKnownLinkObj( $file->getTitle(), "" ); |
715 | | - else |
716 | | - $link = $sk->makeExternalLink( $file->getDescriptionUrl(), |
| 722 | + else { |
| 723 | + $link = $sk->makeExternalLink( $file->getDescriptionUrl(), |
717 | 724 | $file->getTitle()->getPrefixedText() ); |
| 725 | + } |
718 | 726 | $wgOut->addHTML( "<li>{$link}</li>\n" ); |
719 | 727 | } |
720 | 728 | $wgOut->addHTML( "</ul></div>\n" ); |
— | — | @@ -812,8 +820,8 @@ |
813 | 821 | . ( $this->current->isLocal() && ($wgUser->isAllowed('delete') || $wgUser->isAllowed('deleterevision') ) ? '<td></td>' : '' ) |
814 | 822 | . '<th>' . wfMsgHtml( 'filehist-datetime' ) . '</th>' |
815 | 823 | . '<th>' . wfMsgHtml( 'filehist-dimensions' ) . '</th>' |
816 | | - . '<th>' . wfMsgHtml( 'filehist-user' ) . '</th>' |
817 | | - . '<th>' . wfMsgHtml( 'filehist-comment' ) . '</th>' |
| 824 | + . '<th>' . wfMsgHtml( 'filehist-user' ) . '</th>' |
| 825 | + . '<th>' . wfMsgHtml( 'filehist-comment' ) . '</th>' |
818 | 826 | . "</tr>\n"; |
819 | 827 | } |
820 | 828 | |