[icinga-checkins] icinga.org: icingaweb2/feature/redesign-7144: Remove language selection from the general configuration

git at icinga.org git at icinga.org
Thu Nov 13 21:22:39 CET 2014


Module: icingaweb2
Branch: feature/redesign-7144
Commit: 7ff4890ab7c5f9095cb8b7855fb98a6735f5d58f
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=7ff4890ab7c5f9095cb8b7855fb98a6735f5d58f

Author: Johannes Meyer <johannes.meyer at netways.de>
Date:   Wed Jun 25 13:21:05 2014 +0200

Remove language selection from the general configuration

refs #6073

---

 application/forms/Config/GeneralForm.php |   32 ------------------------------
 1 file changed, 32 deletions(-)

diff --git a/application/forms/Config/GeneralForm.php b/application/forms/Config/GeneralForm.php
index 1ff21bf..6612c5e 100644
--- a/application/forms/Config/GeneralForm.php
+++ b/application/forms/Config/GeneralForm.php
@@ -107,36 +107,6 @@ class GeneralForm extends Form
     }
 
     /**
-     * Add a select field for setting the default language
-     *
-     * Possible values are determined by Translator::getAvailableLocaleCodes.
-     *
-     * @param   Zend_Config     $cfg    The "global" section of the config.ini
-     */
-    private function addLanguageSelection(Zend_Config $cfg)
-    {
-        $languages = array();
-        foreach (Translator::getAvailableLocaleCodes() as $language) {
-            $languages[$language] = $language;
-        }
-        $languages[Translator::DEFAULT_LOCALE] = Translator::DEFAULT_LOCALE;
-
-        $this->addElement(
-            'select',
-            'language',
-            array(
-                'label'         => t('Default Language'),
-                'required'      => true,
-                'multiOptions'  => $languages,
-                'helptext'      => t(
-                    'Select the language to use by default. Can be overwritten by a user in his preferences.'
-                ),
-                'value'         => $cfg->get('language', Translator::DEFAULT_LOCALE)
-            )
-        );
-    }
-
-    /**
      * Add a select field for setting the default timezone.
      *
      * Possible values are determined by DateTimeZone::listIdentifiers
@@ -259,7 +229,6 @@ class GeneralForm extends Form
             $preferences = new Zend_Config(array());
         }
         $this->setName('form_config_general');
-        $this->addLanguageSelection($global);
         $this->addTimezoneSelection($global);
         $this->addModuleSettings($global);
         $this->addUserPreferencesDialog($preferences);
@@ -284,7 +253,6 @@ class GeneralForm extends Form
 
         $values = $this->getValues();
         $cfg = clone $config;
-        $cfg->global->language     = $values['language'];
         $cfg->global->timezone     = $values['timezone'];
         $cfg->global->modulePath   = $values['module_path'];
         $cfg->preferences->type = $values['preferences_type'];



More information about the icinga-checkins mailing list