]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/ExtendedProfile/actions/profiledetailsettings.php
initialize fave, sub, and membership URIs
[quix0rs-gnu-social.git] / plugins / ExtendedProfile / actions / profiledetailsettings.php
index 23a6ce5d6577f5eaf9da23b07a244a2ff7014997..1cf70034735579c9cc6a5ee6fe965f05f4aac18f 100644 (file)
@@ -23,9 +23,9 @@ if (!defined('STATUSNET')) {
 
 class ProfileDetailSettingsAction extends ProfileSettingsAction
 {
-
     function title()
     {
+        // TRANS: Title for extended profile settings.
         return _m('Extended profile settings');
     }
 
@@ -37,7 +37,7 @@ class ProfileDetailSettingsAction extends ProfileSettingsAction
     function getInstructions()
     {
         // TRANS: Usage instructions for profile settings.
-        return _('You can update your personal profile info here '.
+        return _m('You can update your personal profile info here '.
                  'so people know more about you.');
     }
 
@@ -59,8 +59,8 @@ class ProfileDetailSettingsAction extends ProfileSettingsAction
         $token = $this->trimmed('token');
         if (!$token || $token != common_session_token()) {
             $this->showForm(
-                _m(
-                    'There was a problem with your session token. '
+                // TRANS: Client error displayed when the session token does not match or is not given.
+                _m('There was a problem with your session token. '
                     .   'Try again, please.'
                   )
             );
@@ -70,7 +70,7 @@ class ProfileDetailSettingsAction extends ProfileSettingsAction
         if ($this->arg('save')) {
             $this->saveDetails();
         } else {
-            // TRANS: Message given submitting a form with an unknown action
+            // TRANS: Message given submitting a form with an unknown action.
             $this->showForm(_m('Unexpected form submission.'));
         }
     }
@@ -133,7 +133,8 @@ class ProfileDetailSettingsAction extends ProfileSettingsAction
             return;
         }
 
-        $this->showForm(_('Details saved.'), true);
+        // TRANS: Success message after saving extended profile details.
+        $this->showForm(_m('Details saved.'), true);
 
     }
 
@@ -142,6 +143,8 @@ class ProfileDetailSettingsAction extends ProfileSettingsAction
         if (empty($datestr)) {
             if ($required) {
                 $msg = sprintf(
+                    // TRANS: Exception thrown when no date was entered in a required date field.
+                    // TRANS: %s is the field name.
                     _m('You must supply a date for "%s".'),
                     $fieldname
                 );
@@ -152,7 +155,9 @@ class ProfileDetailSettingsAction extends ProfileSettingsAction
             if ($ts === false) {
                 throw new Exception(
                     sprintf(
-                        _m('Invalid date entered for "%s": %s'),
+                        // TRANS: Exception thrown on incorrect data input.
+                        // TRANS: %1$s is a field name, %2$s is the incorrect input.
+                        _m('Invalid date entered for "%1$s": %2$s.'),
                         $fieldname,
                         $ts
                     )
@@ -266,7 +271,9 @@ class ProfileDetailSettingsAction extends ProfileSettingsAction
                 $site['value'],
                 array('allowed_schemes' => array('http', 'https')))
             ) {
-                throw new Exception(sprintf(_m('Invalid URL: %s'), $site['value']));
+                // TRANS: Exception thrown when entering an invalid URL.
+                // TRANS: %s is the invalid URL.
+                throw new Exception(sprintf(_m('Invalid URL: %s.'), $site['value']));
             }
 
             if (!empty($site['value'])) {
@@ -514,6 +521,7 @@ class ProfileDetailSettingsAction extends ProfileSettingsAction
             $result = $detail->insert();
             if (empty($result)) {
                 common_log_db_error($detail, 'INSERT', __FILE__);
+                // TRANS: Server error displayed when a field could not be saved in the database.
                 $this->serverError(_m('Could not save profile details.'));
             }
         } else {
@@ -526,6 +534,7 @@ class ProfileDetailSettingsAction extends ProfileSettingsAction
             $result = $detail->update($orig);
             if (empty($result)) {
                 common_log_db_error($detail, 'UPDATE', __FILE__);
+                // TRANS: Server error displayed when a field could not be saved in the database.
                 $this->serverError(_m('Could not save profile details.'));
             }
         }
@@ -613,7 +622,7 @@ class ProfileDetailSettingsAction extends ProfileSettingsAction
             if ($result === false) {
                 common_log_db_error($profile, 'UPDATE', __FILE__);
                 // TRANS: Server error thrown when user profile settings could not be saved.
-                $this->serverError(_('Could not save profile.'));
+                $this->serverError(_m('Could not save profile.'));
                 return;
             }
 
@@ -622,7 +631,7 @@ class ProfileDetailSettingsAction extends ProfileSettingsAction
 
             if (!$result) {
                 // TRANS: Server error thrown when user profile settings tags could not be saved.
-                $this->serverError(_('Could not save tags.'));
+                $this->serverError(_m('Could not save tags.'));
                 return;
             }