* Move hardcoded text "Diff:..." to new message 'missingarticle-diff'
authorRaimond Spekking <raymond@users.mediawiki.org>
Tue, 22 Apr 2008 06:10:01 +0000 (06:10 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Tue, 22 Apr 2008 06:10:01 +0000 (06:10 +0000)
* Move hardcoded text "oldid=..." to new message 'missingarticle-rev'
* Remove variable $t from message 'noarticletext' as it has no parameter $1

includes/Article.php
includes/DifferenceEngine.php
languages/messages/MessagesDe.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index bc4e91f..51d5a82 100644 (file)
@@ -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' );
                                }
                        }
 
index 22b1445..3f41d16 100644 (file)
@@ -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', "<nowiki>$t</nowiki>" );
                        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', "<nowiki>$t</nowiki>" );
                        wfProfileOut( __METHOD__ );
index 9d515d1..6b6a99a 100644 (file)
@@ -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',
index 72af71e..f2abae1 100644 (file)
@@ -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',
index 7ef2774..ab34437 100644 (file)
@@ -323,6 +323,8 @@ $wgMessageStructure = array(
                'enterlockreason',
                'readonlytext',
                'missingarticle',
+               'missingarticle-rev',
+               'missingarticle-diff',
                'readonly_lag',
                'internalerror',
                'internalerror_info',