From 3de4db3525d88e0a34e91c20207a47e27071f084 Mon Sep 17 00:00:00 2001
From: Michael <Chefkeks@users.noreply.github.com>
Date: Tue, 14 Jun 2016 08:54:22 +0200
Subject: [PATCH] Update all `Try again!` phrases to `Please try again` :)

---
 include/ajax.orgs.php    |  8 ++++----
 include/ajax.tasks.php   |  2 +-
 include/ajax.tickets.php |  2 +-
 include/ajax.users.php   |  6 +++---
 include/class.canned.php |  2 +-
 include/class.page.php   |  2 +-
 login.php                |  4 ++--
 open.php                 |  2 +-
 scp/banlist.php          |  2 +-
 scp/emailtest.php        |  4 ++--
 scp/tickets.php          | 14 +++++++-------
 scp/users.php            |  4 ++--
 12 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/include/ajax.orgs.php b/include/ajax.orgs.php
index f6dde6277..ccdd3597c 100644
--- a/include/ajax.orgs.php
+++ b/include/ajax.orgs.php
@@ -123,7 +123,7 @@ class OrgsAjaxAPI extends AjaxController {
             if ($org->delete())
                  Http::response(204, 'Organization deleted successfully');
             else
-                $info['error'] = sprintf('%s - %s', __('Unable to delete organization'), __('Try again!'));
+                $info['error'] = sprintf('%s - %s', __('Unable to delete organization'), __('Please try again!'));
         }
 
         include(STAFFINC_DIR . 'templates/org-delete.tmpl.php');
@@ -158,13 +158,13 @@ class OrgsAjaxAPI extends AjaxController {
                 $form = UserForm::getUserForm()->getForm($_POST);
                 $can_create = $thisstaff->hasPerm(User::PERM_CREATE);
                 if (!($user = User::fromForm($form, $can_create)))
-                    $info['error'] = sprintf('%s - %s', __('Error adding user'), __('Try again!'));
+                    $info['error'] = sprintf('%s - %s', __('Error adding user'), __('Please try again!'));
             }
 
             if (!$info['error'] && $user && $user->setOrganization($org))
                 Http::response(201, $user->to_json());
             elseif (!$info['error'])
-                $info['error'] = sprintf('%s - %s', __('Unable to add user to the organization'), __('Try again!'));
+                $info['error'] = sprintf('%s - %s', __('Unable to add user to the organization'), __('Please try again!'));
 
         } elseif ($remote && $userId) {
             list($bk, $userId) = explode(':', $userId, 2);
@@ -232,7 +232,7 @@ class OrgsAjaxAPI extends AjaxController {
             if (($org = Organization::fromForm($form)))
                 Http::response(201, $org->to_json());
 
-            $info = array('error' =>sprintf('%s - %s', __('Error adding organization'), __('Try again!')));
+            $info = array('error' =>sprintf('%s - %s', __('Error adding organization'), __('Please try again!')));
         }
 
         $info['title'] = __('Add New Organization');
diff --git a/include/ajax.tasks.php b/include/ajax.tasks.php
index bc5e7e47d..b2361b2d6 100644
--- a/include/ajax.tasks.php
+++ b/include/ajax.tasks.php
@@ -90,7 +90,7 @@ class TasksAjaxAPI extends AjaxController {
                     Http::response(201, $task->getId());
             }
 
-            $info['error'] = sprintf('%s - %s', __('Error adding task'), __('Try again!'));
+            $info['error'] = sprintf('%s - %s', __('Error adding task'), __('Please try again!'));
         }
 
         include STAFFINC_DIR . 'templates/task.tmpl.php';
diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php
index eaf42ab8a..deed3e755 100644
--- a/include/ajax.tickets.php
+++ b/include/ajax.tickets.php
@@ -1222,7 +1222,7 @@ class TicketsAjaxAPI extends AjaxController {
                     Http::response(201, $task->getId());
             }
 
-            $info['error'] = sprintf('%s - %s', __('Error adding task'), __('Try again!'));
+            $info['error'] = sprintf('%s - %s', __('Error adding task'), __('Please try again!'));
         }
 
         $info['action'] = sprintf('#tickets/%d/add-task', $ticket->getId());
diff --git a/include/ajax.users.php b/include/ajax.users.php
index 8b57e27d1..f58680fc1 100644
--- a/include/ajax.users.php
+++ b/include/ajax.users.php
@@ -193,7 +193,7 @@ class UsersAjaxAPI extends AjaxController {
             if ($errors['err'])
                 $info['error'] = $errors['err'];
             else
-                $info['error'] = sprintf('%s - %s', __('Unable to register user'), __('Try again!'));
+                $info['error'] = sprintf('%s - %s', __('Unable to register user'), __('Please try again!'));
         }
 
         include(STAFFINC_DIR . 'templates/user-register.tmpl.php');
@@ -258,7 +258,7 @@ class UsersAjaxAPI extends AjaxController {
             if (!$info['error'] && $user->delete())
                  Http::response(204, 'User deleted successfully');
             elseif (!$info['error'])
-                $info['error'] = sprintf('%s - %s', __('Unable to delete user'), __('Try again!'));
+                $info['error'] = sprintf('%s - %s', __('Unable to delete user'), __('Please try again!'));
         }
 
         include(STAFFINC_DIR . 'templates/user-delete.tmpl.php');
@@ -295,7 +295,7 @@ class UsersAjaxAPI extends AjaxController {
             if (($user = User::fromForm($form)))
                 Http::response(201, $user->to_json());
 
-            $info['error'] = sprintf('%s - %s', __('Error adding user'), __('Try again!'));
+            $info['error'] = sprintf('%s - %s', __('Error adding user'), __('Please try again!'));
         }
 
         return self::_lookupform($form, $info);
diff --git a/include/class.canned.php b/include/class.canned.php
index 1bd329edd..c02320991 100644
--- a/include/class.canned.php
+++ b/include/class.canned.php
@@ -260,7 +260,7 @@ extends VerySimpleModel {
 
         $id = isset($this->canned_id) ? $this->canned_id : null;
         if ($id && $id != $vars['id'])
-            $errors['err']=sprintf('%s - %s', __('Internal error occurred'), __('Try again!'));
+            $errors['err']=sprintf('%s - %s', __('Internal error occurred'), __('Please try again!'));
 
         if (!$vars['title'])
             $errors['title'] = __('Title required');
diff --git a/include/class.page.php b/include/class.page.php
index af77ef82e..7219e88c8 100644
--- a/include/class.page.php
+++ b/include/class.page.php
@@ -254,7 +254,7 @@ class Page extends VerySimpleModel {
         }
 
         if (isset($this->id) && $this->getId() != $vars['id'])
-            $errors['err'] = sprintf('%s - %s', __('Internal error occurred'), __('Try again!'));
+            $errors['err'] = sprintf('%s - %s', __('Internal error occurred'), __('Please try again!'));
 
         if(!$vars['type'])
             $errors['type'] = __('Type is required');
diff --git a/login.php b/login.php
index d1ef1abd6..c84d06cd8 100644
--- a/login.php
+++ b/login.php
@@ -70,7 +70,7 @@ if ($_POST && isset($_POST['luser'])) {
                 ?: 'tickets.php');
         }
     } elseif(!$errors['err']) {
-        $errors['err'] = sprintf('%s - %s', __('Invalid username or password'), __('Try again!'));
+        $errors['err'] = sprintf('%s - %s', __('Invalid username or password'), __('Please try again!'));
     }
     $suggest_pwreset = true;
 }
@@ -95,7 +95,7 @@ elseif ($_POST && isset($_POST['lticket'])) {
             Format::htmlchars($user->getName()->getFirst()));
         $_POST = null;
     } elseif(!$errors['err']) {
-        $errors['err'] = sprintf('%s - %s', __('Invalid email or ticket number'), __('Try again!'));
+        $errors['err'] = sprintf('%s - %s', __('Invalid email or ticket number'), __('Please try again!'));
     }
 }
 elseif (isset($_GET['do'])) {
diff --git a/open.php b/open.php
index d6a862a6b..450b9d1f6 100644
--- a/open.php
+++ b/open.php
@@ -26,7 +26,7 @@ if ($_POST) {
         if(!$_POST['captcha'])
             $errors['captcha']=__('Enter text shown on the image');
         elseif(strcmp($_SESSION['captcha'], md5(strtoupper($_POST['captcha']))))
-            $errors['captcha']=sprintf('%s - %s', __('Invalid'), __('Try again!'));
+            $errors['captcha']=sprintf('%s - %s', __('Invalid'), __('Please try again!'));
     }
 
     $tform = TicketForm::objects()->one()->getForm($vars);
diff --git a/scp/banlist.php b/scp/banlist.php
index 9356bbd18..7dafe2f15 100644
--- a/scp/banlist.php
+++ b/scp/banlist.php
@@ -63,7 +63,7 @@ if($_POST && !$errors && $filter){
                 $_REQUEST['a']=null;
                 //Add filter rule here.
             }elseif(!$errors['err']){
-                $errors['err']=sprintf('%s %s', __('Error creating %s.'), __('ban rule'), __('Try again!'));
+                $errors['err']=sprintf('%s %s', __('Error creating %s.'), __('ban rule'), __('Please try again!'));
             }
             break;
         case 'mass_process':
diff --git a/scp/emailtest.php b/scp/emailtest.php
index 189d22312..682749760 100644
--- a/scp/emailtest.php
+++ b/scp/emailtest.php
@@ -43,9 +43,9 @@ if($_POST){
             Draft::deleteForNamespace('email.diag');
         }
         else
-            $errors['err']=sprintf('%s - %s', __('Error sending email'), __('Try again!'));
+            $errors['err']=sprintf('%s - %s', __('Error sending email'), __('Please try again!'));
     }elseif($errors['err']){
-        $errors['err']=sprintf('%s - %s', __('Error sending email'), __('Try again!'));
+        $errors['err']=sprintf('%s - %s', __('Error sending email'), __('Please try again!'));
     }
 }
 $nav->setTabActive('emails');
diff --git a/scp/tickets.php b/scp/tickets.php
index 95bbf4c9e..25e21dfd4 100644
--- a/scp/tickets.php
+++ b/scp/tickets.php
@@ -219,7 +219,7 @@ if($_POST && !$errors):
                             $assigned, $thisstaff->getName());
                         $ticket->logActivity(__('Ticket unassigned'),$msg);
                     } else {
-                        $errors['err'] = sprintf('%s %s', __('Problems releasing the ticket.'), __('Try again!'));
+                        $errors['err'] = sprintf('%s %s', __('Problems releasing the ticket.'), __('Please try again!'));
                     }
                     break;
                 case 'claim':
@@ -232,7 +232,7 @@ if($_POST && !$errors):
                     } elseif ($ticket->claim()) {
                         $msg = __('Ticket is now assigned to you!');
                     } else {
-                        $errors['err'] = sprintf('%s %s', __('Problems assigning the ticket.'), __('Try again!'));
+                        $errors['err'] = sprintf('%s %s', __('Problems assigning the ticket.'), __('Please try again!'));
                     }
                     break;
                 case 'overdue':
@@ -243,7 +243,7 @@ if($_POST && !$errors):
                         $msg=sprintf(__('Ticket flagged as overdue by %s'),$thisstaff->getName());
                         $ticket->logActivity(__('Ticket Marked Overdue'),$msg);
                     } else {
-                        $errors['err']=sprintf('%s %s', __('Problems marking the the ticket overdue.'), __('Try again!'));
+                        $errors['err']=sprintf('%s %s', __('Problems marking the the ticket overdue.'), __('Please try again!'));
                     }
                     break;
                 case 'answered':
@@ -254,7 +254,7 @@ if($_POST && !$errors):
                         $msg=sprintf(__('Ticket flagged as answered by %s'),$thisstaff->getName());
                         $ticket->logActivity(__('Ticket Marked Answered'),$msg);
                     } else {
-                        $errors['err']=sprintf('%s %s', __('Problems marking the ticket answered.'), __('Try again!'));
+                        $errors['err']=sprintf('%s %s', __('Problems marking the ticket answered.'), __('Please try again!'));
                     }
                     break;
                 case 'unanswered':
@@ -265,7 +265,7 @@ if($_POST && !$errors):
                         $msg=sprintf(__('Ticket flagged as unanswered by %s'),$thisstaff->getName());
                         $ticket->logActivity(__('Ticket Marked Unanswered'),$msg);
                     } else {
-                        $errors['err']=sprintf('%s %s', __('Problems marking the ticket unanswered.'), __('Try again!'));
+                        $errors['err']=sprintf('%s %s', __('Problems marking the ticket unanswered.'), __('Please try again!'));
                     }
                     break;
                 case 'banemail':
@@ -287,7 +287,7 @@ if($_POST && !$errors):
                     } elseif(!BanList::includes($ticket->getEmail())) {
                         $warn = __('Email is not in the banlist');
                     } else {
-                        $errors['err']=sprintf('%s %s', __('Unable to remove the email from banlist.'), __('Try again!'));
+                        $errors['err']=sprintf('%s %s', __('Unable to remove the email from banlist.'), __('Please try again!'));
                     }
                     break;
                 case 'changeuser':
@@ -299,7 +299,7 @@ if($_POST && !$errors):
                         $msg = sprintf(__('Ticket ownership changed to %s'),
                             Format::htmlchars($user->getName()));
                     } else {
-                        $errors['err'] = sprintf('%s %s', __('Unable to change ticket ownership.'), __('Try again!'));
+                        $errors['err'] = sprintf('%s %s', __('Unable to change ticket ownership.'), __('Please try again!'));
                     }
                     break;
                 default:
diff --git a/scp/users.php b/scp/users.php
index e4bee2dc8..4223f651f 100644
--- a/scp/users.php
+++ b/scp/users.php
@@ -62,7 +62,7 @@ if ($_POST) {
             elseif ($user->getAccount()->sendConfirmEmail())
                 $msg = sprintf(__('Account activation email sent to %s'),$user->getEmail());
             else
-                $errors['err'] = sprintf('%s - %s', __('Unable to send account activation email'), __('Try again!'));
+                $errors['err'] = sprintf('%s - %s', __('Unable to send account activation email'), __('Please try again!'));
             break;
         case 'pwreset':
             if (!$user || !$user->getAccount())
@@ -70,7 +70,7 @@ if ($_POST) {
             elseif ($user->getAccount()->sendResetEmail())
                 $msg = sprintf(__('Account password reset email sent to %s'),$user->getEmail());
             else
-                $errors['err'] = sprintf('%s - %s', __('Unable to send account password reset email'), __('Try again!'));
+                $errors['err'] = sprintf('%s - %s', __('Unable to send account password reset email'), __('Please try again!'));
             break;
         case 'mass_process':
             if (!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) {
-- 
GitLab