* Add message 'year-month' to enable swap of year and month in input form of
authorRaimond Spekking <raymond@users.mediawiki.org>
Thu, 20 Sep 2007 16:33:45 +0000 (16:33 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Thu, 20 Sep 2007 16:33:45 +0000 (16:33 +0000)
  Special:Contributions for languages which prefer month-year instead of the default year-month

RELEASE-NOTES
includes/SpecialContributions.php
languages/messages/MessagesDe.php
languages/messages/MessagesEn.php
maintenance/language/messageTypes.inc
maintenance/language/messages.inc

index 5a58ca4..54dc243 100644 (file)
@@ -27,6 +27,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 11136) If using Postgres, search path is explicitly set if wgDBmwschema is 
   not set to 'mediawiki', allowing multiple mediawiki instances per user.
 * (bug 11151) Add descriptive <title> to revision history page
+* Add message 'year-month' to enable swap of year and month in input form of
+  Special:Contributions
 
 === Bug fixes in 1.12 ===
 
index e85ec43..2574a19 100644 (file)
@@ -420,8 +420,16 @@ function contributionsForm( $options ) {
                }
                $f .= "\t" . Xml::hidden( $name, $value ) . "\n";
        }
+       $inputMonth= '<span style="white-space: nowrap">' .
+               Xml::label( wfMsg( 'month' ), 'month' ) . ' '.
+               Xml::monthSelector( $options['month'], -1 ) . ' '.
+               '</span>';
+       $inputYear = '<span style="white-space: nowrap">' .
+               Xml::label( wfMsg( 'year' ), 'year' ) . ' '.
+               Xml::input( 'year', 4, $options['year'], array('id' => 'year', 'maxlength' => 4 ) ) .
+               '</span>';
 
-       $f .= '<fieldset>' .
+       $f .= Xml::openElement( 'fieldset' ) .
                Xml::element( 'legend', array(), wfMsg( 'sp-contributions-search' ) ) .
                Xml::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parseinline' ) ), 'contribs' , 'newbie' , 'newbie', $options['contribs'] == 'newbie' ? true : false ) . '<br />' .
                Xml::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parseinline' ) ), 'contribs' , 'user', 'user', $options['contribs'] == 'user' ? true : false ) . ' ' .
@@ -431,23 +439,15 @@ function contributionsForm( $options ) {
                Xml::namespaceSelector( $options['namespace'], '' ) .
                '</span>' .
                Xml::openElement( 'p' ) .
-               '<span style="white-space: nowrap">' .
-               Xml::label( wfMsg( 'year' ), 'year' ) . ' '.
-               Xml::input( 'year', 4, $options['year'], array('id' => 'year', 'maxlength' => 4) ) .
-               '</span>' .
-               ' '.
-               '<span style="white-space: nowrap">' .
-               Xml::label( wfMsg( 'month' ), 'month' ) . ' '.
-               Xml::monthSelector( $options['month'], -1 ) . ' '.
-               '</span>' .
+               wfMsg( 'year-month', $inputYear, $inputMonth ) . ' ' .
                Xml::submitButton( wfMsg( 'sp-contributions-submit' ) ) .
                Xml::closeElement( 'p' );
-       
+
        $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' );
        if( !wfEmptyMsg( 'sp-contributions-explain', $explain ) )
                $f .= "<p>{$explain}</p>";
-               
-       $f .= '</fieldset>' .
+
+       $f .= Xml::closeElement( 'fieldset' ) .
                Xml::closeElement( 'form' );
        return $f;
 }
index 80b65ac..ca9266c 100644 (file)
@@ -1569,9 +1569,10 @@ $1',
 'nocontribs'    => 'Es wurden keine Benutzerbeiträge mit diesen Kriterien gefunden.',
 'ucnote'        => 'Dies sind die letzten <b>$1</b> Beiträge des Benutzers in den letzten <b>$2</b> Tagen.',
 'uclinks'       => 'Zeige die letzten $1 Beiträge; zeige die letzten $2 Tage.',
-'uctop'         => ' (aktuell)',
-'month'         => 'und Monat:',
-'year'          => 'bis Jahr:',
+'uctop'         => '(aktuell)',
+'month'         => 'Bis Monat:',
+'year'          => 'und Jahr:',
+'year-month'    => '$2 $1',
 
 'sp-contributions-newest'      => 'Jüngste',
 'sp-contributions-oldest'      => 'Älteste',
index 7d874bb..85b7fed 100644 (file)
@@ -1971,6 +1971,7 @@ Consult the [[Special:Log/delete|deletion log]] for a record of recent deletions
 'uctop'         => ' (top)',
 'month'         => 'From month (and earlier):',
 'year'          => 'From year (and earlier):',
+'year-month'    => '$1 $2', # $1 year, $2 month; only translate this message to other languages if you have to change it
 
 'sp-contributions-newest'      => 'Newest',
 'sp-contributions-oldest'      => 'Oldest',
index e3376ca..87f6be9 100644 (file)
@@ -205,6 +205,7 @@ $wgOptionalMessages = array(
        'filedelete-backlink',
        'pagetitle',
        'filename-prefix-blacklist',
+       'year-month',
 );
 
 /** EXIF messages, which may be set as optional in several checks, but are generally mandatory */
index 2a27f3f..aa9a2a4 100644 (file)
@@ -1290,6 +1290,7 @@ $wgMessageStructure = array(
                'uctop',
                'month',
                'year',
+               'year_month',
        ),
        'sp-contributions' => array(
                'sp-contributions-newest',
@@ -2396,7 +2397,8 @@ $wgMessageComments = array(
        'exif-orientation-6'          => '0th row: right; 0th column: top',
        'exif-orientation-7'          => '0th row: right; 0th column: bottom',
        'exif-orientation-8'          => '0th row: left; 0th column: bottom',
-       'movepage-moved'              => 'The two titles are passed in plain text as $3 and $4 to allow additional goodies in the message.'
+       'movepage-moved'              => 'The two titles are passed in plain text as $3 and $4 to allow additional goodies in the message.',
+       'year-month'                  => '$1 year, $2 month',
 );
 
 /** Messages which contain dollar signs (which are not followed by numbers), and therefore should use a single apostrophe */