Fix issues identified by SpaceBeforeSingleLineComment sniff
[lhc/web/wiklou.git] / includes / content / ContentHandler.php
index 468c7e9..76f2a7b 100644 (file)
@@ -355,16 +355,20 @@ abstract class ContentHandler {
         *
         * @param string $name The content model ID, as given by a CONTENT_MODEL_XXX
         *    constant or returned by Revision::getContentModel().
+        * @param Language|null $lang The language to parse the message in (since 1.26)
         *
         * @throws MWException If the model ID isn't known.
         * @return string The content model's localized name.
         */
-       public static function getLocalizedName( $name ) {
+       public static function getLocalizedName( $name, Language $lang = null ) {
                // Messages: content-model-wikitext, content-model-text,
                // content-model-javascript, content-model-css
                $key = "content-model-$name";
 
                $msg = wfMessage( $key );
+               if ( $lang ) {
+                       $msg->inLanguage( $lang );
+               }
 
                return $msg->exists() ? $msg->plain() : $name;
        }
@@ -626,7 +630,7 @@ abstract class ContentHandler {
         * @return DifferenceEngine
         */
        public function createDifferenceEngine( IContextSource $context, $old = 0, $new = 0,
-               $rcid = 0, //FIXME: Deprecated, no longer used
+               $rcid = 0, // FIXME: Deprecated, no longer used
                $refreshCache = false, $unhide = false ) {
 
                // hook: get difference engine