]> git.andy128k.dev Git - ipf.git/commitdiff
translatable user's labels (some of)
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 29 Sep 2013 15:23:39 +0000 (18:23 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 29 Sep 2013 15:23:39 +0000 (18:23 +0300)
ipf/auth/models/User.php

index 975bf6ec0cf21931236cb2e0bf2fe3cd84de82fe..93524c0b720284b90a8f23636fc0390d0509e576 100644 (file)
@@ -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 <a href=\"password/\">change password form</a>."
+            $this->fields['password']->help_text = __("Use '[algo]$[salt]$[hexdigest]' or use the <a href=\"password/\">change password form</a>.")
 
             $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')),
         );
 
         /*