Edit notices can now be translated.
authorrobin <robinp.1273@gmail.com>
Fri, 13 Apr 2012 23:57:12 +0000 (01:57 +0200)
committerBrion Vibber <brion@pobox.com>
Thu, 26 Apr 2012 22:59:18 +0000 (15:59 -0700)
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
includes/EditPage.php

index ebf30ca..8e74a8c 100644 (file)
@@ -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.
index 92bca9e..817944f 100644 (file)
@@ -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() );
                        }