]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/designform.php
correct number of notices on a page
[quix0rs-gnu-social.git] / lib / designform.php
index 89e7f6ce8bab5feafb82a4c7a1f172a9a01ec5df..7702b873fe277add016358807442360d69b31c6e 100644 (file)
@@ -127,19 +127,24 @@ class DesignForm extends Form
         $this->out->elementEnd('fieldset');
 
         $this->out->elementStart('fieldset', array('id' => 'settings_design_color'));
+        // TRANS: Fieldset legend on profile design page to change profile page colours.
         $this->out->element('legend', null, _('Change colours'));
         $this->colourData();
         $this->out->elementEnd('fieldset');
 
         $this->out->elementStart('fieldset');
 
+        // TRANS: Button text on profile design page to immediately reset all colour settings to default.
         $this->out->submit('defaults', _('Use defaults'), 'submit form_action-default',
+                           // TRANS: Title for button on profile design page to reset all colour settings to default.
                            'defaults', _('Restore default designs'));
 
         $this->out->element('input', array('id' => 'settings_design_reset',
                                            'type' => 'reset',
-                                           'value' => 'Reset',
+                                           // TRANS: Button text on profile design page to reset all colour settings to default without saving.
+                                           'value' => _m('BUTTON', 'Reset'),
                                            'class' => 'submit form_action-primary',
+                                           // TRANS: Title for button on profile design page to reset all colour settings to default without saving.
                                            'title' => _('Reset back to default')));
     }
 
@@ -148,10 +153,13 @@ class DesignForm extends Form
         $this->out->elementStart('ul', 'form_data');
         $this->out->elementStart('li');
         $this->out->element('label', array('for' => 'design_background-image_file'),
+                            // TRANS: Label in form on profile design page.
+                            // TRANS: Field contains file name on user's computer that could be that user's custom profile background image.
                             _('Upload file'));
         $this->out->element('input', array('name' => 'design_background-image_file',
                                            'type' => 'file',
                                            'id' => 'design_background-image_file'));
+        // TRANS: Instructions for form on profile design page.
         $this->out->element('p', 'form_guide', _('You can upload your personal ' .
                                                  'background image. The maximum file size is 2Mb.'));
         $this->out->element('input', array('name' => 'MAX_FILE_SIZE',
@@ -160,13 +168,13 @@ class DesignForm extends Form
                                            'value' => ImageFile::maxFileSizeInt()));
         $this->out->elementEnd('li');
 
-        if (!empty($design->backgroundimage)) {
+        if (!empty($this->design->backgroundimage)) {
 
             $this->out->elementStart('li', array('id' =>
                                                  'design_background-image_onoff'));
 
             $this->out->element('img', array('src' =>
-                                             Design::url($design->backgroundimage)));
+                                             Design::url($this->design->backgroundimage)));
 
             $attrs = array('name' => 'design_background-image_onoff',
                            'type' => 'radio',
@@ -174,7 +182,7 @@ class DesignForm extends Form
                            'class' => 'radio',
                            'value' => 'on');
 
-            if ($design->disposition & BACKGROUND_ON) {
+            if ($this->design->disposition & BACKGROUND_ON) {
                 $attrs['checked'] = 'checked';
             }
 
@@ -182,7 +190,8 @@ class DesignForm extends Form
 
             $this->out->element('label', array('for' => 'design_background-image_on',
                                                'class' => 'radio'),
-                                _('On'));
+                                // TRANS: Radio button on profile design page that will enable use of the uploaded profile image.
+                                _m('RADIO', 'On'));
 
             $attrs = array('name' => 'design_background-image_onoff',
                            'type' => 'radio',
@@ -190,7 +199,7 @@ class DesignForm extends Form
                            'class' => 'radio',
                            'value' => 'off');
 
-            if ($design->disposition & BACKGROUND_OFF) {
+            if ($this->design->disposition & BACKGROUND_OFF) {
                 $attrs['checked'] = 'checked';
             }
 
@@ -198,14 +207,18 @@ class DesignForm extends Form
 
             $this->out->element('label', array('for' => 'design_background-image_off',
                                                'class' => 'radio'),
-                                _('Off'));
+                                // TRANS: Radio button on profile design page that will disable use of the uploaded profile image.
+                                _m('RADIO', 'Off'));
+            // TRANS: Form guide for a set of radio buttons on the profile design page that will enable or disable
+            // TRANS: use of the uploaded profile image.
             $this->out->element('p', 'form_guide', _('Turn background image on or off.'));
             $this->out->elementEnd('li');
 
             $this->out->elementStart('li');
             $this->out->checkbox('design_background-image_repeat',
+                                 // TRANS: Checkbox label on profile design page that will cause the profile image to be tiled.
                                  _('Tile background image'),
-                                 ($design->disposition & BACKGROUND_TILE) ? true : false);
+                                 ($this->design->disposition & BACKGROUND_TILE) ? true : false);
             $this->out->elementEnd('li');
         }
 
@@ -218,9 +231,10 @@ class DesignForm extends Form
 
         try {
 
-            $bgcolor = new WebColor($design->backgroundcolor);
+            $bgcolor = new WebColor($this->design->backgroundcolor);
 
             $this->out->elementStart('li');
+            // TRANS: Label on profile design page for setting a profile page background colour.
             $this->out->element('label', array('for' => 'swatch-1'), _('Background'));
             $this->out->element('input', array('name' => 'design_background',
                                                'type' => 'text',
@@ -231,9 +245,10 @@ class DesignForm extends Form
                                                'value' => ''));
             $this->out->elementEnd('li');
 
-            $ccolor = new WebColor($design->contentcolor);
+            $ccolor = new WebColor($this->design->contentcolor);
 
             $this->out->elementStart('li');
+            // TRANS: Label on profile design page for setting a profile page content colour.
             $this->out->element('label', array('for' => 'swatch-2'), _('Content'));
             $this->out->element('input', array('name' => 'design_content',
                                                'type' => 'text',
@@ -244,9 +259,10 @@ class DesignForm extends Form
                                                'value' => ''));
             $this->out->elementEnd('li');
 
-            $sbcolor = new WebColor($design->sidebarcolor);
+            $sbcolor = new WebColor($this->design->sidebarcolor);
 
             $this->out->elementStart('li');
+            // TRANS: Label on profile design page for setting a profile page sidebar colour.
             $this->out->element('label', array('for' => 'swatch-3'), _('Sidebar'));
             $this->out->element('input', array('name' => 'design_sidebar',
                                                'type' => 'text',
@@ -257,9 +273,10 @@ class DesignForm extends Form
                                                'value' => ''));
             $this->out->elementEnd('li');
 
-            $tcolor = new WebColor($design->textcolor);
+            $tcolor = new WebColor($this->design->textcolor);
 
             $this->out->elementStart('li');
+            // TRANS: Label on profile design page for setting a profile page text colour.
             $this->out->element('label', array('for' => 'swatch-4'), _('Text'));
             $this->out->element('input', array('name' => 'design_text',
                                                'type' => 'text',
@@ -270,9 +287,10 @@ class DesignForm extends Form
                                                'value' => ''));
             $this->out->elementEnd('li');
 
-            $lcolor = new WebColor($design->linkcolor);
+            $lcolor = new WebColor($this->design->linkcolor);
 
             $this->out->elementStart('li');
+            // TRANS: Label on profile design page for setting a profile page links colour.
             $this->out->element('label', array('for' => 'swatch-5'), _('Links'));
             $this->out->element('input', array('name' => 'design_links',
                                                'type' => 'text',
@@ -284,7 +302,7 @@ class DesignForm extends Form
             $this->out->elementEnd('li');
 
         } catch (WebColorException $e) {
-            common_log(LOG_ERR, 'Bad color values in design ID: ' .$design->id);
+            common_log(LOG_ERR, 'Bad color values in design ID: ' .$this->design->id);
         }
 
         $this->out->elementEnd('ul');
@@ -298,7 +316,9 @@ class DesignForm extends Form
 
     function formActions()
     {
-        $this->out->submit('save', _('Save'), 'submit form_action-secondary',
+        // TRANS: Button text on profile design page to save settings.
+        $this->out->submit('save', _m('BUTTON','Save'), 'submit form_action-secondary',
+                           // TRANS: Title for button on profile design page to save settings.
                            'save', _('Save design'));
     }
 }