Index: trunk/extensions/VipsScaler/VipsScaler.i18n.php |
— | — | @@ -9,7 +9,10 @@ |
10 | 10 | $messages = array(); |
11 | 11 | |
12 | 12 | $messages['en'] = array( |
13 | | - 'vipsscaler-desc' => 'Create thumbnails using VIPS' |
| 13 | + 'vipsscaler-desc' => 'Create thumbnails using VIPS', |
| 14 | + 'vipsscaler-invalid-file' => 'Invalid file: could not process requested file (does it exist on this wiki?)', |
| 15 | + 'vipsscaler-invalid-width' => 'You must specify a width (integer > 0)', |
| 16 | + 'vipsscaler-thumb-error' => 'VIPS could not generate a thumbnail with given parameters', |
14 | 17 | ); |
15 | 18 | |
16 | 19 | /** Message documentation (Message documentation) |
— | — | @@ -17,6 +20,9 @@ |
18 | 21 | */ |
19 | 22 | $messages['qqq'] = array( |
20 | 23 | 'vipsscaler-desc' => '{{desc}}', |
| 24 | + 'vipsscaler-invalid-file' => 'Error message when SpecialVipsTest was given a non existent or invalid file name', |
| 25 | + 'vipsscaler-invalid-width' => 'Error message when SpecialVipsTest did not get a valid width parameter', |
| 26 | + 'vipsscaler-thumb-error' => 'Error message when VIPS did not manage to generate a thumbnail', |
21 | 27 | ); |
22 | 28 | |
23 | 29 | /** Afrikaans (Afrikaans) |
Index: trunk/extensions/VipsScaler/SpecialVipsTest.php |
— | — | @@ -58,25 +58,25 @@ |
59 | 59 | |
60 | 60 | $title = Title::makeTitleSafe( NS_FILE, $request->getText( 'file' ) ); |
61 | 61 | if ( is_null( $title ) ) { |
62 | | - $this->getOutput()->addWikiMsg( 'vips-invalid-file' ); |
| 62 | + $this->getOutput()->addWikiMsg( 'vipsscaler-invalid-file' ); |
63 | 63 | return; |
64 | 64 | } |
65 | 65 | $file = wfFindFile( $title ); |
66 | 66 | if ( !$file || !$file->exists() ) { |
67 | | - $this->getOutput()->addWikiMsg( 'vips-invalid-file' ); |
| 67 | + $this->getOutput()->addWikiMsg( 'vipsscaler-invalid-file' ); |
68 | 68 | return; |
69 | 69 | } |
70 | 70 | |
71 | 71 | $width = $request->getInt( 'width' ); |
72 | 72 | if ( !$width ) { |
73 | | - $this->getOutput()->addWikiMsg( 'vips-invalid-width' ); |
| 73 | + $this->getOutput()->addWikiMsg( 'vipsscaler-invalid-width' ); |
74 | 74 | return; |
75 | 75 | } |
76 | 76 | |
77 | 77 | $params = array( 'width' => $width ); |
78 | 78 | $thumb = $file->transform( $params ); |
79 | 79 | if ( !$thumb || $thumb->isError() ) { |
80 | | - $this->getOutput()->addWikiMsg( 'vips-thumb-error' ); |
| 80 | + $this->getOutput()->addWikiMsg( 'vipsscaler-thumb-error' ); |
81 | 81 | } |
82 | 82 | |
83 | 83 | $vipsThumbUrl = $this->makeUrl( $file, $width ); |