diff --git a/include/ajax.content.php b/include/ajax.content.php index c12d56ab00bdd63863b2dee5e96ccac82a0bc592..38112a11502ec5e80fb61aa2f1f039bc0f889928 100644 --- a/include/ajax.content.php +++ b/include/ajax.content.php @@ -53,23 +53,23 @@ class ContentAjaxAPI extends AjaxController { <td width="55%" valign="top"> <table width="100%" border="0" cellspacing=1 cellpadding=1> <tr><td width="130">%{ticket.id}</td><td>'.__('Ticket ID').' ('.__('internal ID').')</td></tr> - <tr><td>%{ticket.number}</td><td>'.__('Ticket number').' ('.__('external ID').')</td></tr> - <tr><td>%{ticket.email}</td><td>'.__('Email address').'</td></tr> - <tr><td>%{ticket.name}</td><td>'.__('Full name').' — + <tr><td>%{ticket.number}</td><td>'.__('Ticket Number').' ('.__('external ID').')</td></tr> + <tr><td>%{ticket.email}</td><td>'.__('Email Address').'</td></tr> + <tr><td>%{ticket.name}</td><td>'.__('Full Name').' — <em>'.__('see name expansion').'</em></td></tr> <tr><td>%{ticket.subject}</td><td>'.__('Subject').'</td></tr> <tr><td>%{ticket.phone}</td><td>'.__('Phone number | ext').'</td></tr> <tr><td>%{ticket.status}</td><td>'.__('Status').'</td></tr> <tr><td>%{ticket.priority}</td><td>'.__('Priority').'</td></tr> - <tr><td>%{ticket.assigned}</td><td>'.__('Assigned agent and/or team').'</td></tr> - <tr><td>%{ticket.create_date}</td><td>'.__('Date created').'</td></tr> - <tr><td>%{ticket.due_date}</td><td>'.__('Due date').'</td></tr> - <tr><td>%{ticket.close_date}</td><td>'.__('Date closed').'</td></tr> + <tr><td>%{ticket.assigned}</td><td>'.__('Assigned Agent / Team').'</td></tr> + <tr><td>%{ticket.create_date}</td><td>'.__('Date Created').'</td></tr> + <tr><td>%{ticket.due_date}</td><td>'.__('Due Date').'</td></tr> + <tr><td>%{ticket.close_date}</td><td>'.__('Date Closed').'</td></tr> <tr><td>%{ticket.recipients}</td><td>'.__('List of all recipient names').'</td></tr> <tr><td nowrap>%{recipient.ticket_link}</td><td>'.__('Auth. token used for auto-login').'<br/> '.__('Agent\'s ticket view link').'</td></tr> <tr><td colspan="2" style="padding:5px 0 5px 0;"><em><b>'.__('Expandable Variables').'</b></em></td></tr> - <tr><td>%{ticket.topic}</td><td>'.__('Help topic').'</td></tr> + <tr><td>%{ticket.topic}</td><td>'.__('Help Topic').'</td></tr> <tr><td>%{ticket.dept}</td><td>'.__('Department').'</td></tr> <tr><td>%{ticket.staff}</td><td>'.__('Assigned/closing agent').'</td></tr> <tr><td>%{ticket.team}</td><td>'.__('Assigned/closing team').'</td></tr> @@ -82,7 +82,7 @@ class ContentAjaxAPI extends AjaxController { <tr><td>%{response}</td><td>'.__('Outgoing response').'</td></tr> <tr><td>%{comments}</td><td>'.__('Assign/transfer comments').'</td></tr> <tr><td>%{note}</td><td>'.__('Internal note <em>(expandable)</em>').'</td></tr> - <tr><td>%{assignee}</td><td>'.__('Assigned agent/team').'</td></tr> + <tr><td>%{assignee}</td><td>'.__('Assigned Agent / Team').'</td></tr> <tr><td>%{assigner}</td><td>'.__('Agent assigning the ticket').'</td></tr> <tr><td>%{url}</td><td>'.__('osTicket\'s base url (FQDN)').'</td></tr> <tr><td>%{reset_link}</td> @@ -101,7 +101,7 @@ class ContentAjaxAPI extends AjaxController { <tr><td>.lastmessage</td><td>'.__('Last Message').'</td></tr> <tr><td colspan="2" style="padding:5px 0 5px 0;"><em><b>'.__('Thread Entry expansions').'</b></em></td></tr> <tr><td>.poster</td><td>'.__('Poster').'</td></tr> - <tr><td>.create_date</td><td>'.__('Date created').'</td></tr> + <tr><td>.create_date</td><td>'.__('Date Created').'</td></tr> </table> </td> </tr> @@ -200,7 +200,7 @@ class ContentAjaxAPI extends AjaxController { Http::response(201, 'Have a great day!'); } if (!$errors['err']) - $errors['err'] = __('Correct the error(s) below and try again!'); + $errors['err'] = __('Correct any errors below and try again.'); $info = $_POST; $errors = Format::htmlchars($errors); include STAFFINC_DIR . 'templates/content-manage.tmpl.php'; diff --git a/include/ajax.draft.php b/include/ajax.draft.php index c18dca63d08689b1d9d44cc079cb813601ef64e7..e1bb78a0435b619f9bba99973b806543e6fd4a23 100644 --- a/include/ajax.draft.php +++ b/include/ajax.draft.php @@ -354,14 +354,6 @@ class DraftAjaxAPI extends AjaxController { Http::response(500, 'Unable to lookup files'); $files = array(); - $folders = array( - 'C' => __('Canned Responses'), - 'F' => __('FAQ Articles'), - 'T' => __('Email Templates'), - 'L' => __('Logos'), - 'P' => __('Pages'), - 'H' => __('This Thread'), - ); while (list($id, $type, $name) = db_fetch_row($res)) { $f = AttachmentFile::lookup((int) $id); $url = $f->getDownloadUrl(); @@ -371,7 +363,6 @@ class DraftAjaxAPI extends AjaxController { 'thumb'=>$url.($type != 'H' ? '&s=128' : ''), 'image'=>$url, 'title'=>$name ?: $f->getName(), - 'folder'=>$folders[$type] ); } echo JsonDataEncoder::encode($files); diff --git a/include/ajax.kbase.php b/include/ajax.kbase.php index 3fd1409666cef380540a2578176b34973bd20d1f..63ff371f57f0733b1181ef9309247274e29a2447 100644 --- a/include/ajax.kbase.php +++ b/include/ajax.kbase.php @@ -45,7 +45,7 @@ class KbaseAjaxAPI extends AjaxController { '<div style="width:650px;"> <strong>%s</strong><div class="thread-body">%s</div> <div class="clear"></div> - <div class="faded">'.__('Last updated %s').'</div> + <div class="faded">'.__('Last Updated %s').'</div> <hr> <a href="faq.php?id=%d">'.__('View').'</a> | <a href="faq.php?id=%d">'.__('Attachments (%d)').'</a>', $faq->getQuestion(), diff --git a/include/ajax.tasks.php b/include/ajax.tasks.php index 6fa9e052633b41fae05d27ac3d9caa0b40b4f932..387065cc80e5239235566ac046ce3d061088a486 100644 --- a/include/ajax.tasks.php +++ b/include/ajax.tasks.php @@ -115,7 +115,7 @@ class TasksAjaxAPI extends AjaxController { Http::response(404, __('No such task')); if (!$task->checkStaffPerm($thisstaff, Task::PERM_EDIT)) - Http::response(403, __('Permission Denied')); + Http::response(403, __('Permission denied')); $info = $errors = array(); $forms = DynamicFormEntry::forObject($task->getId(), @@ -128,7 +128,9 @@ class TasksAjaxAPI extends AjaxController { if ($task->update($forms, $_POST, $errors)) { Http::response(201, 'Task updated successfully'); } elseif(!$errors['err']) { - $errors['err']=__('Unable to update the task. Correct the errors below and try again!'); + $errors['err'] = sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this task')), + __('Correct any errors below and try again.')); } $info = Format::htmlchars($_POST); } @@ -289,8 +291,7 @@ class TasksAjaxAPI extends AjaxController { if (!$i) { $info['error'] = sprintf( - __('Unable to %1$s %2$s'), - __('assign'), + __('Unable to assign %s' /* %s may be pluralized */), _N('selected task', 'selected tasks', $count)); } } @@ -315,8 +316,7 @@ class TasksAjaxAPI extends AjaxController { if (!$i) { $info['error'] = sprintf( - __('Unable to %1$s %2$s'), - __('transfer'), + __('Unable to transfer %s' /* %s may be pluralized */), _N('selected task', 'selected tasks', $count)); } } @@ -358,9 +358,9 @@ class TasksAjaxAPI extends AjaxController { // will be checked below. if ($perm && !$thisstaff->hasPerm($perm, false)) $errors['err'] = sprintf( - __('You do not have permission to %s %s'), - __($action), - __('tasks')); + __('You do not have permission to %s tasks' + /* %s will be an action verb */ ), + __($action)); if ($_POST && !$errors) { if (!$_POST['status'] @@ -410,8 +410,7 @@ class TasksAjaxAPI extends AjaxController { if (!$i) { $info['error'] = sprintf( - __('Unable to %1$s %2$s'), - __('delete'), + __('Unable to delete %s.'), _N('selected task', 'selected tasks', $count)); } } @@ -427,7 +426,7 @@ class TasksAjaxAPI extends AjaxController { if ($i==$count) { $msg = sprintf(__('Successfully %s %s.'), $actions[$action]['verbed'], - sprintf(__('%1$d %2$s'), + sprintf('%1$d %2$s', $count, _N('selected task', 'selected tasks', $count)) ); @@ -443,7 +442,7 @@ class TasksAjaxAPI extends AjaxController { Http::response(201, 'processed'); } elseif($_POST && !isset($info['error'])) { $info['error'] = $errors['err'] ?: sprintf( - __('Unable to %1$s %2$s'), + __('Unable to %1$s %2$s'), __('process'), _N('selected task', 'selected tasks', $count)); } @@ -476,7 +475,7 @@ class TasksAjaxAPI extends AjaxController { Http::response(404, __('No such task')); if (!$task->checkStaffPerm($thisstaff, Task::PERM_TRANSFER)) - Http::response(403, __('Permission Denied')); + Http::response(403, __('Permission denied')); $errors = array(); @@ -520,7 +519,7 @@ class TasksAjaxAPI extends AjaxController { if (!$task->checkStaffPerm($thisstaff, Task::PERM_ASSIGN) || !($form=$task->getAssignmentForm($_POST, array( 'target' => $target)))) - Http::response(403, __('Permission Denied')); + Http::response(403, __('Permission denied')); $errors = array(); $info = array( @@ -566,7 +565,7 @@ class TasksAjaxAPI extends AjaxController { // Check for premissions and such if (!$task->checkStaffPerm($thisstaff, Task::PERM_ASSIGN) || !($form = $task->getClaimForm($_POST))) - Http::response(403, __('Permission Denied')); + Http::response(403, __('Permission denied')); $errors = array(); $info = array( @@ -621,7 +620,7 @@ class TasksAjaxAPI extends AjaxController { Http::response(404, __('No such task')); if (!$task->checkStaffPerm($thisstaff, Task::PERM_DELETE)) - Http::response(403, __('Permission Denied')); + Http::response(403, __('Permission denied')); $errors = array(); $info = array( @@ -700,8 +699,8 @@ class TasksAjaxAPI extends AjaxController { if (!$errors && (!$perm || !$task->checkStaffPerm($thisstaff, $perm))) $errors['err'] = sprintf( - __('You do not have permission to %s %s'), - $statuses[$status], __('tasks')); + __('You do not have permission to %s tasks'), + $statuses[$status]); if ($_POST && !$errors) { if ($task->setStatus($status, $_POST['comments'], $errors)) diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php index c20abba7ec0120fbaceffca81f762c5e5eb0c650..2ae54c819c1ab870fb58cce3de5ce42e1290bde9 100644 --- a/include/ajax.tickets.php +++ b/include/ajax.tickets.php @@ -381,7 +381,7 @@ class TicketsAjaxAPI extends AjaxController { Http::response(404, __('No such ticket')); if (!$ticket->checkStaffPerm($thisstaff, Ticket::PERM_TRANSFER)) - Http::response(403, __('Permission Denied')); + Http::response(403, __('Permission denied')); $errors = array(); @@ -426,7 +426,7 @@ class TicketsAjaxAPI extends AjaxController { if (!$ticket->checkStaffPerm($thisstaff, Ticket::PERM_ASSIGN) || !($form = $ticket->getAssignmentForm($_POST, array('target' => $target)))) - Http::response(403, __('Permission Denied')); + Http::response(403, __('Permission denied')); $errors = array(); $info = array( @@ -486,7 +486,7 @@ class TicketsAjaxAPI extends AjaxController { || !$ticket->isOpen() // Claim only open || $ticket->getStaff() // cannot claim assigned ticket || !($form = $ticket->getClaimForm($_POST))) - Http::response(403, __('Permission Denied')); + Http::response(403, __('Permission denied')); $errors = array(); $info = array( @@ -736,9 +736,8 @@ class TicketsAjaxAPI extends AjaxController { // Generic permission check. if (!$thisstaff->hasPerm(Ticket::PERM_DELETE, false)) $errors['err'] = sprintf( - __('You do not have permission to %s %s'), - __('delete'), - __('tickets')); + __('You do not have permission %s'), + __('to delete tickets')) if ($_POST && !$errors) { @@ -768,14 +767,16 @@ class TicketsAjaxAPI extends AjaxController { if ($i==$count) { $msg = sprintf(__('Successfully %s %s.'), $actions[$action]['verbed'], - sprintf(__('%1$d %2$s'), + sprintf('%1$d %2$s', $count, _N('selected ticket', 'selected tickets', $count)) ); $_SESSION['::sysmsgs']['msg'] = $msg; } else { $warn = sprintf( - __('%1$d of %2$d %3$s %4$s'), $i, $count, + __('%1$d of %2$d %3$s %4$s' + /* Tokens are <x> of <y> <selected ticket(s)> <actioned> */), + $i, $count, _N('selected ticket', 'selected tickets', $count), $actions[$action]['verbed']); @@ -784,7 +785,7 @@ class TicketsAjaxAPI extends AjaxController { Http::response(201, 'processed'); } elseif($_POST && !isset($info['error'])) { $info['error'] = $errors['err'] ?: sprintf( - __('Unable to %1$s %2$s'), + __('Unable to %1$s %2$s'), __('process'), _N('selected ticket', 'selected tickets', $count)); } @@ -846,8 +847,8 @@ class TicketsAjaxAPI extends AjaxController { break; default: $state = $ticket->getStatus()->getState(); - $info['warn'] = sprintf('%s %s', - __('Unknown or invalid'), __('status')); + $info['warn'] = sprintf(__('%s: Unknown or invalid'), + __('status')); } $info['status_id'] = $id ?: $ticket->getStatusId(); @@ -879,17 +880,17 @@ class TicketsAjaxAPI extends AjaxController { case 'open': if (!$role->hasPerm(TicketModel::PERM_CLOSE) && !$role->hasPerm(TicketModel::PERM_CREATE)) - $errors['err'] = sprintf(__('You do not have permission %s.'), + $errors['err'] = sprintf(__('You do not have permission %s'), __('to reopen tickets')); break; case 'closed': if (!$role->hasPerm(TicketModel::PERM_CLOSE)) - $errors['err'] = sprintf(__('You do not have permission %s.'), + $errors['err'] = sprintf(__('You do not have permission %s'), __('to resolve/close tickets')); break; case 'deleted': if (!$role->hasPerm(TicketModel::PERM_DELETE)) - $errors['err'] = sprintf(__('You do not have permission %s.'), + $errors['err'] = sprintf(__('You do not have permission %s'), __('to archive/delete tickets')); break; default: @@ -974,7 +975,7 @@ class TicketsAjaxAPI extends AjaxController { $errors = $info = array(); if (!$thisstaff || !$thisstaff->canManageTickets()) $errors['err'] = sprintf('%s %s', - sprintf(__('You do not have permission %s.'), + sprintf(__('You do not have permission %s'), __('to mass manage tickets')), __('Contact admin for such access')); elseif (!$_REQUEST['tids'] || !count($_REQUEST['tids'])) @@ -989,17 +990,17 @@ class TicketsAjaxAPI extends AjaxController { case 'open': if (!$thisstaff->hasPerm(TicketModel::PERM_CLOSE, false) && !$thisstaff->hasPerm(TicketModel::PERM_CREATE, false)) - $errors['err'] = sprintf(__('You do not have permission %s.'), + $errors['err'] = sprintf(__('You do not have permission %s'), __('to reopen tickets')); break; case 'closed': if (!$thisstaff->hasPerm(TicketModel::PERM_CLOSE, false)) - $errors['err'] = sprintf(__('You do not have permission %s.'), + $errors['err'] = sprintf(__('You do not have permission %s'), __('to resolve/close tickets')); break; case 'deleted': if (!$thisstaff->hasPerm(TicketModel::PERM_DELETE, false)) - $errors['err'] = sprintf(__('You do not have permission %s.'), + $errors['err'] = sprintf(__('You do not have permission %s'), __('to archive/delete tickets')); break; default: @@ -1229,7 +1230,7 @@ class TicketsAjaxAPI extends AjaxController { $info['title'] = sprintf( __( 'Ticket #%1$s: %2$s'), $ticket->getNumber(), - _('Add New Task') + __('Add New Task') ); include STAFFINC_DIR . 'templates/task.tmpl.php'; diff --git a/include/ajax.users.php b/include/ajax.users.php index dd01ac1deb8bfb4ea261e20d9da37a33aa18d44a..bf85d0c57d223b4d789f540f2bda5209d549498f 100644 --- a/include/ajax.users.php +++ b/include/ajax.users.php @@ -225,7 +225,8 @@ class UsersAjaxAPI extends AjaxController { if ($errors['err']) $info['error'] = $errors['err']; else - $info['error'] = __('Unable to update account - try again!'); + $info['error'] = __('Unable to update account.') + .' '.__('Correct any errors below and try again.'); } $info['_target'] = $target; @@ -424,14 +425,14 @@ class UsersAjaxAPI extends AjaxController { $form = OrganizationForm::getDefaultForm()->getForm($_POST); if (!($org = Organization::fromForm($form))) $info['error'] = __('Unable to create organization.') - .' '.__('Correct error(s) below and try again.'); + .' '.__('Correct any errors below and try again.'); } if ($org && $user->setOrganization($org)) Http::response(201, $org->to_json()); elseif (! $info['error']) $info['error'] = __('Unable to add user to organization.') - .' '.__('Correct error(s) below and try again.'); + .' '.__('Correct any errors below and try again.'); } elseif ($orgId) $org = Organization::lookup($orgId); @@ -442,7 +443,7 @@ class UsersAjaxAPI extends AjaxController { } if ($org && $user->getOrgId() && $org->getId() != $user->getOrgId()) - $info['warning'] = __("Are you sure you want to change user's organization?"); + $info['warning'] = __("Are you sure you want to change the user's organization?"); $tmpl = $tmpl ?: 'org-lookup.tmpl.php'; diff --git a/include/class.api.php b/include/class.api.php index 818b8826e8cf8526643c44d0020559b1564e47a2..1f8ac296c04aa2799165d722b946c27659723b73 100644 --- a/include/class.api.php +++ b/include/class.api.php @@ -149,8 +149,9 @@ class API { if(db_query($sql) && ($id=db_insert_id())) return $id; - $errors['err']=sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this API key')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this API key')), + __('Correct any errors below and try again.')); } return false; diff --git a/include/class.auth.php b/include/class.auth.php index a924d9cd5a990bc507ba0028014490a5445e732b..afda9c0e9a2b9610e44a5d363a8b58989fbf5424 100644 --- a/include/class.auth.php +++ b/include/class.auth.php @@ -484,7 +484,7 @@ abstract class StaffAuthenticationBackend extends AuthenticationBackend { return false; //Log debug info. - $ost->logDebug(_S('Agent login'), + $ost->logDebug(_S('Agent Login'), sprintf(_S("%s logged in [%s], via %s"), $staff->getUserName(), $_SERVER['REMOTE_ADDR'], get_class($bk))); //Debug. @@ -948,7 +948,7 @@ class UserAuthStrikeBackend extends AuthStrikeBackend { _S('Time').": ".date('M j, Y, g:i a T')."\n\n". _S('Attempts').": {$authsession['strikes']}"; $ost->logError(_S('Excessive login attempts (user)'), $alert, ($cfg->alertONLoginError())); - return new AccessDenied(__('Access Denied')); + return new AccessDenied(__('Access denied')); } elseif($authsession['strikes']%3==0) { //Log every third failed login attempt as a warning. $alert=_S('Username').": {$username}\n". _S('IP').": {$_SERVER['REMOTE_ADDR']}\n". diff --git a/include/class.client.php b/include/class.client.php index 9a624e13c545934b7bd864551152ec05b5525c8e..53b6376c98ce603b76251ec6d4295fa88d91b2b8 100644 --- a/include/class.client.php +++ b/include/class.client.php @@ -46,8 +46,8 @@ implements EmailContact, ITicketUser, TemplateVariable { static function getVarScope() { return array( - 'email' => __('Email address'), - 'name' => array('class' => 'PersonsName', 'desc' => __('Full name')), + 'email' => __('Email Address'), + 'name' => array('class' => 'PersonsName', 'desc' => __('Full Name')), 'ticket_link' => __('Link to view the ticket'), ); } diff --git a/include/class.filter_action.php b/include/class.filter_action.php index 6c687cc6faee238d1adb0f007560eb6941404d12..7d639d9d186634592d787c79e44605d8493d4554 100644 --- a/include/class.filter_action.php +++ b/include/class.filter_action.php @@ -369,7 +369,7 @@ class FA_AssignTeam extends TriggerAction { array(':new:' => '— '.__('Add New').' —'), 'validators' => function($self, $clean) { if ($clean === ':new:') - $self->addError(__('Select a team')); + $self->addError(__('Select a Team')); } )), ); diff --git a/include/class.forms.php b/include/class.forms.php index 15b32c3063d2fece589f19765ad208d6cda50f56..0e8f81b60ed21e60bcb1df5ec52709d65166ddf7 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -865,10 +865,10 @@ class FormField { */ function whatChanged($before, $after) { if ($before) - $desc = __('changed from <strong>%2$s</strong> to <strong>%1$s</strong>'); + $desc = __('changed from <strong>%1$s</strong> to <strong>%2$s</strong>'); else - $desc = __('set to <strong>%1$s</strong>'); - return sprintf($desc, $this->display($after), $this->display($before)); + $desc = __('set to <strong>%2$s</strong>'); + return sprintf($desc, $this->display($before), $this->display($after)); } /** @@ -2894,7 +2894,7 @@ class InlineFormField extends FormField { function validateEntry($value) { if (!$this->getInlineForm()->isValid()) { - $this->_errors[] = __('Correct errors in the inline form'); + $this->_errors[] = __('Correct any errors below and try again.'); } } @@ -4215,7 +4215,7 @@ class TransferForm extends Form { 'label' => __('Department'), 'flags' => hexdec(0X450F3), 'required' => true, - 'validator-error' => __('Department selection required'), + 'validator-error' => __('Department selection is required'), ) ), 'comments' => new TextareaField(array( diff --git a/include/class.role.php b/include/class.role.php index f584cfa430af8f7c25ba990cf302d601a3439dcf..0e0f89af2b493003fe2ef3437a0e554152325c36 100644 --- a/include/class.role.php +++ b/include/class.role.php @@ -149,7 +149,7 @@ class Role extends RoleModel { $errors['name'] = __('Name required'); elseif (($r=Role::lookup(array('name'=>$vars['name']))) && $r->getId() != $vars['id']) - $errors['name'] = __('Name already in-use'); + $errors['name'] = __('Name already in use'); elseif (!$vars['perms'] || !count($vars['perms'])) $errors['err'] = __('Must check at least one permission for the role'); diff --git a/include/class.search.php b/include/class.search.php index 25617b27bf401995c9bd14c5afda2ba2d36e346f..6249498b05601fcc09afa23f753ae5c61fcb6466 100644 --- a/include/class.search.php +++ b/include/class.search.php @@ -1132,8 +1132,8 @@ class TicketStateChoiceField extends ChoiceField { return array( 'open' => __('Open'), 'closed' => __('Closed'), - 'archived' => __('Archived'), - 'deleted' => __('Deleted'), + 'archived' => _P('ticket state name', 'Archived'), + 'deleted' => _P('ticket state name','Deleted'), ); } diff --git a/include/class.sla.php b/include/class.sla.php index d961ebcba2f9e7de02a6eb8051415e46c396111e..846656acd065eb62f1bc2c1b4fc9aa264a432131 100644 --- a/include/class.sla.php +++ b/include/class.sla.php @@ -100,7 +100,7 @@ implements TemplateVariable { static function getVarScope() { return array( - 'name' => __('SLA Plan'), + 'name' => __('Service Level Agreement'), 'graceperiod' => __("Grace Period (hrs)"), ); } diff --git a/include/class.staff.php b/include/class.staff.php index a5e56c22addbf69c3ec83dfa4def3f0eaf6750b8..8cc30b7db70608e84ad75228f0e2decbc6db325d 100644 --- a/include/class.staff.php +++ b/include/class.staff.php @@ -628,7 +628,7 @@ implements AuthenticatedUser, EmailContact, TemplateVariable { $errors['email']=__('Already in-use as system email'); elseif (($uid=static::getIdByEmail($vars['email'])) && (!isset($this->staff_id) || $uid!=$this->getId())) - $errors['email']=__('Email already in-use by another agent'); + $errors['email']=__('Email already in use by another agent'); if($vars['phone'] && !Validator::is_phone($vars['phone'])) $errors['phone']=__('Valid phone number is required'); @@ -894,10 +894,10 @@ implements AuthenticatedUser, EmailContact, TemplateVariable { $imported = 0; $fields = array( 'firstname' => new TextboxField(array( - 'label' => __('First name'), + 'label' => __('First Name'), )), 'lastname' => new TextboxField(array( - 'label' => __('Last name'), + 'label' => __('Last Name'), )), 'email' => new TextboxField(array( 'label' => __('Email Address'), diff --git a/include/class.task.php b/include/class.task.php index 5350d9b606d33f949213d78d3589a047f1169e40..2c93eac120ff139cdc74eec8918f265cf358082a 100644 --- a/include/class.task.php +++ b/include/class.task.php @@ -796,7 +796,7 @@ class Task extends TaskModel implements RestrictedAccess, Threadable { $cdept = $this->getDept(); $dept = $form->getDept(); if (!$dept || !($dept instanceof Dept)) - $errors['dept'] = __('Department selection required'); + $errors['dept'] = __('Department selection is required'); elseif ($dept->getid() == $this->getDeptId()) $errors['dept'] = __('Task already in the department'); else @@ -1033,12 +1033,12 @@ class Task extends TaskModel implements RestrictedAccess, Threadable { static function getVarScope() { $base = array( - 'assigned' => __('Assigned agent and/or team'), + 'assigned' => __('Assigned Agent / Team'), 'close_date' => array( 'class' => 'FormattedDate', 'desc' => __('Date Closed'), ), 'create_date' => array( - 'class' => 'FormattedDate', 'desc' => __('Date created'), + 'class' => 'FormattedDate', 'desc' => __('Date Created'), ), 'dept' => array( 'class' => 'Dept', 'desc' => __('Department'), @@ -1046,7 +1046,7 @@ class Task extends TaskModel implements RestrictedAccess, Threadable { 'due_date' => array( 'class' => 'FormattedDate', 'desc' => __('Due Date'), ), - 'number' => __('Task number'), + 'number' => __('Task Number'), 'recipients' => array( 'class' => 'UserList', 'desc' => __('List of all recipient names'), ), diff --git a/include/class.template.php b/include/class.template.php index 36cf856028f5f3b6527c81fc65204e8cb53dccaf..1f53922dd409bc9cc13861a9fd1dbc6a507974f0 100644 --- a/include/class.template.php +++ b/include/class.template.php @@ -62,7 +62,7 @@ class EmailTemplateGroup { ), 'ticket.overlimit'=>array( 'group'=>'a.ticket.user', - 'name'=>/* @trans */ 'Over Limit Notice', + 'name'=>/* @trans */ 'Overlimit Notice', 'desc'=>/* @trans */ 'A one-time notice sent, if enabled, when user has reached the maximum allowed open tickets.', 'context' => array( 'ticket', 'signature', diff --git a/include/class.thread.php b/include/class.thread.php index b9adbef211bb43b9e047f6c793c6405fa1986a0d..90ae737c692161667f6c1eae01ae2040887bb4a1 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -1960,7 +1960,7 @@ class EditEvent extends ThreadEvent { foreach (array( 'topic_id' => array(__('Help Topic'), array('Topic', 'getTopicName')), 'sla_id' => array(__('SLA'), array('SLA', 'getSLAName')), - 'duedate' => array(__('Duedate'), array('Format', 'date')), + 'duedate' => array(__('Due Date'), array('Format', 'date')), 'user_id' => array(__('Ticket Owner'), array('User', 'getNameById')), 'source' => array(__('Source'), null) ) as $f => $info) { diff --git a/include/class.ticket.php b/include/class.ticket.php index 453d40dc5ef607a098536b649d400a2cbe632500..3c225cdc64f0934aed5fee19723ed4bd99b13ad6 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -1700,7 +1700,7 @@ implements RestrictedAccess, Threadable { return false; $user_comments = (bool) $comments; - $comments = $comments ?: _S('Ticket assignment'); + $comments = $comments ?: _S('Ticket Assignment'); $assigner = $thisstaff ?: _S('SYSTEM (Auto Assignment)'); //Log an internal note - no alerts on the internal note. @@ -1883,12 +1883,12 @@ implements RestrictedAccess, Threadable { static function getVarScope() { $base = array( - 'assigned' => __('Assigned agent and/or team'), + 'assigned' => __('Assigned Agent / Team'), 'close_date' => array( 'class' => 'FormattedDate', 'desc' => __('Date Closed'), ), 'create_date' => array( - 'class' => 'FormattedDate', 'desc' => __('Date created'), + 'class' => 'FormattedDate', 'desc' => __('Date Created'), ), 'dept' => array( 'class' => 'Dept', 'desc' => __('Department'), @@ -1900,7 +1900,7 @@ implements RestrictedAccess, Threadable { 'name' => array( 'class' => 'PersonsName', 'desc' => __('Name of ticket owner'), ), - 'number' => __('Ticket number'), + 'number' => __('Ticket Number'), 'phone' => __('Phone number of ticket owner'), 'priority' => array( 'class' => 'Priority', 'desc' => __('Priority'), @@ -1923,14 +1923,14 @@ implements RestrictedAccess, Threadable { 'class' => 'TicketThread', 'desc' => __('Ticket Thread'), ), 'topic' => array( - 'class' => 'Topic', 'desc' => __('Help topic'), + 'class' => 'Topic', 'desc' => __('Help Topic'), ), // XXX: Isn't lastreponse and lastmessage more useful 'last_update' => array( 'class' => 'FormattedDate', 'desc' => __('Time of last update'), ), 'user' => array( - 'class' => 'User', 'desc' => __('Ticket owner'), + 'class' => 'User', 'desc' => __('Ticket Owner'), ), ); @@ -2745,7 +2745,9 @@ implements RestrictedAccess, Threadable { $fields['user_id'] = array('type'=>'int', 'required'=>0, 'error'=>__('Invalid user-id')); if (!Validator::process($fields, $vars, $errors) && !$errors['err']) - $errors['err'] = __('Missing or invalid data - check the errors and try again'); + $errors['err'] = sprintf('%s — %s', + __('Missing or invalid data'), + __('Correct any errors below and try again')); $vars['note'] = ThreadEntryBody::clean($vars['note']); @@ -3065,7 +3067,7 @@ implements RestrictedAccess, Threadable { $errors = array( 'errno' => 403, 'err' => __('This help desk is for use by authorized users only')); - $ost->logWarning(_S('Ticket Denied'), $message, false); + $ost->logWarning(_S('Ticket denied'), $message, false); return 0; }; @@ -3091,7 +3093,7 @@ implements RestrictedAccess, Threadable { $fields=array(); switch (strtolower($origin)) { case 'web': - $fields['topicId'] = array('type'=>'int', 'required'=>1, 'error'=>__('Select a help topic')); + $fields['topicId'] = array('type'=>'int', 'required'=>1, 'error'=>__('Select a Help Topic')); break; case 'staff': $fields['deptId'] = array('type'=>'int', 'required'=>0, 'error'=>__('Department selection is required')); @@ -3109,7 +3111,9 @@ implements RestrictedAccess, Threadable { } if(!Validator::process($fields, $vars, $errors) && !$errors['err']) - $errors['err'] =__('Missing or invalid data - check the errors and try again'); + $errors['err'] = sprintf('%s — %s', + __('Missing or invalid data'), + __('Correct any errors below and try again')); // Make sure the due date is valid if ($vars['duedate']) { diff --git a/include/class.user.php b/include/class.user.php index 82e1f9cfeea202b79ea971050a1076084bbc70ff..bc36bd7bc256dcd3bb18c9b8faba79010b3683bc 100644 --- a/include/class.user.php +++ b/include/class.user.php @@ -1096,7 +1096,7 @@ class UserAccount extends VerySimpleModel { if (!$thisstaff) { - $errors['err'] = __('Access Denied'); + $errors['err'] = __('Access denied'); return false; } diff --git a/include/class.variable.php b/include/class.variable.php index fb968336a697c505654d485829ab8e79620ab87f..8b346e0cd387483494dc2f245211a16ac75a5784 100644 --- a/include/class.variable.php +++ b/include/class.variable.php @@ -264,12 +264,12 @@ class VariableReplacer { $contextTypes = array( 'activity' => array('class' => 'ThreadActivity', 'desc' => __('Type of recent activity')), - 'assignee' => array('class' => 'Staff', 'desc' => __('Assigned agent/team')), + 'assignee' => array('class' => 'Staff', 'desc' => __('Assigned Agent / Team')), 'assigner' => array('class' => 'Staff', 'desc' => __('Agent performing the assignment')), 'comments' => __('Assign/transfer comments'), 'link' => __('Access link'), 'message' => array('class' => 'MessageThreadEntry', 'desc' => 'Message from the EndUser'), - 'note' => array('class' => 'NoteThreadEntry', 'desc' => __('Internal note')), + 'note' => array('class' => 'NoteThreadEntry', 'desc' => __('Internal Note')), 'poster' => array('class' => 'User', 'desc' => 'EndUser or Agent originating the message'), // XXX: This could be EndUser -or- Staff object 'recipient' => array('class' => 'TicketUser', 'desc' => 'Message recipient'), diff --git a/include/cli/modules/i18n.php b/include/cli/modules/i18n.php index 60f935abf7594cc7241019faead868fc734017c3..f4c06caec1e1c34e7cb615ccb78957256b1a97b5 100644 --- a/include/cli/modules/i18n.php +++ b/include/cli/modules/i18n.php @@ -548,6 +548,7 @@ class i18n_Compiler extends Module { 'msgid ""', 'msgstr ""', '"Project-Id-Version: osTicket '.trim(`git describe`).'\n"', + '"X-Osticket-Major-Version: '.MAJOR_VERSION.'\n"', '"POT-Create-Date: '.date('Y-m-d H:i O').'\n"', '"Report-Msgid-Bugs-To: support@osticket.com\n"', '"Language: en_US\n"', diff --git a/include/client/accesslink.inc.php b/include/client/accesslink.inc.php index b73dae29f1cf287842317b7117983ef88429a711..4f5f5ac810094a48898a231ec866b581b6defbd1 100644 --- a/include/client/accesslink.inc.php +++ b/include/client/accesslink.inc.php @@ -23,7 +23,7 @@ else <div class="login-box"> <div><strong><?php echo Format::htmlchars($errors['login']); ?></strong></div> <div> - <label for="email"><?php echo __('E-Mail Address'); ?>: + <label for="email"><?php echo __('Email Address'); ?>: <input id="email" placeholder="<?php echo __('e.g. john.doe@osticket.com'); ?>" type="text" name="lemail" size="30" value="<?php echo $email; ?>" class="nowarn"></label> </div> diff --git a/include/client/faq.inc.php b/include/client/faq.inc.php index c684fda771b03aec476768075297efe4537a843a..c904315623347873b911304207d4b505904b768f 100644 --- a/include/client/faq.inc.php +++ b/include/client/faq.inc.php @@ -17,8 +17,8 @@ $category=$faq->getCategory(); <div class="article-title flush-left"> <?php echo $faq->getLocalQuestion() ?> </div> -<div class="faded"><?php echo __('Last updated').' ' - . Format::relativeTime(Misc::db2gmtime($category->getUpdateDate())); ?></div> +<div class="faded"><?php echo sprintf(__('Last Updated %s'), + Format::relativeTime(Misc::db2gmtime($category->getUpdateDate()))); ?></div> <br/> <div class="thread-body bleed"> <?php echo $faq->getLocalAnswerWithImages(); ?> diff --git a/include/staff/apikey.inc.php b/include/staff/apikey.inc.php index 9a39b814f82544ef7ea26bb0b002a9e29b409450..c3b41fb0c41d14abc18ccb196666f7066fbe9128 100644 --- a/include/staff/apikey.inc.php +++ b/include/staff/apikey.inc.php @@ -103,7 +103,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </tr> <tr> <th colspan="2"> - <em><strong><?php echo __('Internal Notes');?></strong>: <?php echo __("be liberal, they're internal");?></em> + <em><strong><?php echo __('Internal Notes');?></strong>: <?php echo __("Be liberal, they're internal");?></em> </th> </tr> <tr> diff --git a/include/staff/apikeys.inc.php b/include/staff/apikeys.inc.php index 2fd02c9021e2b7f48c1d83eb95f9605626c9cfc1..87cbe05e03a01573322d57406362552f02ebe322 100644 --- a/include/staff/apikeys.inc.php +++ b/include/staff/apikeys.inc.php @@ -37,7 +37,7 @@ $res=db_query($query); if($res && ($num=db_num_rows($res))) $showing=$pageNav->showing().' '.__('API Keys'); else - $showing=__('No API keys found!'); + $showing=__('No API keys found'); ?> <form action="apikeys.php" method="POST" name="keys"> diff --git a/include/staff/banrule.inc.php b/include/staff/banrule.inc.php index 1e433ee89ade186369e1dafe14a1d7a315ccf365..6b4b5cea101f0fe457eb04f2c4dbfb7909630f45 100644 --- a/include/staff/banrule.inc.php +++ b/include/staff/banrule.inc.php @@ -32,7 +32,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <thead> <tr> <th colspan="2"> - <em><?php echo __('Valid email address required');?></em> + <em><?php echo __('Valid email address is required');?></em> </th> </tr> </thead> @@ -58,7 +58,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </tr> <tr> <th colspan="2"> - <em><strong><?php echo __('Internal notes');?></strong>: <?php echo __('Admin notes');?> </em> + <em><strong><?php echo __('Internal Notes');?></strong>: <?php echo __('Admin Notes');?> </em> </th> </tr> <tr> diff --git a/include/staff/categories.inc.php b/include/staff/categories.inc.php index 222079b5274daceb7775467b7a53457775f438e6..91e2419e7b9656cccc68cbe617be67f44eabc357 100644 --- a/include/staff/categories.inc.php +++ b/include/staff/categories.inc.php @@ -30,11 +30,6 @@ $pageNav->setURL('categories.php', $qs); $qstr = '&order='.($order=='DESC'?'ASC':'DESC'); $pageNav->paginate($categories); -if ($total) - $showing=$pageNav->showing().' '.__('categories'); -else - $showing=__('No FAQ categories found!'); - ?> <form action="categories.php" method="POST" id="mass-actions"> @@ -84,7 +79,6 @@ else </thead> <tbody> <?php - $total=0; $ids=($errors && is_array($_POST['ids']))?$_POST['ids']:null; foreach ($categories as $C) { $sel=false; @@ -110,12 +104,12 @@ else <tfoot> <tr> <td colspan="5"> - <?php if($res && $num){ ?> + <?php if ($total) { ?> <?php echo __('Select');?>: <a id="selectAll" href="#ckb"><?php echo __('All');?></a> <a id="selectNone" href="#ckb"><?php echo __('None');?></a> <a id="selectToggle" href="#ckb"><?php echo __('Toggle');?></a> - <?php }else{ + <?php } else { echo __('No FAQ categories found!'); } ?> </td> @@ -123,8 +117,8 @@ else </tfoot> </table> <?php -if($res && $num): //Show options.. - echo '<div> '.__('Page').':'.$pageNav->getPageLinks().' </div>'; +if ($total) { + echo '<div> '.__('Page').': '.$pageNav->getPageLinks().'</div>'; ?> <p class="centered" id="actions"> <input class="button" type="submit" name="make_public" value="<?php echo __('Make Public');?>"> @@ -132,7 +126,7 @@ if($res && $num): //Show options.. <input class="button" type="submit" name="delete" value="<?php echo __('Delete');?>" > </p> <?php -endif; +} ?> </form> <div style="display:none;" class="dialog" id="confirm-action"> diff --git a/include/staff/department.inc.php b/include/staff/department.inc.php index 7374f4b7f74f7407901b0644e86f9ebcf6e01146..66e172a8f59c018842b43d8689d9a0740b528c68 100644 --- a/include/staff/department.inc.php +++ b/include/staff/department.inc.php @@ -58,7 +58,7 @@ $info = Format::htmlchars(($errors && $_POST) ? $_POST : $info); </td> <td> <select name="pid"> - <option value="">— <?php echo __('Top-Level Deptartment'); ?> —</option> + <option value="">— <?php echo __('Top-Level Department'); ?> —</option> <?php foreach (Dept::getDepartments() as $id=>$name) { if ($info['id'] && $id == $info['id']) continue; ?> diff --git a/include/staff/dynamic-form.inc.php b/include/staff/dynamic-form.inc.php index 24361af87eeefb20e3dc3dec8d8f2504fc1855c4..f1bba83968aa5b116f28084aef6ba9ca0d9fb02c 100644 --- a/include/staff/dynamic-form.inc.php +++ b/include/staff/dynamic-form.inc.php @@ -280,7 +280,7 @@ if ($form && count($langs) > 1) { ?> <tr> <th colspan="7"> <em><strong><?php echo __('Internal Notes'); ?>:</strong> - <?php echo __("be liberal, they're internal"); ?></em> + <?php echo __("Be liberal, they're internal"); ?></em> </th> </tr> <tr> diff --git a/include/staff/dynamic-list.inc.php b/include/staff/dynamic-list.inc.php index 4e4b0b7766040afefae49cbd7b47708566c9cf28..a71079656404d42f7b509b72adfaf38c09c7dd2d 100644 --- a/include/staff/dynamic-list.inc.php +++ b/include/staff/dynamic-list.inc.php @@ -99,7 +99,7 @@ $info=Format::htmlchars(($errors && $_POST) ? array_merge($info,$_POST) : $info) <tr> <th colspan="7"> <em><strong><?php echo __('Internal Notes'); ?>:</strong> - <?php echo __("be liberal, they're internal"); ?></em> + <?php echo __("Be liberal, they're internal"); ?></em> </th> </tr> <tr> diff --git a/include/staff/email.inc.php b/include/staff/email.inc.php index 08225cb95e1175634a5e03b3527e9f2717dc417e..e46bcd6433b58f1ecd009de19ca509abf5cd6591 100644 --- a/include/staff/email.inc.php +++ b/include/staff/email.inc.php @@ -249,7 +249,6 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <span> <input type="text" name="mail_fetchmax" size=4 value="<?php echo $info['mail_fetchmax']?$info['mail_fetchmax']:''; ?>"> - <?php echo __('emails'); ?> <i class="help-tip icon-question-sign" href="#emails_per_fetch"></i> <font class="error"> <?php echo $errors['mail_fetchmax']; ?></font> </span> @@ -321,7 +320,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <tr> <th colspan="2"> <em><strong><?php echo __('Internal Notes');?></strong>: <?php - echo __("be liberal, they're internal.");?> <span class="error"> <?php echo $errors['notes']; ?></span></em> + echo __("Be liberal, they're internal");?> <span class="error"> <?php echo $errors['notes']; ?></span></em> </th> </tr> <tr> diff --git a/include/staff/faq-category.inc.php b/include/staff/faq-category.inc.php index d037f9f7bc5fadfc4f54c26c7f1d013ff5841274..0dcff184f204a3716f9c86c33cde294696b46341 100644 --- a/include/staff/faq-category.inc.php +++ b/include/staff/faq-category.inc.php @@ -38,7 +38,7 @@ echo sprintf('<div class="pull-right flush-right"> <div style="margin-bottom:10px;"> <div class="faq-title pull-left"><?php echo $category->getName() ?></div> <div class="faq-status inline">(<?php echo $category->isPublic()?__('Public'):__('Internal'); ?>)</div> - <div class="clear"><time class="faq"> <?php echo __('Last updated').' '. Format::daydatetime($category->getUpdateDate()); ?></time></div> + <div class="clear"><time class="faq"> <?php echo __('Last Updated').' '. Format::daydatetime($category->getUpdateDate()); ?></time></div> </div> <div class="cat-desc has_bottom_border"> <?php echo Format::display($category->getDescription()); ?> diff --git a/include/staff/faq-view.inc.php b/include/staff/faq-view.inc.php index 8f8daf77cef0bb913f8883e29d5e46296f39ccd0..9f46a499478cf3ddc0c0da0459ce5e26ec447eb4 100644 --- a/include/staff/faq-view.inc.php +++ b/include/staff/faq-view.inc.php @@ -83,7 +83,7 @@ if ($otherLangs) { ?> <div> <strong><?php echo $faq->isPublished()?__('Published'):__('Internal'); ?></strong> </div> -<a data-dialog="ajax.php/kb/faq/<?php echo $faq->getId(); ?>/access" href="#"><?php echo __('manage access'); ?></a> +<a data-dialog="ajax.php/kb/faq/<?php echo $faq->getId(); ?>/access" href="#"><?php echo __('Manage Access'); ?></a> </section> </div> @@ -94,7 +94,7 @@ if ($otherLangs) { ?> <div class="faq-title flush-left"><?php echo $faq->getLocalQuestion() ?> </div> -<div class="faded"><?php echo __('Last updated');?> +<div class="faded"><?php echo __('Last Updated');?> <?php echo Format::relativeTime(Misc::db2gmtime($faq->getUpdateDate())); ?> </div> <br/> diff --git a/include/staff/faq.inc.php b/include/staff/faq.inc.php index e96d302228e693d6aa507a94eecd7ef74b3ebaf0..500e1132ed6b9a637f3db8392a39108947b31e28 100644 --- a/include/staff/faq.inc.php +++ b/include/staff/faq.inc.php @@ -246,7 +246,7 @@ echo $attrs; ?>><?php echo $draft ?: $answer; <div class="tab_content" style="display:none;" id="notes"> <div> - <b><?php echo __('Internal Notes');?></b>:<span class="faded"><?php echo __("Be libergsdfgal, they're internal");?></span> + <b><?php echo __('Internal Notes');?></b>:<span class="faded"><?php echo __("Be liberal, they're internal");?></span> </div> <div style="margin-top:10px"></div> <textarea class="richtext no-bar" name="notes" cols="21" diff --git a/include/staff/filter.inc.php b/include/staff/filter.inc.php index 817d20b6b82b6f9b10e18e78cd3b96a3c853aa42..b216779ac4f54fcbf0c17694061ae7c4c000612b 100644 --- a/include/staff/filter.inc.php +++ b/include/staff/filter.inc.php @@ -269,7 +269,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <i class="icon-plus-sign"></i> <select name="new-action" id="new-action-select" onchange="javascript: $('#new-action-btn').trigger('click');"> - <option value=""><?php echo __('— Select an Action —'); ?></option> + <option value="">— <?php echo __('Select an Action'); ?> —</option> <?php $current_group = ''; foreach (FilterAction::allRegistered() as $group=>$actions) { @@ -313,7 +313,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <tr> <th colspan="2"> <em><strong><?php echo __('Internal Notes');?></strong>: <?php - echo __("be liberal, they're internal");?></em> + echo __("Be liberal, they're internal");?></em> </th> </tr> </thead> diff --git a/include/staff/filters.inc.php b/include/staff/filters.inc.php index 25a753302064dc9ebf177eca8e83535cd58d45f2..6eb7f32310c965fbcb3f013a1666c6fbb99c3d43 100644 --- a/include/staff/filters.inc.php +++ b/include/staff/filters.inc.php @@ -41,7 +41,7 @@ $res=db_query($query); if($res && ($num=db_num_rows($res))) $showing=$pageNav->showing().' '._N('filter', 'filters', $num); else - $showing=__('No filters found!'); + $showing=__('No filters found'); ?> <form action="filters.php" method="POST" name="filters"> diff --git a/include/staff/helptopic.inc.php b/include/staff/helptopic.inc.php index 28b01152fcf608bdfccc7ed1340b7ba61bcf62d1..a5a2c31805f760bbeae7aacc0340b9bb8984ec7c 100644 --- a/include/staff/helptopic.inc.php +++ b/include/staff/helptopic.inc.php @@ -99,7 +99,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <div style="padding:8px 3px;border-bottom: 2px dotted #ddd;"> <strong><?php echo __('Internal Notes');?>:</strong> - <?php echo __("be liberal, they're internal.");?> + <?php echo __("Be liberal, they're internal");?> </div> <textarea class="richtext no-bar" name="notes" cols="21" @@ -259,7 +259,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </td> </tr> <tr> - <td width="180"><?php echo __('Thank-you Page'); ?>:</td> + <td width="180"><?php echo __('Thank-You Page'); ?>:</td> <td> <select name="page_id"> <option value="">— <?php echo __('System Default'); ?> —</option> @@ -320,7 +320,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </tr> <tr> <td width="180"> - <?php echo __('Auto-response'); ?>: + <?php echo __('Auto-Response'); ?>: </td> <td> <input type="checkbox" name="noautoresp" value="1" <?php echo $info['noautoresp']?'checked="checked"':''; ?> > diff --git a/include/staff/login.tpl.php b/include/staff/login.tpl.php index c81c46615d7ac0d42c4b64882663a6ce633ceb66..228ec612b0208a0fda92c45cb2439e50a37d7d6f 100644 --- a/include/staff/login.tpl.php +++ b/include/staff/login.tpl.php @@ -22,7 +22,7 @@ $info = ($_POST && $errors)?Format::htmlchars($_POST):array(); autofocus autocorrect="off" autocapitalize="off"> <input type="password" name="passwd" id="pass" placeholder="<?php echo __('Password'); ?>" autocorrect="off" autocapitalize="off"> <?php if ($show_reset && $cfg->allowPasswordReset()) { ?> - <h3 style="display:inline"><a href="pwreset.php"><?php echo __('Forgot my password'); ?></a></h3> + <h3 style="display:inline"><a href="pwreset.php"><?php echo __('Forgot My Password'); ?></a></h3> <?php } ?> <button class="submit button pull-right" type="submit" name="submit"><i class="icon-signin"></i> <?php echo __('Log In'); ?> diff --git a/include/staff/page.inc.php b/include/staff/page.inc.php index 63d4fee2c02c1eab07f06d52db5bb2ac403b584e..97cb838e50a13c9739e1c020aced734c17ecd4ef 100644 --- a/include/staff/page.inc.php +++ b/include/staff/page.inc.php @@ -1,9 +1,9 @@ <?php if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access Denied'); $pageTypes = array( - 'landing' => __('Landing page'), - 'offline' => __('Offline page'), - 'thank-you' => __('Thank you page'), + 'landing' => __('Landing Page'), + 'offline' => __('Offline Page'), + 'thank-you' => __('Thank-You Page'), 'other' => __('Other'), ); $info = $qs = array(); @@ -182,7 +182,7 @@ else </div> <div class="tab_content" style="display:none" id="notes"> <em><strong><?php echo __('Internal Notes'); ?></strong>: - <?php echo __("be liberal, they're internal"); ?></em> + <?php echo __("Be liberal, they're internal"); ?></em> <textarea class="richtext no-bar" name="notes" cols="21" rows="8" style="width: 80%;"><?php echo $info['notes']; ?></textarea> </div> diff --git a/include/staff/profile.inc.php b/include/staff/profile.inc.php index e71a1d1e0a10383b297b54e5cb4cc8c262654956..5383a8c9893c1c9a62a79b489f964e6796c58ebd 100644 --- a/include/staff/profile.inc.php +++ b/include/staff/profile.inc.php @@ -167,7 +167,7 @@ if ($avatar->isChangeable()) { ?> <td width="180"><?php echo __('Maximum Page size');?>:</td> <td> <select name="max_page_size"> - <option value="0">— <?php echo __('system default');?> —</option> + <option value="0">— <?php echo __('System Default');?> —</option> <?php $pagelimit = $staff->max_page_size ?: $cfg->getPageSize(); for ($i = 5; $i <= 50; $i += 5) { @@ -183,7 +183,7 @@ if ($avatar->isChangeable()) { ?> </td> <td> <select name="auto_refresh_rate"> - <option value="0">— <?php echo __('disable');?> —</option> + <option value="0">— <?php echo __('Disabled');?> —</option> <?php $y=1; for($i=1; $i <=30; $i+=$y) { diff --git a/include/staff/settings-emails.inc.php b/include/staff/settings-emails.inc.php index d08b0bec549c19db92eedc134a21ce146f0cd095..d84fdd63bc5411a3fae5345199f0976a27ed05e3 100644 --- a/include/staff/settings-emails.inc.php +++ b/include/staff/settings-emails.inc.php @@ -141,7 +141,7 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) <?php echo __('Automatically add collaborators from email fields'); ?> <i class="help-tip icon-question-sign" href="#accept_email_collaborators"></i> </tr> - <tr><th colspan=2><em><strong><?php echo __('Outgoing Emails');?></strong>: <?php echo __('Default email only applies to outgoing emails without SMTP setting.');?></em></th></tr> + <tr><th colspan=2><em><strong><?php echo __('Outgoing Email');?></strong>: <?php echo __('Default email only applies to outgoing emails without SMTP setting.');?></em></th></tr> <tr><td width="180"><?php echo __('Default MTA'); ?>:</td> <td> <select name="default_smtp_id"> diff --git a/include/staff/settings-tasks.inc.php b/include/staff/settings-tasks.inc.php index dff1b8d79bfd05738712e2569660bc18e885db82..e06a96b5d1a984536c7263e93d38996132efe13d 100644 --- a/include/staff/settings-tasks.inc.php +++ b/include/staff/settings-tasks.inc.php @@ -3,7 +3,7 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) if(!($maxfileuploads=ini_get('max_file_uploads'))) $maxfileuploads=DEFAULT_MAX_FILE_UPLOADS; ?> -<h2><?php echo __('Tasks Settings and Options');?></h2> +<h2><?php echo __('Task Settings and Options');?></h2> <form action="settings.php?t=tasks" method="post" id="save"> <?php csrf_token(); ?> <input type="hidden" name="t" value="tasks" > diff --git a/include/staff/slaplan.inc.php b/include/staff/slaplan.inc.php index a3c806d5a8d842b2aa11ca722a0e33119c964a80..beba3be42ae2971bc44f7d4ce6f4502b362e1148 100644 --- a/include/staff/slaplan.inc.php +++ b/include/staff/slaplan.inc.php @@ -91,7 +91,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </tr> <tr> <th colspan="2"> - <em><strong><?php echo __('Internal Notes');?></strong>: <?php echo __("be liberal, they're internal");?> + <em><strong><?php echo __('Internal Notes');?></strong>: <?php echo __("Be liberal, they're internal");?> </em> </th> </tr> diff --git a/include/staff/slaplans.inc.php b/include/staff/slaplans.inc.php index 3e6c5c93207cba1af6df3648cd5971e0c6451fe8..7b06e98849ce671768d0ae913fe2f784236386a4 100644 --- a/include/staff/slaplans.inc.php +++ b/include/staff/slaplans.inc.php @@ -36,7 +36,7 @@ $qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']); $pageNav = new Pagenate($count, $page, PAGE_LIMIT); $pageNav->setURL('slas.php', $qs); -$showing = $pageNav->showing().' '._N('SLA plan', 'SLA plans', $count); +$showing = $pageNav->showing().' '._N('Service Level Agreement', 'Service Level Agreements', $count); $qstr .= '&order='.($order=='DESC' ? 'ASC' : 'DESC'); ?> <form action="slas.php" method="POST" name="slas"> diff --git a/include/staff/staff.inc.php b/include/staff/staff.inc.php index 384e59d0756357b8f733f63fa31589b1b9d966fb..bf2f925f4f522571e9b8d7f5125a048e28e4c2fb 100644 --- a/include/staff/staff.inc.php +++ b/include/staff/staff.inc.php @@ -199,7 +199,7 @@ if (count($bks) > 1) { <div style="padding:8px 3px; margin-top: 1.6em"> <strong class="big"><?php echo __('Internal Notes');?>: </strong> - <?php echo __("be liberal, they're internal.");?> + <?php echo __("Be liberal, they're internal");?> </div> <textarea name="notes" class="richtext"> diff --git a/include/staff/staffmembers.inc.php b/include/staff/staffmembers.inc.php index be3d276f69cee3c2d2f625a03080551d056eb50b..7ddba38eab8213491443aeccdf489eeb7b62ad88 100644 --- a/include/staff/staffmembers.inc.php +++ b/include/staff/staffmembers.inc.php @@ -87,7 +87,7 @@ $agents->limit($pageNav->getLimit())->offset($pageNav->getStart()); <input type="hidden" name="a" value="filter"> <select name="did" id="did"> <option value="0">— - <?php echo __( 'All Department');?> —</option> + <?php echo __( 'All Departments');?> —</option> <?php if (($depts=Dept::getDepartments())) { foreach ($depts as $id=> $name) { $sel=($_REQUEST['did'] && $_REQUEST['did']==$id)?'selected="selected"':''; echo sprintf(' <option value="%d" %s>%s</option>',$id,$sel,$name); } } ?> </select> diff --git a/include/staff/syslogs.inc.php b/include/staff/syslogs.inc.php index 13d355928e79013c16098e01964812276d454eef..0d3f05e216a6e898f93b2a1134f497a2746ee6cf 100644 --- a/include/staff/syslogs.inc.php +++ b/include/staff/syslogs.inc.php @@ -81,7 +81,7 @@ $res=db_query($query); if($res && ($num=db_num_rows($res))) $showing=$pageNav->showing().' '.$title; else - $showing=__('No logs found!'); + $showing=__('No logs found'); ?> <div id="basic_search"> @@ -97,8 +97,9 @@ else <?php echo __('Log Level'); ?>: <i class="help-tip icon-question-sign" href="#type"></i> <select name='type'> <option value="" selected><?php echo __('All');?></option> - <option value="Error" <?php echo ($type=='Error')?'selected="selected"':''; ?>><?php echo __('Errors');?></option> - <option value="Warning" <?php echo ($type=='Warning')?'selected="selected"':''; ?>><?php echo __('Warnings');?></option> <option value="Debug" <?php echo ($type=='Debug')?'selected="selected"':''; ?>><?php echo __('Debug');?></option> + <option value="Error" <?php echo ($type=='Error')?'selected="selected"':''; ?>><?php echo __('ERROR');?></option> + <option value="Warning" <?php echo ($type=='Warning')?'selected="selected"':''; ?>><?php echo __('WARN');?></option> + <option value="Debug" <?php echo ($type=='Debug')?'selected="selected"':''; ?>><?php echo __('DEBUG');?></option> </select> <input type="submit" Value="<?php echo __('Go!');?>" /> diff --git a/include/staff/template.inc.php b/include/staff/template.inc.php index 7dd34df896a9dfacdaab3c3bf76370e1bd72dd9e..c8a91cace854b47634bf2563e481afcd22a46eec 100644 --- a/include/staff/template.inc.php +++ b/include/staff/template.inc.php @@ -156,7 +156,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <tr> <th colspan="2"> <em><strong><?php echo __('Internal Notes');?></strong>: <?php echo __( - "be liberal, they're internal");?></em> + "Be liberal, they're internal");?></em> </th> </tr> <tr> diff --git a/include/staff/templates/faq-print.tmpl.php b/include/staff/templates/faq-print.tmpl.php index 6f07f898dbd0c00510b2af5e63975c1c9c095e59..57f0dc6bba6adb8f6b9c8fe48a1c3c49ebfa880c 100644 --- a/include/staff/templates/faq-print.tmpl.php +++ b/include/staff/templates/faq-print.tmpl.php @@ -1,7 +1,7 @@ <div class="faq-title flush-left"><?php echo $faq->getLocalQuestion() ?> </div> -<div class="faded"><?php echo __('Last updated');?> +<div class="faded"><?php echo __('Last Updated');?> <?php echo Format::daydatetime($faq->getUpdateDate()); ?> </div> diff --git a/include/staff/templates/task-view.tmpl.php b/include/staff/templates/task-view.tmpl.php index f53a410ef722f9928630a6bdce9948a6c644989b..e2e26b7cc52c814c2e8f213c61d3a3df4183adc3 100644 --- a/include/staff/templates/task-view.tmpl.php +++ b/include/staff/templates/task-view.tmpl.php @@ -533,14 +533,14 @@ else <option value="open" <?php echo $task->isOpen() ? 'selected="selected"': ''; ?>> <?php - echo _('Open'); ?></option> + echo __('Open'); ?></option> <?php if ($task->isClosed() || $canClose) { ?> <option value="closed" <?php echo $task->isClosed() ? 'selected="selected"': ''; ?>> <?php - echo _('Closed'); ?></option> + echo __('Closed'); ?></option> <?php } ?> </select> @@ -593,14 +593,14 @@ else <option value="open" <?php echo $task->isOpen() ? 'selected="selected"': ''; ?>> <?php - echo _('Open'); ?></option> + echo __('Open'); ?></option> <?php if ($task->isClosed() || $canClose) { ?> <option value="closed" <?php echo $task->isClosed() ? 'selected="selected"': ''; ?>> <?php - echo _('Closed'); ?></option> + echo __('Closed'); ?></option> <?php } ?> </select> diff --git a/include/staff/templates/user-account.tmpl.php b/include/staff/templates/user-account.tmpl.php index ce1605f961cd27542a63df8589941f05469a8bd4..78c0afdc46bff70415db2cab574cc821fc771d7b 100644 --- a/include/staff/templates/user-account.tmpl.php +++ b/include/staff/templates/user-account.tmpl.php @@ -139,7 +139,7 @@ if ($info['error']) { 'checked="checked"' : ''; ?>> <?php echo __('Password Reset Required'); ?></div> <div><input type="checkbox" name="forbid-pwchange-flag" value="1" <?php echo !$account->isPasswdResetEnabled() ? - 'checked="checked"' : ''; ?>> <?php echo __('User Cannot Change Password'); ?></div> + 'checked="checked"' : ''; ?>> <?php echo __('User cannot change password'); ?></div> </td> </tr> </tbody> diff --git a/include/staff/templates/user-delete.tmpl.php b/include/staff/templates/user-delete.tmpl.php index dff5b7f2cdd42782fe6cdb8ce7d62ab24d64a3f1..0a2ac0b44698e5427aec69da9818809bf3fa4f80 100644 --- a/include/staff/templates/user-delete.tmpl.php +++ b/include/staff/templates/user-delete.tmpl.php @@ -1,7 +1,7 @@ <?php if (!$info['title']) - $info['title'] = sprintf(__('Delete User: %s'), Format::htmlchars($user->getName())); + $info['title'] = sprintf('%s: %s', __('Delete User'), Format::htmlchars($user->getName())); $info['warn'] = __('Deleted users and tickets CANNOT be recovered'); diff --git a/include/staff/ticket-open.inc.php b/include/staff/ticket-open.inc.php index c7680704fe2c8e8f9b6ec8d2100cb5592023b0cf..5319cb1afee69d3bad59fcf55e92b6b1385f86fa 100644 --- a/include/staff/ticket-open.inc.php +++ b/include/staff/ticket-open.inc.php @@ -371,7 +371,7 @@ print $response_form->getField('attachments')->render(); <?php if($thisstaff->getSignature()) { ?> <label><input type="radio" name="signature" value="mine" - <?php echo ($info['signature']=='mine')?'checked="checked"':''; ?>> <?php echo __('My signature');?></label> + <?php echo ($info['signature']=='mine')?'checked="checked"':''; ?>> <?php echo __('My Signature');?></label> <?php } ?> <label><input type="radio" name="signature" value="dept" diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index 782151d32172f9abd5245f0ee2db4513d2c7e7a3..ffa44110ddfd50918cf063916db136c880d7e07f 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -896,7 +896,8 @@ if ($errors['err'] && isset($_POST['a'])) { '<b><span id="newuser">this guy</span></b>'); ?> </p> <p class="confirm-action" style="display:none;" id="delete-confirm"> - <font color="red"><strong><?php echo __('Are you sure you want to DELETE this ticket?');?></strong></font> + <font color="red"><strong><?php echo sprintf( + __('Are you sure you want to DELETE %s?', __('this ticket')));?></strong></font> <br><br><?php echo __('Deleted data CANNOT be recovered, including any associated attachments.');?> </p> <div><?php echo __('Please confirm to continue.');?></div> diff --git a/include/upgrader/done.inc.php b/include/upgrader/done.inc.php index 58edda1cb125c666acc72c9627170b0e9da9c292..894d7ff2976f874539e7d8b13b2c2d63d5bbb286 100644 --- a/include/upgrader/done.inc.php +++ b/include/upgrader/done.inc.php @@ -29,7 +29,7 @@ $_SESSION['ost_upgrader']=null; sprintf('<a href="http://osticket.com/wiki/Release_Notes" target="_blank">%s</a>', __('osTicket Wiki')));?></p> <p><b><?php echo __('Stay up to date');?></b>: <?php echo __("It's important to keep your osTicket installation up to date. Get announcements, security updates and alerts delivered directly to you!");?> <?php echo sprintf(__('%1$s Get in the loop %2$s today and stay informed!'), '<a target="_blank" href="http://osticket.com/subscribe.php">', '</a>');?></p> - <p><b><?php echo __('Commercial support available');?></b>: <?php echo sprintf(__('Get guidance and hands-on expertise to address unique challenges and make sure your osTicket runs smoothly, efficiently, and securely. %1$s Learn More! %2$s'), '<a target="_blank" href="http://osticket.com/support">','</a>');?></p> + <p><b><?php echo __('Commercial Support Available');?></b>: <?php echo sprintf(__('Get guidance and hands-on expertise to address unique challenges and make sure your osTicket runs smoothly, efficiently, and securely. %1$s Learn More! %2$s'), '<a target="_blank" href="http://osticket.com/support">','</a>');?></p> </div> <div class="clear"></div> </div> diff --git a/include/upgrader/prereq.inc.php b/include/upgrader/prereq.inc.php index 7ab7b4c5b5b98dd7cb272b34854fecb69c4fe558..2c0e8d8533f737d26db6893f42357a9e73b5cc80 100644 --- a/include/upgrader/prereq.inc.php +++ b/include/upgrader/prereq.inc.php @@ -41,7 +41,7 @@ if(!defined('OSTSCPINC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access D <p>1. <?php echo __('Remember to back up your osTicket database');?></p> <p>2. <?php echo sprintf(__('Refer to %1$s Upgrade Guide %2$s for the latest tips'), '<a href="http://osticket.com/wiki/Upgrade_and_Migration" target="_blank">', '</a>');?></p> <p>3. <?php echo __('If you experience any problems, you can always restore your files/database backup.');?></p> - <p>4. <?php echo sprintf(__('We can help, feel free to %1$s contact us %2$s for professional help.'), '<a href="http://osticket.com/support/" target="_blank">', '</a>');?></p> + <p>4. <?php echo sprintf(__('We can help. Feel free to %1$s contact us %2$s for professional help.'), '<a href="http://osticket.com/support/" target="_blank">', '</a>');?></p> </div> <div class="clear"></div> diff --git a/include/upgrader/upgrade.inc.php b/include/upgrader/upgrade.inc.php index 8588f742eb644904593c62a68125ce8940513b5e..302688689cf39a597e133e81b4cc10267e13e6f0 100644 --- a/include/upgrader/upgrade.inc.php +++ b/include/upgrader/upgrade.inc.php @@ -33,14 +33,15 @@ $action=$upgrader->getNextAction(); <input type="hidden" name="s" value="upgrade"> <input type="hidden" id="mode" name="m" value="<?php echo $upgrader->getMode(); ?>"> <input type="hidden" name="sh" value="<?php echo $upgrader->getSchemaSignature(); ?>"> - <input class="btn" type="submit" name="submit" value="<?php echo __('Upgrade Now!');?>"> + <input class="btn" type="submit" name="submit" value="<?php echo __('Upgrade Now');?>"> </form> </div> </div> <div class="sidebar"> <div class="content"> <h3><?php echo __('Upgrade Tips');?></h3> - <p>1. <?php echo __('Be patient the process will take a couple of minutes.');?></p> + <p>1. <?php echo __("Be patient. The upgrade process will take a couple of seconds.");?></p> + <p>2. <?php echo __('If you experience any problems, you can always restore your files/database backup.');?></p> <p>3. <?php echo sprintf(__('We can help. Feel free to %1$s contact us %2$s for professional help.'), '<a href="http://osticket.com/support" target="_blank">', '</a>');?></p> </div> diff --git a/js/redactor-osticket.js b/js/redactor-osticket.js index 8754c637161e12905f0a9b3412e9b373e2acb233..23a30fc29676d221f0f69e15f0c1f757f796acf0 100644 --- a/js/redactor-osticket.js +++ b/js/redactor-osticket.js @@ -116,7 +116,8 @@ RedactorPlugins.draft = function() { displayError: function(json) { $.sysAlert(json.error, - __('Unable to save draft. Refresh the current page to restore and continue your draft.')); + __('Unable to save draft.') + + __('Refresh the current page to restore and continue your draft.')); }, hideDraftSaved: function() { diff --git a/open.php b/open.php index a081c29c9bb47c4417432a1567e65d5d50fd8fd9..7cf09ec1186078f6ff112958417748386f77ca71 100644 --- a/open.php +++ b/open.php @@ -50,7 +50,9 @@ if ($_POST) { @header('Location: tickets.php?id='.$ticket->getId()); } }else{ - $errors['err']=$errors['err']?$errors['err']:__('Unable to create a ticket. Please correct errors below and try again!'); + $errors['err'] = $errors['err'] ?: sprintf('%s %s', + __('Unable to create a ticket.'), + __('Correct any errors below and try again.')); } } diff --git a/pwreset.php b/pwreset.php index 10a7db2fc36cc073391ddbf238815edf06b224ce..e083d3956bd3cb0e5aa5ca4777342926e588b278 100644 --- a/pwreset.php +++ b/pwreset.php @@ -26,7 +26,7 @@ if($_POST) { $banner = __('Unable to send reset email. Internal error'); } else - $banner = sprintf(__('Unable to verify username: %s'), + $banner = sprintf(__('Unable to verify username %s'), Format::htmlchars($_POST['userid'])); break; case 'reset': diff --git a/scp/apikeys.php b/scp/apikeys.php index c4de318105f6776937e17e8c1a637cc70302fb4f..9d9336a30b2f41a25b7126842b98d9d753b7f335 100644 --- a/scp/apikeys.php +++ b/scp/apikeys.php @@ -18,31 +18,34 @@ include_once(INCLUDE_DIR.'class.api.php'); $api=null; if($_REQUEST['id'] && !($api=API::lookup($_REQUEST['id']))) - $errors['err']=sprintf(__('%s: Unknown or invalid ID.'), __('API key')); + $errors['err']=sprintf(__('%s: Unknown or invalid ID.'), __('API Key')); if($_POST){ switch(strtolower($_POST['do'])){ case 'update': if(!$api){ - $errors['err']=sprintf(__('%s: Unknown or invalid'), __('API key')); + $errors['err']=sprintf(__('%s: Unknown or invalid'), __('API Key')); }elseif($api->update($_POST,$errors)){ - $msg=sprintf(__('Succesfully updated %s'), __('this API key')); + $msg=sprintf(__('Successfully updated %s.'), __('this API key')); }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Error updating %s. Try again!'), __('this API key')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this API key')), + __('Correct any errors below and try again.')); } break; case 'add': if(($id=API::add($_POST,$errors))){ - $msg=sprintf(__('Successfully added %s'), __('an API key')); + $msg=sprintf(__('Successfully added %s.'), __('an API key')); $_REQUEST['a']=null; }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this API key')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this API key')), + __('Correct any errors below and try again.')); } break; case 'mass_process': if(!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { - $errors['err'] = sprintf(__('You must select at least %s'), __('one API key')); + $errors['err'] = sprintf(__('You must select at least %s.'), __('one API key')); } else { $count=count($_POST['ids']); switch(strtolower($_POST['a'])) { @@ -57,7 +60,7 @@ if($_POST){ $warn = sprintf(__('%1$d of %2$d %3$s enabled'), $num, $count, _N('selected API key', 'selected API keys', $count)); } else { - $errors['err'] = sprintf(__('Unable to enable %s.'), + $errors['err'] = sprintf(__('Unable to enable %s'), _N('selected API key', 'selected API keys', $count)); } break; @@ -83,13 +86,13 @@ if($_POST){ $i++; } if($i && $i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected API key', 'selected API keys', $count)); elseif($i>0) $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $num, $count, _N('selected API key', 'selected API keys', $count)); elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s'), + $errors['err'] = sprintf(__('Unable to delete %s.'), _N('selected API key', 'selected API keys', $count)); break; default: diff --git a/scp/banlist.php b/scp/banlist.php index bbebfa4b7cc574884d2acd01f71e50dad19c1fdc..8667b2e74cee9f4f1a37ccefe67618773db2ddca 100644 --- a/scp/banlist.php +++ b/scp/banlist.php @@ -34,7 +34,7 @@ if($_POST && !$errors && $filter){ if(!$rule){ $errors['err']=sprintf(__('%s: Unknown or invalid'), __('ban rule')); }elseif(!$_POST['val'] || !Validator::is_email($_POST['val'])){ - $errors['err']=$errors['val']=__('Valid email address required'); + $errors['err']=$errors['val']=__('Valid email address is required'); }elseif(!$errors){ $vars=array('what'=>'email', 'how'=>'equal', @@ -43,9 +43,11 @@ if($_POST && !$errors && $filter){ 'isactive'=>$_POST['isactive'], 'notes'=>$_POST['notes']); if($rule->update($vars,$errors)){ - $msg=sprintf(__('Successfully updated %s'), Format::htmlchars($_POST['val'])); + $msg=sprintf(__('Successfully updated %s.'), Format::htmlchars($_POST['val'])); }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Error updating %s. Try again!'), __('this ban rule')); + $errors['err'] = sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this ban rule')), + __('Correct any errors below and try again.')); } } break; @@ -53,7 +55,7 @@ if($_POST && !$errors && $filter){ if(!$filter) { $errors['err']=sprintf(__('%s: Unknown or invalid'), __('ban list')); }elseif(!$_POST['val'] || !Validator::is_email($_POST['val'])) { - $errors['err']=$errors['val']=__('Valid email address required'); + $errors['err']=$errors['val']=__('Valid email address is required'); }elseif(BanList::includes(trim($_POST['val']))) { $errors['err']=$errors['val']=__('Email already in the ban list'); }elseif($filter->addRule('email','equal',trim($_POST['val']),array('isactive'=>$_POST['isactive'],'notes'=>$_POST['notes']))) { @@ -66,7 +68,8 @@ if($_POST && !$errors && $filter){ break; case 'mass_process': if(!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { - $errors['err'] = __('You must select at least one email to process.'); + $errors['err'] = sprintf(__('You must select at least %s to process.'), + __('one email')); } else { $count=count($_POST['ids']); switch(strtolower($_POST['a'])) { @@ -109,13 +112,13 @@ if($_POST && !$errors && $filter){ $i++; } if($i && $i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected ban rule', 'selected ban rules', $count)); elseif($i>0) $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected ban rule', 'selected ban rules', $count)); elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s'), + $errors['err'] = sprintf(__('Unable to delete %s.'), _N('selected ban rule', 'selected ban rules', $count)); break; diff --git a/scp/canned.php b/scp/canned.php index 6f2631e2a6f5082397fe430dfd31f733e151bfb8..ae8ded5fe76017b4a65b3c75929088e4110127b6 100644 --- a/scp/canned.php +++ b/scp/canned.php @@ -28,7 +28,7 @@ if(!$thisstaff $canned=null; if($_REQUEST['id'] && !($canned=Canned::lookup($_REQUEST['id']))) - $errors['err']=sprintf(__('%s: Unknown or invalid ID.'), __('canned response')); + $errors['err']=sprintf(__('%s: Unknown or invalid ID.'), __('Canned Response')); $canned_form = new SimpleForm(array( 'attachments' => new FileUploadField(array('id'=>'attach', @@ -43,7 +43,7 @@ if ($_POST) { if(!$canned) { $errors['err']=sprintf(__('%s: Unknown or invalid'), __('canned response')); } elseif($canned->update($_POST, $errors)) { - $msg=sprintf(__('Successfully updated %s'), + $msg=sprintf(__('Successfully updated %s.'), __('this canned response')); //Delete removed attachments. @@ -68,13 +68,15 @@ if ($_POST) { // Delete drafts for all users for this canned response Draft::deleteForNamespace('canned.'.$canned->getId()); } elseif(!$errors['err']) { - $errors['err']=sprintf(__('Error updating %s. Try again!'), __('this canned response')); + $errors['err'] = sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this canned response')), + __('Correct any errors below and try again.')); } break; case 'create': $premade = Canned::create(); if ($premade->update($_POST,$errors)) { - $msg=sprintf(__('Successfully added %s'), Format::htmlchars($_POST['title'])); + $msg=sprintf(__('Successfully added %s.'), Format::htmlchars($_POST['title'])); $_REQUEST['a']=null; //Upload attachments $keepers = $canned_form->getField('attachments')->getClean(); @@ -90,13 +92,14 @@ if ($_POST) { // Delete this user's drafts for new canned-responses Draft::deleteForNamespace('canned', $thisstaff->getId()); } elseif(!$errors['err']) { - $errors['err']=sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this canned response')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this canned response')), + __('Correct any errors below and try again.')); } break; case 'mass_process': if(!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { - $errors['err']=sprintf(__('You must select at least %s'), __('one canned response')); + $errors['err']=sprintf(__('You must select at least %s.'), __('one canned response')); } else { $count=count($_POST['ids']); switch(strtolower($_POST['a'])) { @@ -108,10 +111,10 @@ if ($_POST) { $msg = sprintf(__('Successfully enabled %s'), _N('selected canned response', 'selected canned responses', $count)); else - $warn = sprintf(__('%1$d of %2$d %s enabled'), $num, $count, + $warn = sprintf(__('%1$d of %2$d %3$s enabled'), $num, $count, _N('selected canned response', 'selected canned responses', $count)); } else { - $errors['err'] = sprintf(__('Unable to enable %s.'), + $errors['err'] = sprintf(__('Unable to enable %s'), _N('selected canned response', 'selected canned responses', $count)); } break; @@ -123,7 +126,7 @@ if ($_POST) { $msg = sprintf(__('Successfully disabled %s'), _N('selected canned response', 'selected canned responses', $count)); else - $warn = sprintf(__('%1$d of %2$d %s disabled'), $num, $count, + $warn = sprintf(__('%1$d of %2$d %3$s disabled'), $num, $count, _N('selected canned response', 'selected canned responses', $count)); } else { $errors['err'] = sprintf(__('Unable to disable %s'), @@ -139,17 +142,17 @@ if ($_POST) { } if($i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected canned response', 'selected canned responses', $count)); elseif($i>0) $warn=sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected canned response', 'selected canned responses', $count)); elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s'), + $errors['err'] = sprintf(__('Unable to delete %s.'), _N('selected canned response', 'selected canned responses', $count)); break; default: - $errors['err']=__('Unknown command'); + $errors['err']=__('Unknown action'); } } break; diff --git a/scp/categories.php b/scp/categories.php index 3e25c1d672e14f017b26c9da44863cc98f70455b..22e9fab69dffbcbd7fe5da0075c82863aaedfb6f 100644 --- a/scp/categories.php +++ b/scp/categories.php @@ -26,33 +26,36 @@ if(!$thisstaff || $category=null; if($_REQUEST['id'] && !($category=Category::lookup($_REQUEST['id']))) - $errors['err']=sprintf(__('%s: Unknown or invalid ID.'), __('category')); + $errors['err']=sprintf(__('%s: Unknown or invalid ID.'), __('Category')); if($_POST){ switch(strtolower($_POST['do'])) { case 'update': if(!$category) { - $errors['err']=sprintf(__('%s: Unknown or invalid'), __('category')); + $errors['err']=sprintf(__('%s: Unknown or invalid'), __('Category')); } elseif($category->update($_POST,$errors)) { - $msg=sprintf(__('Successfully updated %s'), + $msg=sprintf(__('Successfully updated %s.'), __('this category')); } elseif(!$errors['err']) { - $errors['err']=sprintf(__('Error updating %s. Correct error(s) below and try again.'), __('this category')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this category')), + __('Correct any errors below and try again.')); } break; case 'create': $category = Category::create(); if ($category->update($_POST, $errors)) { - $msg=sprintf(__('Successfull added %s'), Format::htmlchars($_POST['name'])); + $msg=sprintf(__('Successfully added %s.'), Format::htmlchars($_POST['name'])); $_REQUEST['a']=null; } elseif(!$errors['err']) { - $errors['err']=sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this category')); + $errors['err'] = sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this category')), + __('Correct any errors below and try again.')); } break; case 'mass_process': if(!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { - $errors['err']=sprintf(__('You must select at least %s'), __('one category')); + $errors['err']=sprintf(__('You must select at least %s.'), __('one category')); } else { $count=count($_POST['ids']); switch(strtolower($_POST['a'])) { @@ -98,13 +101,13 @@ if($_POST){ ))->delete(); if ($i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected category', 'selected categories', $count)); elseif ($i > 0) $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected category', 'selected categories', $count)); elseif (!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s'), + $errors['err'] = sprintf(__('Unable to delete %s.'), _N('selected category', 'selected categories', $count)); break; default: diff --git a/scp/departments.php b/scp/departments.php index d90a1953e439fd5308f870b4336349ff0fd07e48..45cafc6532e5b9900aa2f177e21159bc6a7bf295 100644 --- a/scp/departments.php +++ b/scp/departments.php @@ -25,26 +25,28 @@ if($_POST){ if(!$dept){ $errors['err']=sprintf(__('%s: Unknown or invalid'), __('department')); }elseif($dept->update($_POST,$errors)){ - $msg=sprintf(__('Successfully updated %s'), + $msg=sprintf(__('Successfully updated %s.'), __('this department')); }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Error updating %s. Try again!'), - __('this department')); + $errors['err'] = sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this department')), + __('Correct any errors below and try again.')); } break; case 'create': $_dept = Dept::create(); if(($_dept->update($_POST,$errors))){ - $msg=sprintf(__('Successfully added "%s"'),Format::htmlchars($_POST['name'])); + $msg=sprintf(__('Successfully added %s.'),Format::htmlchars($_POST['name'])); $_REQUEST['a']=null; }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this department')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this department')), + __('Correct any errors below and try again.')); } break; case 'mass_process': if(!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { - $errors['err'] = sprintf(__('You must select at least %s'), + $errors['err'] = sprintf(__('You must select at least %s.'), __('one department')); }elseif(in_array($cfg->getDefaultDeptId(),$_POST['ids'])) { $errors['err'] = __('You cannot disable/delete a default department. Select a new default department and try again.'); @@ -62,7 +64,7 @@ if($_POST){ $warn=sprintf(__( /* Phrase will read: <a> of <b> <selected objects> made PUBLIC */ - '%1$d of %2$d %s made PUBLIC'), $num, $count, + '%1$d of %2$d %3$s made PUBLIC'), $num, $count, _N('selected department', 'selected departments', $count)); } else { $errors['err']=sprintf(__('Unable to make %s PUBLIC.'), @@ -102,7 +104,7 @@ if($_POST){ $i++; } if($i && $i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected department', 'selected departments', $count)); elseif($i>0) $warn = sprintf(__( diff --git a/scp/emails.php b/scp/emails.php index 9ff1c70a771ad9942977a415e8b2cae8d4794ffa..f19e655761019f3c63338bc377c9b89dc1c3dbfe 100644 --- a/scp/emails.php +++ b/scp/emails.php @@ -26,26 +26,29 @@ if($_POST){ if(!$email){ $errors['err']=sprintf(__('%s: Unknown or invalid'), __('email')); }elseif($email->update($_POST,$errors)){ - $msg=sprintf(__('Successfully updated %s'), + $msg=sprintf(__('Successfully updated %s.'), __('this email')); }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Error updating %s. Try again!'), __('this email')); + $errors['err'] = sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this email')), + __('Correct any errors below and try again.')); } break; case 'create': $box = Email::create(); if ($box->update($_POST, $errors)) { $id = $box->getId(); - $msg=sprintf(__('Successfully added %s'), Format::htmlchars($_POST['name'])); + $msg=sprintf(__('Successfully added %s.'), Format::htmlchars($_POST['name'])); $_REQUEST['a']=null; }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this email')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this email')), + __('Correct any errors below and try again.')); } break; case 'mass_process': if(!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { - $errors['err'] = sprintf(__('You must select at least %s'), + $errors['err'] = sprintf(__('You must select at least %s.'), __('one email')); } else { $count=count($_POST['ids']); @@ -59,13 +62,13 @@ if($_POST){ } if($i && $i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected email', 'selected emails', $count)); elseif($i>0) $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected email', 'selected emails', $count)); elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s'), + $errors['err'] = sprintf(__('Unable to delete %s.'), _N('selected email', 'selected emails', $count)); break; diff --git a/scp/emailsettings.php b/scp/emailsettings.php index 6f871b4bf7b62e072689f4672b9df64f15bb5e06..5f18b29861cbb8290fb119c6e805dd49065466e2 100644 --- a/scp/emailsettings.php +++ b/scp/emailsettings.php @@ -21,9 +21,11 @@ $inc = 'settings-emails.inc.php'; if ($_POST && !$errors) { if($cfg && $cfg->updateSettings($_POST,$errors)) { - $msg=sprintf(__('Successfully updated %s'), Format::htmlchars($page[0])); + $msg=sprintf(__('Successfully updated %s.'), Format::htmlchars($page[0])); } elseif(!$errors['err']) { - $errors['err']=__('Unable to update settings - correct errors below and try again'); + $errors['err'] = sprintf('%s %s', + __('Unable to update settings.'), + __('Correct any errors below and try again.')); } } diff --git a/scp/faq.php b/scp/faq.php index 358a2afec6093d96776a80ccbc03bb33a07ed8eb..310809947f82b90d7b2f4238802aecda6a8b36a4 100644 --- a/scp/faq.php +++ b/scp/faq.php @@ -64,25 +64,27 @@ if ($_POST) { case 'add': $faq = FAQ::create(); if($faq->update($_POST,$errors)) { - $msg=sprintf(__('Successfully added %s'), Format::htmlchars($faq->getQuestion())); + $msg=sprintf(__('Successfully added %s.'), Format::htmlchars($faq->getQuestion())); // Delete draft for this new faq Draft::deleteForNamespace('faq', $thisstaff->getId()); } elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this FAQ article')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this FAQ article')), + __('Correct any errors below and try again.')); break; case 'update': case 'edit': if(!$faq) $errors['err'] = sprintf(__('%s: Invalid or unknown'), __('FAQ article')); elseif($faq->update($_POST,$errors)) { - $msg=sprintf(__('Successfully updated %s'), __('this FAQ article')); + $msg=sprintf(__('Successfully updated %s.'), __('this FAQ article')); $_REQUEST['a']=null; //Go back to view // Delete pending draft updates for this faq (for ALL users) Draft::deleteForNamespace('faq.'.$faq->getId()); } elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to update %s. Correct error(s) below and try again.'), - __('this FAQ article')); + $errors['err'] = sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this FAQ article')), + __('Correct any errors below and try again.')); break; case 'manage-faq': if(!$faq) { @@ -108,7 +110,7 @@ if ($_POST) { case 'delete': $category = $faq->getCategory(); if($faq->delete()) { - $msg=sprintf(__('Successfully deleted %s'), Format::htmlchars($faq->getQuestion())); + $msg=sprintf(__('Successfully deleted %s.'), Format::htmlchars($faq->getQuestion())); $faq=null; } else { $errors['err']=sprintf(__('Unable to delete %s.'), __('this FAQ article')); diff --git a/scp/filters.php b/scp/filters.php index 57b05e526135a9a1d3e34bd56fad2b547bc31008..b8b0d634d105a2a19c48651a4a4fd91788af862d 100644 --- a/scp/filters.php +++ b/scp/filters.php @@ -31,19 +31,21 @@ if($_POST){ if(!$filter){ $errors['err']=sprintf(__('%s: Unknown or invalid'), __('ticket filter')); }elseif($filter->update($_POST,$errors)){ - $msg=sprintf(__('Successfully updated %s'), __('this ticket filter')); + $msg=sprintf(__('Successfully updated %s.'), __('this ticket filter')); }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Error updating %s. Correct error(s) below and try again.'), - __('this ticket filter')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this ticket filter')), + __('Correct any errors below and try again.')); } break; case 'add': if((Filter::create($_POST,$errors))){ - $msg=sprintf(__('Successfully updated %s'), __('this ticket filter')); + $msg=sprintf(__('Successfully updated %s.'), __('this ticket filter')); $_REQUEST['a']=null; }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this ticket filter')); + $errors['err'] = sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this ticket filter')), + __('Correct any errors below and try again.')); } break; case 'mass_process': @@ -91,13 +93,13 @@ if($_POST){ } if($i && $i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected ticket filter', 'selected ticket filters', $count)); elseif($i>0) - $warn = sprintf(__('%1$d of %2$d %s deleted'), $i, $count, + $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected ticket filter', 'selected ticket filters', $count)); elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s'), + $errors['err'] = sprintf(__('Unable to delete %s.'), _N('selected ticket filter', 'selected ticket filters', $count)); break; default: @@ -106,7 +108,7 @@ if($_POST){ } break; default: - $errors['err']=__('Unknown command/action'); + $errors['err']=__('Unknown action'); break; } } diff --git a/scp/forms.php b/scp/forms.php index 59084775c088e9bd5e845c7b651e3542879e05a3..5a4978e0982e98ccfd7d39068e724e6fd2ab1133 100644 --- a/scp/forms.php +++ b/scp/forms.php @@ -77,7 +77,7 @@ if($_POST) { case 'mass_process': if(!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { - $errors['err'] = sprintf(__('You must select at least %s'), __('one custom form')); + $errors['err'] = sprintf(__('You must select at least %s.'), __('one custom form')); } else { $count = count($_POST['ids']); switch(strtolower($_POST['a'])) { @@ -88,13 +88,13 @@ if($_POST) { $i++; } if ($i && $i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected custom form', 'selected custom forms', $count)); elseif ($i > 0) - $warn = sprintf(__('%1$d of %1$d %3$s deleted'), $i, $count, + $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected custom form', 'selected custom forms', $count)); elseif (!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s'), + $errors['err'] = sprintf(__('Unable to delete %s.'), _N('selected custom form', 'selected custom forms', $count)); break; } @@ -137,7 +137,7 @@ if($_POST) { if ($errors) $errors['err'] = sprintf(__('Unable to commit %s. Check validation errors'), __('this custom form')); else - $msg = sprintf(__('Successfully updated %s'), + $msg = sprintf(__('Successfully updated %s.'), __('this custom form')); } diff --git a/scp/helptopics.php b/scp/helptopics.php index 035b04da810e8ebf2dc5187cc180c64c857e9730..2dd0dc7fe8174b4ef96b6f52a7f870a760af2a3c 100644 --- a/scp/helptopics.php +++ b/scp/helptopics.php @@ -28,22 +28,24 @@ if($_POST){ if(!$topic){ $errors['err']=sprintf(__('%s: Unknown or invalid'), __('help topic')); }elseif($topic->update($_POST,$errors)){ - $msg=sprintf(__('Successfully updated %s'), + $msg=sprintf(__('Successfully updated %s.'), __('this help topic')); }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Error updating %s. Try again!'), - __('this help topic')); + $errors['err'] = sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this help topic')), + __('Correct any errors below and try again.')); } break; case 'create': $_topic = Topic::create(); if ($_topic->update($_POST, $errors)) { $topic = $_topic; - $msg=sprintf(__('Successfully added %s'), Format::htmlchars($_POST['topic'])); + $msg=sprintf(__('Successfully added %s.'), Format::htmlchars($_POST['topic'])); $_REQUEST['a']=null; }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this help topic')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this help topic')), + __('Correct any errors below and try again.')); } break; case 'mass_process': @@ -53,7 +55,7 @@ if($_POST){ break; default: if(!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) - $errors['err'] = sprintf(__('You must select at least %s'), + $errors['err'] = sprintf(__('You must select at least %s.'), __('one help topic')); } if (!$errors) { @@ -75,7 +77,7 @@ if($_POST){ $warn = sprintf(__('%1$d of %2$d %3$s enabled'), $num, $count, _N('selected help topic', 'selected help topics', $count)); } else { - $errors['err'] = sprintf(__('Unable to enable %s.'), + $errors['err'] = sprintf(__('Unable to enable %s'), _N('selected help topic', 'selected help topics', $count)); } break; @@ -105,13 +107,13 @@ if($_POST){ ))->delete(); if($i && $i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected help topic', 'selected help topics', $count)); elseif($i>0) $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected help topic', 'selected help topics', $count)); elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s'), + $errors['err'] = sprintf(__('Unable to delete %s.'), _N('selected help topic', 'selected help topics', $count)); break; diff --git a/scp/lists.php b/scp/lists.php index 6ec0fdc9259b5710144f9dfa131f46293832ce44..36929913773354301ffb638a57bc9ea6e345057c 100644 --- a/scp/lists.php +++ b/scp/lists.php @@ -80,17 +80,19 @@ if($_POST) { } if ($errors) - $errors['err'] = $errors['err'] ?: sprintf(__('Unable to update %s. Correct error(s) below and try again!'), - __('custom list items')); + $errors['err'] = sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('custom list items')), + __('Correct any errors below and try again.')); else { $list->_items = null; - $msg = sprintf(__('Successfully updated %s'), + $msg = sprintf(__('Successfully updated %s.'), __('this custom list')); } } elseif ($errors) - $errors['err'] = $errors['err'] ?: sprintf(__('Unable to update %s. Correct error(s) below and try again!'), - __('this custom list')); + $errors['err'] = $errors['err'] ?: sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this custom list')), + __('Correct any errors below and try again.')); else $errors['err']=sprintf(__('Unable to update %s.'), __('this custom list')) .' '.__('Internal error occurred'); @@ -99,12 +101,13 @@ if($_POST) { case 'add': if ($list=DynamicList::add($_POST, $errors)) { $form = $list->getForm(true); - Messages::success(sprintf(__('Successfully added %s'), __('this custom list'))); + Messages::success(sprintf(__('Successfully added %s.'), __('this custom list'))); // Redirect to list page $redirect = "lists.php?id={$list->id}#items"; } elseif ($errors) { - $errors['err']=sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this custom list')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this custom list')), + __('Correct any errors below and try again.')); } else { $errors['err']=sprintf(__('Unable to add %s.'), __('this custom list')) .' '.__('Internal error occurred'); @@ -113,7 +116,7 @@ if($_POST) { case 'mass_process': if(!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { - $errors['err'] = sprintf(__('You must select at least %s'), + $errors['err'] = sprintf(__('You must select at least %s.'), __('one custom list')); } else { $count = count($_POST['ids']); @@ -125,13 +128,13 @@ if($_POST) { $i++; } if ($i && $i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected custom list', 'selected custom lists', $count)); elseif ($i > 0) $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected custom list', 'selected custom lists', $count)); elseif (!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s — they may be in use on a custom form'), + $errors['err'] = sprintf(__('Unable to delete %s. They may be in use.'), _N('selected custom list', 'selected custom lists', $count)); break; } @@ -146,7 +149,7 @@ if($_POST) { else { $status = $list->importFromPost($_FILES['import'] ?: $_POST['pasted']); if (is_numeric($status)) - $msg = sprintf(__('Successfully imported %1$d %2$s.'), $status, + $msg = sprintf(__('Successfully imported %1$d %2$s'), $status, _N('list item', 'list items', $status)); else $errors['err'] = $status; diff --git a/scp/logs.php b/scp/logs.php index df17796687040d053e5ce75811a99d9de0299b0c..26767bd58a335a6961a9ab1895364487d527056a 100644 --- a/scp/logs.php +++ b/scp/logs.php @@ -19,7 +19,7 @@ if($_POST){ switch(strtolower($_POST['do'])){ case 'mass_process': if(!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { - $errors['err'] = sprintf(__('You must select at least %s'), + $errors['err'] = sprintf(__('You must select at least %s.'), __('one log entry')); } else { $count=count($_POST['ids']); @@ -29,13 +29,13 @@ if($_POST){ .' WHERE log_id IN ('.implode(',', db_input($_POST['ids'])).')'; if(db_query($sql) && ($num=db_affected_rows())){ if($num==$count) - $msg=sprintf(__('Successfully deleted %s'), + $msg=sprintf(__('Successfully deleted %s.'), _N('selected log entry', 'selected log entries', $count)); else $warn=sprintf(__('%1$d of %2$d %3$s deleted'), $num, $count, _N('selected log entry', 'selected log entries', $count)); } elseif(!$errors['err']) - $errors['err']=sprintf(__('Unable to delete %s'), + $errors['err']=sprintf(__('Unable to delete %s.'), _N('selected log entry', 'selected log entries', $count)); } else { $errors['err']=__('Unknown action - get technical help.'); diff --git a/scp/orgs.php b/scp/orgs.php index bfd2210abf39db4d913398669c7c0418fc7fb02e..a58e985b522764863a9b43b239ed60e1b1f69623 100644 --- a/scp/orgs.php +++ b/scp/orgs.php @@ -39,7 +39,7 @@ if ($_POST) { if (!$org) $errors['err'] = __('Trying to remove end users from an unknown organization'); elseif (!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { - $errors['err'] = sprintf(__('You must select at least %s'), + $errors['err'] = sprintf(__('You must select at least %s.'), __('one end user')); } else { $i = 0; @@ -49,7 +49,7 @@ if ($_POST) { } $num = count($_POST['ids']); if ($i && $i == $num) - $msg = sprintf(__('Successfully removed %s'), + $msg = sprintf(__('Successfully removed %s.'), _N('selected end user', 'selected end users', $count)); elseif ($i > 0) $warn = sprintf(__('%1$d of %2$d %3$s removed'), $i, $count, diff --git a/scp/pages.php b/scp/pages.php index 773d38fd7dc3366256519d33fbecf8da74b3fad7..31b3cab3bb1dc1f87d81e8b6767811dc0e9c05c9 100644 --- a/scp/pages.php +++ b/scp/pages.php @@ -27,24 +27,26 @@ if($_POST) { if($page->update($_POST, $errors)) { $pageId = $page->getId(); $_REQUEST['a'] = null; - $msg=sprintf(__('Successfully added %s'), Format::htmlchars($_POST['name'])); + $msg=sprintf(__('Successfully added %s.'), Format::htmlchars($_POST['name'])); Draft::deleteForNamespace('page'); } elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this site page')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this site page')), + __('Correct any errors below and try again.')); break; case 'update': if(!$page) $errors['err'] = sprintf(__('%s: Invalid or unknown'), __('site page')); elseif($page->update($_POST, $errors)) { - $msg=sprintf(__('Successfully updated %s'), + $msg=sprintf(__('Successfully updated %s.'), __('this site page')); $_REQUEST['a']=null; //Go back to view Draft::deleteForNamespace('page.'.$page->getId().'%'); } elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to update %s. Correct error(s) below and try again.'), - __('this site page')); + $errors['err'] = sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this site page')), + __('Correct any errors below and try again.')); break; case 'mass_process': if(!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { @@ -95,13 +97,13 @@ if($_POST) { ->delete(); if($i && $i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected site page', 'selected site pages', $count)); elseif($i>0) $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected site page', 'selected site pages', $count)); elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s'), + $errors['err'] = sprintf(__('Unable to delete %s.'), _N('selected site page', 'selected site pages', $count)); break; default: diff --git a/scp/plugins.php b/scp/plugins.php index 06b7cbcd2664471bc4de14ff12a45ba3343713fc..91d13c4ebaeb71807d1fa913204337f975c808b7 100644 --- a/scp/plugins.php +++ b/scp/plugins.php @@ -15,7 +15,7 @@ if($_POST) { break; case 'mass_process': if(!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { - $errors['err'] = sprintf(__('You must select at least %s'), + $errors['err'] = sprintf(__('You must select at least %s.'), __('one plugin')); } else { $count = count($_POST['ids']); @@ -25,7 +25,7 @@ if($_POST) { if ($p = Plugin::lookup($id)) { if (!$p->enable()) $errors['err'] = sprintf( - __('Unable to enable %s.'), + __('Unable to enable %s'), $p->getName()); } } diff --git a/scp/profile.php b/scp/profile.php index f787324a4b2f7a34a59eccaa3cba728db780a6d0..cf77b05f00fc8197696aa5f781cb37fd09c946d4 100644 --- a/scp/profile.php +++ b/scp/profile.php @@ -28,7 +28,9 @@ if($_POST && $_POST['id']!=$thisstaff->getId()) { //Check dummy ID used on the f elseif($staff->updateProfile($_POST,$errors)){ $msg=__('Profile updated successfully'); }elseif(!$errors['err']) - $errors['err']=__('Profile update error. Try correcting the errors below and try again!'); + $errors['err'] = sprintf('%s %s', + __('Profile update error.'), + __('Correct any errors below and try again.')); } //Forced password Change. diff --git a/scp/roles.php b/scp/roles.php index 749dee96fad1f00cf7d40535a3a242b7b4b93356..fbfd74949a18b2f5846b0d975655edd3b374e1be 100644 --- a/scp/roles.php +++ b/scp/roles.php @@ -38,32 +38,33 @@ if ($_POST) { } elseif ($role->update($_POST, $errors)) { $msg = __('Role updated successfully'); } elseif ($errors) { - $errors['err'] = $errors['err'] ?: - sprintf(__('Unable to update %s. Correct error(s) below and try again!'), - __('this role')); + $errors['err'] = $errors['err'] ?: sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this role')), + __('Correct any errors below and try again.')); } else { - $errors['err'] = sprintf(__('Unable to update %s.'), __('this role')) - .' '.__('Internal error occurred'); + $errors['err'] = sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this role')), + __('Internal error occurred')); } break; case 'add': $_role = Role::create(); if ($_role->update($_POST, $errors)) { unset($_REQUEST['a']); - $msg = sprintf(__('Successfully added %s'), + $msg = sprintf(__('Successfully added %s.'), __('role')); } elseif ($errors) { - $errors['err'] = $errors['err'] ?: - sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('role')); + $errors['err'] = sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this role')), + __('Correct any errors below and try again.')); } else { - $errors['err'] = sprintf(__('Unable to add %s.'), __('role')) - .' '.__('Internal error occurred'); + $errors['err'] = sprintf(__('Unable to add %s.'), __('this role')) + .' — '.__('Internal error occurred'); } break; case 'mass_process': if (!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { - $errors['err'] = sprintf(__('You must select at least %s'), + $errors['err'] = sprintf(__('You must select at least %s.'), __('one role')); } else { $count = count($_POST['ids']); @@ -116,13 +117,13 @@ if ($_POST) { $i++; } if ($i && $i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected role', 'selected roles', $count)); elseif ($i > 0) $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected role', 'selected roles', $count)); elseif (!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s — they may be in use.'), + $errors['err'] = sprintf(__('Unable to delete %s. They may be in use.'), _N('selected role', 'selected roles', $count)); break; default: diff --git a/scp/settings.php b/scp/settings.php index 4a52a6f0192f1ca969b753d13d09b3301d382b26..ae5b11dc28119b2008703998ab983f4d695734a0 100644 --- a/scp/settings.php +++ b/scp/settings.php @@ -40,9 +40,11 @@ if (isset($settingOptions[$target])) if($page && $_POST && !$errors) { if($cfg && $cfg->updateSettings($_POST,$errors)) { - $msg=sprintf(__('Successfully updated %s'), Format::htmlchars($page[0])); + $msg=sprintf(__('Successfully updated %s.'), Format::htmlchars($page[0])); } elseif(!$errors['err']) { - $errors['err']=__('Unable to update settings - correct errors below and try again'); + $errors['err'] = sprintf('%s %s', + __('Unable to update settings.'), + __('Correct any errors below and try again.')); } } diff --git a/scp/slas.php b/scp/slas.php index 62ba66c9294424b7ee3c0d6be37d38c5121bd98b..61bab1e556e1913202f3d5b0054f8bbd4f162ac1 100644 --- a/scp/slas.php +++ b/scp/slas.php @@ -19,31 +19,33 @@ include_once(INCLUDE_DIR.'class.sla.php'); $sla=null; if($_REQUEST['id'] && !($sla=SLA::lookup($_REQUEST['id']))) $errors['err']=sprintf(__('%s: Unknown or invalid ID.'), - __('SLA plan')); + __('SLA Plan')); if($_POST){ switch(strtolower($_POST['do'])){ case 'update': if(!$sla){ $errors['err']=sprintf(__('%s: Unknown or invalid'), - __('SLA plan')); + __('SLA Plan')); }elseif($sla->update($_POST,$errors)){ - $msg=sprintf(__('Successfully updated %s'), + $msg=sprintf(__('Successfully updated %s.'), __('this SLA plan')); }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Error updating %s. Try again!'), - __('this SLA plan')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this SLA plan')), + __('Correct any errors below and try again.')); } break; case 'add': $_sla = SLA::create(); if (($_sla->update($_POST, $errors))) { - $msg=sprintf(__('Successfully added %s'), + $msg=sprintf(__('Successfully added %s.'), __('a SLA plan')); $_REQUEST['a']=null; } elseif (!$errors['err']) { - $errors['err']=sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this SLA plan')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this SLA plan')), + __('Correct any errors below and try again.')); } break; case 'mass_process': @@ -102,13 +104,13 @@ if($_POST){ } if($i && $i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected SLA plan', 'selected SLA plans', $count)); elseif($i>0) $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected SLA plan', 'selected SLA plans', $count)); elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s'), + $errors['err'] = sprintf(__('Unable to delete %s.'), _N('selected SLA plan', 'selected SLA plans', $count)); break; default: diff --git a/scp/staff.php b/scp/staff.php index cac7f3fa4f4e44de7ad56e34382653d2c4f6a720..df2854e854cefa8a5d335725240383ce14b08914 100644 --- a/scp/staff.php +++ b/scp/staff.php @@ -28,11 +28,12 @@ if($_POST){ if(!$staff){ $errors['err']=sprintf(__('%s: Unknown or invalid'), __('agent')); }elseif($staff->update($_POST,$errors)){ - $msg=sprintf(__('Successfully updated %s'), + $msg=sprintf(__('Successfully updated %s.'), __('this agent')); }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Unable to update %s. Correct error(s) below and try again!'), - __('this agent')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this agent')), + __('Correct any errors below and try again.')); } break; case 'create': @@ -45,11 +46,12 @@ if($_POST){ } if ($staff->update($_POST,$errors)) { unset($_SESSION['new-agent-passwd']); - $msg=sprintf(__('Successfully added %s'),Format::htmlchars($_POST['firstname'])); + $msg=sprintf(__('Successfully added %s.'),Format::htmlchars($_POST['firstname'])); $_REQUEST['a']=null; }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this agent')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this agent')), + __('Correct any errors below and try again.')); } break; case 'mass_process': @@ -104,13 +106,13 @@ if($_POST){ } if($i && $i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected agent', 'selected agents', $count)); elseif($i>0) $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected agent', 'selected agents', $count)); elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s'), + $errors['err'] = sprintf(__('Unable to delete %s.'), _N('selected agent', 'selected agents', $count)); break; @@ -120,13 +122,13 @@ if($_POST){ $i++; if($i && $i==$count) - $msg = sprintf(__('Successfully updated %s'), + $msg = sprintf(__('Successfully updated %s.'), _N('selected agent', 'selected agents', $count)); elseif($i>0) $warn = sprintf(__('%1$d of %2$d %3$s updated'), $i, $count, _N('selected agent', 'selected agents', $count)); elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to update %s'), + $errors['err'] = sprintf(__('Unable to update %s.'), _N('selected agent', 'selected agents', $count)); break; @@ -145,13 +147,13 @@ if($_POST){ $i++; } if($i && $i==$count) - $msg = sprintf(__('Successfully updated %s'), + $msg = sprintf(__('Successfully updated %s.'), _N('selected agent', 'selected agents', $count)); elseif($i>0) $warn = sprintf(__('%1$d of %2$d %3$s updated'), $i, $count, _N('selected agent', 'selected agents', $count)); elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to update %s'), + $errors['err'] = sprintf(__('Unable to update %s.'), _N('selected agent', 'selected agents', $count)); break; diff --git a/scp/tasks.php b/scp/tasks.php index 616a1720adff44c09e86b72c66d6864f4a3c7fb8..a45635ea042efeaeb45d4bd10735e82231c57e53 100644 --- a/scp/tasks.php +++ b/scp/tasks.php @@ -72,7 +72,9 @@ if($_POST && !$errors): if(!$errors['err']) $errors['err'] = __('Unable to post internal note - missing or invalid data.'); - $errors['postnote'] = __('Unable to post the note. Correct the error(s) below and try again!'); + $errors['postnote'] = sprintf('%s %s', + __('Unable to post the note.'), + __('Correct any errors below and try again.')); } break; case 'postreply': /* Post an update */ @@ -98,9 +100,11 @@ if($_POST && !$errors): } else { if (!$errors['err']) - $errors['err'] = __('Unable to post reply - missing or invalid data.'); + $errors['err'] = __('Unable to post the reply - missing or invalid data.'); - $errors['postreply'] = __('Unable to post the reply. Correct the error(s) below and try again!'); + $errors['postreply'] = sprintf('%s %s', + __('Unable to post the reply.'), + __('Correct any errors below and try again.')); } break; default: @@ -221,7 +225,7 @@ if($task) { // Auto add new fields to the entries foreach ($forms as $f) $f->addMissingFields(); } elseif($_REQUEST['a'] == 'print' && !$task->pdfExport($_REQUEST['psize'])) - $errors['err'] = __('Internal error: Unable to export the task to PDF for print.'); + $errors['err'] = __('Internal error: Unable to print to PDF'); } else { $inc = 'tasks.inc.php'; if ($_REQUEST['a']=='open' && diff --git a/scp/teams.php b/scp/teams.php index 670ef7cce5d33105d5d4a7cb2c0bc978f1489961..600d1488338a4a1e107178c9d4ae391eb1ef0686 100644 --- a/scp/teams.php +++ b/scp/teams.php @@ -25,21 +25,23 @@ if($_POST){ if(!$team){ $errors['err']=sprintf(__('%s: Unknown or invalid'), __('team')); }elseif($team->update($_POST,$errors)){ - $msg=sprintf(__('Successfully updated %s'), + $msg=sprintf(__('Successfully updated %s.'), __('this team')); }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Unable to update %s. Correct any error(s) below and try again.'), - __('this team')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this team')), + __('Correct any errors below and try again.')); } break; case 'create': $team = Team::create(); if (($team->update($_POST, $errors))){ - $msg=sprintf(__('Successfully added %s'),Format::htmlchars($_POST['team'])); + $msg=sprintf(__('Successfully added %s.'),Format::htmlchars($_POST['team'])); $_REQUEST['a']=null; }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this team')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this team')), + __('Correct any errors below and try again.')); } break; case 'mass_process': @@ -98,13 +100,13 @@ if($_POST){ $i++; } if($i && $i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected team', 'selected teams', $count)); elseif($i>0) $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected team', 'selected teams', $count)); elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s'), + $errors['err'] = sprintf(__('Unable to delete %s.'), _N('selected team', 'selected teams', $count)); break; default: diff --git a/scp/templates.php b/scp/templates.php index 34f8b23ea6493840c89cf1d37bf9815dc0442490..e5a8decd0e57583f4a8bb97cd54d4575e7ebfc6b 100644 --- a/scp/templates.php +++ b/scp/templates.php @@ -38,14 +38,15 @@ if($_POST){ $errors['err']=sprintf(__('%s: Unknown or invalid'), __('message template')); }elseif($template->update($_POST,$errors)){ - $msg=sprintf(__('Successfully updated %s'), + $msg=sprintf(__('Successfully updated %s.'), __('this message template')); // Drop drafts for this template for ALL users Draft::deleteForNamespace('tpl.'.$template->getCodeName() .'.'.$template->getTplId()); }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Error updating %s. Try again!'), - __('this template')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this template')), + __('Correct any errors below and try again.')); } break; case 'implement': @@ -53,35 +54,38 @@ if($_POST){ $errors['err']=sprintf(__('%s: Unknown or invalid'), __('template set')); }elseif($new = EmailTemplate::add($_POST,$errors)){ $template = $new; - $msg=sprintf(__('Successfully updated %s'), __('this message template')); + $msg=sprintf(__('Successfully updated %s.'), __('this message template')); // Drop drafts for this user for this template Draft::deleteForNamespace('tpl.'.$new->getCodeName() .$new->getTplId(), $thisstaff->getId()); }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Error updating %s. Try again!'), - __('this message template')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this message template')), + __('Correct any errors below and try again.')); } break; case 'update': if(!$template){ $errors['err']=sprintf(__('%s: Unknown or invalid'), __('template set')); }elseif($template->update($_POST,$errors)){ - $msg=sprintf(__('Successfully updated %s'), + $msg=sprintf(__('Successfully updated %s.'), mb_convert_case(__('this message template'), MB_CASE_TITLE)); }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Error updating %s. Try again!'), - __('this message template')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this message template')), + __('Correct any errors below and try again.')); } break; case 'add': if(($new=EmailTemplateGroup::add($_POST,$errors))){ $template=$new; - $msg=sprintf(__('Successfully added %s'), + $msg=sprintf(__('Successfully added %s.'), mb_convert_case(__('a template set'), MB_CASE_TITLE)); $_REQUEST['a']=null; }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this template set')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this message template')), + __('Correct any errors below and try again.')); } break; case 'mass_process': @@ -132,13 +136,13 @@ if($_POST){ } if($i && $i==$count) - $msg = sprintf(__('Successfully deleted %s'), + $msg = sprintf(__('Successfully deleted %s.'), _N('selected template set', 'selected template sets', $count)); elseif($i>0) $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected template set', 'selected template sets', $count)); elseif(!$errors['err']) - $errors['err'] = sprintf(__('Unable to delete %s'), + $errors['err'] = sprintf(__('Unable to delete %s.'), _N('selected template set', 'selected template sets', $count)); break; default: diff --git a/scp/tickets.php b/scp/tickets.php index aa8347f8173b777762ee92ccc3e40944bce5cc0e..030db306b95036aee783d6aa16d1110f823ef599 100644 --- a/scp/tickets.php +++ b/scp/tickets.php @@ -135,7 +135,9 @@ if($_POST && !$errors): $redirect = 'tickets.php'; } elseif(!$errors['err']) { - $errors['err']=__('Unable to post the reply. Correct the errors below and try again!'); + $errors['err']=sprintf('%s %s', + __('Unable to post the reply.'), + __('Correct any errors below and try again.')); } break; case 'postnote': /* Post Internal Note */ @@ -182,7 +184,9 @@ if($_POST && !$errors): if(!$errors['err']) $errors['err'] = __('Unable to post internal note - missing or invalid data.'); - $errors['postnote'] = __('Unable to post the note. Correct the error(s) below and try again!'); + $errors['postnote'] = sprintf('%s %s', + __('Unable to post the note.'), + __('Correct any errors below and try again.')); } break; case 'edit': @@ -197,7 +201,9 @@ if($_POST && !$errors): if(!$ticket->checkStaffPerm($thisstaff)) $ticket=null; } elseif(!$errors['err']) { - $errors['err']=__('Unable to update the ticket. Correct the errors below and try again!'); + $errors['err']=sprintf( + __('Unable to update %s. Correct any errors below and try again.'), + __('ticket')); } break; case 'process': @@ -310,7 +316,7 @@ if($_POST && !$errors): if (!$thisstaff || !$thisstaff->hasPerm(TicketModel::PERM_CREATE, false)) { $errors['err'] = sprintf('%s %s', - sprintf(__('You do not have permission %s.'), + sprintf(__('You do not have permission %s'), __('to create tickets')), __('Contact admin for such access')); } else { @@ -330,7 +336,9 @@ if($_POST && !$errors): $response_form->getField('attachments')->reset(); unset($_SESSION[':form-data']); } elseif(!$errors['err']) { - $errors['err']=__('Unable to create the ticket. Correct the error(s) and try again'); + $errors['err']=sprintf('%s %s', + __('Unable to create the ticket.', + __('Correct any errors below and try again.')); } } break; diff --git a/scp/users.php b/scp/users.php index f665050384c88854bd93b6ae310ef91f11eb9cbb..a99f06709645adc2cfc1adf4178049703b78e64e 100644 --- a/scp/users.php +++ b/scp/users.php @@ -34,21 +34,23 @@ if ($_POST) { && !$acct->update($_POST, $errors)) { $errors['err']=__('Unable to update user account information'); } elseif($user->updateInfo($_POST, $errors)) { - $msg=sprintf(__('Successfully updated %s'), __('this end user')); + $msg=sprintf(__('Successfully updated %s.'), __('this end user')); $_REQUEST['a'] = null; } elseif(!$errors['err']) { - $errors['err']=sprintf(__('Unable to update %s. Correct error(s) below and try again!'), - __('this end user')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this end user')), + __('Correct any errors below and try again.')); } break; case 'create': $form = UserForm::getUserForm()->getForm($_POST); if (($user = User::fromForm($form))) { - $msg = Format::htmlchars(sprintf(__('Successfully added %s'), $user->getName())); + $msg = Format::htmlchars(sprintf(__('Successfully added %s.'), $user->getName())); $_REQUEST['a'] = null; } elseif (!$errors['err']) { - $errors['err'] = sprintf(__('Unable to add %s. Correct error(s) below and try again.'), - __('this end user')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to add %s.'), __('this end user')), + __('Correct any errors below and try again.')); } break; case 'confirmlink': @@ -150,7 +152,7 @@ if ($_POST) { case 'import-users': $status = User::importFromPost($_FILES['import'] ?: $_POST['pasted']); if (is_numeric($status)) - $msg = sprintf(__('Successfully imported %1$d %2$s.'), $status, + $msg = sprintf(__('Successfully imported %1$d %2$s'), $status, _N('end user', 'end users', $status)); else $errors['err'] = $status; diff --git a/setup/inc/class.installer.php b/setup/inc/class.installer.php index 85441fedd2566d87dd384814d472695a2d98bdb1..d922eab1b234a4c340a10449082db9acd4f3a3da 100644 --- a/setup/inc/class.installer.php +++ b/setup/inc/class.installer.php @@ -64,7 +64,9 @@ class Installer extends SetupWizard { $vars = array_map('trim', $vars); if(!Validator::process($f,$vars,$this->errors) && !$this->errors['err']) - $this->errors['err']=__('Missing or invalid data - correct the errors and try again.'); + $errors['err'] = sprintf('%s — %s', + __('Missing or invalid data'), + __('Correct any errors below and try again')); //Staff's email can't be same as system emails. @@ -72,7 +74,7 @@ class Installer extends SetupWizard { $this->errors['admin_email']=__('Conflicts with system email above'); //Admin's pass confirmation. if(!$this->errors && strcasecmp($vars['passwd'],$vars['passwd2'])) - $this->errors['passwd2']=__('Password(s) do not match'); + $this->errors['passwd2']=__('Passwords do not match'); //Check table prefix underscore required at the end! if($vars['prefix'] && substr($vars['prefix'], -1)!='_') diff --git a/setup/inc/install-prereq.inc.php b/setup/inc/install-prereq.inc.php index bff091f6089e42e8c575b6f346b875f7f82dfe90..97d7a13c48d6332f542e66486d39ee4d7a7f7cc6 100644 --- a/setup/inc/install-prereq.inc.php +++ b/setup/inc/install-prereq.inc.php @@ -10,7 +10,7 @@ if(!defined('SETUPINC')) die('Kwaheri!'); <p><?php echo __("The installer will guide you every step of the way in the installation process. You're minutes away from your awesome customer support system!");?></p> </div> <h2><?php echo __('Prerequisites');?></h3> - <p><?php echo __("Before we begin, we'll check your server configuration to make sure you meet the minimum requirements to install and run osTicket.");?></p> + <p><?php echo __("Before we begin, we'll check your server configuration to make sure you meet the minimum requirements to run the latest version of osTicket.");?></p> <h3><?php echo __('Required');?>: <font color="red"><?php echo $errors['prereq']; ?></font></h3> <?php echo __('These items are necessary in order to install and use osTicket.');?> <ul class="progress"> @@ -23,24 +23,24 @@ if(!defined('SETUPINC')) die('Kwaheri!'); <h3><?php echo __('Recommended');?>:</h3> <?php echo __('You can use osTicket without these, but you may not be able to use all features.');?> <ul class="progress"> - <li class="<?php echo extension_loaded('gd')?'yes':'no'; ?>">Gdlib <?php echo __('extension');?></li> - <li class="<?php echo extension_loaded('imap')?'yes':'no'; ?>">PHP IMAP <?php echo __('extension');?> — <em><?php + <li class="<?php echo extension_loaded('gd')?'yes':'no'; ?>">Gdlib <?php echo __('Extension');?></li> + <li class="<?php echo extension_loaded('imap')?'yes':'no'; ?>">PHP IMAP <?php echo __('Extension');?> — <em><?php echo __('Required for mail fetching');?></em></li> - <li class="<?php echo extension_loaded('xml') ?'yes':'no'; ?>">PHP XML <?php echo __('extension');?> <?php + <li class="<?php echo extension_loaded('xml') ?'yes':'no'; ?>">PHP XML <?php echo __('Extension');?> <?php echo __('(for XML API)');?></li> - <li class="<?php echo extension_loaded('dom') ?'yes':'no'; ?>">PHP XML-DOM <?php echo __('extension');?> <?php + <li class="<?php echo extension_loaded('dom') ?'yes':'no'; ?>">PHP XML-DOM <?php echo __('Extension');?> <?php echo __('(for HTML email processing)');?></li> - <li class="<?php echo extension_loaded('json')?'yes':'no'; ?>">PHP JSON <?php echo __('extension');?> <?php + <li class="<?php echo extension_loaded('json')?'yes':'no'; ?>">PHP JSON <?php echo __('Extension');?> <?php echo __('(faster performance)');?></li> - <li class="<?php echo extension_loaded('mbstring')?'yes':'no'; ?>">Mbstring <?php echo __('extension');?> — <?php + <li class="<?php echo extension_loaded('mbstring')?'yes':'no'; ?>">Mbstring <?php echo __('Extension');?> — <?php echo __('recommended for all installations');?></li> - <li class="<?php echo extension_loaded('phar')?'yes':'no'; ?>">Phar <?php echo __('extension');?> — <?php + <li class="<?php echo extension_loaded('phar')?'yes':'no'; ?>">Phar <?php echo __('Extension');?> — <?php echo __('recommended for plugins and language packs');?></li> - <li class="<?php echo extension_loaded('intl')?'yes':'no'; ?>">Intl <?php echo __('extension');?> — <?php + <li class="<?php echo extension_loaded('intl')?'yes':'no'; ?>">Intl <?php echo __('Extension');?> — <?php echo __('recommended for improved localization');?></li> - <li class="<?php echo extension_loaded('apcu')?'yes':'no'; ?>">APCu <?php echo __('extension');?> — <?php + <li class="<?php echo extension_loaded('apcu')?'yes':'no'; ?>">APCu <?php echo __('Extension');?> — <?php echo __('(faster performance)');?></li> - <li class="<?php echo extension_loaded('Zend OPcache')?'yes':'no'; ?>">Zend OPcache <?php echo __('extension');?> — <?php + <li class="<?php echo extension_loaded('Zend OPcache')?'yes':'no'; ?>">Zend OPcache <?php echo __('Extension');?> — <?php echo __('(faster performance)');?></li> </ul> <div id="bar"> diff --git a/setup/inc/subscribe.inc.php b/setup/inc/subscribe.inc.php index e60fd275fda1117e914e17d20ba5842d04b278a0..961ce7ba2bdf27e506679a4b594e5afd31db1a84 100644 --- a/setup/inc/subscribe.inc.php +++ b/setup/inc/subscribe.inc.php @@ -5,7 +5,7 @@ $info=($_POST && $errors)?Format::htmlchars($_POST):$_SESSION['info']; <h1><?php echo __('Basic Installation Completed');?></h1> <p><?php echo __('osTicket installation has been completed successfully.');?></p> <h3 style="color:#FF7700;"><?php echo __('Stay up to date');?>: </h3> - <?php echo __("It's important to keep your installation up to date. Get announcements, security updates and alerts delivered directly to you!");?> + <?php echo __("It's important to keep your osTicket installation up to date. Get announcements, security updates and alerts delivered directly to you!");?> <br><br> <form action="install.php" method="post"> <input type="hidden" name="s" value="subscribe"> diff --git a/setup/install.php b/setup/install.php index 1420f2dfab36db7ee48d874b9e127308b45dd32d..b093ba10507c8ef8d8d069953dea7c645f24ddff 100644 --- a/setup/install.php +++ b/setup/install.php @@ -56,7 +56,9 @@ if($_POST && $_POST['s']) { //TODO: Go to subscribe step. $_SESSION['ost_installer']['s']='done'; } elseif(!($errors=$installer->getErrors()) || !$errors['err']) { - $errors['err']=__('Error installing osTicket - correct the errors below and try again.'); + $errors['err'] = sprintf('%s %s', + __('Error installing osTicket.'), + __('Correct any errors below and try again.')); } break; case 'subscribe': diff --git a/setup/tips.php b/setup/tips.php index f2722d1dc0382a707411a997a5dc8ebe0fa1cdf9..1ed08b7a4aa5fc9d33b10e71a20ea07c72e982f7 100644 --- a/setup/tips.php +++ b/setup/tips.php @@ -39,7 +39,7 @@ require_once('setup.inc.php'); <p><?php echo __("Retype admin's password. Must match.");?></p> </div> <div id="t9"> -<b><?php echo __('MySQL Table Prefix.');?></b> +<b><?php echo __('MySQL Table Prefix');?></b> <p><?php echo __('osTicket requires table prefix in order to avoid possible table conflicts in a shared database.');?></p> </div> <div id="t10"> diff --git a/tickets.php b/tickets.php index 8ba0bd644349edee72c61853278ff5b622af799b..5d2a07ffbdf4db5a3550ee04baa6a35cf911b2d2 100644 --- a/tickets.php +++ b/tickets.php @@ -95,11 +95,13 @@ if ($_POST && is_object($ticket) && $ticket->getId()) { $attachments->reset(); $attachments->getForm()->setSource(array()); } else { - $errors['err']=__('Unable to post the message. Try again'); + $errors['err'] = sprintf('%s %s', + __('Unable to post the message.'), + __('Correct any errors below and try again.')); } } elseif(!$errors['err']) { - $errors['err']=__('Error(s) occurred. Please try again'); + $errors['err'] = __('Correct any errors below and try again.'); } break; default: @@ -110,7 +112,7 @@ elseif (is_object($ticket) && $ticket->getId()) { switch(strtolower($_REQUEST['a'])) { case 'print': if (!$ticket || !$ticket->pdfExport($_REQUEST['psize'])) - $errors['err'] = __('Internal error: Unable to export the ticket to PDF for print.'); + $errors['err'] = __('Internal error: Unable to print to PDF'); break; } }