]> git.mjollnir.org Git - moodle.git/commitdiff
Language string changes
authorikawhero <ikawhero>
Fri, 12 Jan 2007 06:03:49 +0000 (06:03 +0000)
committerikawhero <ikawhero>
Fri, 12 Jan 2007 06:03:49 +0000 (06:03 +0000)
user/profile/field/menu/field.class.php
user/profile/field/text/field.class.php
user/profile/lib.php

index ad5df466708f7ebdfc374a42adec93f3fc739ff1..ca9733b896a02ed6059105f3d278c8cfe9ab0fa8 100644 (file)
@@ -34,7 +34,7 @@ class profile_field_menu extends profile_field_base {
 
     function validate_data($data) {
         if ($data >= count($this->options)) {
-            return get_string('invaliddata');
+            return get_string('profileinvaliddata', 'admin');
         } else {
             return '';
         }
@@ -50,11 +50,11 @@ class profile_field_menu extends profile_field_base {
 
     function edit_field_specific(&$form) {
         /// Param 1 for menu type contains the options
-        $form->addElement('textarea', 'param1', get_string('profilemenuoptions'));
+        $form->addElement('textarea', 'param1', get_string('profilemenuoptions', 'admin'));
         $form->setType('param1', PARAM_MULTILANG);
         
         /// Default data
-        $form->addElement('text', 'defaultdata', get_string('profiledefaultdata'), 'size="30"');
+        $form->addElement('text', 'defaultdata', get_string('profiledefaultdata', 'admin'), 'size="30"');
         $form->setType('defaultdata', PARAM_MULTILANG);
     }
 
@@ -63,13 +63,13 @@ class profile_field_menu extends profile_field_base {
         
         /// Check that we have at least 2 options
         if (($options = explode("\n", $data->param1)) === false) {
-            $err['param1'] = get_string('profilemenunooptions');
+            $err['param1'] = get_string('profilemenunooptions', 'admin');
         } elseif (count($options) < 2) {
-            $err['param1'] = get_string('profilemenuoptions');
+            $err['param1'] = get_string('profilemenutoofewoptions', 'admin');
             
         /// Check the default data exists in the options
         } elseif (!empty($data->defaultdata) and !in_array($data->defaultdata, $options)) {
-            $err['defaultdata'] = get_string('profilemenudefaultnotinoptions');
+            $err['defaultdata'] = get_string('profilemenudefaultnotinoptions', 'admin');
         }
         return $err;        
     }
index 96a5cb78ac0d5124eb804ffe5ae1fa447f7fa0ae..8541db43c62db8433bb7ea34c472b6b652d1bee9 100644 (file)
@@ -20,15 +20,15 @@ class profile_field_text extends profile_field_base {
 
     function edit_field_specific(&$form) {
         /// Default data
-        $form->addElement('text', 'defaultdata', get_string('profiledefaultdata'), 'size="30"');
+        $form->addElement('text', 'defaultdata', get_string('profiledefaultdata', 'admin'), 'size="30"');
         $form->setType('defaultdata', PARAM_MULTILANG);
 
         /// Param 1 for text type is the size of the field
-        $form->addElement('text', 'param1', get_string('profilefieldsize'), 'size="6"');
+        $form->addElement('text', 'param1', get_string('profilefieldsize', 'admin'), 'size="6"');
         $form->setType('param1', PARAM_INT);
         
         /// Param 2 for text type is the maxlength of the field
-        $form->addElement('text', 'param2', get_string('profilefieldmaxlength'), 'size="6"');
+        $form->addElement('text', 'param2', get_string('profilefieldmaxlength', 'admin'), 'size="6"');
         $form->setType('param2', PARAM_INT);
     }
 
index 600971f192ceb433b2f2726cf11963997ab7384f..03183adf2562f96b384fb520831280ed783e68a1 100644 (file)
@@ -138,7 +138,7 @@ class profile_field_base {
      */
     function display_field_lock (&$form) {
         if ($this->_is_locked()) {
-            $form->freeze($this->fieldname);
+            $form->freeze($this->fieldname, false);
         }
     }
 
@@ -178,10 +178,10 @@ class profile_field_base {
      * @param   object   instance of the moodleform class
      */
     function edit_field (&$form) {
-        $form->addElement('header', '_commonsettings', get_string('profilecommonsettings'));
+        $form->addElement('header', '_commonsettings', get_string('profilecommonsettings', 'admin'));
         $this->edit_field_common($form);
         
-        $form->addElement('header', '_specificsettings', get_string('profilespecificsettings'));
+        $form->addElement('header', '_specificsettings', get_string('profilespecificsettings', 'admin'));
         $this->edit_field_specific($form);
     }
 
@@ -194,34 +194,34 @@ class profile_field_base {
 
         $strrequired = get_string('required');
         
-        $form->addElement('text', 'shortname', get_string('profileshortname'), 'maxlength="100" size="30"');
+        $form->addElement('text', 'shortname', get_string('profileshortname', 'admin'), 'maxlength="100" size="30"');
         $form->setType('shortname', PARAM_ALPHANUM);
         $form->addRule('shortname', $strrequired, 'required', null, 'client');
 
-        $form->addElement('text', 'name', get_string('profilename'), 'size="30"');
+        $form->addElement('text', 'name', get_string('profilename', 'admin'), 'size="30"');
         $form->setType('name', PARAM_MULTILANG);
         $form->addRule('name', $strrequired, 'required', null, 'client');
 
-        $form->addElement('htmleditor', 'description', get_string('profiledescription'));
+        $form->addElement('htmleditor', 'description', get_string('profiledescription', 'admin'));
         $form->setType('description', PARAM_MULTILANG);
         $form->setHelpButton('description', array('text', get_string('helptext')));
 
-        $form->addElement('selectyesno', 'required', get_string('profilerequired'));
+        $form->addElement('selectyesno', 'required', get_string('profilerequired', 'admin'));
         $form->setType('required', PARAM_BOOL);
 
-        $form->addElement('selectyesno', 'locked', get_string('profilelocked'));
+        $form->addElement('selectyesno', 'locked', get_string('profilelocked', 'admin'));
         $form->setType('locked', PARAM_BOOL);
 
         unset($choices);
-        $choices[0] = get_string('profilevisiblenone');
-        $choices[1] = get_string('profilevisibleprivate');
-        $choices[2] = get_string('profilevisibleall');
-        $form->addElement('select', 'visible', get_string('profilevisible'), $choices);
+        $choices[0] = get_string('profilevisiblenone', 'admin');
+        $choices[1] = get_string('profilevisibleprivate', 'admin');
+        $choices[2] = get_string('profilevisibleall', 'admin');
+        $form->addElement('select', 'visible', get_string('profilevisible', 'admin'), $choices);
         $form->setType('visible', PARAM_INT);
 
         unset($choices);
         $choices = profile_list_categories();
-        $form->addElement('select', 'categoryid', get_string('profilecategory'), $choices);
+        $form->addElement('select', 'categoryid', get_string('profilecategory', 'admin'), $choices);
         $form->setType('categoryid', PARAM_INT);
     }
 
@@ -265,7 +265,7 @@ class profile_field_base {
         /// Check the shortname is unique
         if (($field = get_record('user_info_field', 'shortname', $data->shortname)) and ($field->id <> $data->id)) {
         //if (record_exists_select('user_info_field', 'shortname='.$data->shortname.' AND id<>'.$data->id)) {
-            $err['shortname'] = get_string('profileshortnamenotunique');
+            $err['shortname'] = get_string('profileshortnamenotunique', 'admin');
         }
 
         /// No further checks necessary as the form class will take care of it