From: Andrey Kutejko Date: Sun, 29 Sep 2013 15:23:39 +0000 (+0300) Subject: translatable user's labels (some of) X-Git-Tag: 0.5~25 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=56d809e1def3f01945dd1704a464a61750934e08;p=ipf.git translatable user's labels (some of) --- diff --git a/ipf/auth/models/User.php b/ipf/auth/models/User.php index 975bf6e..93524c0 100644 --- a/ipf/auth/models/User.php +++ b/ipf/auth/models/User.php @@ -8,37 +8,37 @@ class IPFAuthAdminUserForm extends IPF_Form_Model $this->fields['email']->label = 'E-mail'; - $this->fields['is_active']->label = 'Active'; - $this->fields['is_staff']->label = 'Staff status'; - $this->fields['is_superuser']->label = 'Superuser status'; + $this->fields['is_active']->label = __('Active'); + $this->fields['is_staff']->label = __('Staff status'); + $this->fields['is_superuser']->label = __('Superuser status'); - $this->fields['is_active']->help_text = 'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.'; - $this->fields['is_staff']->help_text = 'Designates whether the user can log into this admin site.'; - $this->fields['is_superuser']->help_text = 'Designates that this user has all permissions without explicitly assigning them.'; + $this->fields['is_active']->help_text = __('Designates whether this user should be treated as active. Unselect this instead of deleting accounts.'); + $this->fields['is_staff']->help_text = __('Designates whether the user can log into this admin site.'); + $this->fields['is_superuser']->help_text = __('Designates that this user has all permissions without explicitly assigning them.'); - $this->fields['username']->help_text = 'Required. 32 characters or less. Alphanumeric characters only (letters, digits and underscores).'; + $this->fields['username']->help_text = __('Required. 32 characters or less. Alphanumeric characters only (letters, digits and underscores).'); if (!$this->model->id) { unset($this->fields['password']); $this->fields['password1'] = new IPF_Form_Field_Varchar(array( - 'label' => 'Password', - 'required' => true, - 'max_length' => 32, - 'widget' => 'IPF_Form_Widget_PasswordInput' + 'label' => __('Password'), + 'required' => true, + 'max_length' => 32, + 'widget' => 'IPF_Form_Widget_PasswordInput' )); $this->fields['password2'] = new IPF_Form_Field_Varchar(array( - 'label' => 'Password (again)', - 'required' => true, - 'max_length' => 32, - 'widget' => 'IPF_Form_Widget_PasswordInput', - 'help_text' => 'Enter the same password as above, for verification.' + 'label' => __('Password (again)'), + 'required' => true, + 'max_length' => 32, + 'widget' => 'IPF_Form_Widget_PasswordInput', + 'help_text' => __('Enter the same password as above, for verification.'), )); $account = array('username', 'password1', 'password2'); } else { - $this->fields['password']->help_text = "Use '[algo]$[salt]$[hexdigest]' or use the change password form."; + $this->fields['password']->help_text = __("Use '[algo]$[salt]$[hexdigest]' or use the change password form."); $account = array('username', 'password'); } @@ -51,8 +51,8 @@ class IPFAuthAdminUserForm extends IPF_Form_Model $this->field_groups = array( array('fields' => $account), - array('fields' => array('email', 'first_name', 'last_name'), 'label' => 'Personal info'), - array('fields' => $permissions, 'label' => 'Permissions'), + array('fields' => array('email', 'first_name', 'last_name'), 'label' => __('Personal info')), + array('fields' => $permissions, 'label' => __('Permissions')), ); /*