diff --git a/ajax.php b/ajax.php
index a629af63..694b6017 100644
--- a/ajax.php
+++ b/ajax.php
@@ -14,14 +14,17 @@
vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/
-function clientLoginPage($msg='Unauthorized') {
- Http::response(403,'Must login: '.Format::htmlchars($msg));
+function clientLoginPage($msg=null) {
+ if(!$msg)
+ $msg = lang('unauthorized');
+ Http::response(403,lang('must_login').': '.Format::htmlchars($msg));
exit;
}
require('client.inc.php');
+require_once(INCLUDE_DIR.'languages/language_control/languages_processor.php');
-if(!defined('INCLUDE_DIR')) Http::response(500, 'Server configuration error');
+if(!defined('INCLUDE_DIR')) Http::response(500, lang('server_conf_error'));
require_once INCLUDE_DIR.'/class.dispatcher.php';
require_once INCLUDE_DIR.'/class.ajax.php';
diff --git a/api/cron.php b/api/cron.php
index 0ca641b5..8293ca6e 100644
--- a/api/cron.php
+++ b/api/cron.php
@@ -13,14 +13,15 @@
vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/
-@chdir(realpath(dirname(__FILE__)).'/'); //Change dir.
+/*@chdir(realpath(dirname(__FILE__)).'/'); //Change dir.
+require('api.inc.php');
+require_once(INCLUDE_DIR.'languages/language_control/languages_processor.php');
+*/
require('api.inc.php');
-
if (!osTicket::is_cli())
- die('cron.php only supports local cron calls - use http -> api/tasks/cron');
+ die('cron.php only_support_local http -> api/tasks/cron');
@chdir(realpath(dirname(__FILE__)).'/'); //Change dir.
-require('api.inc.php');
require_once(INCLUDE_DIR.'api.cron.php');
LocalCronApiController::call();
?>
diff --git a/api/pipe.php b/api/pipe.php
index 7cf1ad1b..422ba909 100644
--- a/api/pipe.php
+++ b/api/pipe.php
@@ -17,10 +17,11 @@
ini_set('memory_limit', '256M'); //The concern here is having enough mem for emails with attachments.
@chdir(realpath(dirname(__FILE__)).'/'); //Change dir.
require('api.inc.php');
+require_once(INCLUDE_DIR.'languages/language_control/languages_processor.php');
//Only local piping supported via pipe.php
if (!osTicket::is_cli())
- die('pipe.php only supports local piping - use http -> api/tickets.email');
+ die('pipe.php '.lang('only_support_local_p').' http -> api/tickets.email');
require_once(INCLUDE_DIR.'api.tickets.php');
PipeApiController::process();
diff --git a/assets/default/css/theme.css b/assets/default/css/theme.css
index c8b90631..e6b2c487 100644
--- a/assets/default/css/theme.css
+++ b/assets/default/css/theme.css
@@ -213,7 +213,6 @@ h2 {
#msg_error {
margin: 0;
padding: 5px 10px 5px 36px;
- height: 16px;
line-height: 16px;
margin-bottom: 10px;
border: 1px solid #a00;
@@ -782,6 +781,7 @@ a.refresh {
}
.infoTable th {
text-align: left;
+ font-weight: bold;
}
#ticketThread table {
margin-top: 10px;
@@ -806,7 +806,7 @@ a.refresh {
background: #d8efff;
}
#ticketThread .response th {
- background: #ddd;
+ background: #FFE0B3;
}
#ticketThread .info {
padding: 2px;
@@ -824,3 +824,14 @@ a.refresh {
background-position: 0 50%;
background-repeat: no-repeat;
}
+
+#sysmsg{ position: absolute; width: 753px; top: 27px; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; margin-bottom: 10px; border: 1px solid #0a0; background: url('../images/icons/ok.png') 10px 50% no-repeat #e0ffe0; }
+#sysmsg.error{
+ margin: 0;
+ padding: 5px 10px 5px 36px;
+ line-height: 16px;
+ margin-bottom: 10px;
+ border: 1px solid #a00;
+ background: url('../images/icons/error.png') 10px 50% no-repeat #fff0f0;
+ top: 40px;
+}
\ No newline at end of file
diff --git a/attachment.php b/attachment.php
index d780ae2d..d47a09ed 100644
--- a/attachment.php
+++ b/attachment.php
@@ -16,20 +16,21 @@
**********************************************************************/
require('secure.inc.php');
require_once(INCLUDE_DIR.'class.attachment.php');
+require_once(INCLUDE_DIR.'languages/language_control/languages_processor.php');
//Basic checks
if(!$thisclient
|| !$_GET['id']
|| !$_GET['h']
|| !($attachment=Attachment::lookup($_GET['id']))
|| !($file=$attachment->getFile()))
- die('Unknown attachment!');
+ die(lang('unknown_attach'));
//Validate session access hash - we want to make sure the link is FRESH! and the user has access to the parent ticket!!
$vhash=md5($attachment->getFileId().session_id().$file->getHash());
if(strcasecmp(trim($_GET['h']),$vhash)
|| !($ticket=$attachment->getTicket())
|| !$ticket->checkClientAccess($thisclient))
- die('Unknown or invalid attachment');
+ die('unknown_attach');
//Download the file..
$file->download();
diff --git a/autocomplete.php b/autocomplete.php
new file mode 100644
index 00000000..037c94a4
--- /dev/null
+++ b/autocomplete.php
@@ -0,0 +1,49 @@
+ true);
+
+ $sql='SELECT email, name, phone, phone_ext FROM `ost_ticket` WHERE '
+ . ' name LIKE(' . db_input('%'.$_POST['name'].'%') . ') GROUP BY name';
+
+ if(!($res=db_query($sql)) || !db_num_rows($res))
+ {
+ json_output(array('result' => false));
+ return;
+ }
+ while ($row = mysqli_fetch_assoc($res)){
+ $data['data'][] = $row;
+ }
+
+ json_output($data);
+}
\ No newline at end of file
diff --git a/client.inc.php b/client.inc.php
index f8f6ddff..c38309ed 100644
--- a/client.inc.php
+++ b/client.inc.php
@@ -19,6 +19,7 @@
if(!file_exists($thisdir.'main.inc.php')) die('Fatal Error.');
require_once($thisdir.'main.inc.php');
+require_once(INCLUDE_DIR.'languages/language_control/languages_processor.php');
if(!defined('INCLUDE_DIR')) die('Fatal error');
@@ -60,7 +61,7 @@
if ($_POST && !$ost->checkCSRFToken()) {
@header('Location: index.php');
//just incase redirect fails
- die('Action denied (400)!');
+ die(lang('action_denied').' (400)!');
}
/* Client specific defaults */
diff --git a/css/ui-lightness/jquery-ui-1.8.18.custom.css b/css/ui-lightness/jquery-ui-1.8.18.custom.css
index d9e8e3a5..b43e020c 100755
--- a/css/ui-lightness/jquery-ui-1.8.18.custom.css
+++ b/css/ui-lightness/jquery-ui-1.8.18.custom.css
@@ -340,6 +340,13 @@
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-autocomplete {
+ position: absolute;
+ top: 0;
+ left: 0;
+ cursor: default;
+}
+
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
diff --git a/include/JSON.php b/include/JSON.php
index e75eba65..61c32945 100644
--- a/include/JSON.php
+++ b/include/JSON.php
@@ -111,6 +111,8 @@
* $value = $json->decode($input);
*
*/
+require_once(INCLUDE_DIR.'languages/language_control/languages_processor.php');
+
class Services_JSON
{
/**
@@ -417,7 +419,7 @@ function encode($var)
default:
return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)
? 'null'
- : new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
+ : new Services_JSON_Error(gettype($var).' '.lang('cant_encode_json'));
}
}
diff --git a/include/ajax.content.php b/include/ajax.content.php
index 197d75ff..059dfb2d 100644
--- a/include/ajax.content.php
+++ b/include/ajax.content.php
@@ -15,20 +15,21 @@
**********************************************************************/
if(!defined('INCLUDE_DIR')) die('!');
-
+
class ContentAjaxAPI extends AjaxController {
-
+
function log($id) {
if($id && ($log=Log::lookup($id))) {
$content=sprintf('
%s%s
-
Log Date: %s IP Address: %s ',
+
'.lang('log_date').': %s '.lang('ip_address').': %s',
$log->getTitle(),
Format::display(str_replace(',',', ',$log->getText())),
Format::db_daydatetime($log->getCreateDate()),
$log->getIP());
}else {
- $content=' Error:Unknown or invalid log ID
';
+ $content=' Error:'.lang('unknown_log_id').'
';
+
}
return $content;
@@ -39,46 +40,45 @@ function ticket_variables() {
$content='
Ticket Variables
- Please note that non-base variables depend on the context of use. Visit osTicket Wiki for up-to-date documentation.
-
+ '
+ .lang('non_base_var').
+ '
- Base Variables | Other Variables |
+ '.lang('base_variables').' | '.lang('other_variables').' |
- %{ticket.id} | Ticket ID (internal ID) |
- %{ticket.number} | Ticket number (external ID) |
- %{ticket.email} | Email address |
- %{ticket.name} | Full name |
- %{ticket.subject} | Subject |
- %{ticket.phone} | Phone number | ext |
- %{ticket.status} | Status |
- %{ticket.priority} | Priority |
- %{ticket.assigned} | Assigned staff and/or team |
- %{ticket.create_date} | Date created |
- %{ticket.due_date} | Due date |
- %{ticket.close_date} | Date closed |
- %{ticket.auth_token} | Auth. token used for auto-login |
- %{ticket.client_link} | Client\'s ticket view link |
- %{ticket.staff_link} | Staff\'s ticket view link |
- Expandable Variables (See Wiki) |
- %{ticket.topic} | Help topic |
- %{ticket.dept} | Department |
- %{ticket.staff} | Assigned/closing staff |
- %{ticket.team} | Assigned/closing team |
+ %{ticket.id} | '.lang('ticket_id_int_id').' |
+ %{ticket.number} | '.lang('ticket_number').' |
+ %{ticket.email} | '.lang('email_address').' |
+ %{ticket.name} | '.lang('full_name').' |
+ %{ticket.subject} | '.lang('subject').' |
+ %{ticket.phone} | '.lang('phone_number').' | '.lang('ext').' |
+ %{ticket.status} | '.lang('status').' |
+ %{ticket.priority} | '.lang('priority').' |
+ %{ticket.assigned} | '.lang('assigned_st_te').' |
+ %{ticket.create_date} | '.lang('date_created').' |
+ %{ticket.due_date} | '.lang('due_date').' |
+ %{ticket.close_date} | '.lang('date_closed').' |
+ %{ticket.auth_token} | '.lang('auth_used').' |
+ %{ticket.client_link} | '.lang('client_view_link').' |
+ %{ticket.staff_link} | '.lang('staff_view_link').' |
+ '.lang('expan_var').' |
+ %{ticket.topic} | '.lang('help_topic').' |
+ %{ticket.dept} | '.lang('department').' |
+ %{ticket.staff} | '.lang('assigned_c_staff').' |
+ %{ticket.team} | '.lang('assigned_closing').' |
|
- %{message} | Incoming message |
- %{response} | Outgoing response |
- %{comments} | Assign/transfer comments |
- %{note} | Internal note (expandable) |
- %{assignee} | Assigned staff/team |
- %{assigner} | Staff assigning the ticket |
- %{url} | osTicket\'s base url (FQDN) |
- %{reset_link} |
- Reset link used by the password reset feature |
+ %{message} | '.lang('incoming_message').' |
+ %{response} | '.lang('outgoing_response').' |
+ %{comments} | '.lang('assign_comments').' |
+ %{note} | '.lang('no_note').' ('.lang('expandable').') |
+ %{assignee} | '.lang('assigned_st_te').' |
+ %{assigner} | '.lang('staff_assigning').' |
+ %{url} | '.lang('fqdn').' |
|
diff --git a/include/ajax.kbase.php b/include/ajax.kbase.php
index e467f513..3614bc4e 100644
--- a/include/ajax.kbase.php
+++ b/include/ajax.kbase.php
@@ -14,17 +14,17 @@
vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/
if(!defined('INCLUDE_DIR')) die('!');
-
-
+require_once(INCLUDE_DIR.'languages/language_control/languages_processor.php');
+
class KbaseAjaxAPI extends AjaxController {
-
+
function cannedResp($id, $format='') {
global $thisstaff, $_GET;
include_once(INCLUDE_DIR.'class.canned.php');
if(!$id || !($canned=Canned::lookup($id)) || !$canned->isEnabled())
- Http::response(404, 'No such premade reply');
+ Http::response(404, lang('no_premade_reply'));
//Load ticket.
if($_GET['tid']) {
@@ -52,33 +52,32 @@ function cannedResp($id, $format='') {
}
function faq($id, $format='html') {
- //XXX: user ajax->getThisStaff() (nolint)
- global $thisstaff;
+ global $thisstaff; //XXX: user ajax->getThisStaff()
include_once(INCLUDE_DIR.'class.faq.php');
if(!($faq=FAQ::lookup($id)))
return null;
- //TODO: $fag->getJSON() for json format. (nolint)
+ //TODO: $fag->getJSON() for json format.
$resp = sprintf(
'
%s%s
-
Last updated %s
+
'.lang('last_update').' %s
-
View |
Attachments (%s)',
- $faq->getQuestion(),
+
'.lang('view').' |
'.lang('attachments').' (%s)',
+ $faq->getQuestion(),
Format::safe_html($faq->getAnswer()),
Format::db_daydatetime($faq->getUpdateDate()),
$faq->getId(),
$faq->getId(),
$faq->getNumAttachments());
if($thisstaff && $thisstaff->canManageFAQ()) {
- $resp.=sprintf(' |
Edit',$faq->getId());
+ $resp.=sprintf(' |
'.lang('edit').'',$faq->getId());
}
$resp.='
';
- return $resp;
+ return $resp;
}
}
?>
diff --git a/include/ajax.reports.php b/include/ajax.reports.php
index 603fb416..02898b4f 100644
--- a/include/ajax.reports.php
+++ b/include/ajax.reports.php
@@ -19,19 +19,20 @@
if(!defined('INCLUDE_DIR')) die('403');
include_once(INCLUDE_DIR.'class.ticket.php');
+require_once(INCLUDE_DIR.'languages/language_control/languages_processor.php');
/**
* Overview Report
- *
+ *
* The overview report allows for the display of basic ticket statistics in
* both graphical and tabular formats.
*/
class OverviewReportAjaxAPI extends AjaxController {
function enumTabularGroups() {
- return $this->encode(array("dept"=>"Department", "topic"=>"Topics",
+ return $this->encode(array("dept"=>lang("department"), "topic"=>lang("topics"),
# XXX: This will be relative to permissions based on the
# logged-in-staff. For basic staff, this will be 'My Stats'
- "staff"=>"Staff"));
+ "staff"=>lang("staff")));
}
function getData() {
@@ -55,7 +56,7 @@ function getData() {
"pk" => "dept_id",
"sort" => 'T1.dept_name',
"fields" => 'T1.dept_name',
- "headers" => array('Department'),
+ "headers" => array(lang('department')),
"filter" => ('T1.dept_id IN ('.implode(',', db_input($thisstaff->getDepts())).')')
),
"topic" => array(
@@ -65,7 +66,7 @@ function getData() {
"fields" => "CONCAT_WS(' / ',"
."(SELECT P.topic FROM ".TOPIC_TABLE." P WHERE P.topic_id = T1.topic_pid),"
."T1.topic) as name ",
- "headers" => array('Help Topic'),
+ "headers" => array(lang('help_topic')),
"filter" => '1'
),
"staff" => array(
@@ -73,17 +74,17 @@ function getData() {
"pk" => 'staff_id',
"sort" => 'name',
"fields" => "CONCAT_WS(' ', T1.firstname, T1.lastname) as name",
- "headers" => array('Staff Member'),
+ "headers" => array(lang('staff_members')),
"filter" =>
('T1.staff_id=S1.staff_id
- AND
+ AND
(T1.staff_id='.db_input($thisstaff->getId())
.(($depts=$thisstaff->getManagedDepartments())?
(' OR T1.dept_id IN('.implode(',', db_input($depts)).')'):'')
.(($thisstaff->canViewStaffStats())?
(' OR T1.dept_id IN('.implode(',', db_input($thisstaff->getDepts())).')'):'')
.')'
- )
+ )
)
);
$group = $this->get('group', 'dept');
@@ -98,10 +99,10 @@ function getData() {
COUNT(*)-COUNT(NULLIF(A1.state, "overdue")) AS Overdue,
COUNT(*)-COUNT(NULLIF(A1.state, "closed")) AS Closed,
COUNT(*)-COUNT(NULLIF(A1.state, "reopened")) AS Reopened
- FROM '.$info['table'].' T1
- LEFT JOIN '.TICKET_EVENT_TABLE.' A1
+ FROM '.$info['table'].' T1
+ LEFT JOIN '.TICKET_EVENT_TABLE.' A1
ON (A1.'.$info['pk'].'=T1.'.$info['pk'].'
- AND NOT annulled
+ AND NOT annulled
AND (A1.timestamp BETWEEN '.$start.' AND '.$stop.'))
LEFT JOIN '.STAFF_TABLE.' S1 ON (S1.staff_id=A1.staff_id)
WHERE '.$info['filter'].'
@@ -110,7 +111,7 @@ function getData() {
array(1, 'SELECT '.$info['fields'].',
FORMAT(AVG(DATEDIFF(T2.closed, T2.created)),1) AS ServiceTime
- FROM '.$info['table'].' T1
+ FROM '.$info['table'].' T1
LEFT JOIN '.TICKET_TABLE.' T2 ON (T2.'.$info['pk'].'=T1.'.$info['pk'].')
LEFT JOIN '.STAFF_TABLE.' S1 ON (S1.staff_id=T2.staff_id)
WHERE '.$info['filter'].' AND T2.closed BETWEEN '.$start.' AND '.$stop.'
@@ -119,7 +120,7 @@ function getData() {
array(1, 'SELECT '.$info['fields'].',
FORMAT(AVG(DATEDIFF(B2.created, B1.created)),1) AS ResponseTime
- FROM '.$info['table'].' T1
+ FROM '.$info['table'].' T1
LEFT JOIN '.TICKET_TABLE.' T2 ON (T2.'.$info['pk'].'=T1.'.$info['pk'].')
LEFT JOIN '.TICKET_THREAD_TABLE.' B2 ON (B2.ticket_id = T2.ticket_id
AND B2.thread_type="R")
@@ -153,8 +154,8 @@ function getData() {
$r[] = null;
}
return array("columns" => array_merge($info['headers'],
- array('Opened','Assigned','Overdue','Closed','Reopened',
- 'Service Time','Response Time')),
+ array(lang('opened'),lang('assigned'),lang('overdue'),lang('closed'),lang('reopened'),
+ lang('service_time'),lang('response_time'))),
"data" => $rows);
}
@@ -174,7 +175,7 @@ function downloadTabularData() {
function getPlotData() {
-
+
if(($start = $this->get('start', 'last month'))) {
$stop = $this->get('stop', 'now');
if (substr($stop, 0, 1) == '+')
@@ -193,7 +194,7 @@ function getPlotData() {
.') AND FROM_UNIXTIME('.db_input($stop)
.') ORDER BY 1');
$events = array();
- while ($row = db_fetch_row($res)) $events[] = $row[0];
+ while ($row = db_fetch_row($res)) $events[] = lang($row[0]);
# TODO: Handle user => db timezone offset
# XXX: Implement annulled column from the %ticket_event table
@@ -211,7 +212,6 @@ function getPlotData() {
$time = null; $times = array();
# Iterate over result set, adding zeros for missing ticket events
- $slots = array();
while ($row = db_fetch_row($res)) {
$row_time = strtotime($row[1]);
if ($time != $row_time) {
@@ -227,11 +227,12 @@ function getPlotData() {
$times[] = $time = $row_time;
}
# Keep track of states for this timeframe
- $slots[] = $row[0];
- $plots[$row[0]][] = (int)$row[2];
+ $slots[] = lang($row[0]);
+ $plots[lang($row[0])][] = (int)$row[2];
}
foreach (array_diff($events, $slots) as $slot)
$plots[$slot][] = 0;
+
return $this->encode(array("times" => $times, "plots" => $plots,
"events"=>$events));
}
diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php
index 34c46325..d00e7e46 100644
--- a/include/ajax.tickets.php
+++ b/include/ajax.tickets.php
@@ -17,6 +17,7 @@
if(!defined('INCLUDE_DIR')) die('403');
include_once(INCLUDE_DIR.'class.ticket.php');
+require_once(INCLUDE_DIR.'languages/language_control/languages_processor.php');
class TicketsAjaxAPI extends AjaxController {
@@ -178,11 +179,11 @@ function search() {
$sql="$select $from $where";
if(($tickets=db_result(db_query($sql)))) {
- $result['success'] =sprintf("Search criteria matched %s - view",
- ($tickets>1?"$tickets tickets":"$tickets ticket"),
+ $result['success'] =sprintf(lang("search_match")." %s - ".lang("view")."",
+ ($tickets>1?"$tickets ".lang("tickets"):"$tickets ".lang("ticket")),
str_replace(array('&', '&'), array('&', '&'), $_SERVER['QUERY_STRING']));
} else {
- $result['fail']='No tickets found matching your search criteria.';
+ $result['fail']=lang('no_tickets_found');
}
return $this->json_encode($result);
@@ -195,14 +196,14 @@ function acquireLock($tid) {
return 0;
if(!($ticket = Ticket::lookup($tid)) || !$ticket->checkStaffAccess($thisstaff))
- return $this->json_encode(array('id'=>0, 'retry'=>false, 'msg'=>'Lock denied!'));
+ return $this->json_encode(array('id'=>0, 'retry'=>false, 'msg'=>lang('lock_denied')));
//is the ticket already locked?
if($ticket->isLocked() && ($lock=$ticket->getLock()) && !$lock->isExpired()) {
/*Note: Ticket->acquireLock does the same logic...but we need it here since we need to know who owns the lock up front*/
//Ticket is locked by someone else.??
if($lock->getStaffId()!=$thisstaff->getId())
- return $this->json_encode(array('id'=>0, 'retry'=>false, 'msg'=>'Unable to acquire lock.'));
+ return $this->json_encode(array('id'=>0, 'retry'=>false, 'msg'=>lang('cant_acquire_lock')));
//Ticket already locked by staff...try renewing it.
$lock->renew(); //New clock baby!
@@ -266,9 +267,9 @@ function previewTicket ($tid) {
$error=$msg=$warn=null;
if($lock && $lock->getStaffId()==$thisstaff->getId())
- $warn.=' Ticket is locked by '.$lock->getStaffName().'';
+ $warn.=' '.lang('ticket_locket_by').' '.$lock->getStaffName().'';
elseif($ticket->isOverdue())
- $warn.=' Marked overdue!';
+ $warn.=' '.lang('market_overdue').'!';
ob_start();
echo sprintf(
@@ -287,26 +288,26 @@ function previewTicket ($tid) {
$ticket_state=sprintf('%s',ucfirst($ticket->getStatus()));
if($ticket->isOpen()) {
if($ticket->isOverdue())
- $ticket_state.=' — Overdue';
+ $ticket_state.=' — '.lang('overdue').'';
else
$ticket_state.=sprintf(' — %s',$ticket->getPriority());
}
echo sprintf('
- Ticket State: |
+ '.lang('ticket_state').': |
%s |
- Create Date: |
+ '.lang('create_date').': |
%s |
',$ticket_state,
Format::db_datetime($ticket->getCreateDate()));
if($ticket->isClosed()) {
echo sprintf('
- Close Date: |
- %s by %s |
+ '.lang('close_date').': |
+ %s '.lang('by').' %s |
',
Format::db_datetime($ticket->getCloseDate()),
($staff?$staff->getName():'staff')
@@ -314,7 +315,7 @@ function previewTicket ($tid) {
} elseif($ticket->getEstDueDate()) {
echo sprintf('
- Due Date: |
+ '.lang('due_date').': |
%s |
',
Format::db_datetime($ticket->getEstDueDate()));
@@ -327,21 +328,21 @@ function previewTicket ($tid) {
if($ticket->isOpen()) {
echo sprintf('
- Assigned To: |
+ '.lang('assigned_to').': |
%s |
-
',$ticket->isAssigned()?implode('/', $ticket->getAssignees()):' — Unassigned —');
+ ',$ticket->isAssigned()?implode('/', $ticket->getAssignees()):' — '.lang('unassigned').' —');
}
echo sprintf(
'
- Department: |
+ '.lang('department').': |
%s |
- Help Topic: |
+ '.lang('help_topic').': |
%s |
- From: |
+ '.lang('from').': |
%s %s |
',
Format::htmlchars($ticket->getDeptName()),
@@ -350,23 +351,23 @@ function previewTicket ($tid) {
$ticket->getEmail());
echo '
';
- $options[]=array('action'=>'Thread ('.$ticket->getThreadCount().')','url'=>"tickets.php?id=$tid");
+ $options[]=array('action'=>lang('thread').' ('.$ticket->getThreadCount().')','url'=>"tickets.php?id=$tid");
if($ticket->getNumNotes())
$options[]=array('action'=>'Notes ('.$ticket->getNumNotes().')','url'=>"tickets.php?id=$tid#notes");
if($ticket->isOpen())
- $options[]=array('action'=>'Reply','url'=>"tickets.php?id=$tid#reply");
+ $options[]=array('action'=>lang('reply'),'url'=>"tickets.php?id=$tid#reply");
if($thisstaff->canAssignTickets())
- $options[]=array('action'=>($ticket->isAssigned()?'Reassign':'Assign'),'url'=>"tickets.php?id=$tid#assign");
+ $options[]=array('action'=>($ticket->isAssigned()?lang('reasisgn'):lang('assign')),'url'=>"tickets.php?id=$tid#assign");
if($thisstaff->canTransferTickets())
- $options[]=array('action'=>'Transfer','url'=>"tickets.php?id=$tid#transfer");
+ $options[]=array('action'=>lang('transfer'),'url'=>"tickets.php?id=$tid#transfer");
- $options[]=array('action'=>'Post Note','url'=>"tickets.php?id=$tid#note");
+ $options[]=array('action'=>lang('post_note'),'url'=>"tickets.php?id=$tid#note");
if($thisstaff->canEditTickets())
- $options[]=array('action'=>'Edit Ticket','url'=>"tickets.php?id=$tid&a=edit");
+ $options[]=array('action'=>lang('edit_ticket'),'url'=>"tickets.php?id=$tid&a=edit");
if($options) {
echo '