本文整理汇总了PHP中ev_gettext函数的典型用法代码示例。如果您正苦于以下问题:PHP ev_gettext函数的具体用法?PHP ev_gettext怎么用?PHP ev_gettext使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ev_gettext函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: outputDownload
/**
* Method used to output the headers and the binary data for
* an attachment file.
*
* This method never returns to caller.
*
* @param string $data The binary data of this file download
* @param string $filename The filename
* @param integer $filesize The size of this file
* @param string $mimetype The mimetype of this file
* @param boolean $force_inline If the file should be forced to render in the browser
* @return void
*/
public static function outputDownload(&$data, $filename, $filesize, $mimetype, $force_inline = false)
{
if ($force_inline == true) {
header('Content-Type: text/plain');
if (stristr($mimetype, 'gzip')) {
header('Content-Encoding: gzip');
}
header('Content-Disposition: inline; filename="' . urlencode($filename) . '"');
header('Content-Length: ' . $filesize);
echo $data;
exit;
}
if (empty($mimetype)) {
$mimetype = 'application/octet-stream';
}
if (empty($filename)) {
$filename = ev_gettext('Untitled');
}
$disposition = self::displayInline($mimetype) ? 'inline' : 'attachment';
$filename = rawurlencode($filename);
header('Content-Type: ' . $mimetype);
header("Content-Disposition: {$disposition}; filename=\"{$filename}\"; filename*=" . APP_CHARSET . "''{$filename}");
header("Content-Length: {$filesize}");
echo $data;
exit;
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:39,代码来源:class.attachment.php
示例2: smarty_function_get_display_label
function smarty_function_get_display_label($params, &$smarty)
{
$print_result = true;
$show = ev_gettext('show');
$hide = ev_gettext('hide');
extract($params);
$cookie_name = 'visibility_' . $element_name;
if (!empty($_COOKIE[$cookie_name])) {
if ($_COOKIE[$cookie_name] == 'none') {
$html_result = $show;
} else {
$html_result = $hide;
}
} else {
$html_result = $hide;
}
// automatically hide the table if there is nothing to be displayed
if (isset($total)) {
if ($total < 1) {
$html_result = $show;
}
}
if ($print_result) {
print $html_result;
} else {
return $html_result;
}
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:28,代码来源:function.get_display_label.php
示例3: markAsDuplicateAction
private function markAsDuplicateAction()
{
$res = Issue::markAsDuplicate($this->issue_id);
$map = array(1 => array(ev_gettext('Thank you, the issue was marked as a duplicate successfully'), Misc::MSG_INFO), -1 => array(ev_gettext('Sorry, an error happened while trying to run your query.'), Misc::MSG_ERROR));
Misc::mapMessages($res, $map);
$this->redirect(APP_RELATIVE_URL . 'view.php', array('id' => $this->issue_id));
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:7,代码来源:DuplicateController.php
示例4: defaultAction
/**
* @inheritdoc
*/
protected function defaultAction()
{
AuthCookie::setProjectCookie($this->prj_id);
Misc::setMessage(ev_gettext('The project has been switched'), Misc::MSG_INFO);
$url = $this->getRedirectUrl();
$this->redirect($url);
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:10,代码来源:SwitchController.php
示例5: getLocalizedRoles
private static function getLocalizedRoles()
{
if (self::$localized_roles === null) {
foreach (self::$roles as $id => $role) {
self::$localized_roles[$id] = ev_gettext($role);
}
}
return self::$localized_roles;
}
开发者ID:korusdipl,项目名称:eventum,代码行数:9,代码来源:class.user.php
示例6: updateReporterAction
private function updateReporterAction()
{
$post = $this->getRequest()->request;
$email = trim($post->get('email'));
$res = Edit_Reporter::update($this->issue_id, $email);
$map = array(1 => array(ev_gettext('Thank you, the Reporter was updated successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to update the Reporter.'), Misc::MSG_ERROR));
Misc::mapMessages($res, $map);
$this->redirect(APP_RELATIVE_URL . 'view.php', array('id' => $this->issue_id));
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:9,代码来源:EditReporterController.php
示例7: getTopics
private static function getTopics()
{
if (self::$topics !== null) {
return self::$topics;
}
// we need this in function as function calls are not allowed in static properties
self::$topics = array('main' => array('title' => ev_gettext('Help Topics'), 'parent' => ''), 'report' => array('title' => ev_gettext('Reporting Issues'), 'parent' => 'main'), 'report_category' => array('title' => ev_gettext('Category Field'), 'parent' => 'report'), 'report_priority' => array('title' => ev_gettext('Priority Field'), 'parent' => 'report'), 'report_assignment' => array('title' => ev_gettext('Assignment Field'), 'parent' => 'report'), 'report_release' => array('title' => ev_gettext('Scheduled Release Field'), 'parent' => 'report'), 'report_summary' => array('title' => ev_gettext('Summary Field'), 'parent' => 'report'), 'report_description' => array('title' => ev_gettext('Description Field'), 'parent' => 'report'), 'report_estimated_dev_time' => array('title' => ev_gettext('Estimated Development Time Field'), 'parent' => 'report'), 'scm_integration' => array('title' => ev_gettext('SCM Integration'), 'parent' => 'main'), 'scm_integration_usage' => array('title' => ev_gettext('Usage Examples'), 'parent' => 'scm_integration'), 'scm_integration_installation' => array('title' => ev_gettext('Installation Instructions'), 'parent' => 'scm_integration'), 'list' => array('title' => ev_gettext('Listing / Searching for Issues'), 'parent' => 'main'), 'adv_search' => array('title' => ev_gettext('Advanced Search / Creating Custom Queries'), 'parent' => 'main'), 'support_emails' => array('title' => ev_gettext('Associate Emails'), 'parent' => 'main'), 'preferences' => array('title' => ev_gettext('Account Preferences'), 'parent' => 'main'), 'notifications' => array('title' => ev_gettext('Email Notifications'), 'parent' => 'main'), 'view' => array('title' => ev_gettext('Viewing Issues'), 'parent' => 'main'), 'email_blocking' => array('title' => ev_gettext('Email Blocking'), 'parent' => 'main'), 'link_filters' => array('title' => ev_gettext('Link Filters'), 'parent' => 'main'), 'field_display' => array('title' => ev_gettext('Edit Fields to Display'), 'parent' => 'main'), 'column_display' => array('title' => ev_gettext('Edit Columns to Display'), 'parent' => 'main'), 'customize_listing' => array('title' => ev_gettext('Customize Issue Listing Screen'), 'parent' => 'main'), 'segregate_reporter' => array('title' => ev_gettext('Segregate Reporters'), 'parent' => 'main'), 'permission_levels' => array('title' => ev_gettext('User Permission Levels'), 'parent' => 'main'));
return self::$topics;
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:9,代码来源:class.help.php
示例8: checkRequirements
private function checkRequirements()
{
$errors = array();
// check if templates_c is writable by the web server user
if (!Misc::isWritableDirectory($dir = APP_TPL_COMPILE_PATH)) {
$errors[] = ev_gettext('Directory "%1$s" is not writable.', $dir);
Misc::displayRequirementErrors($errors);
exit;
}
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:10,代码来源:IndexController.php
示例9: attachmentAction
private function attachmentAction()
{
$file = Attachment::getDetails($this->iaf_id);
if (!$file) {
$this->error(ev_gettext('No such attachment'));
}
if (!Issue::canAccess($file['iat_iss_id'], $this->usr_id)) {
$this->error(ev_gettext('No access to requested attachment'));
}
Attachment::outputDownload($file['iaf_file'], $file['iaf_filename'], $file['iaf_filesize'], $file['iaf_filetype'], $this->force_inline);
exit;
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:12,代码来源:DownloadController.php
示例10: createVisitorAccountAction
private function createVisitorAccountAction()
{
$setup = Setup::get();
if ($setup['open_signup'] != 'enabled') {
$error = ev_gettext('Sorry, but this feature has been disabled by the administrator.');
$this->error($error);
}
$res = User::createVisitorAccount($setup['accounts_role'], $setup['accounts_projects']);
$this->tpl->assign('signup_result', $res);
// TODO: translate
$map = array(1 => array('Thank you, your account creation request was processed successfully. For security reasons a confirmation email was sent to the provided email address with instructions on how to confirm your request and activate your account.', Misc::MSG_INFO), -1 => array('Error: An error occurred while trying to run your query.', Misc::MSG_ERROR), -2 => array('Error: The email address specified is already associated with an user in the system.', Misc::MSG_ERROR));
Misc::mapMessages($res, $map);
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:13,代码来源:SignupController.php
示例11: defaultAction
/**
* @inheritdoc
*/
protected function defaultAction()
{
if (User::isClockedIn($this->usr_id)) {
User::ClockOut($this->usr_id);
$message = ev_gettext('You have been clocked out');
} else {
User::ClockIn($this->usr_id);
$message = ev_gettext('You have been clocked in');
}
Misc::setMessage($message, Misc::MSG_INFO);
$url = $this->url ?: APP_RELATIVE_URL . 'list.php';
$this->redirect($url);
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:16,代码来源:ClockStatusController.php
示例12: prepareTemplate
/**
* @inheritdoc
*/
protected function prepareTemplate()
{
$note = Note::getDetails($this->note_id);
if (!$note) {
$this->tpl->assign('note', '');
return;
}
$note['message'] = $note['not_note'];
$seq_no = Note::getNoteSequenceNumber($this->issue_id, $this->note_id);
// TRANSLATORS: %1: note sequence number, %2: note title
$extra_title = ev_gettext('Note #%1$s: %2$s', $seq_no, $note['not_title']);
$this->tpl->assign(array('note' => $note, 'issue_id' => $this->issue_id, 'extra_title' => $extra_title, 'recipients' => Mail_Queue::getMessageRecipients('notes', $this->note_id)));
$this->setSideLinks();
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:17,代码来源:ViewNoteController.php
示例13: getListing
/**
* Method used to get the list of changes made against a specific issue.
*
* @param integer $iss_id The issue ID
* @param string $order_by The order to sort the history
* @return array The list of changes
*/
public static function getListing($iss_id, $order_by = 'DESC')
{
$order_by = DB_Helper::orderBy($order_by);
$stmt = "SELECT\n *\n FROM\n {{%issue_history}},\n {{%history_type}}\n WHERE\n htt_id = his_htt_id AND\n his_is_hidden != 1 AND\n his_iss_id=? AND\n his_min_role <= ?\n ORDER BY\n his_id {$order_by}";
$params = array($iss_id, Auth::getCurrentRole());
try {
$res = DB_Helper::getInstance()->getAll($stmt, $params);
} catch (DbException $e) {
return '';
}
foreach ($res as &$row) {
$row['his_summary'] = Misc::processTokens(ev_gettext($row['his_summary']), $row['his_context']);
}
return $res;
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:22,代码来源:class.history.php
示例14: getAssignOptions
/**
* Generate options for assign list.
* If there are groups and user is above a customer, include groups
*
* @param array $users
* @return array
*/
public function getAssignOptions($users)
{
$assign_options = array('' => ev_gettext('Any'), '-1' => ev_gettext('un-assigned'), '-2' => ev_gettext('myself and un-assigned'));
if (Auth::isAnonUser()) {
unset($assign_options['-2']);
} elseif (User::getGroupID($this->usr_id)) {
$assign_options['-3'] = ev_gettext('myself and my group');
$assign_options['-4'] = ev_gettext('myself, un-assigned and my group');
}
if (Auth::getCurrentRole() > User::ROLE_CUSTOMER && ($groups = Group::getAssocList($this->prj_id))) {
foreach ($groups as $grp_id => $grp_name) {
$assign_options["grp:{$grp_id}"] = ev_gettext('Group') . ': ' . $grp_name;
}
}
return $assign_options + $users;
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:23,代码来源:AssignHelper.php
示例15: dirname
// | |
// | Free Software Foundation, Inc. |
// | 51 Franklin Street, Suite 330 |
// | Boston, MA 02110-1301, USA. |
// +----------------------------------------------------------------------+
// | Authors: Dave Anderson <[email protected]> |
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('manage/email_alias.tpl.html');
Auth::checkAuthentication(APP_COOKIE, null, true);
$role_id = Auth::getCurrentRole();
if ($role_id < User::getRoleID('manager')) {
$tpl->setTemplate('permission_denied.tpl.html');
$tpl->displayTemplate();
exit;
}
$usr_id = $_REQUEST['id'];
if (@$_POST['cat'] == 'save') {
$res = User::addAlias($usr_id, trim($_POST['alias']));
Misc::mapMessages($res, array(true => array(ev_gettext('Thank you, the alias was added successfully.'), Misc::MSG_INFO), false => array(ev_gettext('An error occurred while trying to add the alias.'), Misc::MSG_ERROR)));
} elseif (@$_POST['cat'] == 'remove') {
foreach ($_POST['item'] as $aliastmp) {
$res = User::removeAlias($usr_id, $aliastmp);
}
Misc::mapMessages($res, array(true => array(ev_gettext('Thank you, the alias was removed successfully.'), Misc::MSG_INFO), false => array(ev_gettext('An error occurred while trying to remove the alias.'), Misc::MSG_ERROR)));
}
$tpl->assign('list', User::getAliases($usr_id));
$tpl->assign('username', User::getFullName($usr_id));
$tpl->assign('id', $usr_id);
$tpl->displayTemplate();
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:email_alias.php
示例16: getLastStatusChangeDates
/**
* Retrieves the last status change date for the given issue.
*
* @param integer $prj_id The project ID
* @param array $result The associative array of data
* @see Search::getListing()
*/
public static function getLastStatusChangeDates($prj_id, &$result)
{
$ids = array();
foreach ($result as $res) {
$ids[] = $res['iss_sta_id'];
}
if (!$ids) {
return;
}
$customizations = Status::getProjectStatusCustomization($prj_id, $ids);
foreach ($result as &$row) {
if (empty($row['iss_sta_id'])) {
$row['status_change_date'] = '';
continue;
}
list($label, $date_field_name) = @$customizations[$row['iss_sta_id']];
if (empty($label) || empty($date_field_name)) {
$row['status_change_date'] = '';
continue;
}
// TRANSLATORS: %1 = label, %2 = date diff
$desc = ev_gettext('%1$s: %2$s ago');
$target_date = $row[$date_field_name];
if (empty($target_date)) {
$row['status_change_date'] = '';
continue;
}
$dateDiff = Date_Helper::getFormattedDateDiff(time(), $target_date);
$row['status_change_date'] = sprintf($desc, $label, $dateDiff);
}
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:38,代码来源:class.issue.php
示例17: addTimeEntry
private function addTimeEntry()
{
$post = $this->getRequest()->request;
$date = (array) $post->get('date');
$ttc_id = $post->getInt('category');
$time_spent = $post->getInt('time_spent');
$summary = ev_gettext('Time entry inserted when closing issue.');
Time_Tracking::addTimeEntry($this->issue_id, $ttc_id, $time_spent, $date, $summary);
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:9,代码来源:CloseController.php
示例18: Template_Helper
* that were distributed with this source code.
*/
require_once __DIR__ . '/../../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('manage/link_filters.tpl.html');
Auth::checkAuthentication();
$role_id = Auth::getCurrentRole();
if ($role_id < User::ROLE_MANAGER) {
Misc::setMessage(ev_gettext('Sorry, you are not allowed to access this page.'), Misc::MSG_ERROR);
$tpl->displayTemplate();
exit;
}
if (@$_POST['cat'] == 'new') {
$res = Link_Filter::insert();
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the link filter was added successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to add the new link filter.'), Misc::MSG_INFO)));
} elseif (@$_POST['cat'] == 'update') {
$res = Link_Filter::update();
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the link filter was updated successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to update the link filter.'), Misc::MSG_INFO)));
} elseif (@$_POST['cat'] == 'delete') {
$res = Link_Filter::remove();
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the link filter was deleted successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to delete the link filter.'), Misc::MSG_INFO)));
}
if (@$_GET['cat'] == 'edit') {
$info = Link_Filter::getDetails($_GET['id']);
$tpl->assign('info', $info);
}
$user_roles = User::getRoles();
$tpl->assign('list', Link_Filter::getList());
$tpl->assign('project_list', Project::getAll());
$tpl->assign('user_roles', $user_roles);
$tpl->displayTemplate();
开发者ID:dabielkabuto,项目名称:eventum,代码行数:31,代码来源:link_filters.php
示例19: WorkloadDateRangeGraph
/**
* Generates a graph for workload by date range report.
*
* @param string $graph
* @param string $type
* @param string $start_date
* @param string $end_date
* @param $interval
* @return bool
*/
public function WorkloadDateRangeGraph($graph, $type, $start_date, $end_date, $interval)
{
$data = Session::get('workload_date_range_data');
if (empty($data)) {
return false;
}
switch ($interval) {
case 'dow':
$x_title = ev_gettext('Day of Week');
break;
case 'week':
$x_title = ev_gettext('Week');
break;
case 'dom':
$x_title = ev_gettext('Day of Month');
break;
case 'day':
$x_title = ev_gettext('Day');
break;
case 'month':
$x_title = ev_gettext('Month');
break;
default:
return false;
}
switch ($graph) {
case 'issue':
$plots = array_values($data['issues']['points']);
$graph_title = ev_gettext('Issues by created date %s through %s', $start_date, $end_date);
$labels = array_keys($data['issues']['points']);
$y_label = ev_gettext('Issues');
break;
case 'email':
$plots = array_values($data['emails']['points']);
$graph_title = ev_gettext('Emails by sent date %s through %s', $start_date, $end_date);
$labels = array_keys($data['emails']['points']);
$y_label = ev_gettext('Emails');
break;
case 'note':
$plots = array_values($data['notes']['points']);
$graph_title = ev_gettext('Notes by sent date %s through %s', $start_date, $end_date);
$labels = array_keys($data['notes']['points']);
$y_label = ev_gettext('Notes');
break;
case 'phone':
$plots = array_values($data['phone']['points']);
$graph_title = ev_gettext('Phone calls by date %s through %s', $start_date, $end_date);
$labels = array_keys($data['phone']['points']);
$y_label = ev_gettext('Phone Calls');
break;
case 'time_spent':
$plots = array_values($data['time_spent']['points']);
$graph_title = ev_gettext('Time spent (hrs) %s through %s', $start_date, $end_date);
$labels = array_keys($data['time_spent']['points']);
$y_label = ev_gettext('Hours');
break;
case 'avg_time_per_issue':
$plots = array_values($data['avg_time_per_issue']['points']);
$graph_title = ev_gettext('Avg. Time spent per issue (min) %s through %s', $start_date, $end_date);
$labels = array_keys($data['avg_time_per_issue']['points']);
$y_label = ev_gettext('Minutes');
break;
default:
return false;
}
if (count($plots) < 1) {
return false;
}
// convert to phplot format
$plotData = array();
foreach ($plots as $i => $plot) {
$plotData[] = array($labels[$i], $plot);
}
if ($type == 'pie') {
$plot = $this->create(500, 300);
$plot->SetPlotType('pie');
$plot->SetDataType('text-data-single');
$plot->SetLegend($labels);
} else {
$plot = $this->create(500, 350);
$plot->SetPlotType('bars');
$plot->SetDataType('text-data');
$plot->SetYTitle($y_label);
$plot->SetXTitle($x_title);
$plot->SetYDataLabelPos('plotin');
}
$plot->SetTitle($graph_title);
$plot->SetImageBorderType('plain');
$plot->SetDataValues($plotData);
return $plot->DrawGraph();
//.........这里部分代码省略.........
开发者ID:korusdipl,项目名称:eventum,代码行数:101,代码来源:PlotHelper.php
示例20: Template_Helper
/*
* This file is part of the Eventum (Issue Tracking System) package.
*
* @copyright (c) Eventum Team
* @license GNU General Public License, version 2 or later (GPL-2+)
*
* For the full copyright and license information,
* please see the COPYING and AUTHORS files
* that were distributed with this source code.
*/
require_once __DIR__ . '/../../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('manage/private_key.tpl.html');
Auth::checkAuthentication();
$role_id = Auth::getCurrentRole();
if ($role_id < User::ROLE_ADMINISTRATOR) {
Misc::setMessage(ev_gettext('Sorry, you are not allowed to access this page.'), Misc::MSG_ERROR);
$tpl->displayTemplate();
exit;
}
$cat = isset($_POST['cat']) ? (string) $_POST['cat'] : null;
if ($cat == 'update') {
// regenerate key
try {
Auth::generatePrivateKey();
Misc::setMessage(ev_gettext('Thank you, the private key was regenerated.'));
} catch (Exception $e) {
Misc::setMessage(ev_gettext('Private key regeneration error. Check server error logs.'), Misc::MSG_ERROR);
}
}
$tpl->displayTemplate();
开发者ID:dabielkabuto,项目名称:eventum,代码行数:31,代码来源:private_key.php
注:本文中的ev_gettext函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论