r39578 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39577‎ | r39578 | r39579 >
Date:09:44, 18 August 2008
Author:grondin
Status:old
Tags:
Comment:
Adding news internationalization messages.
Modified paths:
  • /trunk/extensions/LiquidThreads/Lqt.i18n.php (modified) (history)
  • /trunk/extensions/LiquidThreads/LqtPages.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/Lqt.i18n.php
@@ -104,6 +104,23 @@
105105 'lqt_sort_newest_changes' => 'last modified first',
106106 'lqt_sort_newest_threads' => 'newest threads first',
107107 'lqt_sort_oldest_threads' => 'oldest threads first',
 108+ 'lqt-any-date' => 'Any date',
 109+ 'lqt-only-date' => 'Only these dates:',
 110+ 'lqt-date-from' => 'From',
 111+ 'lqt-date-to' => 'To',
 112+ 'lqt-title' => 'Title',
 113+ 'lqt-summary' => 'Summary',
 114+ 'lqt-older' => 'older',
 115+ 'lqt-newer' => 'newer',
 116+ 'lqt-searching' => 'Searching for threads',
 117+ 'lqt-read-email' => 'Read',
 118+ 'lqt-email-remove' => 'Remove this thread from New Messages.',
 119+ 'lqt-marked-read' => 'Thread <b>$1</b> marked as read.',
 120+ 'lqt-count-marked-read' => '$1 {{PLURAL:$1|messages|messages}} marked as read.',
 121+ 'lqt-email-undo' => 'Undo',
 122+ 'lqt-messages-sent' => 'Messages sent to you:',
 123+ 'lqt-other-messages' => 'Messages on other talkpages:',
 124+ 'lqt-new-messages' => 'There are new messages for you.',
108125 );
109126
110127 /** Message documentation (Message documentation)
@@ -729,6 +746,15 @@
730747 'lqt_sort_newest_changes' => 'fils de discussion plus récemment modifiés en premier',
731748 'lqt_sort_newest_threads' => 'fils de discussion les plus récents en premier',
732749 'lqt_sort_oldest_threads' => 'fils de discussion les plus anciens en premier',
 750+ 'lqt-any-date' => 'Toutes les dates',
 751+ 'lqt-only-date' => 'Uniquement ces dates :',
 752+ 'lqt-date-from' => 'Du',
 753+ 'lqt-date-to' => 'au',
 754+ 'lqt-title' => 'Titre',
 755+ 'lqt-summary' => 'Sommaire',
 756+ 'lqt-older' => 'plus ancien',
 757+ 'lqt-newer' => 'plus récent',
 758+ 'lqt-searching' => 'Recherche des fils',
733759 );
734760
735761 /** Western Frisian (Frysk)
Index: trunk/extensions/LiquidThreads/LqtPages.php
@@ -325,7 +325,7 @@
326326 'thread.thread_modified < ' . $startdate->text());
327327 $options = array('ORDER BY thread.thread_modified DESC');
328328
329 - $annotations = array("Searching for threads");
 329+ $annotations = array( wfMsg ( 'lqt-searching' ));
330330
331331 $r = $this->request;
332332
@@ -414,6 +414,10 @@
415415 }
416416 $any_date_check = !$use_dates ? 'checked="1"' : '';
417417 $these_dates_check = $use_dates ? 'checked="1"' : '';
 418+ $any_date = wfMsg ( 'lqt-any-date' );
 419+ $only_date= wfMsg ( 'lqt-only-date' );
 420+ $date_from= wfMsg ( 'lqt-date-from' );
 421+ $date_to = wfMsg ( 'lqt-date-to' );
418422
419423 if( isset($this->datespan) ) {
420424 $oatte = $this->starti + 1;
@@ -430,16 +434,16 @@
431435 'lqt_archive_filter_by_date'=>'1',
432436 'lqt_archive_start' => $months[$os],
433437 'lqt_archive_end' => $months[$oe]))
434 - . '">«older</a>';
 438+ . '">«'.wfMsg ( 'lqt-older' ).'</a>';
435439 $newer = '<a class="lqt_newer_older" href="' . $this->queryReplace(array(
436440 'lqt_archive_filter_by_date'=>'1',
437441 'lqt_archive_start' => $months[$ns],
438442 'lqt_archive_end' => $months[$ne]))
439 - . '">newer»</a>';
 443+ . '">'.wfMsg ( 'lqt-newer' ).'»</a>';
440444 }
441 - else {
442 - $older = '<span class="lqt_newer_older_disabled" title="This link is disabled because you are viewing threads from all dates.">«older</span>';
443 - $newer = '<span class="lqt_newer_older_disabled" title="This link is disabled because you are viewing threads from all dates.">newer»</span>';
 445+ else {
 446+ $older = '<span class="lqt_newer_older_disabled" title="This link is disabled because you are viewing threads from all dates.">«'.wfMsg ( 'lqt-older' ).'</span>';
 447+ $newer = '<span class="lqt_newer_older_disabled" title="This link is disabled because you are viewing threads from all dates.">'.wfMsg ( 'lqt-newer' ).'»</span>';
444448 }
445449
446450 $this->output->addHTML(<<<HTML
@@ -449,15 +453,15 @@
450454
451455 <input type="radio" id="lqt_archive_filter_by_date_no"
452456 name="lqt_archive_filter_by_date" value="0" {$any_date_check}>
453 - <label for="lqt_archive_filter_by_date_no">Any date</label> <br />
 457+ <label for="lqt_archive_filter_by_date_no">{$any_date}</label> <br />
454458 <input type="radio" id="lqt_archive_filter_by_date_yes"
455459 name="lqt_archive_filter_by_date" value="1" {$these_dates_check}>
456 - <label for="lqt_archive_filter_by_date_yes">Only these dates:</label> <br />
 460+ <label for="lqt_archive_filter_by_date_yes">{$only_date}</label> <br />
457461
458462 <table>
459 -<tr><td><label for="lqt_archive_start">From</label>
 463+<tr><td><label for="lqt_archive_start">{$date_from}</label>
460464 <td>{$this->monthSelect($months, 'lqt_archive_start')} <br />
461 -<tr><td><label for="lqt_archive_end">To</label>
 465+<tr><td><label for="lqt_archive_end">{$date_to}</label>
462466 <td>{$this->monthSelect($months, 'lqt_archive_end')}
463467 </table>
464468 <input type="submit">
@@ -480,13 +484,14 @@
481485 $this->output->addHTML('<p><br /><b>'. wfMsg('lqt-nothread' ) . '</b></p>' );
482486 return false;
483487 }
484 -
 488+ $lqt_title = wfMsg ( 'lqt-title');
 489+ $lqt_summary = wfMsg ( 'lqt-summary' );
485490 $this->output->addHTML(<<<HTML
486491 <p class="lqt_search_annotations">{$this->annotations}</p>
487492 <table class="lqt_archive_listing">
488493 <col class="lqt_titles" />
489494 <col class="lqt_summaries" />
490 -<tr><th>Title<th>Summary</tr>
 495+<tr><th>{$lqt_title}<th>{$lqt_summary}</tr>
491496 HTML
492497 );
493498 foreach ($this->threads() as $t) {
@@ -1178,13 +1183,15 @@
11791184 function preShowThread($t) {
11801185 // $t_ids = implode(',', array_map(create_function('$t', 'return $t->id();'), $this->targets[$t->id()]));
11811186 $t_ids = implode(',', $this->targets[$t->id()]);
 1187+ $lqt_read_email = wfMsg ( 'lqt-read-email' );
 1188+ $lqt_remove_thread = wfMsg ( 'lqt-email-remove' );
11821189 $this->output->addHTML(<<<HTML
11831190 <table ><tr>
11841191 <td style="padding-right: 1em; vertical-align: top; padding-top: 1em;" >
11851192 <form method="POST">
11861193 <input type="hidden" name="lqt_method" value="mark_as_read" />
11871194 <input type="hidden" name="lqt_operand" value="{$t_ids}" />
1188 - <input type="submit" value="Read" name="lqt_read_button" title="Remove this thread from New Messages." />
 1195+ <input type="submit" value="{$lqt_read_email}" name="lqt_read_button" title="{$lqt_remove_thread}" />
11891196 </form>
11901197 </td>
11911198 <td>
@@ -1203,18 +1210,19 @@
12041211 function showUndo($ids) {
12051212 if( count($ids) == 1 ) {
12061213 $t = Threads::withId($ids[0]);
1207 - $msg = "Thread <b>{$t->subject()}</b> marked as read.";
 1214+ $msg = wfMsg( 'lqt-marked-read',$t->subject() );
12081215 } else {
12091216 $count = count($ids);
1210 - $msg = "$count messages marked as read.";
 1217+ $msg = wfMsg( 'lqt-count-marked-read',$count );
12111218 }
12121219 $operand = implode(',', $ids);
 1220+ $lqt_email_undo = wfMsg ( 'lqt-email-undo' );
12131221 $this->output->addHTML(<<<HTML
12141222 <form method="POST" class="lqt_undo_mark_as_read">
12151223 $msg
12161224 <input type="hidden" name="lqt_method" value="mark_as_unread" />
12171225 <input type="hidden" name="lqt_operand" value="{$operand}" />
1218 - <input type="submit" value="Undo" name="lqt_read_button" title="Bring back the thread you just dismissed." />
 1226+ <input type="submit" value="{$lqt_email_undo}" name="lqt_read_button" title="Bring back the thread you just dismissed." />
12191227 </form>
12201228 HTML
12211229 );
@@ -1333,11 +1341,11 @@
13341342 $view->setHeaderLevel(3);
13351343 $view->showOnce();
13361344
1337 - $this->output->addHTML('<h2 class="lqt_newmessages_section">Messages sent to you:</h2>');
 1345+ $this->output->addHTML('<h2 class="lqt_newmessages_section">'.wfMsg ( 'lqt-messages-sent' ).'</h2>');
13381346 $view->setThreads( NewMessages::newUserMessages($this->user) );
13391347 $view->show();
13401348
1341 - $this->output->addHTML('<h2 class="lqt_newmessages_section">Messages on other talkpages:</h2>');
 1349+ $this->output->addHTML('<h2 class="lqt_newmessages_section">'.wfMsg ( 'lqt-other-messages' ).'</h2>');
13421350 $view->setThreads( NewMessages::watchedThreadsForUser($this->user) );
13431351 $view->show();
13441352 }
@@ -1363,9 +1371,10 @@
13641372
13651373 LqtView::addJSandCSS();
13661374 $messages_url = SpecialPage::getPage('Newmessages')->getTitle()->getFullURL();
 1375+ $new_messages = wfMsg ( 'lqt-new-messages' );
13671376 $wgOut->addHTML(<<< HTML
13681377 <a href="$messages_url" class="lqt_watchlist_messages_notice">
1369 - &#x2712; There are new messages for you.
 1378+ &#x2712; {$new_messages}
13701379 </a>
13711380 HTML
13721381 );

Status & tagging log