From 5951d05e2bb1e52f927fe9a4ae66b6dee06112b7 Mon Sep 17 00:00:00 2001 From: robin Date: Sat, 14 Apr 2012 01:57:12 +0200 Subject: [PATCH] Edit notices can now be translated. Change editnotice from content language to user language. I see no need to disable possible translations (for multilingual wikis). As there is no default content, it'll always default to the editnotice in the content language anyway. Slashes in page titles are converted to hyphens, so there are no collisions. Patch set 3, 4: Rebase against master Patch set 5: wrap commit msg Change-Id: I3d7ccec0bf407324821c3c853a60c27db5e5c519 --- RELEASE-NOTES-1.20 | 1 + includes/EditPage.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20 index ebf30ca198..8e74a8c447 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -44,6 +44,7 @@ production. $wgDebugLogFile['memcached'] to some filepath. * (bug 35685) api.php URL and other entry point URLs are now listed on Special:Version +* Edit notices can now be translated. === Bug fixes in 1.20 === * (bug 30245) Use the correct way to construct a log page title. diff --git a/includes/EditPage.php b/includes/EditPage.php index 92bca9ef58..817944f3b8 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1918,7 +1918,7 @@ class EditPage { # Optional notices on a per-namespace and per-page basis $editnotice_ns = 'editnotice-' . $this->mTitle->getNamespace(); - $editnotice_ns_message = wfMessage( $editnotice_ns )->inContentLanguage(); + $editnotice_ns_message = wfMessage( $editnotice_ns ); if ( $editnotice_ns_message->exists() ) { $wgOut->addWikiText( $editnotice_ns_message->plain() ); } @@ -1927,7 +1927,7 @@ class EditPage { $editnotice_base = $editnotice_ns; while ( count( $parts ) > 0 ) { $editnotice_base .= '-' . array_shift( $parts ); - $editnotice_base_msg = wfMessage( $editnotice_base )->inContentLanguage(); + $editnotice_base_msg = wfMessage( $editnotice_base ); if ( $editnotice_base_msg->exists() ) { $wgOut->addWikiText( $editnotice_base_msg->plain() ); } @@ -1935,7 +1935,7 @@ class EditPage { } else { # Even if there are no subpages in namespace, we still don't want / in MW ns. $editnoticeText = $editnotice_ns . '-' . str_replace( '/', '-', $this->mTitle->getDBkey() ); - $editnoticeMsg = wfMessage( $editnoticeText )->inContentLanguage(); + $editnoticeMsg = wfMessage( $editnoticeText ); if ( $editnoticeMsg->exists() ) { $wgOut->addWikiText( $editnoticeMsg->plain() ); } -- 2.20.1