Skip to content
Snippets Groups Projects
Commit 3de4db35 authored by Michael's avatar Michael
Browse files

Update all `Try again!` phrases to `Please try again` :)

parent 7628f142
Branches
Tags
No related merge requests found
...@@ -123,7 +123,7 @@ class OrgsAjaxAPI extends AjaxController { ...@@ -123,7 +123,7 @@ class OrgsAjaxAPI extends AjaxController {
if ($org->delete()) if ($org->delete())
Http::response(204, 'Organization deleted successfully'); Http::response(204, 'Organization deleted successfully');
else 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'); include(STAFFINC_DIR . 'templates/org-delete.tmpl.php');
...@@ -158,13 +158,13 @@ class OrgsAjaxAPI extends AjaxController { ...@@ -158,13 +158,13 @@ class OrgsAjaxAPI extends AjaxController {
$form = UserForm::getUserForm()->getForm($_POST); $form = UserForm::getUserForm()->getForm($_POST);
$can_create = $thisstaff->hasPerm(User::PERM_CREATE); $can_create = $thisstaff->hasPerm(User::PERM_CREATE);
if (!($user = User::fromForm($form, $can_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)) if (!$info['error'] && $user && $user->setOrganization($org))
Http::response(201, $user->to_json()); Http::response(201, $user->to_json());
elseif (!$info['error']) 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) { } elseif ($remote && $userId) {
list($bk, $userId) = explode(':', $userId, 2); list($bk, $userId) = explode(':', $userId, 2);
...@@ -232,7 +232,7 @@ class OrgsAjaxAPI extends AjaxController { ...@@ -232,7 +232,7 @@ class OrgsAjaxAPI extends AjaxController {
if (($org = Organization::fromForm($form))) if (($org = Organization::fromForm($form)))
Http::response(201, $org->to_json()); 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'); $info['title'] = __('Add New Organization');
......
...@@ -90,7 +90,7 @@ class TasksAjaxAPI extends AjaxController { ...@@ -90,7 +90,7 @@ class TasksAjaxAPI extends AjaxController {
Http::response(201, $task->getId()); 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'; include STAFFINC_DIR . 'templates/task.tmpl.php';
......
...@@ -1222,7 +1222,7 @@ class TicketsAjaxAPI extends AjaxController { ...@@ -1222,7 +1222,7 @@ class TicketsAjaxAPI extends AjaxController {
Http::response(201, $task->getId()); 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()); $info['action'] = sprintf('#tickets/%d/add-task', $ticket->getId());
......
...@@ -193,7 +193,7 @@ class UsersAjaxAPI extends AjaxController { ...@@ -193,7 +193,7 @@ class UsersAjaxAPI extends AjaxController {
if ($errors['err']) if ($errors['err'])
$info['error'] = $errors['err']; $info['error'] = $errors['err'];
else 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'); include(STAFFINC_DIR . 'templates/user-register.tmpl.php');
...@@ -258,7 +258,7 @@ class UsersAjaxAPI extends AjaxController { ...@@ -258,7 +258,7 @@ class UsersAjaxAPI extends AjaxController {
if (!$info['error'] && $user->delete()) if (!$info['error'] && $user->delete())
Http::response(204, 'User deleted successfully'); Http::response(204, 'User deleted successfully');
elseif (!$info['error']) 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'); include(STAFFINC_DIR . 'templates/user-delete.tmpl.php');
...@@ -295,7 +295,7 @@ class UsersAjaxAPI extends AjaxController { ...@@ -295,7 +295,7 @@ class UsersAjaxAPI extends AjaxController {
if (($user = User::fromForm($form))) if (($user = User::fromForm($form)))
Http::response(201, $user->to_json()); 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); return self::_lookupform($form, $info);
......
...@@ -260,7 +260,7 @@ extends VerySimpleModel { ...@@ -260,7 +260,7 @@ extends VerySimpleModel {
$id = isset($this->canned_id) ? $this->canned_id : null; $id = isset($this->canned_id) ? $this->canned_id : null;
if ($id && $id != $vars['id']) 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']) if (!$vars['title'])
$errors['title'] = __('Title required'); $errors['title'] = __('Title required');
......
...@@ -254,7 +254,7 @@ class Page extends VerySimpleModel { ...@@ -254,7 +254,7 @@ class Page extends VerySimpleModel {
} }
if (isset($this->id) && $this->getId() != $vars['id']) 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']) if(!$vars['type'])
$errors['type'] = __('Type is required'); $errors['type'] = __('Type is required');
......
...@@ -70,7 +70,7 @@ if ($_POST && isset($_POST['luser'])) { ...@@ -70,7 +70,7 @@ if ($_POST && isset($_POST['luser'])) {
?: 'tickets.php'); ?: 'tickets.php');
} }
} elseif(!$errors['err']) { } 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; $suggest_pwreset = true;
} }
...@@ -95,7 +95,7 @@ elseif ($_POST && isset($_POST['lticket'])) { ...@@ -95,7 +95,7 @@ elseif ($_POST && isset($_POST['lticket'])) {
Format::htmlchars($user->getName()->getFirst())); Format::htmlchars($user->getName()->getFirst()));
$_POST = null; $_POST = null;
} elseif(!$errors['err']) { } 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'])) { elseif (isset($_GET['do'])) {
......
...@@ -26,7 +26,7 @@ if ($_POST) { ...@@ -26,7 +26,7 @@ if ($_POST) {
if(!$_POST['captcha']) if(!$_POST['captcha'])
$errors['captcha']=__('Enter text shown on the image'); $errors['captcha']=__('Enter text shown on the image');
elseif(strcmp($_SESSION['captcha'], md5(strtoupper($_POST['captcha'])))) 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); $tform = TicketForm::objects()->one()->getForm($vars);
......
...@@ -63,7 +63,7 @@ if($_POST && !$errors && $filter){ ...@@ -63,7 +63,7 @@ if($_POST && !$errors && $filter){
$_REQUEST['a']=null; $_REQUEST['a']=null;
//Add filter rule here. //Add filter rule here.
}elseif(!$errors['err']){ }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; break;
case 'mass_process': case 'mass_process':
......
...@@ -43,9 +43,9 @@ if($_POST){ ...@@ -43,9 +43,9 @@ if($_POST){
Draft::deleteForNamespace('email.diag'); Draft::deleteForNamespace('email.diag');
} }
else 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']){ }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'); $nav->setTabActive('emails');
......
...@@ -219,7 +219,7 @@ if($_POST && !$errors): ...@@ -219,7 +219,7 @@ if($_POST && !$errors):
$assigned, $thisstaff->getName()); $assigned, $thisstaff->getName());
$ticket->logActivity(__('Ticket unassigned'),$msg); $ticket->logActivity(__('Ticket unassigned'),$msg);
} else { } 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; break;
case 'claim': case 'claim':
...@@ -232,7 +232,7 @@ if($_POST && !$errors): ...@@ -232,7 +232,7 @@ if($_POST && !$errors):
} elseif ($ticket->claim()) { } elseif ($ticket->claim()) {
$msg = __('Ticket is now assigned to you!'); $msg = __('Ticket is now assigned to you!');
} else { } 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; break;
case 'overdue': case 'overdue':
...@@ -243,7 +243,7 @@ if($_POST && !$errors): ...@@ -243,7 +243,7 @@ if($_POST && !$errors):
$msg=sprintf(__('Ticket flagged as overdue by %s'),$thisstaff->getName()); $msg=sprintf(__('Ticket flagged as overdue by %s'),$thisstaff->getName());
$ticket->logActivity(__('Ticket Marked Overdue'),$msg); $ticket->logActivity(__('Ticket Marked Overdue'),$msg);
} else { } 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; break;
case 'answered': case 'answered':
...@@ -254,7 +254,7 @@ if($_POST && !$errors): ...@@ -254,7 +254,7 @@ if($_POST && !$errors):
$msg=sprintf(__('Ticket flagged as answered by %s'),$thisstaff->getName()); $msg=sprintf(__('Ticket flagged as answered by %s'),$thisstaff->getName());
$ticket->logActivity(__('Ticket Marked Answered'),$msg); $ticket->logActivity(__('Ticket Marked Answered'),$msg);
} else { } 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; break;
case 'unanswered': case 'unanswered':
...@@ -265,7 +265,7 @@ if($_POST && !$errors): ...@@ -265,7 +265,7 @@ if($_POST && !$errors):
$msg=sprintf(__('Ticket flagged as unanswered by %s'),$thisstaff->getName()); $msg=sprintf(__('Ticket flagged as unanswered by %s'),$thisstaff->getName());
$ticket->logActivity(__('Ticket Marked Unanswered'),$msg); $ticket->logActivity(__('Ticket Marked Unanswered'),$msg);
} else { } 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; break;
case 'banemail': case 'banemail':
...@@ -287,7 +287,7 @@ if($_POST && !$errors): ...@@ -287,7 +287,7 @@ if($_POST && !$errors):
} elseif(!BanList::includes($ticket->getEmail())) { } elseif(!BanList::includes($ticket->getEmail())) {
$warn = __('Email is not in the banlist'); $warn = __('Email is not in the banlist');
} else { } 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; break;
case 'changeuser': case 'changeuser':
...@@ -299,7 +299,7 @@ if($_POST && !$errors): ...@@ -299,7 +299,7 @@ if($_POST && !$errors):
$msg = sprintf(__('Ticket ownership changed to %s'), $msg = sprintf(__('Ticket ownership changed to %s'),
Format::htmlchars($user->getName())); Format::htmlchars($user->getName()));
} else { } 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; break;
default: default:
......
...@@ -62,7 +62,7 @@ if ($_POST) { ...@@ -62,7 +62,7 @@ if ($_POST) {
elseif ($user->getAccount()->sendConfirmEmail()) elseif ($user->getAccount()->sendConfirmEmail())
$msg = sprintf(__('Account activation email sent to %s'),$user->getEmail()); $msg = sprintf(__('Account activation email sent to %s'),$user->getEmail());
else 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; break;
case 'pwreset': case 'pwreset':
if (!$user || !$user->getAccount()) if (!$user || !$user->getAccount())
...@@ -70,7 +70,7 @@ if ($_POST) { ...@@ -70,7 +70,7 @@ if ($_POST) {
elseif ($user->getAccount()->sendResetEmail()) elseif ($user->getAccount()->sendResetEmail())
$msg = sprintf(__('Account password reset email sent to %s'),$user->getEmail()); $msg = sprintf(__('Account password reset email sent to %s'),$user->getEmail());
else 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; break;
case 'mass_process': case 'mass_process':
if (!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { if (!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment