diff --git a/account.php b/account.php index f57eefbf1a1774d253890efa4a61ee3bb01096af..947a4c36f3aa62d83d7fb15447f9c5aecf9967df 100644 --- a/account.php +++ b/account.php @@ -88,7 +88,8 @@ elseif ($_POST) { $errors['err'] = __('Unable to register account. See messages below'); else { if (!($acct = ClientAccount::createForUser($user))) - $errors['err'] = __('Internal error. Unable to create new account'); + $errors['err'] = __('Unable to create new account.') + .' '.__('Internal error occurred'); elseif (!$acct->update($_POST, $errors)) $errors['err'] = __('Errors configuring your profile. See messages below'); } diff --git a/include/ajax.orgs.php b/include/ajax.orgs.php index 1a1c8d19ca060a22e139135cae4d5af4965510f4..ccdd3597cd1ce52a0a84c1cef46471b23318077c 100644 --- a/include/ajax.orgs.php +++ b/include/ajax.orgs.php @@ -123,7 +123,7 @@ class OrgsAjaxAPI extends AjaxController { if ($org->delete()) Http::response(204, 'Organization deleted successfully'); else - $info['error'] = 'Unable to delete organization - try again!'; + $info['error'] = sprintf('%s - %s', __('Unable to delete organization'), __('Please try again!')); } include(STAFFINC_DIR . 'templates/org-delete.tmpl.php'); @@ -158,13 +158,13 @@ class OrgsAjaxAPI extends AjaxController { $form = UserForm::getUserForm()->getForm($_POST); $can_create = $thisstaff->hasPerm(User::PERM_CREATE); if (!($user = User::fromForm($form, $can_create))) - $info['error'] = __('Error adding user - try again!'); + $info['error'] = sprintf('%s - %s', __('Error adding user'), __('Please try again!')); } if (!$info['error'] && $user && $user->setOrganization($org)) Http::response(201, $user->to_json()); elseif (!$info['error']) - $info['error'] = __('Unable to add user to the organization - try again'); + $info['error'] = sprintf('%s - %s', __('Unable to add user to the organization'), __('Please try again!')); } elseif ($remote && $userId) { list($bk, $userId) = explode(':', $userId, 2); @@ -232,7 +232,7 @@ class OrgsAjaxAPI extends AjaxController { if (($org = Organization::fromForm($form))) Http::response(201, $org->to_json()); - $info = array('error' =>__('Error adding organization - try again!')); + $info = array('error' =>sprintf('%s - %s', __('Error adding organization'), __('Please try again!'))); } $info['title'] = __('Add New Organization'); diff --git a/include/ajax.search.php b/include/ajax.search.php index 3342ac46d2e69d7a3dd5023e873fc92989693b73..7e22a87901c5ab73ef9ac86b250ea48711651535 100644 --- a/include/ajax.search.php +++ b/include/ajax.search.php @@ -140,7 +140,7 @@ class SearchAjaxAPI extends AjaxController { elseif ($search->__new__) Http::response(400, 'A name is required'); if (!$search->save()) { - Http::response(500, 'Internal error. Unable to update search'); + Http::response(500, 'Unable to update search. Internal error occurred'); } Http::response(201, $this->encode(array( 'id' => $search->id, diff --git a/include/ajax.tasks.php b/include/ajax.tasks.php index 387065cc80e5239235566ac046ce3d061088a486..b2361b2d6c715d6d44499900155e72753620aba5 100644 --- a/include/ajax.tasks.php +++ b/include/ajax.tasks.php @@ -90,7 +90,7 @@ class TasksAjaxAPI extends AjaxController { Http::response(201, $task->getId()); } - $info['error'] = __('Error adding task - try again!'); + $info['error'] = sprintf('%s - %s', __('Error adding task'), __('Please try again!')); } include STAFFINC_DIR . 'templates/task.tmpl.php'; @@ -336,20 +336,18 @@ class TasksAjaxAPI extends AjaxController { $info[':title'] = sprintf('Reopen %s', _N('selected task', 'selected tasks', $count)); - $info['warn'] = sprintf(__('Are you sure you want to %s?'), - sprintf(__('REOPEN %s'), + $info['warn'] = sprintf(__('Are you sure you want to REOPEN %s?'), _N('selected task', 'selected tasks', $count) - )); + ); break; case 'closed': $perm = Task::PERM_CLOSE; $info[':title'] = sprintf('Close %s', _N('selected task', 'selected tasks', $count)); - $info['warn'] = sprintf(__('Are you sure you want to %s?'), - sprintf(__('CLOSE %s'), + $info['warn'] = sprintf(__('Are you sure you want to CLOSE %s?'), _N('selected task', 'selected tasks', $count) - )); + ); break; default: Http::response(404, __('Unknown action')); @@ -424,7 +422,7 @@ class TasksAjaxAPI extends AjaxController { // Assume success if ($i==$count) { - $msg = sprintf(__('Successfully %s %s.'), + $msg = sprintf(__('Successfully %1$s %2$s.' /* Tokens are <actioned> <x selected task(s)> */), $actions[$action]['verbed'], sprintf('%1$d %2$s', $count, @@ -531,7 +529,7 @@ class TasksAjaxAPI extends AjaxController { $target ? "/$target" : ''), ); if ($task->isAssigned()) { - $info['notice'] = sprintf(__('%s is currently assigned to %s'), + $info['notice'] = sprintf(__('%s is currently assigned to <b>%s</b>'), __('Task'), $task->getAssigned()); } @@ -690,8 +688,8 @@ class TasksAjaxAPI extends AjaxController { if (($m=$task->isCloseable()) !== true) $errors['err'] = $info['error'] = $m; else - $info['warn'] = sprintf(__('Are you sure you want to %s?'), - sprintf(__('change status of %s'), __('this task'))); + $info['warn'] = sprintf(__('Are you sure you want to change status of %s?'), + sprintf(__('this task')); break; default: Http::response(404, __('Unknown status')); diff --git a/include/ajax.thread.php b/include/ajax.thread.php index 7850c67c0b6c5acb4667661ee5934e7e7cc7a150..235a5540b09a649a73127976910a1d75ee409986 100644 --- a/include/ajax.thread.php +++ b/include/ajax.thread.php @@ -123,7 +123,7 @@ class ThreadAjaxAPI extends AjaxController { if($errors && $errors['err']) { $info +=array('error' => $errors['err']); } else { - $info +=array('error' =>__('Unable to add collaborator. Internal error')); + $info +=array('error' =>__('Unable to add collaborator.').' '.__('Internal error occurred')); } return self::_addcollaborator($thread, $user, $form, $info); diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php index 5015363ec3ee495e704f45eb323315ba3086ce49..3a157a511e6ba92c666e25738401ab4320db74f3 100644 --- a/include/ajax.tickets.php +++ b/include/ajax.tickets.php @@ -764,7 +764,7 @@ class TicketsAjaxAPI extends AjaxController { // Assume success if ($i==$count) { - $msg = sprintf(__('Successfully %s %s.'), + $msg = sprintf(__('Successfully %1$s %2$s.' /* Tokens are <actioned> <x selected ticket(s)> */ ), $actions[$action]['verbed'], sprintf('%1$d %2$s', $count, @@ -1024,7 +1024,7 @@ class TicketsAjaxAPI extends AjaxController { if (!$i) { $errors['err'] = $errors['err'] ?: sprintf(__('Unable to change status for %s'), - _N('the selected ticket', 'any of the selected tickets', $count)); + _N('selected ticket', 'selected tickets', $count)); } else { // Assume success @@ -1222,7 +1222,7 @@ class TicketsAjaxAPI extends AjaxController { Http::response(201, $task->getId()); } - $info['error'] = __('Error adding task - try again!'); + $info['error'] = sprintf('%s - %s', __('Error adding task'), __('Please try again!')); } $info['action'] = sprintf('#tickets/%d/add-task', $ticket->getId()); diff --git a/include/ajax.users.php b/include/ajax.users.php index bf85d0c57d223b4d789f540f2bda5209d549498f..f58680fc17216d465fda0aafc7e97dd7fc5ae7f4 100644 --- a/include/ajax.users.php +++ b/include/ajax.users.php @@ -193,7 +193,7 @@ class UsersAjaxAPI extends AjaxController { if ($errors['err']) $info['error'] = $errors['err']; else - $info['error'] = __('Unable to register user - try again!'); + $info['error'] = sprintf('%s - %s', __('Unable to register user'), __('Please try again!')); } include(STAFFINC_DIR . 'templates/user-register.tmpl.php'); @@ -258,7 +258,7 @@ class UsersAjaxAPI extends AjaxController { if (!$info['error'] && $user->delete()) Http::response(204, 'User deleted successfully'); elseif (!$info['error']) - $info['error'] = __('Unable to delete user - try again!'); + $info['error'] = sprintf('%s - %s', __('Unable to delete user'), __('Please try again!')); } include(STAFFINC_DIR . 'templates/user-delete.tmpl.php'); @@ -295,7 +295,7 @@ class UsersAjaxAPI extends AjaxController { if (($user = User::fromForm($form))) Http::response(201, $user->to_json()); - $info['error'] = __('Error adding user - try again!'); + $info['error'] = sprintf('%s - %s', __('Error adding user'), __('Please try again!')); } return self::_lookupform($form, $info); diff --git a/include/class.canned.php b/include/class.canned.php index a8847c9ea07b3f61bb57aefe6afdc7caad382ccf..21cd9aa6367f2b4ec81959d1790177fbb751ad65 100644 --- a/include/class.canned.php +++ b/include/class.canned.php @@ -264,7 +264,7 @@ extends VerySimpleModel { $id = isset($this->canned_id) ? $this->canned_id : null; if ($id && $id != $vars['id']) - $errors['err']=__('Internal error. Try again'); + $errors['err']=sprintf('%s - %s', __('Internal error occurred'), __('Please try again!')); if (!$vars['title']) $errors['title'] = __('Title required'); diff --git a/include/class.collaborator.php b/include/class.collaborator.php index 2d73efbfd26aa211dd0e45adfe6b3510e0730e69..0de95b6e48df9810e915dac35e2d61d802380773 100644 --- a/include/class.collaborator.php +++ b/include/class.collaborator.php @@ -147,7 +147,8 @@ implements EmailContact, ITicketUser { if ($collab->save(true)) return $collab; - $errors['err'] = __('Unable to add collaborator. Internal error'); + $errors['err'] = __('Unable to add collaborator.') + .' '.__('Internal error occurred'); return false; } diff --git a/include/class.config.php b/include/class.config.php index 277741525d9bc3760b784052a362b53c53f6483a..8f10d777aa31df72875c9704d359c9a85416f9c2 100644 --- a/include/class.config.php +++ b/include/class.config.php @@ -1089,7 +1089,7 @@ class OsticketConfig extends Config { return $this->updateKBSettings($vars, $errors); break; default: - $errors['err']=__('Unknown setting option. Get technical support.'); + $errors['err']=sprintf('%s - %s', __('Unknown setting option'), __('Get technical help!')); } return false; diff --git a/include/class.dept.php b/include/class.dept.php index 36ffd2ffb00f07258426aa1c9b3f819bc949f297..ceff70a47084409a9b5b02eebcff703db808b139 100644 --- a/include/class.dept.php +++ b/include/class.dept.php @@ -599,7 +599,8 @@ implements TemplateVariable { $id = $this->id; if ($id && $id != $vars['id']) - $errors['err']=__('Missing or invalid Dept ID (internal error).'); + $errors['err']=__('Missing or invalid Dept ID.') + .' '.__('Internal error occurred'); if (!$vars['name']) { $errors['name']=__('Name required'); diff --git a/include/class.email.php b/include/class.email.php index 2b5f5e033973b65f0b9a5862e57af2311f6488db..c1542113e4b7056ce1a9e578a96b2c7da76642fe 100644 --- a/include/class.email.php +++ b/include/class.email.php @@ -248,7 +248,8 @@ class Email extends VerySimpleModel { $id = isset($this->email_id) ? $this->getId() : 0; if($id && $id!=$vars['id']) - $errors['err']=__('Internal error. Get technical help.'); + $errors['err']=__('Get technical help!') + .' '.__('Internal error occurred'); if(!$vars['email'] || !Validator::is_email($vars['email'])) { $errors['email']=__('Valid email required'); @@ -273,7 +274,7 @@ class Email extends VerySimpleModel { && $vars['userid'] && !Crypto::encrypt($vars['passwd'], SECRET_SALT, $vars['userid']) ) - $errors['passwd'] = __('Unable to encrypt password - get technical support'); + $errors['passwd'] = sprintf('%s - %s', __('Unable to encrypt password'), __('Get technical help!')); } list($vars['mail_protocol'], $encryption) = explode('/', $vars['mail_proto']); diff --git a/include/class.page.php b/include/class.page.php index 157ad43cdc30d1add90b0270f331d821038feacc..c296e9feef025ddc7860c5fb6771d2397f8cdee4 100644 --- a/include/class.page.php +++ b/include/class.page.php @@ -254,7 +254,7 @@ class Page extends VerySimpleModel { } if (isset($this->id) && $this->getId() != $vars['id']) - $errors['err'] = __('Internal error. Try again'); + $errors['err'] = sprintf('%s - %s', __('Internal error occurred'), __('Please try again!')); if(!$vars['type']) $errors['type'] = __('Type is required'); diff --git a/include/class.staff.php b/include/class.staff.php index b7e79b95f49b06ecb6432e364d3950a253915c53..e5ed7e77555e5bb72f1376d10de92bc9b579569d 100644 --- a/include/class.staff.php +++ b/include/class.staff.php @@ -969,7 +969,7 @@ implements AuthenticatedUser, EmailContact, TemplateVariable { $vars['lastname']=Format::striptags($vars['lastname']); if (isset($this->staff_id) && $this->getId() != $vars['id']) - $errors['err']=__('Internal Error'); + $errors['err']=__('Internal error occurred'); if(!$vars['firstname']) $errors['firstname']=__('First name required'); @@ -1096,9 +1096,9 @@ implements AuthenticatedUser, EmailContact, TemplateVariable { if (!$role_id || !Role::lookup($role_id)) $errors['dept_access'][$dept_id] = __('Select a valid role'); if (!$dept_id || !Dept::lookup($dept_id)) - $errors['dept_access'][$dept_id] = __('Select a valid departent'); + $errors['dept_access'][$dept_id] = __('Select a valid department'); if ($dept_id == $this->getDeptId()) - $errors['dept_access'][$dept_id] = __('Agent already has access to this department'); + $errors['dept_access'][$dept_id] = sprintf(__('Agent already has access to %s'), __('this department')); $da = $this->dept_access->findFirst(array('dept_id' => $dept_id)); if (!isset($da)) { $da = new StaffDeptAccess(array( diff --git a/include/class.task.php b/include/class.task.php index 424e6ed324cafe86d0052607d7cf283ff7624451..4b98ff1d4a861ff9d3cab3ed906fc3ae12db34d6 100644 --- a/include/class.task.php +++ b/include/class.task.php @@ -1240,7 +1240,7 @@ class Task extends TaskModel implements RestrictedAccess, Threadable { $_errors = array(); $this->postNote(array( 'note' => $vars['note'], - 'title' => __('Task Update'), + 'title' => _S('Task Updated'), ), $_errors, $thisstaff); diff --git a/include/class.ticket.php b/include/class.ticket.php index caf9f63fa0a6bc853dd691293e6ff4c5f133cd09..7cc661f9595c6a68e4dc8ee8d47b04b7fd13ddda 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -3526,7 +3526,7 @@ implements RestrictedAccess, Threadable { && ($role = $thisstaff->getRole($vars['deptId'])) && !$role->hasPerm(TicketModel::PERM_CREATE) ) { - $errors['err'] = __('You do not have permission to create a ticket in this department'); + $errors['err'] = sprintf(__('You do not have permission to create a ticket in %s'), __('this department')); return false; } diff --git a/include/client/view.inc.php b/include/client/view.inc.php index 05ea6f44057d9440e31c57092f61355bcdad5b80..2aa01d019bafc6a7390d7259bfcb775b7b5f682b 100644 --- a/include/client/view.inc.php +++ b/include/client/view.inc.php @@ -6,7 +6,7 @@ $info=($_POST && $errors)?Format::htmlchars($_POST):array(); $dept = $ticket->getDept(); if ($ticket->isClosed() && !$ticket->isReopenable()) - $warn = __('This ticket is marked as closed and cannot be reopened.'); + $warn = sprintf(__('%s is marked as closed and cannot be reopened.'), __('This ticket')); //Making sure we don't leak out internal dept names if(!$dept || !$dept->isPublic()) diff --git a/include/i18n/en_US/help/tips/settings.kb.yaml b/include/i18n/en_US/help/tips/settings.kb.yaml index c6147567c1c39c8f220af8da4cee19a854a5cc4d..c36af843ffcc6a947f822307408f4c136914d2c7 100644 --- a/include/i18n/en_US/help/tips/settings.kb.yaml +++ b/include/i18n/en_US/help/tips/settings.kb.yaml @@ -29,7 +29,7 @@ knowledge_base_status: href: /scp/kb.php restrict_kb: - title: Resctrict Access to the Knowledge Base + title: Restrict Access to the Knowledge Base content: > Enable this setting to prevent unregistered users from accessing your knowledge base articles on the client interface. diff --git a/include/i18n/en_US/templates/email/task.assignment.alert.yaml b/include/i18n/en_US/templates/email/task.assignment.alert.yaml index 2a8684c51d65ceac087757a2778285f1d215ab94..4778cf112ab0752ea9c14ba38382cf376c01dda8 100644 --- a/include/i18n/en_US/templates/email/task.assignment.alert.yaml +++ b/include/i18n/en_US/templates/email/task.assignment.alert.yaml @@ -7,7 +7,7 @@ # --- notes: | - Sent to agents when a ticket is assigned to them or the team to which + Sent to agents when a task is assigned to them or the team to which they belong. Use %{assigner} to distinguish who made the assignment. subject: | diff --git a/include/i18n/en_US/templates/email/transfer.alert.yaml b/include/i18n/en_US/templates/email/transfer.alert.yaml index 9bdec78bdda6fb235610827ec38a0ce33daa1f0e..d195dc91cabee95a627233ede99d9f5f1e47fd4d 100644 --- a/include/i18n/en_US/templates/email/transfer.alert.yaml +++ b/include/i18n/en_US/templates/email/transfer.alert.yaml @@ -7,7 +7,8 @@ # --- notes: | - + Sent to agents when a ticket is transfered to a department to which + they are a member. subject: | Ticket #%{ticket.number} transfer - %{ticket.dept.name} body: | diff --git a/include/staff/department.inc.php b/include/staff/department.inc.php index b1eb9b3236e2131a0fb6a620e7a8a778ee3e62df..2ea8825e35c787bdcba95078a23e50f8e46f1192 100644 --- a/include/staff/department.inc.php +++ b/include/staff/department.inc.php @@ -227,7 +227,7 @@ $info = Format::htmlchars(($errors && $_POST) ? $_POST : $info); <label> <input type="checkbox" name="ticket_auto_response" value="0" <?php echo !$info['ticket_auto_response']?'checked="checked"':''; ?> > - <?php echo __('<strong>Disable</strong> for this Department'); ?> + <?php echo sprintf(__('<strong>Disable</strong> for %s'), __('this department')); ?> </label> <i class="help-tip icon-question-sign" href="#new_ticket"></i> </td> @@ -239,7 +239,7 @@ $info = Format::htmlchars(($errors && $_POST) ? $_POST : $info); <td> <label> <input type="checkbox" name="message_auto_response" value="0" <?php echo !$info['message_auto_response']?'checked="checked"':''; ?> > - <?php echo __('<strong>Disable</strong> for this Department'); ?> + <?php echo sprintf(__('<strong>Disable</strong> for %s'), __('this department')); ?> </label> <i class="help-tip icon-question-sign" href="#new_message"></i> </td> @@ -322,7 +322,7 @@ $info = Format::htmlchars(($errors && $_POST) ? $_POST : $info); <td colspan="2"> <?php echo __('Department Members'); ?> <div><small> - <?php echo __('Agents who are primary members of this department'); ?> + <?php echo sprintf(__('Agents who are primary members of %s'), __('this department')); ?> </small></div> </td> </tr> @@ -339,7 +339,7 @@ $info = Format::htmlchars(($errors && $_POST) ? $_POST : $info); <tr class="header" id="extended-access-members"> <td colspan="2"> <div><small> - <?php echo __('Agents who have extended access to this department'); ?> + <?php echo sprintf(__('Agents who have extended access to %s'), __('this department')); ?> </small></div> </td> </tr> diff --git a/include/staff/email.inc.php b/include/staff/email.inc.php index 77015e85aea1f255768750959e86b90d430c78a2..3653f06a7949bacc7d92d1b32a911c075abe07c0 100644 --- a/include/staff/email.inc.php +++ b/include/staff/email.inc.php @@ -152,7 +152,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </td> <td> <label><input type="checkbox" name="noautoresp" value="1" <?php echo $info['noautoresp']?'checked="checked"':''; ?> > - <?php echo __('<strong>Disable</strong> for this Email Address'); ?> + <?php echo sprintf(__('<strong>Disable</strong> for %s'), __('this email')); ?> </label> <i class="help-tip icon-question-sign" href="#auto_response"></i> </td> @@ -313,7 +313,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <td><?php echo __('Header Spoofing'); ?></td> <td> <label><input type="checkbox" name="smtp_spoofing" value="1" <?php echo $info['smtp_spoofing'] ?'checked="checked"':''; ?>> - <?php echo __('Allow for this Email Address'); ?></label> + <?php echo sprintf(__('Allow for %s'), __('this email')); ?></label> <i class="help-tip icon-question-sign" href="#header_spoofing"></i> </td> </tr> diff --git a/include/staff/faq.inc.php b/include/staff/faq.inc.php index 116bdad865765ff61446f7b0c2cfcd7558d5ce0f..4579deb8d34ca38484835ec6bb33d178721ddbda 100644 --- a/include/staff/faq.inc.php +++ b/include/staff/faq.inc.php @@ -77,7 +77,7 @@ if ($topics = Topic::getAllHelpTopics()) { ?> <div style="padding-top:9px"> <strong><?php echo __('Help Topics');?></strong>: - <div class="faded"><?php echo __('Check all help topics related to this FAQ.');?></div> + <div class="faded"><?php echo sprintf(__('Check all help topics related to %s.'), __('this FAQ article'));?></div> </div> <select multiple="multiple" name="topics[]" class="multiselect" data-placeholder="<?php echo __('Help Topics'); ?>" diff --git a/include/staff/filter.inc.php b/include/staff/filter.inc.php index 942b2e33770b4c0cc06fa6b6dddac5f9738fd68a..2330fc47dc4ebeece8aa04e8365c71bb30bfb186 100644 --- a/include/staff/filter.inc.php +++ b/include/staff/filter.inc.php @@ -227,7 +227,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <th colspan="2"> <em><strong><?php echo __('Filter Actions');?></strong>: <div><?php - echo __('Can be overwridden by other filters depending on processing order.'); + echo __('Can be overridden by other filters depending on processing order.'); ?><br/><?php echo __('Actions are executed in the order declared below'); ?></div></em> diff --git a/include/staff/settings-emails.inc.php b/include/staff/settings-emails.inc.php index 784e519a7329aff6302171e795d7cd5af86dffc4..aece5823459b9ecf0aeb3bd2b8c565d04619fe4f 100644 --- a/include/staff/settings-emails.inc.php +++ b/include/staff/settings-emails.inc.php @@ -9,7 +9,7 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) <thead> <tr> <th colspan="2"> - <em><?php echo __('Note that some of the global settings can be overwridden at department/email level.');?></em> + <em><?php echo __('Note that some of the global settings can be overridden at department/email level.');?></em> </th> </tr> </thead> diff --git a/include/staff/team.inc.php b/include/staff/team.inc.php index cefc503fc2e5c15e7940a3f8933e2be44fe501a6..254d1559d6407d5e15d522185e2c62778ff567f4 100644 --- a/include/staff/team.inc.php +++ b/include/staff/team.inc.php @@ -103,7 +103,7 @@ $info = $team->getInfo(); </td> <td> <input type="checkbox" name="noalerts" value="1" <?php echo !$team->alertsEnabled()?'checked="checked"':''; ?> > - <?php echo __('<strong>Disable</strong> for this Team'); ?> + <?php echo sprintf(__('<strong>Disable</strong> for %s'), __('this team')); ?> <i class="help-tip icon-question-sign" href="#assignment_alert"></i> </td> </tr> @@ -135,7 +135,7 @@ foreach ($members as $m) <td colspan="2"> <?php echo __('Team Members'); ?> <div><small> - <?php echo __('Agents who are members of this team'); ?> + <?php echo sprintf(__('Agents who are members of %s'), __('this team')); ?> <i class="help-tip icon-question-sign" href="#members"></i> </small></div> </td> diff --git a/include/staff/templates/task-edit.tmpl.php b/include/staff/templates/task-edit.tmpl.php index f86e8a70a4c751d92b23b5bf592849bb66b7c08a..5c8533eb900f32e965d08f538031b91dcf107a2a 100644 --- a/include/staff/templates/task-edit.tmpl.php +++ b/include/staff/templates/task-edit.tmpl.php @@ -2,7 +2,7 @@ global $cfg; if (!$info['title']) - $info['title'] = sprintf(__('%s Tasks #%s'), + $info['title'] = sprintf(__('%s Task #%s'), __('Edit'), $task->getNumber() ); diff --git a/include/staff/templates/task-preview.tmpl.php b/include/staff/templates/task-preview.tmpl.php index e1f32892c94ce791f7d90979920a2e885e1a6286..88405bc1277ba6138eec1cceb7372df25a6c7ce3 100644 --- a/include/staff/templates/task-preview.tmpl.php +++ b/include/staff/templates/task-preview.tmpl.php @@ -2,7 +2,7 @@ $error=$msg=$warn=null; if (!$task->checkStaffPerm($thisstaff)) - $warn.= __('You do not have access to this task'); + $warn.= __('You do not have access to %s'), __('this task'); elseif ($task->isOverdue()) $warn.=' <span class="Icon overdueTicket">'.__('Marked overdue!').'</span>'; diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index fb3bbc241852137543a14700c3de301cd25b4958..ba3e0a468006f2caf6c66c1520212ae57d36ec6d 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -38,7 +38,8 @@ elseif ($ticket->isAssigned() if (!$errors['err']) { if ($lock && $lock->getStaffId()!=$thisstaff->getId()) - $errors['err'] = sprintf(__('This ticket is currently locked by %s'), + $errors['err'] = sprintf(__('%s is currently locked by %s'), + __('This ticket'), $lock->getStaffName()); elseif (($emailBanned=Banlist::isBanned($ticket->getEmail()))) $errors['err'] = __('Email is in banlist! Must be removed before any reply/response'); @@ -867,7 +868,7 @@ if ($errors['err'] && isset($_POST['a'])) { <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="claim-confirm"> - <?php echo __('Are you sure you want to <b>claim</b> (self assign) this ticket?');?> + <?php echo sprintf(__('Are you sure you want to <b>claim</b> (self assign) %s?'), __('this ticket');?> </p> <p class="confirm-action" style="display:none;" id="answered-confirm"> <?php echo __('Are you sure you want to flag the ticket as <b>answered</b>?');?> diff --git a/include/staff/tpl.inc.php b/include/staff/tpl.inc.php index b21cc2593f7cb124d15574957ede56b19c96e682..650591ec0828a2ca2f196eb5cb5954df7f3dde1c 100644 --- a/include/staff/tpl.inc.php +++ b/include/staff/tpl.inc.php @@ -105,8 +105,8 @@ $invalid = array(); if ($template instanceof EmailTemplate) { if ($invalid = $template->getInvalidVariableUsage()) { $invalid = array_unique($invalid); ?> - <div class="warning-banner"><?php echo - __('Some variables may not be a valid for this context. Please check for spelling errors and correct usage for this template.') ?> + <div class="warning-banner"><?php echo sprintf( + __('Some variables may not be a valid for this context. Please check for spelling errors and correct usage for %s.'), __('this template')); ?> <br/> <code><?php echo implode(', ', $invalid); ?></code> </div> diff --git a/include/upgrader/aborted.inc.php b/include/upgrader/aborted.inc.php index 846d5cd7238567a9243b92e1cc65ff711e4e9a7b..c34a4e7d2bd6d4403017205165da604e135f81a1 100644 --- a/include/upgrader/aborted.inc.php +++ b/include/upgrader/aborted.inc.php @@ -17,7 +17,7 @@ if(!defined('OSTSCPINC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access D echo sprintf('<li>%s</li>',$error); echo '</ul>'; } else { - echo '<b><font color="red">'.__('Internal error occurred - get technical help.').'</font></b>'; + echo '<b><font color="red">'.__('Internal error occurred').' - '.__('Get technical help!').'</font></b>'; } ?> <p><b><?php echo sprintf(__('For details - please view %s or check your email.'), diff --git a/include/upgrader/prereq.inc.php b/include/upgrader/prereq.inc.php index 2c0e8d8533f737d26db6893f42357a9e73b5cc80..8d48052c1f5fbea432de48105fc5c26f6d7bee76 100644 --- a/include/upgrader/prereq.inc.php +++ b/include/upgrader/prereq.inc.php @@ -22,7 +22,7 @@ if(!defined('OSTSCPINC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access D <li class="<?php echo $upgrader->check_mysql_version()?'yes':'no'; ?>"> <?php echo sprintf(__('%s or later'), 'MySQL v5.0'); ?> - (<small><b><?php echo db_version(); ?></b></small>)</li> </ul> - <h3><?php echo __('Higly Recommended');?>:</h3> + <h3><?php echo __('Highly Recommended');?>:</h3> <?php echo __('We highly recommend that you follow the steps below.');?> <ul> <li><?php echo __("Back up the current database if you haven't done so already."); ?></li> diff --git a/login.php b/login.php index f19c1a3ec8897bb98784793e29222693af5a3277..5c4a713124bc6b55175f48d9f2926e4676f631ec 100644 --- a/login.php +++ b/login.php @@ -70,7 +70,7 @@ if ($_POST && isset($_POST['luser'])) { ?: 'tickets.php'); } } elseif(!$errors['err']) { - $errors['err'] = __('Invalid username or password - try again!'); + $errors['err'] = sprintf('%s - %s', __('Invalid username or password'), __('Please try again!')); } $suggest_pwreset = true; } @@ -95,7 +95,7 @@ elseif ($_POST && isset($_POST['lticket'])) { Format::htmlchars($user->getName()->getFirst())); $_POST = null; } elseif(!$errors['err']) { - $errors['err'] = __('Invalid email or ticket number - try again!'); + $errors['err'] = sprintf('%s - %s', __('Invalid email or ticket number'), __('Please try again!')); } } elseif (isset($_GET['do'])) { diff --git a/main.inc.php b/main.inc.php index e92ec4a71d3e59876361fba0aa8446328b383779..383156038acea34b4d6e56352df0b508e9136fd1 100644 --- a/main.inc.php +++ b/main.inc.php @@ -31,7 +31,7 @@ Bootstrap::connect(); $_SERVER['REMOTE_ADDR'] = osTicket::get_client_ip(); if(!($ost=osTicket::start()) || !($cfg = $ost->getConfig())) -Bootstrap::croak(__('Unable to load config info from DB. Get tech support.')); +Bootstrap::croak(__('Unable to load config info from DB.').' '.__('Get technical help!')); //Init $session = $ost->getSession(); diff --git a/open.php b/open.php index 7cf09ec1186078f6ff112958417748386f77ca71..450b9d1f60609daaa31e77673e4898d672230403 100644 --- a/open.php +++ b/open.php @@ -26,7 +26,7 @@ if ($_POST) { if(!$_POST['captcha']) $errors['captcha']=__('Enter text shown on the image'); elseif(strcmp($_SESSION['captcha'], md5(strtoupper($_POST['captcha'])))) - $errors['captcha']=__('Invalid - try again!'); + $errors['captcha']=sprintf('%s - %s', __('Invalid'), __('Please try again!')); } $tform = TicketForm::objects()->one()->getForm($vars); diff --git a/pwreset.php b/pwreset.php index e083d3956bd3cb0e5aa5ca4777342926e588b278..2461ec3cf6971a736cf5821099a890476963c39f 100644 --- a/pwreset.php +++ b/pwreset.php @@ -23,7 +23,8 @@ if($_POST) { $inc = 'pwreset.sent.php'; } else - $banner = __('Unable to send reset email. Internal error'); + $banner = __('Unable to send reset email.') + .' '.__('Internal error occurred'); } else $banner = sprintf(__('Unable to verify username %s'), diff --git a/scp/apikeys.php b/scp/apikeys.php index 9d9336a30b2f41a25b7126842b98d9d753b7f335..1f84789a96341b0ece254d610aac8dd2f28df434 100644 --- a/scp/apikeys.php +++ b/scp/apikeys.php @@ -96,7 +96,7 @@ if($_POST){ _N('selected API key', 'selected API keys', $count)); break; default: - $errors['err']=__('Unknown action - get technical help.'); + $errors['err']=sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } } break; diff --git a/scp/banlist.php b/scp/banlist.php index 8667b2e74cee9f4f1a37ccefe67618773db2ddca..742938d1b0bf34e6610ae6c114e25c8af664994b 100644 --- a/scp/banlist.php +++ b/scp/banlist.php @@ -63,7 +63,7 @@ if($_POST && !$errors && $filter){ $_REQUEST['a']=null; //Add filter rule here. }elseif(!$errors['err']){ - $errors['err']=sprintf(__('Error creating %s. Try again!'), __('ban rule')); + $errors['err']=sprintf('%s %s', sprintf(__('Error creating %s.'), __('ban rule')), __('Please try again!')); } break; case 'mass_process': @@ -123,7 +123,7 @@ if($_POST && !$errors && $filter){ break; default: - $errors['err'] = __('Unknown action - get technical help.'); + $errors['err'] = sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } } break; diff --git a/scp/categories.php b/scp/categories.php index 22e9fab69dffbcbd7fe5da0075c82863aaedfb6f..bea8e9a24cf8a730471d9ba9c73b3d827aa46627 100644 --- a/scp/categories.php +++ b/scp/categories.php @@ -111,7 +111,7 @@ if($_POST){ _N('selected category', 'selected categories', $count)); break; default: - $errors['err']=__('Unknown action - get technical help.'); + $errors['err']=sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } } break; diff --git a/scp/departments.php b/scp/departments.php index 45cafc6532e5b9900aa2f177e21159bc6a7bf295..c1d860488f991d92291f73c0102bf16e0647964a 100644 --- a/scp/departments.php +++ b/scp/departments.php @@ -118,7 +118,7 @@ if($_POST){ } break; default: - $errors['err']=__('Unknown action - get technical help.'); + $errors['err']=sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } } break; diff --git a/scp/emails.php b/scp/emails.php index f19e655761019f3c63338bc377c9b89dc1c3dbfe..b119d11b456ec7a6960c86ce82b57f21f02f475f 100644 --- a/scp/emails.php +++ b/scp/emails.php @@ -73,7 +73,7 @@ if($_POST){ break; default: - $errors['err'] = __('Unknown action - get technical help.'); + $errors['err'] = sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } } break; diff --git a/scp/emailtest.php b/scp/emailtest.php index ed34e8f7ceeb42ba75ad55b906c4d8e624dd8d83..ae8d68579d88768ee3034c856d89ace84c5b6283 100644 --- a/scp/emailtest.php +++ b/scp/emailtest.php @@ -43,9 +43,9 @@ if($_POST){ Draft::deleteForNamespace('email.diag'); } else - $errors['err']=__('Error sending email - try again.'); + $errors['err']=sprintf('%s - %s', __('Error sending email'), __('Please try again!')); }elseif($errors['err']){ - $errors['err']=__('Error sending email - try again.'); + $errors['err']=sprintf('%s - %s', __('Error sending email'), __('Please try again!')); } } $nav->setTabActive('emails'); diff --git a/scp/filters.php b/scp/filters.php index b8b0d634d105a2a19c48651a4a4fd91788af862d..9e4d63193bfa370b53ca3135d5c2b16c5d7e20ae 100644 --- a/scp/filters.php +++ b/scp/filters.php @@ -103,7 +103,7 @@ if($_POST){ _N('selected ticket filter', 'selected ticket filters', $count)); break; default: - $errors['err']=__('Unknown action - get technical help.'); + $errors['err']=sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } } break; diff --git a/scp/helptopics.php b/scp/helptopics.php index 2dd0dc7fe8174b4ef96b6f52a7f870a760af2a3c..b00c231d500211a30c4ea30d35a2b8c87a7b38d4 100644 --- a/scp/helptopics.php +++ b/scp/helptopics.php @@ -135,7 +135,7 @@ if($_POST){ } break; default: - $errors['err']=__('Unknown action - get technical help.'); + $errors['err']=sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } } break; diff --git a/scp/js/scp.js b/scp/js/scp.js index ae2512f63f921854e78ec117e9061d2bfe5eaadf..c825c051cc64764435c33debafd976b3c0c53324 100644 --- a/scp/js/scp.js +++ b/scp/js/scp.js @@ -93,7 +93,7 @@ var scp_prep = function() { else formObj = $(this).closest('form'); if($('.dialog#confirm-action p#'+name+'-confirm').length === 0) { - alert('Unknown action '+name+' - get technical help.'); + alert('Unknown action '+name+' - Get technical help!'); } else if(checkbox_checker(formObj, 1)) { var action = name; $('.dialog#confirm-action').undelegate('.confirm'); diff --git a/scp/logs.php b/scp/logs.php index 26767bd58a335a6961a9ab1895364487d527056a..7e4eea9f945e4d66c81dc06c0886a6e689c82a40 100644 --- a/scp/logs.php +++ b/scp/logs.php @@ -38,7 +38,7 @@ if($_POST){ $errors['err']=sprintf(__('Unable to delete %s.'), _N('selected log entry', 'selected log entries', $count)); } else { - $errors['err']=__('Unknown action - get technical help.'); + $errors['err']=sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } } break; diff --git a/scp/orgs.php b/scp/orgs.php index a58e985b522764863a9b43b239ed60e1b1f69623..8a70dcf2b61562fdda3fb9807410af9d5ffe9987 100644 --- a/scp/orgs.php +++ b/scp/orgs.php @@ -78,7 +78,7 @@ if ($_POST) { break; default: - $errors['err']=__('Unknown action - get technical help.'); + $errors['err']=sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } if (!$errors['err'] && !$count) { $errors['err'] = __('Unable to manage any of the selected organizations'); @@ -101,7 +101,8 @@ if ($_POST) { if (!($query=$_SESSION[':Q:orgs'])) $errors['err'] = __('Query token not found'); elseif (!Export::saveOrganizations($query, __('organizations')."-$ts.csv", 'csv')) - $errors['err'] = __('Internal error: Unable to export results'); + $errors['err'] = __('Unable to export results.') + .' '.__('Internal error occurred'); } $page = 'orgs.inc.php'; @@ -118,7 +119,8 @@ if ($org) { $filename = sprintf('%s-tickets-%s.csv', $org->getName(), strftime('%Y%m%d')); if (!Export::saveTickets($query, $filename, 'csv')) - $errors['err'] = __('Internal error: Unable to dump query results'); + $errors['err'] = __('Unable to dump query results.') + .' '.__('Internal error occurred'); } break; } diff --git a/scp/pages.php b/scp/pages.php index 31b3cab3bb1dc1f87d81e8b6767811dc0e9c05c9..c7dc6a068df5c00707021eccd1e4f41f66846dcc 100644 --- a/scp/pages.php +++ b/scp/pages.php @@ -107,7 +107,7 @@ if($_POST) { _N('selected site page', 'selected site pages', $count)); break; default: - $errors['err']=__('Unknown action - get technical help.'); + $errors['err']=sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } } break; diff --git a/scp/profile.php b/scp/profile.php index cf77b05f00fc8197696aa5f781cb37fd09c946d4..0a46875e7f3ae2812c366facb72f27702e7eaebb 100644 --- a/scp/profile.php +++ b/scp/profile.php @@ -20,7 +20,8 @@ require_once(INCLUDE_DIR.'class.export.php'); // For paper sizes $msg=''; $staff=Staff::lookup($thisstaff->getId()); if($_POST && $_POST['id']!=$thisstaff->getId()) { //Check dummy ID used on the form. - $errors['err']=__('Internal Error. Action Denied'); + $errors['err']=__('Action Denied.') + .' '.__('Internal error occurred'); } elseif(!$errors && $_POST) { //Handle post if(!$staff) diff --git a/scp/slas.php b/scp/slas.php index 61bab1e556e1913202f3d5b0054f8bbd4f162ac1..22e3e44e679cdb637193f0b36eb09e1ebdc69272 100644 --- a/scp/slas.php +++ b/scp/slas.php @@ -114,7 +114,7 @@ if($_POST){ _N('selected SLA plan', 'selected SLA plans', $count)); break; default: - $errors['err']=__('Unknown action - get technical help.'); + $errors['err']=sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } } break; diff --git a/scp/staff.inc.php b/scp/staff.inc.php index e486cde88b72018c1464c3bc5b94240c482a4420..a91b15a2f370bfcb5481f537a3bb3010d6657908 100644 --- a/scp/staff.inc.php +++ b/scp/staff.inc.php @@ -15,7 +15,7 @@ **********************************************************************/ if(basename($_SERVER['SCRIPT_NAME'])==basename(__FILE__)) die('Access denied'); //Say hi to our friend.. -if(!file_exists('../main.inc.php')) die('Fatal error... get technical support'); +if(!file_exists('../main.inc.php')) die('Fatal error... Get technical help!'); require_once('../main.inc.php'); diff --git a/scp/staff.php b/scp/staff.php index df2854e854cefa8a5d335725240383ce14b08914..9b2f4a999c6b6d65b10077dc3ededd2769129a89 100644 --- a/scp/staff.php +++ b/scp/staff.php @@ -137,7 +137,7 @@ if($_POST){ || !Dept::lookup($_POST['dept_id']) || !Role::lookup($_POST['role_id']) ) { - $errors['err'] = 'Internal error.'; + $errors['err'] = __('Internal error occurred'); break; } foreach ($members as $s) { @@ -158,7 +158,7 @@ if($_POST){ break; default: - $errors['err'] = __('Unknown action - get technical help.'); + $errors['err'] = sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } } diff --git a/scp/tasks.php b/scp/tasks.php index a45635ea042efeaeb45d4bd10735e82231c57e53..327de9a268937bebc73453e777e97121fd7d2130 100644 --- a/scp/tasks.php +++ b/scp/tasks.php @@ -225,7 +225,8 @@ 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 print to PDF'); + $errors['err'] = __('Unable to print to PDF.') + .' '.__('Internal error occurred'); } else { $inc = 'tasks.inc.php'; if ($_REQUEST['a']=='open' && @@ -236,7 +237,8 @@ if($task) { if (!($query=$_SESSION[':Q:tasks'])) $errors['err'] = __('Query token not found'); elseif (!Export::saveTasks($query, "tasks-$ts.csv", 'csv')) - $errors['err'] = __('Internal error: Unable to dump query results'); + $errors['err'] = __('Unable to dump query results.') + .' '.__('Internal error occurred'); } //Clear active submenu on search with no status diff --git a/scp/teams.php b/scp/teams.php index 600d1488338a4a1e107178c9d4ae391eb1ef0686..8f154b97cac453c5b750322e5f2e03a3c769952a 100644 --- a/scp/teams.php +++ b/scp/teams.php @@ -110,7 +110,7 @@ if($_POST){ _N('selected team', 'selected teams', $count)); break; default: - $errors['err'] = __('Unknown action - get technical help.'); + $errors['err'] = sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } } break; diff --git a/scp/templates.php b/scp/templates.php index e5a8decd0e57583f4a8bb97cd54d4575e7ebfc6b..929e220d5a7c5894d4e226d829f43d6043b0b00a 100644 --- a/scp/templates.php +++ b/scp/templates.php @@ -146,7 +146,7 @@ if($_POST){ _N('selected template set', 'selected template sets', $count)); break; default: - $errors['err']=__('Unknown action - get technical help.'); + $errors['err']=sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } } break; diff --git a/scp/tickets.php b/scp/tickets.php index 7e8f027dce8052999cf9ed87b0e275d1080197a1..25e21dfd4e2a4854311393d4d35ccec99195688d 100644 --- a/scp/tickets.php +++ b/scp/tickets.php @@ -92,7 +92,7 @@ if($_POST && !$errors): if ($cfg->getLockTime()) { if (!$lock) { - $errors['err'] = __('This action requires a lock. Please try again'); + $errors['err'] = sprintf('%s %s', __('This action requires a lock.'), __('Please try again!')); } // Use locks to avoid double replies elseif ($lock->getStaffId()!=$thisstaff->getId()) { @@ -102,7 +102,7 @@ if($_POST && !$errors): elseif (($lock->isExpired() && !$lock->renew()) ||($lock->getCode() != $_POST['lockCode']) ) { - $errors['err'] = __('Your lock has expired. Please try again'); + $errors['err'] = sprintf('%s %s', __('Your lock has expired.'), __('Please try again!')); } } @@ -149,14 +149,14 @@ if($_POST && !$errors): if ($cfg->getLockTime()) { if (!$lock) { - $errors['err'] = __('This action requires a lock. Please try again'); + $errors['err'] = sprintf('%s %s', __('This action requires a lock.'), __('Please try again!')); } // Use locks to avoid double replies elseif ($lock->getStaffId()!=$thisstaff->getId()) { $errors['err'] = __('Action Denied. Ticket is locked by someone else!'); } elseif ($lock->getCode() != $_POST['lockCode']) { - $errors['err'] = __('Your lock has expired. Please try again'); + $errors['err'] = sprintf('%s %s', __('Your lock has expired.'), __('Please try again!')); } } @@ -201,9 +201,10 @@ if($_POST && !$errors): if(!$ticket->checkStaffPerm($thisstaff)) $ticket=null; } elseif(!$errors['err']) { - $errors['err']=sprintf( - __('Unable to update %s. Correct any errors below and try again.'), - __('ticket')); + $errors['err']=sprintf('%s %s', + sprintf(__('Unable to update %s.'), __('this ticket')), + __('Correct any errors below and try again.') + ); } break; case 'process': @@ -218,7 +219,7 @@ if($_POST && !$errors): $assigned, $thisstaff->getName()); $ticket->logActivity(__('Ticket unassigned'),$msg); } else { - $errors['err'] = __('Problems releasing the ticket. Try again'); + $errors['err'] = sprintf('%s %s', __('Problems releasing the ticket.'), __('Please try again!')); } break; case 'claim': @@ -231,7 +232,7 @@ if($_POST && !$errors): } elseif ($ticket->claim()) { $msg = __('Ticket is now assigned to you!'); } else { - $errors['err'] = __('Problems assigning the ticket. Try again'); + $errors['err'] = sprintf('%s %s', __('Problems assigning the ticket.'), __('Please try again!')); } break; case 'overdue': @@ -242,7 +243,7 @@ if($_POST && !$errors): $msg=sprintf(__('Ticket flagged as overdue by %s'),$thisstaff->getName()); $ticket->logActivity(__('Ticket Marked Overdue'),$msg); } else { - $errors['err']=__('Problems marking the the ticket overdue. Try again'); + $errors['err']=sprintf('%s %s', __('Problems marking the the ticket overdue.'), __('Please try again!')); } break; case 'answered': @@ -253,7 +254,7 @@ if($_POST && !$errors): $msg=sprintf(__('Ticket flagged as answered by %s'),$thisstaff->getName()); $ticket->logActivity(__('Ticket Marked Answered'),$msg); } else { - $errors['err']=__('Problems marking the the ticket answered. Try again'); + $errors['err']=sprintf('%s %s', __('Problems marking the ticket answered.'), __('Please try again!')); } break; case 'unanswered': @@ -264,7 +265,7 @@ if($_POST && !$errors): $msg=sprintf(__('Ticket flagged as unanswered by %s'),$thisstaff->getName()); $ticket->logActivity(__('Ticket Marked Unanswered'),$msg); } else { - $errors['err']=__('Problems marking the ticket unanswered. Try again'); + $errors['err']=sprintf('%s %s', __('Problems marking the ticket unanswered.'), __('Please try again!')); } break; case 'banemail': @@ -286,7 +287,7 @@ if($_POST && !$errors): } elseif(!BanList::includes($ticket->getEmail())) { $warn = __('Email is not in the banlist'); } else { - $errors['err']=__('Unable to remove the email from banlist. Try again.'); + $errors['err']=sprintf('%s %s', __('Unable to remove the email from banlist.'), __('Please try again!')); } break; case 'changeuser': @@ -298,7 +299,7 @@ if($_POST && !$errors): $msg = sprintf(__('Ticket ownership changed to %s'), Format::htmlchars($user->getName())); } else { - $errors['err'] = __('Unable to change ticket ownership. Try again'); + $errors['err'] = sprintf('%s %s', __('Unable to change ticket ownership.'), __('Please try again!')); } break; default: @@ -462,7 +463,8 @@ if($ticket) { $f->addMissingFields(); } } elseif($_REQUEST['a'] == 'print' && !$ticket->pdfExport($_REQUEST['psize'], $_REQUEST['notes'])) - $errors['err'] = __('Internal error: Unable to export the ticket to PDF for print.'); + $errors['err'] = __('Unable to export the ticket to PDF for print.') + .' '.__('Internal error occurred'); } else { $inc = 'tickets.inc.php'; if ($_REQUEST['a']=='open' && @@ -473,7 +475,8 @@ if($ticket) { if (!($query=$_SESSION[':Q:tickets'])) $errors['err'] = __('Query token not found'); elseif (!Export::saveTickets($query, "tickets-$ts.csv", 'csv')) - $errors['err'] = __('Internal error: Unable to dump query results'); + $errors['err'] = __('Unable to dump query results.') + .' '.__('Internal error occurred'); } //Clear active submenu on search with no status diff --git a/scp/users.php b/scp/users.php index a99f06709645adc2cfc1adf4178049703b78e64e..047d0f91cdc1229c465673be570a6bf109c8db02 100644 --- a/scp/users.php +++ b/scp/users.php @@ -62,7 +62,7 @@ if ($_POST) { elseif ($user->getAccount()->sendConfirmEmail()) $msg = sprintf(__('Account activation email sent to %s'),$user->getEmail()); else - $errors['err'] = __('Unable to send account activation email - try again!'); + $errors['err'] = sprintf('%s - %s', __('Unable to send account activation email'), __('Please try again!')); break; case 'pwreset': if (!$user || !$user->getAccount()) @@ -70,7 +70,7 @@ if ($_POST) { elseif ($user->getAccount()->sendResetEmail()) $msg = sprintf(__('Account password reset email sent to %s'),$user->getEmail()); else - $errors['err'] = __('Unable to send account password reset email - try again!'); + $errors['err'] = sprintf('%s - %s', __('Unable to send account password reset email'), __('Please try again!')); break; case 'mass_process': if (!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { @@ -126,7 +126,7 @@ if ($_POST) { case 'setorg': if (!($org = Organization::lookup($_POST['org_id']))) - $errors['err'] = __('Unknown action - get technical help.'); + $errors['err'] = sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); foreach ($users as $U) { if ($U->setOrganization($org)) $count++; @@ -134,7 +134,7 @@ if ($_POST) { break; default: - $errors['err']=__('Unknown action - get technical help.'); + $errors['err']=sprintf('%s - %s', __('Unknown action'), __('Get technical help!')); } if (!$errors['err'] && !$count) { $errors['err'] = __('Unable to manage any of the selected end users'); @@ -167,7 +167,8 @@ if ($_POST) { if (!($query=$_SESSION[':Q:users'])) $errors['err'] = __('Query token not found'); elseif (!Export::saveUsers($query, __("users")."-$ts.csv", 'csv')) - $errors['err'] = __('Internal error: Unable to dump query results'); + $errors['err'] = __('Unable to dump query results.') + .' '.__('Internal error occurred'); } $page = 'users.inc.php'; @@ -184,7 +185,8 @@ if ($user ) { $filename = sprintf('%s-tickets-%s.csv', $user->getName(), strftime('%Y%m%d')); if (!Export::saveTickets($query, $filename, 'csv')) - $errors['err'] = __('Internal error: Unable to dump query results'); + $errors['err'] = __('Unable to dump query results.') + .' '.__('Internal error occurred'); } break; } diff --git a/setup/inc/class.installer.php b/setup/inc/class.installer.php index b382aa0f6b71cf5326574a3bf4e27172fcecd54a..1a198325548faafda964b654f26423e7ad828844 100644 --- a/setup/inc/class.installer.php +++ b/setup/inc/class.installer.php @@ -146,7 +146,7 @@ class Installer extends SetupWizard { $schemaFile = INC_DIR."streams/$stream/install-mysql.sql"; if (!file_exists($schemaFile) || !($fp2 = fopen($schemaFile, 'rb'))) $this->errors['err'] = sprintf( - __('%s: Internal Error - please make sure your download is the latest (#1)'), + __('%s: Internal error occurred - please make sure your download is the latest (#1)'), $stream); elseif ( // TODO: Make the hash algo configurable in the streams diff --git a/setup/inc/install-prereq.inc.php b/setup/inc/install-prereq.inc.php index 97d7a13c48d6332f542e66486d39ee4d7a7f7cc6..f4346e3f22b8a7c74f005e4dff530950c1ec8e19 100644 --- a/setup/inc/install-prereq.inc.php +++ b/setup/inc/install-prereq.inc.php @@ -9,7 +9,7 @@ if(!defined('SETUPINC')) die('Kwaheri!'); <p><?php echo __('We are delighted you have chosen osTicket for your customer support ticketing system!');?></p> <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> + <h3><?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 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.');?> diff --git a/tickets.php b/tickets.php index 5d2a07ffbdf4db5a3550ee04baa6a35cf911b2d2..5795925f4bdffdb051dabd64b2f033da0cbb2d4c 100644 --- a/tickets.php +++ b/tickets.php @@ -112,7 +112,8 @@ elseif (is_object($ticket) && $ticket->getId()) { switch(strtolower($_REQUEST['a'])) { case 'print': if (!$ticket || !$ticket->pdfExport($_REQUEST['psize'])) - $errors['err'] = __('Internal error: Unable to print to PDF'); + $errors['err'] = __('Unable to print to PDF.') + .' '.__('Internal error occurred'); break; } }