r101811 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101810‎ | r101811 | r101812 >
Date:14:32, 3 November 2011
Author:hashar
Status:ok (Comments)
Tags:
Comment:
prefix i18n msg with "vipsscaler-"

also added some missing translations and the qqq messages.
Modified paths:
  • /trunk/extensions/VipsScaler/SpecialVipsTest.php (modified) (history)
  • /trunk/extensions/VipsScaler/VipsScaler.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/VipsScaler/VipsScaler.i18n.php
@@ -9,7 +9,10 @@
1010 $messages = array();
1111
1212 $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',
1417 );
1518
1619 /** Message documentation (Message documentation)
@@ -17,6 +20,9 @@
1821 */
1922 $messages['qqq'] = array(
2023 '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',
2127 );
2228
2329 /** Afrikaans (Afrikaans)
Index: trunk/extensions/VipsScaler/SpecialVipsTest.php
@@ -58,25 +58,25 @@
5959
6060 $title = Title::makeTitleSafe( NS_FILE, $request->getText( 'file' ) );
6161 if ( is_null( $title ) ) {
62 - $this->getOutput()->addWikiMsg( 'vips-invalid-file' );
 62+ $this->getOutput()->addWikiMsg( 'vipsscaler-invalid-file' );
6363 return;
6464 }
6565 $file = wfFindFile( $title );
6666 if ( !$file || !$file->exists() ) {
67 - $this->getOutput()->addWikiMsg( 'vips-invalid-file' );
 67+ $this->getOutput()->addWikiMsg( 'vipsscaler-invalid-file' );
6868 return;
6969 }
7070
7171 $width = $request->getInt( 'width' );
7272 if ( !$width ) {
73 - $this->getOutput()->addWikiMsg( 'vips-invalid-width' );
 73+ $this->getOutput()->addWikiMsg( 'vipsscaler-invalid-width' );
7474 return;
7575 }
7676
7777 $params = array( 'width' => $width );
7878 $thumb = $file->transform( $params );
7979 if ( !$thumb || $thumb->isError() ) {
80 - $this->getOutput()->addWikiMsg( 'vips-thumb-error' );
 80+ $this->getOutput()->addWikiMsg( 'vipsscaler-thumb-error' );
8181 }
8282
8383 $vipsThumbUrl = $this->makeUrl( $file, $width );

Follow-up revisions

RevisionCommit summaryAuthorDate
r102863VipsScaler:...btongminh15:41, 12 November 2011

Comments

#Comment by Nikerabbit (talk | contribs)   15:27, 3 November 2011
-Invalid file: could not process requested file (does it exist on this wiki?)
+Could not process requested file. Check that it exists on this wiki.

What do you think?

Status & tagging log