r45122 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45121‎ | r45122 | r45123 >
Date:13:17, 28 December 2008
Author:purodha
Status:deferred (Comments)
Tags:
Comment:
Adding PLURAL to messages: smoothgallery-invalid-images smoothgallery-no-images
Modified paths:
  • /trunk/extensions/SmoothGallery/SmoothGallery.i18n.php (modified) (history)
  • /trunk/extensions/SmoothGallery/SmoothGalleryClass.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SmoothGallery/SmoothGalleryClass.php
@@ -29,12 +29,12 @@
3030 $error = wfMsg( "smoothgallery-error" );
3131
3232 if ( isset( $galleryArray["missing_images"] ) && isset( $galleryArray["invalid_images"] ) ) {
33 - $error .= wfMsg( "smoothgallery-no-images", implode( ", " , $galleryArray["missing_images"] ) );
34 - $error .= wfMsg( "smoothgallery-invalid-images", implode( ", " , $galleryArray["invalid_images"] ) );
 33+ $error .= wfMsg( "smoothgallery-no-images", implode( ", " , $galleryArray["missing_images"] , count($galleryArray["missing_images"]) ) );
 34+ $error .= wfMsg( "smoothgallery-invalid-images", implode( ", " , $galleryArray["invalid_images"] , count($galleryArray["invalid_images"]) ) );
3535 } else if ( isset( $galleryArray["invalid_images"] ) ) {
36 - $error .= wfMsg( "smoothgallery-invalid-images", implode( ", " , $galleryArray["invalid_images"] ) );
 36+ $error .= wfMsg( "smoothgallery-invalid-images", implode( ", " , $galleryArray["invalid_images"] , count($galleryArray["invalid_images"]) ) );
3737 } else if ( isset( $galleryArray["missing_images"] ) ) {
38 - $error .= wfMsg( "smoothgallery-no-images", implode( ", " , $galleryArray["missing_images"] ) );
 38+ $error .= wfMsg( "smoothgallery-no-images", implode( ", " , $galleryArray["missing_images"] , count($galleryArray["missing_images"]) ) );
3939 } else {
4040 $error .= wfMsg( "smoothgallery-not-found" );
4141 }
Index: trunk/extensions/SmoothGallery/SmoothGallery.i18n.php
@@ -20,9 +20,9 @@
2121 'smoothgallery-not-found' => 'No images were added into the gallery.
2222 Please add at least one image.',
2323 'smoothgallery-no-images' => 'No images were found in this gallery.
24 -Make sure all images requested exist.
 24+Make sure {{PLURAL:$2|the image|all images}} requested exist.
2525 The following images were not found: $1',
26 - 'smoothgallery-invalid-images' => 'The following requested images were of an invalid type: $1',
 26+ 'smoothgallery-invalid-images' => 'The following requested {{PLURAL:$2|image was|images were}} of an invalid type: $1',
2727 'smoothgallery-unexpected-error' => 'There was an unexpected error.
2828 Please file a bug report.',
2929 'smoothgallery-javascript-disabled' => 'Javascript is required to view this gallery properly.',

Follow-up revisions

RevisionCommit summaryAuthorDate
r45156fix error remaining after r45122.purodha11:06, 29 December 2008

Comments

#Comment by Aaron Schulz (talk | contribs)   20:25, 28 December 2008

Should this be using wfMsgExt() ?

#Comment by Siebrand (talk | contribs)   00:09, 31 December 2008

Yes, it should.

Status & tagging log