r22796 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22795‎ | r22796 | r22797 >
Date:11:42, 6 June 2007
Author:raymond
Status:old
Tags:
Comment:
Per talk with River on IRC:
Removing extra message from r22793, seem to be just unintuitive.
Modified paths:
  • /trunk/phase3/includes/SpecialBooksources.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesDe.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -1003,7 +1003,6 @@
10041004 'booksources-isbn',
10051005 'booksources-go',
10061006 'booksources-text',
1007 - 'booksources-language',
10081007 ),
10091008 'specialpages2' => array(
10101009 'categoriespagetext',
Index: trunk/phase3/includes/SpecialBooksources.php
@@ -31,7 +31,6 @@
3232 global $wgOut, $wgRequest;
3333 $this->setHeaders();
3434 $this->isbn = $this->cleanIsbn( $isbn ? $isbn : $wgRequest->getText( 'isbn' ) );
35 - $this->lang = htmlspecialchars( $wgRequest->getText( 'uselang' ) );
3635 $wgOut->addWikiText( wfMsgNoTrans( 'booksources-summary' ) );
3736 $wgOut->addHtml( $this->makeForm() );
3837 if( strlen( $this->isbn ) > 0 )
@@ -73,24 +72,16 @@
7473 * @return string
7574 */
7675 private function showList() {
77 - global $wgOut, $wgContLang, $wgUser, $wgContLanguageCode;
78 - $this->userLanguage = $wgUser->getOption( 'language', $wgContLanguageCode );
 76+ global $wgOut, $wgContLang;
7977
8078 # Hook to allow extensions to insert additional HTML,
8179 # e.g. for API-interacting plugins and so on
8280 wfRunHooks( 'BookInformation', array( $this->isbn, &$wgOut ) );
8381
8482 # Check for a local page such as Project:Book_sources and use that if available
85 - if ( $this->lang == '' || $this->lang == $wgContLanguageCode ) {
86 - $title = Title::makeTitleSafe( NS_PROJECT, wfMsgForContent( 'booksources' ) ); # Show list in content language
87 - } else {
88 - $title = Title::makeTitleSafe( NS_PROJECT, wfMsg( 'booksources' ) ); # Show list in user language
89 - }
 83+ $title = Title::makeTitleSafe( NS_PROJECT, wfMsgForContent( 'booksources' ) ); # Show list in content language
9084 if( is_object( $title ) && $title->exists() ) {
9185 $rev = Revision::newFromTitle( $title );
92 - if ( $this->userLanguage != $wgContLanguageCode && $this->lang == '' ) {
93 - $wgOut->addWikiText( '<span class="plainlinks">' . wfMsgHtml( 'booksources-language', $this->isbn, $this->userLanguage ) . '</span>' );
94 - }
9586 $wgOut->addWikiText( str_replace( 'MAGICNUMBER', $this->isbn, $rev->getText() ) );
9687 return true;
9788 }
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1608,7 +1608,6 @@
16091609 'booksources-go' => 'Go',
16101610 'booksources-text' => 'Below is a list of links to other sites that sell new and used books, and may also have
16111611 further information about books you are looking for:',
1612 -'booksources-language' => "''The following list is written in the content language of this wiki. [{{fullurl:{{FULLPAGENAMEE}}|isbn=$1&uselang=$2}} A translations into your user language] contains normally a shortened list only.''",
16131612
16141613 'categoriespagetext' => 'The following categories exist in the wiki.',
16151614 'data' => 'Data',
Index: trunk/phase3/languages/messages/MessagesDe.php
@@ -1239,7 +1239,6 @@
12401240 'booksources-isbn' => 'ISBN:',
12411241 'booksources-go' => 'Suche',
12421242 'booksources-text' => 'Dies ist eine Liste mit Links zu Internetseiten, die neue und gebrauchte Bücher verkaufen. Dort kann es auch weitere Informationen über die Bücher geben. {{SITENAME}} ist mit keinem dieser Anbieter geschäftlich verbunden.',
1243 -'booksources-language' => "''Die nachfolgende Liste wird in der Sprache des Wikis ausgegeben. [{{fullurl:{{FULLPAGENAMEE}}|isbn=$1&uselang=$2}} Eine Liste in Ihrer Benutzersprache] enthält in der Regel nur wenige Einträge.''",
12441243
12451244 'categoriespagetext' => 'Die folgenden Kategorien existieren in {{SITENAME}}:',
12461245 'data' => 'Daten',

Follow-up revisions

RevisionCommit summaryAuthorDate
r22811Merged revisions 22791-22810 via svnmerge from...david07:26, 7 June 2007

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r22793Show result of Special:Booksources in wiki content language always,...raymond09:51, 6 June 2007

Status & tagging log