Do not localize content model name inside of english exception messages
authorTpt <thomaspt@hotmail.fr>
Sat, 27 Aug 2016 09:03:18 +0000 (11:03 +0200)
committerTpt <thomaspt@hotmail.fr>
Sat, 27 Aug 2016 09:03:18 +0000 (11:03 +0200)
Bug: T143889
Change-Id: I2d8004123ca6ae94219bd7880beb1c274ce13417

includes/EditPage.php

index 0da7e6e..f954529 100644 (file)
@@ -2494,8 +2494,7 @@ class EditPage {
                }
 
                if ( !$this->isSupportedContentModel( $content->getModel() ) ) {
-                       throw new MWException( 'This content model is not supported: '
-                               . ContentHandler::getLocalizedName( $content->getModel() ) );
+                       throw new MWException( 'This content model is not supported: ' . $content->getModel() );
                }
 
                return $content->serialize( $this->contentFormat );
@@ -2526,8 +2525,7 @@ class EditPage {
                        $this->contentModel, $this->contentFormat );
 
                if ( !$this->isSupportedContentModel( $content->getModel() ) ) {
-                       throw new MWException( 'This content model is not supported: '
-                               . ContentHandler::getLocalizedName( $content->getModel() ) );
+                       throw new MWException( 'This content model is not supported: ' . $content->getModel() );
                }
 
                return $content;