r25958 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25957‎ | r25958 | r25959 >
Date:16:33, 20 September 2007
Author:raymond
Status:old
Tags:
Comment:
* Add message 'year-month' to enable swap of year and month in input form of
Special:Contributions for languages which prefer month-year instead of the default year-month
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialContributions.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesDe.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messageTypes.inc (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -1290,6 +1290,7 @@
12911291 'uctop',
12921292 'month',
12931293 'year',
 1294+ 'year_month',
12941295 ),
12951296 'sp-contributions' => array(
12961297 'sp-contributions-newest',
@@ -2396,7 +2397,8 @@
23972398 'exif-orientation-6' => '0th row: right; 0th column: top',
23982399 'exif-orientation-7' => '0th row: right; 0th column: bottom',
23992400 'exif-orientation-8' => '0th row: left; 0th column: bottom',
2400 - 'movepage-moved' => 'The two titles are passed in plain text as $3 and $4 to allow additional goodies in the message.'
 2401+ 'movepage-moved' => 'The two titles are passed in plain text as $3 and $4 to allow additional goodies in the message.',
 2402+ 'year-month' => '$1 year, $2 month',
24012403 );
24022404
24032405 /** Messages which contain dollar signs (which are not followed by numbers), and therefore should use a single apostrophe */
Index: trunk/phase3/maintenance/language/messageTypes.inc
@@ -205,6 +205,7 @@
206206 'filedelete-backlink',
207207 'pagetitle',
208208 'filename-prefix-blacklist',
 209+ 'year-month',
209210 );
210211
211212 /** EXIF messages, which may be set as optional in several checks, but are generally mandatory */
Index: trunk/phase3/includes/SpecialContributions.php
@@ -420,8 +420,16 @@
421421 }
422422 $f .= "\t" . Xml::hidden( $name, $value ) . "\n";
423423 }
 424+ $inputMonth= '<span style="white-space: nowrap">' .
 425+ Xml::label( wfMsg( 'month' ), 'month' ) . ' '.
 426+ Xml::monthSelector( $options['month'], -1 ) . ' '.
 427+ '</span>';
 428+ $inputYear = '<span style="white-space: nowrap">' .
 429+ Xml::label( wfMsg( 'year' ), 'year' ) . ' '.
 430+ Xml::input( 'year', 4, $options['year'], array('id' => 'year', 'maxlength' => 4 ) ) .
 431+ '</span>';
424432
425 - $f .= '<fieldset>' .
 433+ $f .= Xml::openElement( 'fieldset' ) .
426434 Xml::element( 'legend', array(), wfMsg( 'sp-contributions-search' ) ) .
427435 Xml::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parseinline' ) ), 'contribs' , 'newbie' , 'newbie', $options['contribs'] == 'newbie' ? true : false ) . '<br />' .
428436 Xml::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parseinline' ) ), 'contribs' , 'user', 'user', $options['contribs'] == 'user' ? true : false ) . ' ' .
@@ -431,23 +439,15 @@
432440 Xml::namespaceSelector( $options['namespace'], '' ) .
433441 '</span>' .
434442 Xml::openElement( 'p' ) .
435 - '<span style="white-space: nowrap">' .
436 - Xml::label( wfMsg( 'year' ), 'year' ) . ' '.
437 - Xml::input( 'year', 4, $options['year'], array('id' => 'year', 'maxlength' => 4) ) .
438 - '</span>' .
439 - ' '.
440 - '<span style="white-space: nowrap">' .
441 - Xml::label( wfMsg( 'month' ), 'month' ) . ' '.
442 - Xml::monthSelector( $options['month'], -1 ) . ' '.
443 - '</span>' .
 443+ wfMsg( 'year-month', $inputYear, $inputMonth ) . ' ' .
444444 Xml::submitButton( wfMsg( 'sp-contributions-submit' ) ) .
445445 Xml::closeElement( 'p' );
446 -
 446+
447447 $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' );
448448 if( !wfEmptyMsg( 'sp-contributions-explain', $explain ) )
449449 $f .= "<p>{$explain}</p>";
450 -
451 - $f .= '</fieldset>' .
 450+
 451+ $f .= Xml::closeElement( 'fieldset' ) .
452452 Xml::closeElement( 'form' );
453453 return $f;
454454 }
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1971,6 +1971,7 @@
19721972 'uctop' => ' (top)',
19731973 'month' => 'From month (and earlier):',
19741974 'year' => 'From year (and earlier):',
 1975+'year-month' => '$1 $2', # $1 year, $2 month; only translate this message to other languages if you have to change it
19751976
19761977 'sp-contributions-newest' => 'Newest',
19771978 'sp-contributions-oldest' => 'Oldest',
Index: trunk/phase3/languages/messages/MessagesDe.php
@@ -1569,9 +1569,10 @@
15701570 'nocontribs' => 'Es wurden keine Benutzerbeiträge mit diesen Kriterien gefunden.',
15711571 'ucnote' => 'Dies sind die letzten <b>$1</b> Beiträge des Benutzers in den letzten <b>$2</b> Tagen.',
15721572 'uclinks' => 'Zeige die letzten $1 Beiträge; zeige die letzten $2 Tage.',
1573 -'uctop' => ' (aktuell)',
1574 -'month' => 'und Monat:',
1575 -'year' => 'bis Jahr:',
 1573+'uctop' => '(aktuell)',
 1574+'month' => 'Bis Monat:',
 1575+'year' => 'und Jahr:',
 1576+'year-month' => '$2 $1',
15761577
15771578 'sp-contributions-newest' => 'Jüngste',
15781579 'sp-contributions-oldest' => 'Älteste',
Index: trunk/phase3/RELEASE-NOTES
@@ -27,6 +27,8 @@
2828 * (bug 11136) If using Postgres, search path is explicitly set if wgDBmwschema is
2929 not set to 'mediawiki', allowing multiple mediawiki instances per user.
3030 * (bug 11151) Add descriptive <title> to revision history page
 31+* Add message 'year-month' to enable swap of year and month in input form of
 32+ Special:Contributions
3133
3234 === Bug fixes in 1.12 ===
3335

Follow-up revisions

RevisionCommit summaryAuthorDate
r25959fix typo from r25958. Thanks to Nikerabbitraymond17:20, 20 September 2007
r25966Revert r25958 and r25959 for now....brion17:54, 20 September 2007
r26015Merged revisions 25932-26011 via svnmerge from...david21:05, 21 September 2007

Status & tagging log