From 63ccbb331a5d8da4ef1b55efadb5a3aca1134be4 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Tue, 22 Apr 2008 06:10:01 +0000 Subject: [PATCH] * Move hardcoded text "Diff:..." to new message 'missingarticle-diff' * Move hardcoded text "oldid=..." to new message 'missingarticle-rev' * Remove variable $t from message 'noarticletext' as it has no parameter $1 --- includes/Article.php | 6 +++--- includes/DifferenceEngine.php | 5 ++--- languages/messages/MessagesDe.php | 2 ++ languages/messages/MessagesEn.php | 2 ++ maintenance/language/messages.inc | 2 ++ 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index bc4e91ff56..51d5a82fdf 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -394,7 +394,7 @@ class Article { # fails we'll have something telling us what we intended. $t = $this->mTitle->getPrefixedText(); if( $oldid ) { - $t .= ',oldid='.$oldid; + $t .= ' ' . wfMsgExt( 'missingarticle-rev', array( 'escape' ), $oldid ); } $this->mContent = wfMsg( 'missingarticle', $t ) ; @@ -797,10 +797,10 @@ class Article { # Failed to load, replace text with error message $t = $this->mTitle->getPrefixedText(); if( $oldid ) { - $t .= ',oldid='.$oldid; + $t .= ' ' . wfMsgExt( 'missingarticle-rev', array( 'escape' ), $oldid ); $text = wfMsg( 'missingarticle', $t ); } else { - $text = wfMsg( 'noarticletext', $t ); + $text = wfMsg( 'noarticletext' ); } } diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index 22b14450ff..3f41d1677c 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -107,7 +107,7 @@ CONTROL; $wgOut->setArticleFlag( false ); if ( ! $this->loadRevisionData() ) { - $t = $this->mTitle->getPrefixedText() . " (Diff: {$this->mOldid}, {$this->mNewid})"; + $t = $this->mTitle->getPrefixedText() . ' ' . wfMsgExt( 'missingarticle-diff', array( 'escape' ), $this->mOldid, $this->mNewid ); $wgOut->setPagetitle( wfMsg( 'errorpagetitle' ) ); $wgOut->addWikiMsg( 'missingarticle', "$t" ); wfProfileOut( __METHOD__ ); @@ -326,8 +326,7 @@ CONTROL; # Get article text from the DB # if ( ! $this->loadNewText() ) { - $t = $this->mTitle->getPrefixedText() . " (Diff: {$this->mOldid}, " . - "{$this->mNewid})"; + $t = $this->mTitle->getPrefixedText() . ' ' . wfMsgExt( 'missingarticle-diff', array( 'escape' ), $this->mOldid, $this->mNewid ); $wgOut->setPagetitle( wfMsg( 'errorpagetitle' ) ); $wgOut->addWikiMsg( 'missingarticle', "$t" ); wfProfileOut( __METHOD__ ); diff --git a/languages/messages/MessagesDe.php b/languages/messages/MessagesDe.php index 9d515d1440..6b6a99a4d1 100644 --- a/languages/messages/MessagesDe.php +++ b/languages/messages/MessagesDe.php @@ -487,6 +487,8 @@ Grund der Sperrung: $1', Die Seite ist möglicherweise gelöscht oder verschoben worden. Falls dies nicht der Fall ist, hast du eventuell einen Fehler in der Software gefunden. Bitte melde dies einem [[{{MediaWiki:Grouppage-sysop}}|Administrator]] unter Nennung der URL.', +'missingarticle-rev' => '(Versionsnummer: $1)', +'missingarticle-diff' => '(Unterschied zwischen Versionen: $1, $2)', 'readonly_lag' => 'Die Datenbank wurde automatisch für Schreibzugriffe gesperrt, damit sich die verteilten Datenbankserver (slaves) mit dem Hauptdatenbankserver (master) abgleichen können.', 'internalerror' => 'Interner Fehler', 'internalerror_info' => 'Interner Fehler: $1', diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 72af71e7c3..f2abae1478 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -794,6 +794,8 @@ This is usually caused by following an outdated diff or history link to a page t If this is not the case, you may have found a bug in the software. Please report this to an administrator, making note of the URL.', +'missingarticle-rev' => '(revision#: $1)', +'missingarticle-diff' => '(Diff: $1, $2)', 'readonly_lag' => 'The database has been automatically locked while the slave database servers catch up to the master', 'internalerror' => 'Internal error', 'internalerror_info' => 'Internal error: $1', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 7ef27748f6..ab34437958 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -323,6 +323,8 @@ $wgMessageStructure = array( 'enterlockreason', 'readonlytext', 'missingarticle', + 'missingarticle-rev', + 'missingarticle-diff', 'readonly_lag', 'internalerror', 'internalerror_info', -- 2.20.1