]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/smssettings.php
Merge branch '0.9.x' into 1.0.x
[quix0rs-gnu-social.git] / actions / smssettings.php
index 217db278883d1be6746009428d0d85c20b7ceaeb..cdf99a56d9da6a2bfd728ceabbe85eeeb0c32bad 100644 (file)
@@ -50,7 +50,6 @@ class SmssettingsAction extends SettingsAction
      *
      * @return string Title of the page
      */
-
     function title()
     {
         // TRANS: Title for SMS settings.
@@ -62,7 +61,6 @@ class SmssettingsAction extends SettingsAction
      *
      * @return instructions for use
      */
-
     function getInstructions()
     {
         // XXX: For consistency of parameters in messages, this should be a
@@ -86,7 +84,6 @@ class SmssettingsAction extends SettingsAction
      *
      * @return void
      */
-
     function showContent()
     {
         if (!common_config('sms', 'enabled')) {
@@ -152,7 +149,7 @@ class SmssettingsAction extends SettingsAction
                              ($this->arg('sms')) ? $this->arg('sms') : null,
                              // TRANS: SMS phone number input field instructions in SMS settings form.
                              _('Phone number, no punctuation or spaces, '.
-                               'with area code'));
+                               'with area code.'));
                 $this->elementEnd('li');
                 $this->elementEnd('ul');
                 $this->carrierSelect();
@@ -217,7 +214,6 @@ class SmssettingsAction extends SettingsAction
      *
      * @todo very similar to EmailsettingsAction::getConfirmation(); refactor?
      */
-
     function getConfirmation()
     {
         $user = common_current_user();
@@ -244,7 +240,6 @@ class SmssettingsAction extends SettingsAction
      *
      * @return void
      */
-
     function handlePost()
     {
         // CSRF protection
@@ -283,7 +278,6 @@ class SmssettingsAction extends SettingsAction
      *
      * @return void
      */
-
     function savePreferences()
     {
         $smsnotify = $this->boolean('smsnotify');
@@ -303,7 +297,7 @@ class SmssettingsAction extends SettingsAction
         if ($result === false) {
             common_log_db_error($user, 'UPDATE', __FILE__);
             // TRANS: Server error thrown on database error updating SMS preferences.
-            $this->serverError(_('Couldn\'t update user.'));
+            $this->serverError(_('Could not update user.'));
             return;
         }
 
@@ -321,7 +315,6 @@ class SmssettingsAction extends SettingsAction
      *
      * @return void
      */
-
     function addAddress()
     {
         $user = common_current_user();
@@ -368,7 +361,7 @@ class SmssettingsAction extends SettingsAction
         if ($result === false) {
             common_log_db_error($confirm, 'INSERT', __FILE__);
             // TRANS: Server error thrown on database error adding SMS confirmation code.
-            $this->serverError(_('Couldn\'t insert confirmation code.'));
+            $this->serverError(_('Could not insert confirmation code.'));
             return;
         }
 
@@ -393,7 +386,6 @@ class SmssettingsAction extends SettingsAction
      *
      * @return void
      */
-
     function cancelConfirmation()
     {
         $sms     = $this->trimmed('sms');
@@ -417,7 +409,7 @@ class SmssettingsAction extends SettingsAction
         if (!$result) {
             common_log_db_error($confirm, 'DELETE', __FILE__);
             // TRANS: Server error thrown on database error canceling SMS phone number confirmation.
-            $this->serverError(_('Couldn\'t delete email confirmation.'));
+            $this->serverError(_('Could not delete email confirmation.'));
             return;
         }
 
@@ -430,7 +422,6 @@ class SmssettingsAction extends SettingsAction
      *
      * @return void
      */
-
     function removeAddress()
     {
         $user = common_current_user();
@@ -459,7 +450,7 @@ class SmssettingsAction extends SettingsAction
         if (!$result) {
             common_log_db_error($user, 'UPDATE', __FILE__);
             // TRANS: Server error thrown on database error removing a registered SMS phone number.
-            $this->serverError(_('Couldn\'t update user.'));
+            $this->serverError(_('Could not update user.'));
             return;
         }
         $user->query('COMMIT');
@@ -477,7 +468,6 @@ class SmssettingsAction extends SettingsAction
      *
      * @return boolean does the number exist
      */
-
     function smsExists($sms)
     {
         $user = common_current_user();
@@ -496,7 +486,6 @@ class SmssettingsAction extends SettingsAction
      *
      * @return void
      */
-
     function carrierSelect()
     {
         $carrier = new Sms_carrier();
@@ -536,14 +525,13 @@ class SmssettingsAction extends SettingsAction
      *
      * @return void
      */
-
     function confirmCode()
     {
         $code = $this->trimmed('code');
 
         if (!$code) {
             // TRANS: Message given saving SMS phone number confirmation code without having provided one.
-            $this->showForm(_('No code entered'));
+            $this->showForm(_('No code entered.'));
             return;
         }
 
@@ -557,12 +545,12 @@ class SmssettingsAction extends SettingsAction
      *
      * @return void
      */
-
     function removeIncoming()
     {
         $user = common_current_user();
 
         if (!$user->incomingemail) {
+            // TRANS: Form validation error displayed when trying to remove an incoming e-mail address while no address has been set.
             $this->showForm(_('No incoming email address.'));
             return;
         }
@@ -573,9 +561,11 @@ class SmssettingsAction extends SettingsAction
 
         if (!$user->updateKeys($orig)) {
             common_log_db_error($user, 'UPDATE', __FILE__);
-            $this->serverError(_("Couldn't update user record."));
+            // TRANS: Server error displayed when the user could not be updated in SMS settings.
+            $this->serverError(_('Could not update user record.'));
         }
 
+        // TRANS: Confirmation text after updating SMS settings.
         $this->showForm(_('Incoming email address removed.'), true);
     }
 
@@ -586,7 +576,6 @@ class SmssettingsAction extends SettingsAction
      *
      * @see Emailsettings::newIncoming
      */
-
     function newIncoming()
     {
         $user = common_current_user();
@@ -597,9 +586,11 @@ class SmssettingsAction extends SettingsAction
 
         if (!$user->updateKeys($orig)) {
             common_log_db_error($user, 'UPDATE', __FILE__);
-            $this->serverError(_("Couldn't update user record."));
+            // TRANS: Server error displayed when the user could not be updated in SMS settings.
+            $this->serverError(_('Could not update user record.'));
         }
 
+        // TRANS: Confirmation text after updating SMS settings.
         $this->showForm(_('New incoming email address added.'), true);
     }
 }