From: ikawhero Date: Fri, 12 Jan 2007 06:03:49 +0000 (+0000) Subject: Language string changes X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8c33bc76d061faabd262eb2a40f136b00d7210b1;p=moodle.git Language string changes --- diff --git a/user/profile/field/menu/field.class.php b/user/profile/field/menu/field.class.php index ad5df46670..ca9733b896 100644 --- a/user/profile/field/menu/field.class.php +++ b/user/profile/field/menu/field.class.php @@ -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; } diff --git a/user/profile/field/text/field.class.php b/user/profile/field/text/field.class.php index 96a5cb78ac..8541db43c6 100644 --- a/user/profile/field/text/field.class.php +++ b/user/profile/field/text/field.class.php @@ -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); } diff --git a/user/profile/lib.php b/user/profile/lib.php index 600971f192..03183adf25 100644 --- a/user/profile/lib.php +++ b/user/profile/lib.php @@ -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