Merge "Add new static function LanguageCode::replaceDeprecatedCodes"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 10 Aug 2017 20:04:34 +0000 (20:04 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 10 Aug 2017 20:04:34 +0000 (20:04 +0000)
includes/specials/SpecialPreferences.php
languages/data/Names.php

index 40b50ea..ba5a57e 100644 (file)
@@ -81,7 +81,7 @@ class SpecialPreferences extends SpecialPage {
                        $user = $this->getUser();
                }
 
-               $htmlForm = Preferences::getFormObject( $user, $this->getContext() );
+               $htmlForm = $this->getFormObject( $user, $this->getContext() );
                $htmlForm->setSubmitCallback( [ 'Preferences', 'tryUISubmit' ] );
                $sectionTitles = $htmlForm->getPreferenceSections();
 
@@ -117,6 +117,16 @@ class SpecialPreferences extends SpecialPage {
                $htmlForm->show();
        }
 
+       /**
+        * Get the preferences form to use.
+        * @param User $user The user.
+        * @param IContextSource $context The context.
+        * @return PreferencesForm|HtmlForm
+        */
+       protected function getFormObject( $user, IContextSource $context ) {
+               return Preferences::getFormObject( $user, $context );
+       }
+
        private function showResetForm() {
                if ( !$this->getUser()->isAllowed( 'editmyoptions' ) ) {
                        throw new PermissionsError( 'editmyoptions' );
index 19ff2a4..8970b40 100644 (file)
@@ -314,7 +314,7 @@ class Names {
                'nl' => 'Nederlands', # Dutch
                'nl-informal' => "Nederlands (informeel)\xE2\x80\x8E", # Dutch (informal address ("je"))
                'nn' => 'norsk nynorsk', # Norwegian (Nynorsk)
-               'no' => 'norsk bokmÃ¥l', # Norwegian (falls back to nb).
+               'no' => 'norsk', # Norwegian macro language (falls back to nb).
                'nov' => 'Novial', # Novial
                'nrm' => 'Nouormand', # Norman
                'nso' => 'Sesotho sa Leboa', # Northern Sotho