Move the () surrounding description strings of files, out of the description and...
authorDerk-Jan Hartman <hartman@users.mediawiki.org>
Mon, 10 Jan 2011 22:18:08 +0000 (22:18 +0000)
committerDerk-Jan Hartman <hartman@users.mediawiki.org>
Mon, 10 Jan 2011 22:18:08 +0000 (22:18 +0000)
Follows up r68324 and r68325

includes/ImagePage.php
includes/media/GIF.php
includes/media/Generic.php
includes/media/PNG.php
includes/specials/SpecialSearch.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index 3113818..7c127d1 100644 (file)
@@ -330,7 +330,7 @@ class ImagePage extends Article {
                        $height_orig = $this->displayImg->getHeight( $page );
                        $height = $height_orig;
 
-                       $longDesc = $this->displayImg->getLongDesc();
+                       $longDesc = wfMsgExt( 'file-info-wrapper', 'parseinline', $this->displayImg->getLongDesc() );
 
                        wfRunHooks( 'ImageOpenShowImageInlineBefore', array( &$this, &$wgOut ) );
 
index c4c8056..4e53d10 100644 (file)
@@ -76,7 +76,7 @@ class GIFHandler extends BitmapHandler {
 
                /* Preserve original image info string, but strip the last char ')' so we can add even more */
                $info = array();
-               $info[] = substr( $original, 1, strlen( $original )-2 );
+               $info[] = $original;
                
                if ($metadata['looped'])
                        $info[] = wfMsgExt( 'file-info-gif-looped', 'parseinline' );
@@ -87,8 +87,6 @@ class GIFHandler extends BitmapHandler {
                if ($metadata['duration'])
                        $info[] = $wgLang->formatTimePeriod( $metadata['duration'] );
                
-               $infoString = $wgLang->commaList( $info );
-               
-               return "($infoString)";
+               return $wgLang->commaList( $info );
        }
 }
index 92f0304..cf69a01 100644 (file)
@@ -240,8 +240,8 @@ abstract class MediaHandler {
 
        function getShortDesc( $file ) {
                global $wgLang;
-               $nbytes = '(' . wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ),
-                       $wgLang->formatNum( $file->getSize() ) ) . ')';
+               $nbytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ),
+                       $wgLang->formatNum( $file->getSize() ) );
                return "$nbytes";
        }
 
@@ -255,8 +255,8 @@ abstract class MediaHandler {
        
        static function getGeneralShortDesc( $file ) {
                global $wgLang;
-               $nbytes = '(' . wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ),
-                       $wgLang->formatNum( $file->getSize() ) ) . ')';
+               $nbytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ),
+                       $wgLang->formatNum( $file->getSize() ) );
                return "$nbytes";
        }
 
index 0a7fc32..5197282 100644 (file)
@@ -63,7 +63,7 @@ class PNGHandler extends BitmapHandler {
                        return $original;
 
                $info = array();
-               $info[] = substr( $original, 1, strlen( $original )-2 );
+               $info[] = $original;
                
                if ($metadata['loopCount'] == 0)
                        $info[] = wfMsgExt( 'file-info-png-looped', 'parseinline' );
@@ -76,9 +76,7 @@ class PNGHandler extends BitmapHandler {
                if ($metadata['duration'])
                        $info[] = $wgLang->formatTimePeriod( $metadata['duration'] );
                
-               $infoString = $wgLang->commaList( $info );
-               
-               return "($infoString)";
+               return $wgLang->commaList( $info );
        }
 
 }
index fafcf0d..7f5b7f1 100644 (file)
@@ -594,7 +594,7 @@ class SpecialSearch extends SpecialPage {
                        if( $img ) {
                                $thumb = $img->transform( array( 'width' => 120, 'height' => 120 ) );
                                if( $thumb ) {
-                                       $desc = $img->getShortDesc();
+                                       $desc = wfMsgExt( 'file-info-wrapper', 'parseinline', $img->getShortDesc() );
                                        wfProfileOut( __METHOD__ );
                                        // Float doesn't seem to interact well with the bullets.
                                        // Table messes up vertical alignment of the bullets.
index 5b18fe4..dd6f7c1 100644 (file)
@@ -3602,10 +3602,11 @@ By executing it, your system may be compromised.",
 'thumbsize'            => 'Thumbnail size:',
 'widthheight'          => '$1×$2', # only translate this message to other languages if you have to change it
 'widthheightpage'      => '$1×$2, $3 {{PLURAL:$3|page|pages}}',
-'file-info'            => '(file size: $1, MIME type: $2)',
-'file-info-size'       => '($1 × $2 pixels, file size: $3, MIME type: $4)',
+'file-info'            => 'file size: $1, MIME type: $2',
+'file-info-size'       => '$1 × $2 pixels, file size: $3, MIME type: $4',
+'file-info-wrapper'    => '($1)',
 'file-nohires'         => '<small>No higher resolution available.</small>',
-'svg-long-desc'        => '(SVG file, nominally $1 × $2 pixels, file size: $3)',
+'svg-long-desc'        => 'SVG file, nominally $1 × $2 pixels, file size: $3',
 'show-big-image'       => 'Full resolution',
 'show-big-image-thumb' => '<small>Size of this preview: $1 × $2 pixels</small>',
 'file-info-gif-looped' => 'looped',
index a82be33..9dffc46 100644 (file)
@@ -3059,6 +3059,7 @@ The message appears after the name of the patroller.',
 '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.',
 'file-info'            => 'File info displayed on file description page.',
 'file-info-size'       => 'File info displayed on file description page.',
+'file-info-wrapper'    => 'Surrounds file info descriptions',
 'file-nohires'         => 'File info displayed on file description page. For example of message in use see [[:File:Mouse10.gif]].',
 '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]].',
 'show-big-image'       => 'Displayed under an image at the image description page, when it is displayed smaller there than it was uploaded.',
index e7d891a..30a8996 100644 (file)
@@ -2560,6 +2560,7 @@ $wgMessageStructure = array(
                'widthheightpage',
                'file-info',
                'file-info-size',
+               'file-info-wrapper',
                'file-nohires',
                'svg-long-desc',
                'show-big-image',