Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -2004,6 +2004,9 @@ |
2005 | 2005 | 'djvu_no_xml', |
2006 | 2006 | 'thumbnail_invalid_params', |
2007 | 2007 | 'thumbnail_dest_directory', |
| 2008 | + 'thumbnail_image-type', |
| 2009 | + 'thumbnail_gd-library', |
| 2010 | + 'thumbnail_image-missing', |
2008 | 2011 | ), |
2009 | 2012 | 'import' => array( |
2010 | 2013 | 'import', |
Index: trunk/phase3/includes/media/Bitmap.php |
— | — | @@ -181,20 +181,23 @@ |
182 | 182 | if( !isset( $typemap[$mimeType] ) ) { |
183 | 183 | $err = 'Image type not supported'; |
184 | 184 | wfDebug( "$err\n" ); |
185 | | - return new MediaTransformError( 'thumbnail_error', $clientWidth, $clientHeight, $err ); |
| 185 | + $errMsg = wfMsg ( 'thumbnail_image-type' ); |
| 186 | + return new MediaTransformError( 'thumbnail_error', $clientWidth, $clientHeight, $errMsg ); |
186 | 187 | } |
187 | 188 | list( $loader, $colorStyle, $saveType ) = $typemap[$mimeType]; |
188 | 189 | |
189 | 190 | if( !function_exists( $loader ) ) { |
190 | 191 | $err = "Incomplete GD library configuration: missing function $loader"; |
191 | 192 | wfDebug( "$err\n" ); |
192 | | - return new MediaTransformError( 'thumbnail_error', $clientWidth, $clientHeight, $err ); |
| 193 | + $errMsg = wfMsg ( 'thumbnail_gd-library', $loader ); |
| 194 | + return new MediaTransformError( 'thumbnail_error', $clientWidth, $clientHeight, $errMsg ); |
193 | 195 | } |
194 | 196 | |
195 | 197 | if ( !file_exists( $srcPath ) ) { |
196 | 198 | $err = "File seems to be missing: $srcPath"; |
197 | 199 | wfDebug( "$err\n" ); |
198 | | - return new MediaTransformError( 'thumbnail_error', $clientWidth, $clientHeight, $err ); |
| 200 | + $errMsg = wfMsg ( 'thumbnail_image-missing', $srcPath ); |
| 201 | + return new MediaTransformError( 'thumbnail_error', $clientWidth, $clientHeight, $errMsg ); |
199 | 202 | } |
200 | 203 | |
201 | 204 | $src_image = call_user_func( $loader, $srcPath ); |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2866,6 +2866,9 @@ |
2867 | 2867 | 'djvu_no_xml' => 'Unable to fetch XML for DjVu file', |
2868 | 2868 | 'thumbnail_invalid_params' => 'Invalid thumbnail parameters', |
2869 | 2869 | 'thumbnail_dest_directory' => 'Unable to create destination directory', |
| 2870 | +'thumbnail_image-type' => 'Image type not supported', |
| 2871 | +'thumbnail_gd-library' => 'Incomplete GD library configuration: missing function $1', |
| 2872 | +'thumbnail_image-missing' => 'File seems to be missing: $1', |
2870 | 2873 | |
2871 | 2874 | # Special:Import |
2872 | 2875 | 'import' => 'Import pages', |