- %{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} | '.__('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').' |
|
- %{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) |
+ %{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)').' |
|
diff --git a/include/ajax.kbase.php b/include/ajax.kbase.php
index a89161a7..944e5888 100644
--- a/include/ajax.kbase.php
+++ b/include/ajax.kbase.php
@@ -62,9 +62,9 @@ function faq($id, $format='html') {
$resp = sprintf(
'
%s%s
-
Last updated %s
+
'.__('Last updated %s').'
-
View |
Attachments (%s)',
+
'.__('View').' |
'.__('Attachments').' (%s)',
$faq->getQuestion(),
Format::safe_html($faq->getAnswer()),
Format::db_daydatetime($faq->getUpdateDate()),
@@ -72,7 +72,7 @@ function faq($id, $format='html') {
$faq->getId(),
$faq->getNumAttachments());
if($thisstaff && $thisstaff->canManageFAQ()) {
- $resp.=sprintf(' |
Edit',$faq->getId());
+ $resp.=sprintf(' |
'.__('Edit').'',$faq->getId());
}
$resp.='
';
diff --git a/include/ajax.reports.php b/include/ajax.reports.php
index 2634bc8d..3c28ca33 100644
--- a/include/ajax.reports.php
+++ b/include/ajax.reports.php
@@ -28,10 +28,10 @@
*/
class OverviewReportAjaxAPI extends AjaxController {
function enumTabularGroups() {
- return $this->encode(array("dept"=>"Department", "topic"=>"Topics",
+ return $this->encode(array("dept"=>__("Department"), "topic"=>__("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"=>__("Staff")));
}
function getData() {
@@ -55,7 +55,7 @@ function getData() {
"pk" => "dept_id",
"sort" => 'T1.dept_name',
"fields" => 'T1.dept_name',
- "headers" => array('Department'),
+ "headers" => array(__('Department')),
"filter" => ('T1.dept_id IN ('.implode(',', db_input($thisstaff->getDepts())).')')
),
"topic" => array(
@@ -65,7 +65,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(__('Help Topic')),
"filter" => '1'
),
"staff" => array(
@@ -73,7 +73,7 @@ function getData() {
"pk" => 'staff_id',
"sort" => 'name',
"fields" => "CONCAT_WS(' ', T1.firstname, T1.lastname) as name",
- "headers" => array('Staff Member'),
+ "headers" => array(__('Staff Member')),
"filter" =>
('T1.staff_id=S1.staff_id
AND
@@ -153,8 +153,8 @@ function getData() {
$r[] = null;
}
return array("columns" => array_merge($info['headers'],
- array('Opened','Assigned','Overdue','Closed','Reopened',
- 'Service Time','Response Time')),
+ array(__('Opened'),__('Assigned'),__('Overdue'),__('Closed'),__('Reopened'),
+ __('Service Time'),__('Response Time'))),
"data" => $rows);
}
@@ -168,7 +168,7 @@ function downloadTabularData() {
foreach ($data['data'] as $row)
$csv .= "\n" . '"' . implode('","', $row) . '"';
Http::download(
- sprintf('%s-report.csv', $this->get('group', 'Department')),
+ sprintf('%s-report.csv', $this->get('group', __('Department'))),
'text/csv', $csv);
}
diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php
index 34c46325..d7ad0e32 100644
--- a/include/ajax.tickets.php
+++ b/include/ajax.tickets.php
@@ -178,13 +178,13 @@ function search() {
$sql="$select $from $where";
if(($tickets=db_result(db_query($sql)))) {
- $result['success'] =sprintf("Search criteria matched %s -
@@ -283,29 +283,39 @@ function previewTicket ($tid) {
echo sprintf('
%s
',$warn);
echo '
';
-
- $ticket_state=sprintf('%s',ucfirst($ticket->getStatus()));
+ $ticketstatus='';
+ switch($ticket->getStatus()) {
+ case 'open':
+ $ticketstatus=__('open');
+ break;
+ case 'closed':
+ $ticketstatus=__('closed');
+ break;
+ default:
+ $ticketstatus=__('open');
+ }
+ $ticket_state=sprintf('%s',ucfirst($ticketstatus));
if($ticket->isOpen()) {
if($ticket->isOverdue())
- $ticket_state.=' — Overdue';
+ $ticket_state.=' — '.__('Overdue').'';
else
$ticket_state.=sprintf(' — %s',$ticket->getPriority());
}
echo sprintf('
- Ticket State: |
+ '.__('Ticket State').': |
%s |
- Create Date: |
+ '.__('Create Date').': |
%s |
',$ticket_state,
Format::db_datetime($ticket->getCreateDate()));
if($ticket->isClosed()) {
echo sprintf('
- Close Date: |
+ '.__('Close Date').': |
%s by %s |
',
Format::db_datetime($ticket->getCloseDate()),
@@ -314,7 +324,7 @@ function previewTicket ($tid) {
} elseif($ticket->getEstDueDate()) {
echo sprintf('
- Due Date: |
+ '.__('Due Date').': |
%s |
',
Format::db_datetime($ticket->getEstDueDate()));
@@ -327,21 +337,21 @@ function previewTicket ($tid) {
if($ticket->isOpen()) {
echo sprintf('
- Assigned To: |
+ '.__('Assigned To').': |
%s |
-
',$ticket->isAssigned()?implode('/', $ticket->getAssignees()):' — Unassigned —');
+ ',$ticket->isAssigned()?implode('/', $ticket->getAssignees()):' — '.__('Unassigned').' —');
}
echo sprintf(
'
- Department: |
+ '.__('Department').': |
%s |
- Help Topic: |
+ '.__('Help Topic').': |
%s |
- From: |
+ '.__('From').': |
%s %s |
',
Format::htmlchars($ticket->getDeptName()),
@@ -350,23 +360,23 @@ function previewTicket ($tid) {
$ticket->getEmail());
echo '
';
- $options[]=array('action'=>'Thread ('.$ticket->getThreadCount().')','url'=>"tickets.php?id=$tid");
+ $options[]=array('action'=>__('Thread').' ('.$ticket->getThreadCount().')','url'=>"tickets.php?id=$tid");
if($ticket->getNumNotes())
- $options[]=array('action'=>'Notes ('.$ticket->getNumNotes().')','url'=>"tickets.php?id=$tid#notes");
-
+ $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'=>__('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()?__('Reassign'):__('Assign')),'url'=>"tickets.php?id=$tid#assign");
if($thisstaff->canTransferTickets())
- $options[]=array('action'=>'Transfer','url'=>"tickets.php?id=$tid#transfer");
+ $options[]=array('action'=>__('Transfer'),'url'=>"tickets.php?id=$tid#transfer");
- $options[]=array('action'=>'Post Note','url'=>"tickets.php?id=$tid#note");
+ $options[]=array('action'=>__('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'=>__('Edit Ticket'),'url'=>"tickets.php?id=$tid&a=edit");
if($options) {
echo '