* (bug 7782) fix for .svg
authorRaimond Spekking <raymond@users.mediawiki.org>
Mon, 5 Mar 2007 19:53:41 +0000 (19:53 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Mon, 5 Mar 2007 19:53:41 +0000 (19:53 +0000)
includes/ImagePage.php
languages/messages/MessagesDe.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index b8403ad..3ddf192 100644 (file)
@@ -311,25 +311,25 @@ class ImagePage extends Article {
 
 
                        if ($showLink) {
-                               $filename = wfEscapeWikiText( $this->img->getName() );
                                // Hacky workaround: for some reason we use the incorrect MIME type
                                // image/svg for SVG.  This should be fixed internally, but at least
                                // make the displayed type right.
                                if ($mime == 'image/svg') $mime = 'image/svg+xml';
-                               // Check for MIME type. Other types may have more information in the future.
+
+                               $filename = wfEscapeWikiText( $this->img->getName() );
+                               $info = wfMsg( 'file-info', $sk->formatSize( $this->img->getSize() ), $mime );
                                $infores = '';
-                               if ( substr($mime,0,5) == 'image' ) { 
-                                       $infores =  wfMsg('file-nohires') . '<br />';
+
+                               // Check for MIME type. Other types may have more information in the future.
+                               if (substr($mime,0,9) == 'image/svg' ) {
+                                       $infores = wfMsg('file-svg', $width_orig, $height_orig ) . '<br />';
+                               } elseif ( substr($mime,0,5) == 'image' ) { 
+                                       $infores = wfMsg('file-nohires') . '<br />';
                                        $info = wfMsg( 
                                                'file-info-size',
                                                $width_orig, $height_orig,
                                                $sk->formatSize( $this->img->getSize() ),
                                                $mime );
-                               } else {
-                                       $info = wfMsg( 
-                                               'file-info',
-                                               $sk->formatSize( $this->img->getSize() ),
-                                               $mime );
                                }
 
                                global $wgContLang;
index 4c368ba..f0ded3b 100644 (file)
@@ -1864,9 +1864,10 @@ Variants for Chinese language
 'imagemaxsize'          => 'Maximale Bildgröße auf Bildbeschreibungsseiten:',
 'thumbsize'             => 'Standardgröße der Vorschaubilder (thumbnails):',
 'widthheight'          => '$1×$2',
-'file-info'             => 'Dateigröße: $1, MIME-Typ: $2',
+'file-info'             => '(Dateigröße: $1, MIME-Typ: $2)',
 'file-info-size'        => '($1 × $2 Pixel, Dateigröße: $3, MIME-Typ: $4)',
 'file-nohires'          => '<small>Keine höhere Auflösung vorhanden.</small>',
+'file-svg'              => '<small>Dies ist eine verlustfrei skalierbare Vektorgrafik. Basisgröße: $1 × $2 Pixel.</small>',
 'show-big-image'        => 'Version in höherer Auflösung',
 'show-big-image-thumb'  => '<small>Größe der Voransicht: $1 × $2 Pixel</small>',
 
index 863c808..fd62c4a 100644 (file)
@@ -2291,9 +2291,10 @@ All transwiki import actions are logged at the [[Special:Log/import|import log]]
 'imagemaxsize'          => 'Limit images on image description pages to:',
 'thumbsize'             => 'Thumbnail size:',
 'widthheight'          => '$1×$2',
-'file-info'             => 'File size: $1, MIME type: $2',
+'file-info'             => '(file size: $1, MIME type: $2)',
 'file-info-size'        => '($1 × $2 pixel, file size: $3, MIME type: $4)',
 'file-nohires'          => '<small>No higher resolution available.</small>',
+'file-svg'              => '<small>This is a lossless scalable vector graphics. Base size: $1 × $2 pixel.</small>',
 'show-big-image'        => 'Image in higher resolution',
 'show-big-image-thumb'  => '<small>Size of this preview: $1 × $2 pixel</small>',
 
index 9901911..c3a2b5b 100644 (file)
@@ -1562,6 +1562,7 @@ $wgMessageStructure = array(
                'file-info',
                'file-info-size',
                'file-nohires',
+               'file-svg',
                'show-big-image',
                'show-big-image-thumb',
        ),