From ffbabba04ca06966b10b1fdfead6eda0c0c7be8d Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Thu, 28 Aug 2014 16:34:32 -0500 Subject: [PATCH] i18n: Fix several untranslated texts and missing help tips --- include/ajax.content.php | 2 +- include/class.forms.php | 2 +- .../tips/knowledgebase.canned_response.yaml | 26 +++---------------- .../help/tips/knowledgebase.category.yaml | 19 -------------- .../i18n/en_US/help/tips/settings.ticket.yaml | 10 +++++++ include/staff/cannedresponse.inc.php | 1 - include/staff/cannedresponses.inc.php | 3 +-- include/staff/categories.inc.php | 3 +-- include/staff/directory.inc.php | 2 +- include/staff/faq-categories.inc.php | 3 +-- include/staff/helptopic.inc.php | 2 +- include/staff/orgs.inc.php | 2 +- include/staff/settings-tickets.inc.php | 2 +- include/staff/ticket-open.inc.php | 2 +- scp/js/tips.js | 2 ++ scp/lists.php | 10 +++++-- 16 files changed, 33 insertions(+), 58 deletions(-) diff --git a/include/ajax.content.php b/include/ajax.content.php index f283e2640..5333fc9a6 100644 --- a/include/ajax.content.php +++ b/include/ajax.content.php @@ -60,7 +60,7 @@ class ContentAjaxAPI extends AjaxController { <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.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> diff --git a/include/class.forms.php b/include/class.forms.php index f51a06fdc..08adccab7 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -1273,7 +1273,7 @@ class PhoneNumberWidget extends Widget { echo Format::htmlchars($phone); ?>"/><?php // Allow display of extension field even if disabled if the phone // number being edited has an extension - if ($ext || $config['ext']) { ?> Ext: + if ($ext || $config['ext']) { ?> <?php echo __('Ext'); ?>: <input type="text" name="<?php echo $this->name; ?>-ext" value="<?php echo Format::htmlchars($ext); ?>" size="5"/> diff --git a/include/i18n/en_US/help/tips/knowledgebase.canned_response.yaml b/include/i18n/en_US/help/tips/knowledgebase.canned_response.yaml index 67a39c729..0779b10fe 100644 --- a/include/i18n/en_US/help/tips/knowledgebase.canned_response.yaml +++ b/include/i18n/en_US/help/tips/knowledgebase.canned_response.yaml @@ -16,34 +16,14 @@ canned_response: title: Canned Response content: > - Create a <span class="doc-desc-title">Canned Response</span> that can - be included in a ticket response. In fact, you may include as many - <span class="doc-desc-title">Canned Responses</span> as you would like - in a ticket response. It can also be included in the <span - class="doc-desc-title">Ticket Auto-Response</span> setup by a <span + Create a <span class="doc-desc-title">Canned Response</span> that can + be included in a ticket response. It can also be used as a <span + class="doc-desc-title">Ticket Auto-Response</span> setup by a <span class="doc-desc-title">Ticket Filter</span>. links: - title: Setup a Ticket Filter href: /scp/filters.php -canned_response_settings: - title: Canned Response Settings - content: > - -status: - title: Status - content: > - Disable your new <span class="doc-desc-title">Canned Response</span> - if you do not want it to be available to Agents immediately upon creation. - -department: - title: Department - content: > - -title: - title: Title - content: > - canned_attachments: title: Canned Attachments content: > diff --git a/include/i18n/en_US/help/tips/knowledgebase.category.yaml b/include/i18n/en_US/help/tips/knowledgebase.category.yaml index 1f22329bb..a1bbcbcee 100644 --- a/include/i18n/en_US/help/tips/knowledgebase.category.yaml +++ b/include/i18n/en_US/help/tips/knowledgebase.category.yaml @@ -13,22 +13,3 @@ # must match the HTML #ids put into the page template. # --- -category_information: - title: Category Information - content: > - Once you have created categories, you can select the category that the FAQ - pertains to then select “Add New FAQâ€. Type in the Question that will be - visible, if the FAQ will be Public or Internal and type the Answer in the - text box. You can also attach a file to the FAQ. - -category_type: - title: Category Type - content: > - -category_name: - title: Category Name - content: > - -category_description: - title: Category Description - content: > diff --git a/include/i18n/en_US/help/tips/settings.ticket.yaml b/include/i18n/en_US/help/tips/settings.ticket.yaml index 1e8afefc8..5baf7e720 100644 --- a/include/i18n/en_US/help/tips/settings.ticket.yaml +++ b/include/i18n/en_US/help/tips/settings.ticket.yaml @@ -32,6 +32,16 @@ sequence_id: in the <span class="doc-desc-title">Ticket Number Format</span> configuration for help topics. +default_ticket_status: + title: Default Status for new Tickets + content: > + Choose a status as the default for new tickets. This can be defined + for each help topic, if desired. It can also be overridden by a + ticket filter. + links: + - title: Manage Ticket Statuses + href: /scp/lists.php?type=ticket-status + default_sla: title: Default SLA content: > diff --git a/include/staff/cannedresponse.inc.php b/include/staff/cannedresponse.inc.php index f2842292d..e3cb5f84d 100644 --- a/include/staff/cannedresponse.inc.php +++ b/include/staff/cannedresponse.inc.php @@ -48,7 +48,6 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <label><input type="radio" name="isenabled" value="0" <?php echo !$info['isenabled']?'checked="checked"':''; ?>> <?php echo __('Disabled'); ?> </label> <span class="error">* <?php echo $errors['isenabled']; ?></span> - <i class="help-tip icon-question-sign" href="#status"></i> </td> </tr> <tr> diff --git a/include/staff/cannedresponses.inc.php b/include/staff/cannedresponses.inc.php index 1da21b8b0..706450105 100644 --- a/include/staff/cannedresponses.inc.php +++ b/include/staff/cannedresponses.inc.php @@ -49,8 +49,7 @@ else ?> <div class="pull-left" style="width:700px;padding-top:5px;"> - <h2><?php echo __('Canned Responses');?> - <i class="help-tip icon-question-sign" href="#canned_responses"></i></h2> + <h2><?php echo __('Canned Responses');?></h2> </div> <div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;"> <b><a href="canned.php?a=add" class="Icon newReply"><?php echo __('Add New Response');?></a></b></div> diff --git a/include/staff/categories.inc.php b/include/staff/categories.inc.php index efdd593ba..a948f4976 100644 --- a/include/staff/categories.inc.php +++ b/include/staff/categories.inc.php @@ -41,8 +41,7 @@ else ?> <div class="pull-left" style="width:700px;padding-top:5px;"> - <h2><?php echo __('FAQ Categories');?> - <i class="help-tip icon-question-sign" href="#faq_categories"></i></h2> + <h2><?php echo __('FAQ Categories');?></h2> </div> <div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;"> <b><a href="categories.php?a=add" class="Icon newCategory"><?php echo __('Add New Category');?></a></b></div> diff --git a/include/staff/directory.inc.php b/include/staff/directory.inc.php index 7f27db017..6d127962a 100644 --- a/include/staff/directory.inc.php +++ b/include/staff/directory.inc.php @@ -101,7 +101,7 @@ else <th width="150"><a <?php echo $dept_sort; ?>href="directory.php?<?php echo $qstr; ?>&sort=dept"><?php echo __('Department');?></a></th> <th width="180"><a <?php echo $email_sort; ?>href="directory.php?<?php echo $qstr; ?>&sort=email"><?php echo __('Email Address');?></a></th> <th width="120"><a <?php echo $phone_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=phone"><?php echo __('Phone Number');?></a></th> - <th width="80"><a <?php echo $ext_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=ext"><?php echo __('Phone Ext');?></a></th> + <th width="80"><a <?php echo $ext_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=ext"><?php echo __(/* As in a phone number `extension` */ 'Extension');?></a></th> <th width="120"><a <?php echo $mobile_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=mobile"><?php echo __('Mobile Number');?></a></th> </tr> </thead> diff --git a/include/staff/faq-categories.inc.php b/include/staff/faq-categories.inc.php index 7ccfc7720..9d9efa32b 100644 --- a/include/staff/faq-categories.inc.php +++ b/include/staff/faq-categories.inc.php @@ -2,8 +2,7 @@ if(!defined('OSTSTAFFINC') || !$thisstaff) die('Access Denied'); ?> -<h2><?php echo __('Frequently Asked Questions');?> - <i class="help-tip icon-question-sign" href="#page_header"></i></h2> +<h2><?php echo __('Frequently Asked Questions');?></h2> <form id="kbSearch" action="kb.php" method="get"> <input type="hidden" name="a" value="search"> <div> diff --git a/include/staff/helptopic.inc.php b/include/staff/helptopic.inc.php index e544218b5..3674b6a10 100644 --- a/include/staff/helptopic.inc.php +++ b/include/staff/helptopic.inc.php @@ -32,7 +32,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <tr> <th colspan="2"> <h4><?php echo $title; ?></h4> - <em><?php echo __('Help Topic Information');?></em> + <em><?php echo __('Help Topic Information');?> <i class="help-tip icon-question-sign" href="#help_topic_information"></i></em> </th> </tr> diff --git a/include/staff/orgs.inc.php b/include/staff/orgs.inc.php index 7f81447f6..862da34be 100644 --- a/include/staff/orgs.inc.php +++ b/include/staff/orgs.inc.php @@ -79,7 +79,7 @@ $_SESSION['orgs_qs_'.$qhash] = $query; <tr> <td><input type="text" id="basic-org-search" name="query" size=30 value="<?php echo Format::htmlchars($_REQUEST['query']); ?>" autocomplete="off" autocorrect="off" autocapitalize="off"></td> - <td><input type="submit" name="basic_search" class="button" value="Search"></td> + <td><input type="submit" name="basic_search" class="button" value="<?php echo __('Search'); ?>"></td> <!-- <td> <a href="" id="advanced-user-search">[advanced]</a></td> --> </tr> </table> diff --git a/include/staff/settings-tickets.inc.php b/include/staff/settings-tickets.inc.php index b8526ed0c..9f4b30673 100644 --- a/include/staff/settings-tickets.inc.php +++ b/include/staff/settings-tickets.inc.php @@ -49,7 +49,7 @@ if(!($maxfileuploads=ini_get('max_file_uploads'))) <button class="action-button" onclick="javascript: $.dialog('ajax.php/sequence/manage', 205); return false; - "><i class="icon-gear"></i> Manage</button> + "><i class="icon-gear"></i> <?php echo __('Manage'); ?></button> <i class="help-tip icon-question-sign" href="#sequence_id"></i> </td> </tr> diff --git a/include/staff/ticket-open.inc.php b/include/staff/ticket-open.inc.php index 63da455a8..6a9b533ad 100644 --- a/include/staff/ticket-open.inc.php +++ b/include/staff/ticket-open.inc.php @@ -299,7 +299,7 @@ if ($_POST) data-signature="<?php echo Format::htmlchars(Format::viewableImages($signature)); ?>" data-signature-field="signature" data-dept-field="deptId" - placeholder="Intial response for the ticket" + placeholder="<?php echo __('Initial response for the ticket'); ?>" name="response" id="response" cols="21" rows="8" style="width:80%;"><?php echo $info['response']; ?></textarea> <table border="0" cellspacing="0" cellpadding="2" width="100%"> diff --git a/scp/js/tips.js b/scp/js/tips.js index 4c1c6ce28..4d623eb16 100644 --- a/scp/js/tips.js +++ b/scp/js/tips.js @@ -129,6 +129,8 @@ jQuery(function() { clearTimeout(tip_timer); return; } + if (!section) + return; tip_content.append( $('<h1>') .append('<i class="icon-info-sign faded"> ') diff --git a/scp/lists.php b/scp/lists.php index b3c424de7..5247a0643 100644 --- a/scp/lists.php +++ b/scp/lists.php @@ -4,8 +4,14 @@ require_once(INCLUDE_DIR.'class.list.php'); $list=null; -if ($_REQUEST['id']) { - $list = DynamicList::lookup($_REQUEST['id']); +$criteria=array(); +if ($_REQUEST['id']) + $criteria['id'] = $_REQUEST['id']; +elseif ($_REQUEST['type']) + $criteria['type'] = $_REQUEST['type']; + +if ($criteria) { + $list = DynamicList::lookup($criteria); if ($list) $form = $list->getForm(); -- GitLab