diff --git a/include/class.staff.php b/include/class.staff.php index 6a2f2646bdf1e6ff0512f1a53018ad728c1de596..1241e58fcd144ca6fbfc3dd125e27c6c2dcee437 100644 --- a/include/class.staff.php +++ b/include/class.staff.php @@ -1090,7 +1090,7 @@ implements AuthenticatedUser, EmailContact, TemplateVariable { if (!$dept_id || !Dept::lookup($dept_id)) $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.ticket.php b/include/class.ticket.php index 8f5dd5551bc713fa6d10bb8340806caf1f58317a..a97aae045e88f2696d2bc9d78c1fe7bda41e9e64 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -3518,7 +3518,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/staff/department.inc.php b/include/staff/department.inc.php index 66e172a8f59c018842b43d8689d9a0740b528c68..a3822f68b9e729400bdf1104ecf6960321b6172d 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> diff --git a/include/staff/email.inc.php b/include/staff/email.inc.php index e46bcd6433b58f1ecd009de19ca509abf5cd6591..953da7f55ccbdc324d09f5f2f08fd56b4dd2b462 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 500e1132ed6b9a637f3db8392a39108947b31e28..d75958fdadd7dd97b4eed2fdd0c5d613fa5f8155 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/team.inc.php b/include/staff/team.inc.php index 3552d2cc7f925ba106ae85c3e73a7315bd6464f0..600ea6a5826062b2c31de4550d505747ca069c76 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-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 c634971b3fd1dc97a10008b8b95344b4ce69393c..ea85e04f357c6f31e7f9aebd5d7912fa75ad913f 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'); @@ -866,7 +867,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 7f0839f8b8e05538f66d04e0eaaf4d135280d165..10fc3e70bb5ae13933389891cceab34a52173f39 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>