if ($_REQUEST['do'] == 'delete')
{
- $admin->page_confirm(_('Are you sure you want to delete this automation?'), 'automation.php', 'kill', array('actionid' => $bugsys->in['actionid']));
+ $admin->page_confirm(T('Are you sure you want to delete this automation?'), 'automation.php', 'kill', array('actionid' => $bugsys->in['actionid']));
}
// ###################################################################
$navigator->set_focus('link', 'automations-add', 'automations');
}
- $admin->page_start(($add ? _('New Automation') : _('Edit Automation')));
+ $admin->page_start(($add ? T('New Automation') : T('Edit Automation')));
$admin->form_start('automation.php', ($add ? 'insert' : 'update'));
}
$admin->table_start();
- $admin->table_head(($add ? _('New Automation') : _('Edit Automation')));
+ $admin->table_head(($add ? T('New Automation') : T('Edit Automation')));
- $admin->row_input(_('Name'), 'name', $action->objdata['name']);
- $admin->row_textarea(_('Description'), 'description', $action->objdata['description']);
- $admin->row_textarea(_('Add Comment'), 'comment', $action->objdata['comment']);
+ $admin->row_input(T('Name'), 'name', $action->objdata['name']);
+ $admin->row_textarea(T('Description'), 'description', $action->objdata['description']);
+ $admin->row_textarea(T('Add Comment'), 'comment', $action->objdata['comment']);
- $admin->row_span(_('Field Changes'), 'thead', 'center');
+ $admin->row_span(T('Field Changes'), 'thead', 'center');
// -------------------------------------------------------------------
// built-in fields
construct_datastore_select('severity', 'severity', 'severityid', $action->objdata['fields']['builtin']['severity'], true, true);
- $admin->row_list(_('Severity'), 'fields[severity]');
+ $admin->row_list(T('Severity'), 'fields[severity]');
construct_datastore_select('priority', 'priority', 'priorityid', $action->objdata['fields']['builtin']['priority'], true, true);
- $admin->row_list(_('Priority'), 'fields[priority]');
+ $admin->row_list(T('Priority'), 'fields[priority]');
construct_datastore_select('status', 'status', 'statusid', $action->objdata['fields']['builtin']['status'], true, true);
- $admin->row_list(_('Status'), 'fields[status]');
+ $admin->row_list(T('Status'), 'fields[status]');
construct_datastore_select('resolution', 'resolution', 'resolutionid', $action->objdata['fields']['builtin']['resolution'], true, true);
- $admin->row_list(_('Resolution'), 'fields[resolution]');
+ $admin->row_list(T('Resolution'), 'fields[resolution]');
$admin->row_span('', 'tcat', 'center');
case 'input_checkbox':
$admin->list_item('', -1, (!$action->objdata['fields']['custom']["$field[fieldid]"] OR $action->objdata['fields']['custom']["$field[fieldid]"] == -1));
- $admin->list_item(_('Checked'), 1, ($action->objdata['fields']['custom']["$field[fieldid]"] == 1));
- $admin->list_item(_('Un-Checked'), 0, (isset($action->objdata['fields']['custom']["$field[fieldid]"]) AND $action->objdata['fields']['custom']["$field[fieldid]"] == 0));
+ $admin->list_item(T('Checked'), 1, ($action->objdata['fields']['custom']["$field[fieldid]"] == 1));
+ $admin->list_item(T('Un-Checked'), 0, (isset($action->objdata['fields']['custom']["$field[fieldid]"]) AND $action->objdata['fields']['custom']["$field[fieldid]"] == 0));
$admin->row_list($field['name'], "fields[custom][$field[fieldid]]");
break;
NavLinks::automationsAdd();
$navigator->set_focus('link', 'fields-pages-automations', 'fields-pages');
- $admin->page_start(_('Automations'));
+ $admin->page_start(T('Automations'));
$admin->table_start();
- $admin->table_head(_('Automations'));
+ $admin->table_head(T('Automations'));
$actions = $db->query("SELECT * FROM " . TABLE_PREFIX . "automation ORDER BY name ASC");
while ($action = $db->fetch_array($actions))
{
- $admin->row_text($action['name'] . "\n<div class=\"smallfont\">$action[description]</div>", "<a href=\"automation.php?do=edit&actionid=$action[actionid]\">[" . _('Edit') . "]</a> <a href=\"automation.php?do=delete&actionid=$action[actionid]\">[" . _('Delete') . "]</a>");
+ $admin->row_text($action['name'] . "\n<div class=\"smallfont\">$action[description]</div>", "<a href=\"automation.php?do=edit&actionid=$action[actionid]\">[" . T('Edit') . "]</a> <a href=\"automation.php?do=delete&actionid=$action[actionid]\">[" . T('Delete') . "]</a>");
}
$admin->table_end();
if ($_REQUEST['do'] == 'delete')
{
- $admin->page_confirm(_('Are you sure you want to delete this bug field? Doing so will remove everything for this field and it cannot be undone!'), 'field.php', 'kill', array('fieldid' => $bugsys->in['fieldid']));
+ $admin->page_confirm(T('Are you sure you want to delete this bug field? Doing so will remove everything for this field and it cannot be undone!'), 'field.php', 'kill', array('fieldid' => $bugsys->in['fieldid']));
}
// ###################################################################
(" . implode("),\n\t\t\t(", $values) . ")"
);
- $admin->redirect('field.php?do=modify', ($add ? _('The custom field has been added') : _('The custom field has been updated')));
+ $admin->redirect('field.php?do=modify', ($add ? T('The custom field has been added') : T('The custom field has been updated')));
}
// ###################################################################
$navigator->set_focus('link', 'fields-pages-fields', 'fields-pages');
}
- $admin->page_start(($add ? _('Add New Custom Field') : _('Edit Custom Field')));
+ $admin->page_start(($add ? T('Add New Custom Field') : T('Edit Custom Field')));
$admin->form_start('field.php', ($typeselect ? 'add' : 'update'));
if ($add AND !$typeselect)
{
{
$admin->form_hidden_field('step', 1);
$admin->table_start(true, '40%');
- $admin->table_head(_('Select Type'));
+ $admin->table_head(T('Select Type'));
}
else
{
$admin->table_start();
- $admin->table_head(($add ? _('Add New Bug Field') . ' - ' . FieldAPI::field_types($bugsys->in['type']) : _('Edit Field')));
+ $admin->table_head(($add ? T('Add New Bug Field') . ' - ' . FieldAPI::field_types($bugsys->in['type']) : T('Edit Field')));
}
if ($edit)
{
$admin->list_item($description, $name);
}
- $admin->row_list(_('Field Type'), 'type', false);
+ $admin->row_list(T('Field Type'), 'type', false);
$admin->row_submit();
$admin->table_end();
$field->set('type', $type);
// global fields
- $admin->row_span(_('Global Fields'), 'thead', 'center');
- $admin->row_text(_('Field Type'), FieldAPI::field_types($type));
- $admin->row_input(_('Display Name'), 'name', $field->objdata['name']);
- $admin->row_textarea(_('Description'), 'description', $field->objdata['description']);
- $admin->row_yesno(_('Required'), 'required', $field->objdata['required']);
- $admin->row_yesno(_('Can Be Searched'), 'cansearch', ((isset($field->objdata['cansearch'])) ? $field->objdata['cansearch'] : true));
+ $admin->row_span(T('Global Fields'), 'thead', 'center');
+ $admin->row_text(T('Field Type'), FieldAPI::field_types($type));
+ $admin->row_input(T('Display Name'), 'name', $field->objdata['name']);
+ $admin->row_textarea(T('Description'), 'description', $field->objdata['description']);
+ $admin->row_yesno(T('Required'), 'required', $field->objdata['required']);
+ $admin->row_yesno(T('Can Be Searched'), 'cansearch', ((isset($field->objdata['cansearch'])) ? $field->objdata['cansearch'] : true));
// type-specific fields
- $admin->row_span(_('Type-Specific Fields'), 'thead', 'center');
+ $admin->row_span(T('Type-Specific Fields'), 'thead', 'center');
switch ($type)
{
case 'input_text':
- $admin->row_input(_('Default Value'), 'defaultvalue', $field->objdata['defaultvalue']);
- $admin->row_input(_('Regular Expression Match'), 'regexmatch', $field->objdata['regexmatch']);
- $admin->row_input(_('Maximum Length'), 'maxlength', $field->objdata['maxlength'], 2, 10);
+ $admin->row_input(T('Default Value'), 'defaultvalue', $field->objdata['defaultvalue']);
+ $admin->row_input(T('Regular Expression Match'), 'regexmatch', $field->objdata['regexmatch']);
+ $admin->row_input(T('Maximum Length'), 'maxlength', $field->objdata['maxlength'], 2, 10);
break;
case 'input_checkbox':
- $admin->row_yesno(_('Checked By Default'), 'defaultvalue', $field->objdata['defaultvalue']);
+ $admin->row_yesno(T('Checked By Default'), 'defaultvalue', $field->objdata['defaultvalue']);
break;
case 'select_single':
- $admin->row_textarea(_('Selection Values'), 'selects', stripslashes(implode("\n", (array)unserialize($field->objdata['selects']))));
- $admin->row_yesno(_('Make the First Option Default'), 'usedefault', $field->objdata['usedefault']);
+ $admin->row_textarea(T('Selection Values'), 'selects', stripslashes(implode("\n", (array)unserialize($field->objdata['selects']))));
+ $admin->row_yesno(T('Make the First Option Default'), 'usedefault', $field->objdata['usedefault']);
break;
}
// custom field permissions
$admin->table_start();
- $admin->table_head(_('Custom Field Permissions'));
+ $admin->table_head(T('Custom Field Permissions'));
if ($edit)
{
while ($usergroup = $db->fetch_array($usergroups))
{
unset($listitem);
- $admin->list_item(_('No Permission'), 0, $permissions["$usergroup[usergroupid]"] == 0);
- $admin->list_item(_('Can View Field'), 1, $permissions["$usergroup[usergroupid]"] == 1);
- $admin->list_item(_('Can View, Edit Field'), 2, $permissions["$usergroup[usergroupid]"] == 2);
+ $admin->list_item(T('No Permission'), 0, $permissions["$usergroup[usergroupid]"] == 0);
+ $admin->list_item(T('Can View Field'), 1, $permissions["$usergroup[usergroupid]"] == 1);
+ $admin->list_item(T('Can View, Edit Field'), 2, $permissions["$usergroup[usergroupid]"] == 2);
$admin->row_list($usergroup['title'], "custom[$usergroup[usergroupid]]");
}
NavLinks::fieldsAdd();
$navigator->set_focus('link', 'fields-pages-fields', 'fields-pages');
- $admin->page_start(_('Additional Bug Fields'));
+ $admin->page_start(T('Additional Bug Fields'));
$admin->table_start();
- $admin->table_head(_('Additional Bug Fields'), 3, 'custom_bug_fields');
- $admin->table_column_head(array(_('Display Name/Description'), _('Field ID'), _('Actions')));
+ $admin->table_head(T('Additional Bug Fields'), 3, 'custom_bug_fields');
+ $admin->table_column_head(array(T('Display Name/Description'), T('Field ID'), T('Actions')));
$fields = $db->query("SELECT * FROM " . TABLE_PREFIX . "bugfield ORDER BY fieldid ASC");
while ($field = $db->fetch_array($fields))
array(
"$field[name]<div class=\"smallfont\"><em>$field[description]</em></div>" => 'l',
"$field[fieldid]" => 'c',
- "<a href=\"field.php?do=edit&fieldid=$field[fieldid]\">[" . _('Edit') . "]</a> <a href=\"field.php?do=delete&fieldid=$field[fieldid]\">[" . _('Delete') . "]</a>" => 'c'
+ "<a href=\"field.php?do=edit&fieldid=$field[fieldid]\">[" . T('Edit') . "]</a> <a href=\"field.php?do=delete&fieldid=$field[fieldid]\">[" . T('Delete') . "]</a>" => 'c'
)
);
}
// admin navigation
$bugsys->load('printer_navigation', 'navigator', true);
-$navigator->add_top_link(_('Home'), '../index.php');
-$navigator->add_top_link(_('Logout'), '../login.php?do=cplogout');
+$navigator->add_top_link(T('Home'), '../index.php');
+$navigator->add_top_link(T('Logout'), '../login.php?do=cplogout');
-$navigator->add_component('tab', 'options', null, _('Options'), 'index.php');
-$navigator->add_component('tab', 'products', null, _('Products'), 'product.php');
-$navigator->add_component('tab', 'fields', null, _('Fields'), 'field.php');
-$navigator->add_component('tab', 'users', null, _('Users & Permissions'), 'user.php');
+$navigator->add_component('tab', 'options', null, T('Options'), 'index.php');
+$navigator->add_component('tab', 'products', null, T('Products'), 'product.php');
+$navigator->add_component('tab', 'fields', null, T('Fields'), 'field.php');
+$navigator->add_component('tab', 'users', null, T('Users & Permissions'), 'user.php');
require_once('./includes/class_admin_navigation.php');
// continue loading
$bugsys->load('printer', 'admin', true);
-$admin->setRealm(_('Administration'));
+$admin->setRealm(T('Administration'));
$admin->setLanguageInformation($language);
$admin->css_link('../framework/printer.css.php');
define('ISSO_PRINTER_NO_NAVIGATION', 1);
- $admin->page_start(_('Login'), null, '', 'document.cplogin.' . ($bugsys->userinfo['email'] ? 'password' : 'email') . '.focus();');
+ $admin->page_start(T('Login'), null, '', 'document.cplogin.' . ($bugsys->userinfo['email'] ? 'password' : 'email') . '.focus();');
$admin->form_start('../login.php', 'cplogin', false, 'cplogin');
$admin->table_start(true, '425');
- $admin->table_head(_('Login to Bugdar'));
- $admin->row_input(_('Email'), 'email', $bugsys->userinfo['email'], 2, 35, false, false, 'middle');
- $admin->row_input(_('Password'), 'password', '', 2, 35, false, true, 'middle');
- $admin->row_submit('', _('Login'));
+ $admin->table_head(T('Login to Bugdar'));
+ $admin->row_input(T('Email'), 'email', $bugsys->userinfo['email'], 2, 35, false, false, 'middle');
+ $admin->row_input(T('Password'), 'password', '', 2, 35, false, true, 'middle');
+ $admin->row_submit('', T('Login'));
$admin->table_end();
$admin->form_end();
$funct->cookie(COOKIE_PREFIX . 'adminsession', null);
admin_login();
// do we need this message?
- $admin->error(_('Invalid admin session has been terminated.'));
+ $admin->error(T('Invalid admin session has been terminated.'));
}
}
else
if ($show['first'])
{
- $return .= '<a href="' . $baselink . 'p=1&pp=' . $paginator->getPerPage() . '">' . _('First') . '</a> ...';
+ $return .= '<a href="' . $baselink . 'p=1&pp=' . $paginator->getPerPage() . '">' . T('First') . '</a> ...';
}
if ($show['prev'])
{
- $return .= '<a href="' . $baselink . 'p=' . $prevpage . '&pp=' . $paginator->getPerPage() . '">' . _('Prev') . '</a> ...';
+ $return .= '<a href="' . $baselink . 'p=' . $prevpage . '&pp=' . $paginator->getPerPage() . '">' . T('Prev') . '</a> ...';
}
$return .= $pagebits;
if ($show['next'])
{
- $return .= '... <a href="' . $baselink . 'p=' . $nextpage . '&pp=' . $paginator->getPerPage() . '">' . _('Next') . '</a>';
+ $return .= '... <a href="' . $baselink . 'p=' . $nextpage . '&pp=' . $paginator->getPerPage() . '">' . T('Next') . '</a>';
}
if ($show['last'])
{
- $return .= '... <a href="' . $baselink . 'p=' . $paginator->getPageCount() . '&pp=' . $paginator->getPerPage() . '">' . _('Last') . '</a>';
+ $return .= '... <a href="' . $baselink . 'p=' . $paginator->getPageCount() . '&pp=' . $paginator->getPerPage() . '">' . T('Last') . '</a>';
}
return '<div style="margin-top: 15px; float: ' . $stylevar['right'] . '">' . $return . '</div>';
}
$navigator->set_focus('tab', 'options', null);
$navigator->set_focus('link', 'options-pages-home', 'options-pages');
-$admin->page_start(_('Home'));
+$admin->page_start(T('Home'));
// ###################################################################
$check = $bugsys->xml->parse($check);
if (isset($check['version-check']['update']))
{
- $admin->page_code('<div style="background-color: white; border-color: red; border-width: 2px; border-style: solid; color: red; padding: 4px"><div style="font-size: 18px; font-weight: bold">' . _('Update Avaliable') . ':</div>' . sprintf(_('Your installation of Bugdar is out-of-date. You are running version <strong>%1$s</strong> and the latest version is <strong>%2$s</strong>. You can download the update at <a href="http://www.bluestatic.org">Blue Static\'s website</a>. You are strongly encouraged to apply all updates to fix bugs and any security issues (if present).'), $bugsys->options['trackerversion'], $check['version-check']['update']['value']) . '</div>');
+ $admin->page_code('<div style="background-color: white; border-color: red; border-width: 2px; border-style: solid; color: red; padding: 4px"><div style="font-size: 18px; font-weight: bold">' . T('Update Avaliable') . ':</div>' . sprintf(T('Your installation of Bugdar is out-of-date. You are running version <strong>%1$s</strong> and the latest version is <strong>%2$s</strong>. You can download the update at <a href="http://www.bluestatic.org">Blue Static\'s website</a>. You are strongly encouraged to apply all updates to fix bugs and any security issues (if present).'), $bugsys->options['trackerversion'], $check['version-check']['update']['value']) . '</div>');
}
else if (isset($check['version-check']['up-to-date']))
{
- $admin->page_code('<div style="background-color: white; border-color: green; border-width: 2px; border-style: solid; color: green; padding: 4px"><div style="font-size: 18px; font-weight: bold">' . _('Up-to-Date') . ':</div>' . sprintf(_('Your installation of Bugdar is up-to-date. You are running version <strong>%1$s</strong>.'), $bugsys->options['trackerversion']) . '</div>');
+ $admin->page_code('<div style="background-color: white; border-color: green; border-width: 2px; border-style: solid; color: green; padding: 4px"><div style="font-size: 18px; font-weight: bold">' . T('Up-to-Date') . ':</div>' . sprintf(T('Your installation of Bugdar is up-to-date. You are running version <strong>%1$s</strong>.'), $bugsys->options['trackerversion']) . '</div>');
}
}
}
// ###################################################################
$admin->table_start();
-$admin->table_head(_('Welcome to the Bugdar Admin Panel'));
+$admin->table_head(T('Welcome to the Bugdar Admin Panel'));
// -------------------------------------------------------------------
-$admin->row_span(_('Version Information'), 'thead');
-$admin->row_text(_('Bugdar Version'), $bugsys->options['trackerversion']);
-$admin->row_text(_('PHP Version'), phpversion());
+$admin->row_span(T('Version Information'), 'thead');
+$admin->row_text(T('Bugdar Version'), $bugsys->options['trackerversion']);
+$admin->row_text(T('PHP Version'), phpversion());
$mysql = $db->query_first("SELECT VERSION() AS version");
-$admin->row_text(_('MySQL Version'), $mysql['version']);
+$admin->row_text(T('MySQL Version'), $mysql['version']);
-$admin->row_text(_('Web Server'), ($_SERVER['SERVER_SOFTWARE'] ? $_SERVER['SERVER_SOFTWARE'] : $SERVER['SERVER_SOFTWARE']));
+$admin->row_text(T('Web Server'), ($_SERVER['SERVER_SOFTWARE'] ? $_SERVER['SERVER_SOFTWARE'] : $SERVER['SERVER_SOFTWARE']));
// -------------------------------------------------------------------
-$admin->row_span(_('Server Options'), 'thead');
+$admin->row_span(T('Server Options'), 'thead');
$mysql = $db->query_first("SHOW VARIABLES LIKE 'max_allowed_packet'");
-$admin->row_text(_('MySQL: Maximum Packet Size'), $mysql['Value']);
+$admin->row_text(T('MySQL: Maximum Packet Size'), $mysql['Value']);
-$admin->row_text(_('MySQL: Maximum Upload Size'), $funct->fetch_max_attachment_size());
+$admin->row_text(T('MySQL: Maximum Upload Size'), $funct->fetch_max_attachment_size());
$mysql = $db->query_first("SHOW VARIABLES LIKE 'ft_min_word_len'");
-$admin->row_text(_('MySQL: Full-Text Search Minimum Word Length'), $mysql['Value']);
+$admin->row_text(T('MySQL: Full-Text Search Minimum Word Length'), $mysql['Value']);
-$admin->row_text(_('PHP: Safe Mode'), ((ini_get('safe_mode') == 1 OR strtolower(ini_get('safe_mode')) == 'on') ? _('Yes') : _('No')));
-$admin->row_text(_('PHP: Register Globals'), ((ini_get('register_globals') == 1 OR strtolower(ini_get('register_globals')) == 'on') ? _('Yes') : _('No')));
-$admin->row_text(_('PHP: Magic Quotes GPC'), ((ini_get('magic_quotes_gpc') == 1 OR strtolower(ini_get('magic_quotes_gpc')) == 'on') ? _('Yes') : _('No')));
-$admin->row_text(_('PHP: Magic Quotes Sybase'), ((ini_get('magic_quotes_sybase') == 1 OR strtolower(ini_get('magic_quotes_sybase')) == 'on') ? _('Yes') : _('No')));
-$admin->row_text(_('PHP: Gettext Installed'), (function_exists('ngettext') ? _('Yes') : _('No')));
+$admin->row_text(T('PHP: Safe Mode'), ((ini_get('safe_mode') == 1 OR strtolower(ini_get('safe_mode')) == 'on') ? T('Yes') : T('No')));
+$admin->row_text(T('PHP: Register Globals'), ((ini_get('register_globals') == 1 OR strtolower(ini_get('register_globals')) == 'on') ? T('Yes') : T('No')));
+$admin->row_text(T('PHP: Magic Quotes GPC'), ((ini_get('magic_quotes_gpc') == 1 OR strtolower(ini_get('magic_quotes_gpc')) == 'on') ? T('Yes') : T('No')));
+$admin->row_text(T('PHP: Magic Quotes Sybase'), ((ini_get('magic_quotes_sybase') == 1 OR strtolower(ini_get('magic_quotes_sybase')) == 'on') ? T('Yes') : T('No')));
+$admin->row_text(T('PHP: Gettext Installed'), (function_exists('ngettext') ? T('Yes') : T('No')));
// -------------------------------------------------------------------
if ($_REQUEST['do'] == 'delete')
{
- $admin->page_confirm(_('Are you sure you want to delete this language?'), 'language.php', 'kill', array('languageid' => $bugsys->input_clean('languageid', TYPE_UINT)));
+ $admin->page_confirm(T('Are you sure you want to delete this language?'), 'language.php', 'kill', array('languageid' => $bugsys->input_clean('languageid', TYPE_UINT)));
}
// ###################################################################
NavLinks::languagesAdd();
$navigator->set_focus('link', 'options-languages-add', 'options-languages');
- $admin->page_start(_('New Language'));
+ $admin->page_start(T('New Language'));
$admin->form_start('language.php', 'insert');
$admin->table_start();
- $admin->table_head(_('New Language'));
+ $admin->table_head(T('New Language'));
- $admin->row_input(_('Title'), 'title');
- $admin->row_input(_('Gettext Language Code (<em><a href="http://www.gnu.org/software/gettext/manual/html_chapter/gettext_15.html">language</a></em>_<em><a href="http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html">COUNTRY</a></em>)'), 'langcode');
- $admin->row_input(_('Character Set'), 'charset', 'utf-8');
- $admin->list_item(_('Left-to-Right'), 'ltr', true);
- $admin->list_item(_('Right-to-Left'), 'rtl');
- $admin->row_list(_('Direction'), 'direction');
- $admin->row_yesno(_('User Selectable'), 'userselect', true);
+ $admin->row_input(T('Title'), 'title');
+ $admin->row_input(T('Gettext Language Code (<em><a href="http://www.gnu.org/software/gettext/manual/html_chapter/gettext_15.html">language</a></em>_<em><a href="http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html">COUNTRY</a></em>)'), 'langcode');
+ $admin->row_input(T('Character Set'), 'charset', 'utf-8');
+ $admin->list_item(T('Left-to-Right'), 'ltr', true);
+ $admin->list_item(T('Right-to-Left'), 'rtl');
+ $admin->row_list(T('Direction'), 'direction');
+ $admin->row_yesno(T('User Selectable'), 'userselect', true);
$admin->row_submit();
$admin->table_end();
$language =& $languageapi->objdata;
- $admin->page_start(_('Edit Language'));
+ $admin->page_start(T('Edit Language'));
$admin->form_start('language.php', 'update');
$admin->table_start();
- $admin->table_head(sprintf(_('Edit Language - %1$s'), $language['title']));
+ $admin->table_head(sprintf(T('Edit Language - %1$s'), $language['title']));
$admin->form_hidden_field('languageid', $language['languageid']);
- $admin->row_input(_('Title'), 'title', $language['title']);
- $admin->row_input(_('Gettext Language Code (<em><a href="http://www.gnu.org/software/gettext/manual/html_chapter/gettext_15.html">language</a></em>_<em><a href="http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html">COUNTRY</a></em>)'), 'langcode', $language['langcode']);
- $admin->row_input(_('Character Set'), 'charset', $language['charset']);
- $admin->list_item(_('Left-to-Right'), 'ltr', (($language['direction'] == 'ltr') ? true : false));
- $admin->list_item(_('Right-to-Left'), 'rtl', (($language['direction'] == 'rtl') ? true : false));
- $admin->row_list(_('Direction'), 'direction');
- $admin->row_yesno(_('User Selectable'), 'userselect', $language['userselect']);
+ $admin->row_input(T('Title'), 'title', $language['title']);
+ $admin->row_input(T('Gettext Language Code (<em><a href="http://www.gnu.org/software/gettext/manual/html_chapter/gettext_15.html">language</a></em>_<em><a href="http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html">COUNTRY</a></em>)'), 'langcode', $language['langcode']);
+ $admin->row_input(T('Character Set'), 'charset', $language['charset']);
+ $admin->list_item(T('Left-to-Right'), 'ltr', (($language['direction'] == 'ltr') ? true : false));
+ $admin->list_item(T('Right-to-Left'), 'rtl', (($language['direction'] == 'rtl') ? true : false));
+ $admin->row_list(T('Direction'), 'direction');
+ $admin->row_yesno(T('User Selectable'), 'userselect', $language['userselect']);
$admin->row_submit();
$admin->table_end();
NavLinks::languagesAdd();
$navigator->set_focus('link', 'options-pages-languages', 'options-pages');
- $admin->page_start(_('Manage Languages'));
+ $admin->page_start(T('Manage Languages'));
$admin->table_start();
- $admin->table_head(_('Manage Languages'), 3, 'language_manage');
+ $admin->table_head(T('Manage Languages'), 3, 'language_manage');
- $admin->table_column_head(array(_('Title'), _('Language Code / Charset'), _('Options')));
+ $admin->table_column_head(array(T('Title'), T('Language Code / Charset'), T('Options')));
$languages = $db->query("SELECT * FROM " . TABLE_PREFIX . "language ORDER BY languageid ASC");
while ($language = $db->fetch_array($languages))
$admin->row_multi_item(array(
"<a href=\"language.php?do=edit&languageid=$language[languageid]\">$language[title]</a>" => 'l',
$language['langcode'] . ' / ' . $language['charset'] => 'c',
- (($bugsys->options['defaultlanguage'] == $language['languageid']) ? '<strong>' . _('DEFAULT LANGUAGE') . '</strong> / ' : '') . ($language['userselect'] ? _('User Selectable') : _('Private')) => 'c'
+ (($bugsys->options['defaultlanguage'] == $language['languageid']) ? '<strong>' . T('DEFAULT LANGUAGE') . '</strong> / ' : '') . ($language['userselect'] ? T('User Selectable') : T('Private')) => 'c'
));
}
// define permissions as groups
$permissions = array(
- _('General Permissions') => array(
- 'canviewbugs' => _('Can View Bugs'),
- 'canviewhidden' => _('Can View All Hidden Bugs and Comments'),
- 'canviewownhidden' => _('Can View Own Hidden Bugs'),
- 'cansubscribe' => _('Can Subscribe to Bugs'),
+ T('General Permissions') => array(
+ 'canviewbugs' => T('Can View Bugs'),
+ 'canviewhidden' => T('Can View All Hidden Bugs and Comments'),
+ 'canviewownhidden' => T('Can View Own Hidden Bugs'),
+ 'cansubscribe' => T('Can Subscribe to Bugs'),
),
- _('Posting/Submitting Permissions') => array(
- 'canvote' => _('Can Vote on Polls'),
- 'cansubmitbugs' => _('Can Submit Bugs'),
- 'canpostcomments' => _('Can Post Comments'),
- 'cangetattach' => _('Can View Attachments'),
- 'canputattach' => _('Can Upload/Edit Own Attachments'),
- 'caneditattach' => _('Can Manage All Attachments')
+ T('Posting/Submitting Permissions') => array(
+ 'canvote' => T('Can Vote on Polls'),
+ 'cansubmitbugs' => T('Can Submit Bugs'),
+ 'canpostcomments' => T('Can Post Comments'),
+ 'cangetattach' => T('Can View Attachments'),
+ 'canputattach' => T('Can Upload/Edit Own Attachments'),
+ 'caneditattach' => T('Can Manage All Attachments')
),
- _('Moderation/Managment Permissions') => array(
- 'caneditown' => _('Can Edit Own Bugs'),
- 'caneditother' => _('Can Edit Others\' Bugs'),
- 'caneditownreply' => _('Can Edit Own Comments'),
- 'caneditotherreply' => _('Can Edit Others\' Comments'),
- 'canassign' => _('Can Assign Bugs'),
- 'canchangestatus' => _('Can Change Status'),
- 'candeletedata' => _('Can Delete Bugs and Comments')
+ T('Moderation/Managment Permissions') => array(
+ 'caneditown' => T('Can Edit Own Bugs'),
+ 'caneditother' => T('Can Edit Others\' Bugs'),
+ 'caneditownreply' => T('Can Edit Own Comments'),
+ 'caneditotherreply' => T('Can Edit Others\' Comments'),
+ 'canassign' => T('Can Assign Bugs'),
+ 'canchangestatus' => T('Can Change Status'),
+ 'candeletedata' => T('Can Delete Bugs and Comments')
)
);
if ($_REQUEST['do'] == 'delete')
{
- $admin->page_confirm(_('Are you sure you want to revert this permission mask?'), 'permission.php', 'kill', array('usergroupid' => $bugsys->input_clean('usergroupid', TYPE_UINT), 'productid' => $bugsys->input_clean('productid', TYPE_UINT)));
+ $admin->page_confirm(T('Are you sure you want to revert this permission mask?'), 'permission.php', 'kill', array('usergroupid' => $bugsys->input_clean('usergroupid', TYPE_UINT), 'productid' => $bugsys->input_clean('productid', TYPE_UINT)));
}
// ###################################################################
$admin->error(L_INVALID_ID);
}
- $admin->page_start(_('Edit Permissions'));
+ $admin->page_start(T('Edit Permissions'));
$admin->form_start('permission.php', 'update');
$admin->form_hidden_field('usergroupid', $usergroup['usergroupid']);
// Permission
$admin->table_start();
- $admin->table_head(sprintf(_('Permissions: %1$s - %2$s'), $usergroup['title'], $product['title']));
+ $admin->table_head(sprintf(T('Permissions: %1$s - %2$s'), $usergroup['title'], $product['title']));
foreach ($permissions AS $group => $settings)
{
if ($_REQUEST['do'] == 'modify')
{
- $admin->page_start(_('Permission Manager'));
+ $admin->page_start(T('Permission Manager'));
$admin->table_start();
- $admin->table_head(_('Permission Manager'));
+ $admin->table_head(T('Permission Manager'));
$groups = $db->query("SELECT * FROM " . TABLE_PREFIX . "usergroup ORDER BY usergroupid ASC");
while ($group = $db->fetch_array($groups))
foreach ($usergroups AS $group)
{
- $admin->row_text($group['title'], ($bugsys->in['usergroupid'] != $group['usergroupid'] ? "<a href=\"permission.php?do=modify&usergroupid=$group[usergroupid]\">[" . _('Expand') . "]</a>" : ''), 'top', 2, 'alt3');
+ $admin->row_text($group['title'], ($bugsys->in['usergroupid'] != $group['usergroupid'] ? "<a href=\"permission.php?do=modify&usergroupid=$group[usergroupid]\">[" . T('Expand') . "]</a>" : ''), 'top', 2, 'alt3');
if ($bugsys->in['usergroupid'] == $group['usergroupid'])
{
if (!isset($permissions["$product[productid]"]))
{
- $statuslink = _('Inherited From Usergroup Settings: ');
- $statuslink .= "<a href=\"permission.php?do=edit&usergroupid=$groupid&productid=$prodid\">[" . _('Customize') . ']</a>';
+ $statuslink = T('Inherited From Usergroup Settings: ');
+ $statuslink .= "<a href=\"permission.php?do=edit&usergroupid=$groupid&productid=$prodid\">[" . T('Customize') . ']</a>';
}
else
{
- $statuslink = _('Customized: ');
- $statuslink .= "<a href=\"permission.php?do=edit&usergroupid=$groupid&productid=$prodid\">[" . _('Edit') . ']</a>';
- $statuslink .= " <a href=\"permission.php?do=delete&usergroupid=$groupid&productid=$prodid\">[" . _('Revert') . ']</a>';
+ $statuslink = T('Customized: ');
+ $statuslink .= "<a href=\"permission.php?do=edit&usergroupid=$groupid&productid=$prodid\">[" . T('Edit') . ']</a>';
+ $statuslink .= " <a href=\"permission.php?do=delete&usergroupid=$groupid&productid=$prodid\">[" . T('Revert') . ']</a>';
}
$admin->row_text($product['title'], $statuslink);
if ($_REQUEST['do'] == 'delete')
{
- $admin->page_confirm(_('Are you sure you want to delete this priority? Doing so will revert all bugs to the default priority (which is set in the options panel)?'), 'priority.php', 'kill', array('priorityid' => $bugsys->input_clean('priorityid', TYPE_UINT)));
+ $admin->page_confirm(T('Are you sure you want to delete this priority? Doing so will revert all bugs to the default priority (which is set in the options panel)?'), 'priority.php', 'kill', array('priorityid' => $bugsys->input_clean('priorityid', TYPE_UINT)));
}
// ###################################################################
NavLinks::prioritiesAdd();
$navigator->set_focus('link', 'priorities-add', 'priorities');
- $admin->page_start(_('Add New Priority'));
+ $admin->page_start(T('Add New Priority'));
$admin->form_start('priority.php', 'insert');
$admin->table_start();
- $admin->table_head(_('New Priority'));
- $admin->row_input(_('Priority Title<div><dfn>The title of this priority flag (eg: `Slated for Development` or `Address Now`)</dfn></div>'), 'priority');
- $admin->row_input(_('Display Order<div><dfn>The order in which the priorities are displayed. The higher the number, the lower down in the list it is.</dfn></div>'), 'displayorder');
+ $admin->table_head(T('New Priority'));
+ $admin->row_input(T('Priority Title<div><dfn>The title of this priority flag (eg: `Slated for Development` or `Address Now`)</dfn></div>'), 'priority');
+ $admin->row_input(T('Display Order<div><dfn>The order in which the priorities are displayed. The higher the number, the lower down in the list it is.</dfn></div>'), 'displayorder');
$admin->row_submit();
$admin->table_end();
$admin->form_end();
$priority->set_condition();
$priority->fetch();
- $admin->page_start(_('Edit Priority'));
+ $admin->page_start(T('Edit Priority'));
$admin->form_start('priority.php', 'update');
$admin->form_hidden_field('priorityid', $priority->objdata['priorityid']);
$admin->table_start();
- $admin->table_head(sprintf(_('Edit Priority `%1$s` (id: %2$s)'), $priority->objdata['priority'], $priority->objdata['priorityid']));
- $admin->row_input(_('Priority Title<div><dfn>The title of this priority flag (eg: `Slated for Development` or `Address Now`)</dfn></div>'), 'priority', $priority->objdata['priority']);
- $admin->row_input(_('Display Order<div><dfn>The order in which the priorities are displayed. The higher the number, the lower down in the list it is.</dfn></div>'), 'displayorder', $priority->objdata['displayorder']);
+ $admin->table_head(sprintf(T('Edit Priority `%1$s` (id: %2$s)'), $priority->objdata['priority'], $priority->objdata['priorityid']));
+ $admin->row_input(T('Priority Title<div><dfn>The title of this priority flag (eg: `Slated for Development` or `Address Now`)</dfn></div>'), 'priority', $priority->objdata['priority']);
+ $admin->row_input(T('Display Order<div><dfn>The order in which the priorities are displayed. The higher the number, the lower down in the list it is.</dfn></div>'), 'displayorder', $priority->objdata['displayorder']);
$admin->row_submit();
$admin->table_end();
$admin->form_end();
NavLinks::prioritiesAdd();
$navigator->set_focus('link', 'fields-pages-priorities', 'fields-pages');
- $admin->page_start(_('Priority Manager'));
+ $admin->page_start(T('Priority Manager'));
$priorities = $db->query("SELECT * FROM " . TABLE_PREFIX . "priority ORDER BY displayorder");
$admin->form_start('priority.php', 'null');
$admin->table_start();
- $admin->table_head(_('Priority Manager'));
+ $admin->table_head(T('Priority Manager'));
while ($priority = $db->fetch_array($priorities))
{
- $admin->row_text("$priority[displayorder]: <a href=\"priority.php?do=edit&priorityid=$priority[priorityid]\">$priority[priority]</a>", "(priorityid: $priority[priorityid]) <a href=\"priority.php?do=edit&priorityid=$priority[priorityid]\">[" . _('Edit') . "]</a> <a href=\"priority.php?do=delete&priorityid=$priority[priorityid]\">[" . _('Delete') . "]</a>");
+ $admin->row_text("$priority[displayorder]: <a href=\"priority.php?do=edit&priorityid=$priority[priorityid]\">$priority[priority]</a>", "(priorityid: $priority[priorityid]) <a href=\"priority.php?do=edit&priorityid=$priority[priorityid]\">[" . T('Edit') . "]</a> <a href=\"priority.php?do=delete&priorityid=$priority[priorityid]\">[" . T('Delete') . "]</a>");
}
$db->free_result($priorities);
if ($edit)
{
- $opt .= '<option value="product.php?do=edit' . $type . '&' . $type_action . '=' . $id . '">' . sprintf(_('Edit %1$s'), $type_display) . '</option>';
+ $opt .= '<option value="product.php?do=edit' . $type . '&' . $type_action . '=' . $id . '">' . sprintf(T('Edit %1$s'), $type_display) . '</option>';
}
if ($delete)
{
- $opt .= '<option value="product.php?do=delete' . $type . '&' . $type_action . '=' . $id . '">' . sprintf(_('Delete %1$s'), $type_display) . '</option>';
+ $opt .= '<option value="product.php?do=delete' . $type . '&' . $type_action . '=' . $id . '">' . sprintf(T('Delete %1$s'), $type_display) . '</option>';
}
if ($addcomponent)
{
- $opt .= '<option value="product.php?do=addproduct&productid=' . $id . '">' . _('Add Component') . '</option>';
+ $opt .= '<option value="product.php?do=addproduct&productid=' . $id . '">' . T('Add Component') . '</option>';
}
if ($addversion)
{
- $opt .= '<option value="product.php?do=addversion&productid=' . $id . '">' . _('Add Version') . '</option>';
+ $opt .= '<option value="product.php?do=addversion&productid=' . $id . '">' . T('Add Version') . '</option>';
}
$type = strtolower($type);
$displayorder = (($displayorder != -1) ? '<input type="text" name="displayorder[' . $name . ']" value="' . $displayorder . '" size="4" class="input" /> ' : '');
- return $displayorder . '<select id="' . $name . '" name="' . $name . '" onchange="exec_action(\'' . $name . '\')" class="input">' . $opt . '</select> <input type="button" class="button" name="gobutton" value=" ' . _('Go') . ' " onclick="exec_action(\'' . $name . '\')" />';
+ return $displayorder . '<select id="' . $name . '" name="' . $name . '" onchange="exec_action(\'' . $name . '\')" class="input">' . $opt . '</select> <input type="button" class="button" name="gobutton" value=" ' . T('Go') . ' " onclick="exec_action(\'' . $name . '\')" />';
}
// ###################################################################
if ($_REQUEST['do'] == 'deleteversion')
{
- $admin->page_confirm(_('Are you sure you want to delete this version? Doing so will do <strong>delete all the bugs with this version</strong>.'), 'product.php', 'killversion', array('versionid' => $bugsys->input_clean('versionid', TYPE_UINT)));
+ $admin->page_confirm(T('Are you sure you want to delete this version? Doing so will do <strong>delete all the bugs with this version</strong>.'), 'product.php', 'killversion', array('versionid' => $bugsys->input_clean('versionid', TYPE_UINT)));
}
// ###################################################################
$bugsys->in['productid'] = 0;
}
- $admin->page_start(_('Add Version'));
+ $admin->page_start(T('Add Version'));
$admin->form_start('product.php', 'insertversion');
$admin->form_hidden_field('productid', $bugsys->in['productid']);
$admin->table_start();
- $admin->table_head(_('Add New Version'));
- $admin->row_input(_('Version Number<div><dfn>This is the version string for this product.</dfn></div>'), 'version');
- $admin->row_input(_('Display Order<div><dfn>The order in which the versions are displayed.</dfn></div>'), 'displayorder');
- $admin->row_yesno(_('Obsolete<div><dfn>An obsolete version cannot have new bugs filed against it, but existing ones can be set to it.</dfn></div>'), 'obsolete', false);
+ $admin->table_head(T('Add New Version'));
+ $admin->row_input(T('Version Number<div><dfn>This is the version string for this product.</dfn></div>'), 'version');
+ $admin->row_input(T('Display Order<div><dfn>The order in which the versions are displayed.</dfn></div>'), 'displayorder');
+ $admin->row_yesno(T('Obsolete<div><dfn>An obsolete version cannot have new bugs filed against it, but existing ones can be set to it.</dfn></div>'), 'obsolete', false);
$admin->row_submit();
$admin->table_end();
$admin->form_end();
{
if (empty($bugsys->in['version']))
{
- $admin->error(_('Please fill in a version number.'));
+ $admin->error(T('Please fill in a version number.'));
}
$db->query("UPDATE " . TABLE_PREFIX . "version SET version = '" . $bugsys->input_escape('version') . "', displayorder = " . $bugsys->input_clean('displayorder', TYPE_UINT) . ", obsolete = " . $bugsys->input_clean('obsolete', TYPE_UINT) . " WHERE versionid = " . $bugsys->input_clean('versionid', TYPE_UINT));
if ($_REQUEST['do'] == 'editversion')
{
- $admin->page_start(_('Edit Version'));
+ $admin->page_start(T('Edit Version'));
$version = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "version WHERE versionid = " . $bugsys->input_clean('versionid', TYPE_UINT));
if (!is_array($version))
$admin->form_start('product.php', 'updateversion');
$admin->form_hidden_field('versionid', $version['versionid']);
$admin->table_start();
- $admin->table_head(sprintf(_('Edit Version - %1$s'), $version['version']));
- $admin->row_input(_('Version Number<div><dfn>This is the version string for this product.</dfn></div>'), 'version', $version['version']);
- $admin->row_input(_('Display Order<div><dfn>The order in which the versions are displayed.</dfn></div>'), 'displayorder', $version['displayorder']);
- $admin->row_yesno(_('Obsolete<div><dfn>An obsolete version cannot have new bugs filed against it, but existing ones can be set to it.</dfn></div>'), 'obsolete', $version['obsolete']);
+ $admin->table_head(sprintf(T('Edit Version - %1$s'), $version['version']));
+ $admin->row_input(T('Version Number<div><dfn>This is the version string for this product.</dfn></div>'), 'version', $version['version']);
+ $admin->row_input(T('Display Order<div><dfn>The order in which the versions are displayed.</dfn></div>'), 'displayorder', $version['displayorder']);
+ $admin->row_yesno(T('Obsolete<div><dfn>An obsolete version cannot have new bugs filed against it, but existing ones can be set to it.</dfn></div>'), 'obsolete', $version['obsolete']);
$admin->row_submit();
$admin->table_end();
$admin->form_end();
if ($_REQUEST['do'] == 'deleteproduct')
{
- $admin->page_confirm(_('Are you sure you want to delete this product and all of it\'s versions and components <strong>and any bugs that have been assigned those products or components</strong>?'), 'product.php', 'killproduct', array('productid' => $bugsys->input_clean('productid', TYPE_UINT)));
+ $admin->page_confirm(T('Are you sure you want to delete this product and all of it\'s versions and components <strong>and any bugs that have been assigned those products or components</strong>?'), 'product.php', 'killproduct', array('productid' => $bugsys->input_clean('productid', TYPE_UINT)));
}
// ###################################################################
{
if (empty($bugsys->in['title']))
{
- $admin->error(_('Please go back and fill in the title field.'));
+ $admin->error(T('Please go back and fill in the title field.'));
}
$db->query("
}
$navigator->set_focus('link', 'products-add', 'products');
- $admin->page_start(_('Add New Product'));
+ $admin->page_start(T('Add New Product'));
$admin->form_start('product.php', 'insertproduct');
$admin->form_hidden_field('parentid', $bugsys->in['productid']);
$admin->table_start();
- $admin->table_head(_('Add Product'));
- $admin->row_input(_('Title'), 'title');
- $admin->row_textarea(_('Description<div><dfn>A short description of this product.</dfn></div>'), 'description');
- $admin->row_input(_('Display Order<div><dfn>The order in which the products are displayed.</dfn></div>'), 'displayorder');
+ $admin->table_head(T('Add Product'));
+ $admin->row_input(T('Title'), 'title');
+ $admin->row_textarea(T('Description<div><dfn>A short description of this product.</dfn></div>'), 'description');
+ $admin->row_input(T('Display Order<div><dfn>The order in which the products are displayed.</dfn></div>'), 'displayorder');
$admin->row_submit();
$admin->table_end();
$admin->form_end();
{
if (empty($bugsys->in['title']))
{
- $admin->error(_('Please go back and fill in the title field.'));
+ $admin->error(T('Please go back and fill in the title field.'));
}
if (empty($bugsys->in['productid']))
NavLinks::productsEdit($bugsys->input_clean('productid', TYPE_UINT));
$navigator->set_focus('link', 'products-edit', 'products-edit');
- $admin->page_start(_('Edit Product'));
+ $admin->page_start(T('Edit Product'));
$product = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "product WHERE productid = " . $bugsys->in['productid']);
if (!is_array($product))
$admin->form_start('product.php', 'updateproduct');
$admin->form_hidden_field('productid', $product['productid']);
$admin->table_start();
- $admin->table_head(sprintf(_('Edit Product - %1$s'), $product['title']));
- $admin->row_input(_('Title'), 'title', $product['title']);
- $admin->row_textarea(_('Description<div><dfn>A short description of this product.</dfn></div>'), 'description', $product['description']);
- $admin->row_input(_('Display Order<div><dfn>The order in which the products are displayed.</dfn></div>'), 'displayorder', $product['displayorder']);
+ $admin->table_head(sprintf(T('Edit Product - %1$s'), $product['title']));
+ $admin->row_input(T('Title'), 'title', $product['title']);
+ $admin->row_textarea(T('Description<div><dfn>A short description of this product.</dfn></div>'), 'description', $product['description']);
+ $admin->row_input(T('Display Order<div><dfn>The order in which the products are displayed.</dfn></div>'), 'displayorder', $product['displayorder']);
$admin->row_submit();
$admin->table_end();
$admin->form_end();
{
$navigator->set_focus('link', 'products-manage', 'products');
- $admin->page_start(_('Products and Versions'));
+ $admin->page_start(T('Products and Versions'));
$javascript = <<<EOF
<script type="text/javascript">
}
$admin->table_start();
- $admin->table_head(_('Products / Versions'));
+ $admin->table_head(T('Products / Versions'));
// Handle our global versions
if (is_array($versions['0']))
{
- $admin->row_text(_('Global Versions'), construct_option_list(_('Product'), 'product', -1, 0, 0, 1, 0, -1), 'middle', 2, 'alt3');
+ $admin->row_text(T('Global Versions'), construct_option_list(T('Product'), 'product', -1, 0, 0, 1, 0, -1), 'middle', 2, 'alt3');
foreach ($versions['0'] AS $version)
{
- $admin->row_text('-- ' . $version['version'], construct_option_list(_('Version'), 'version', $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2');
+ $admin->row_text('-- ' . $version['version'], construct_option_list(T('Version'), 'version', $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2');
}
}
foreach ($products AS $product)
{
// Product
- $admin->row_text("<a href=\"product.php?do=editproduct&productid=$product[productid]\">$product[title]</a>", construct_option_list(_('Product'), 'product', $product['productid'], 1, 1, 1, 1, $product['displayorder']), 'middle', 2, 'alt3');
+ $admin->row_text("<a href=\"product.php?do=editproduct&productid=$product[productid]\">$product[title]</a>", construct_option_list(T('Product'), 'product', $product['productid'], 1, 1, 1, 1, $product['displayorder']), 'middle', 2, 'alt3');
// Versions
if (is_array($versions["$product[productid]"]))
{
foreach ($versions["$product[productid]"] AS $version)
{
- $admin->row_text('-- ' . $version['version'], construct_option_list(_('Version'), 'version', $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2');
+ $admin->row_text('-- ' . $version['version'], construct_option_list(T('Version'), 'version', $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2');
}
}
{
foreach ($components["$product[productid]"] AS $comp)
{
- $admin->row_text("-- <a href=\"product.php?do=editproduct&productid=$comp[productid]\">$comp[title]</a>", construct_option_list(_('Component'), 'component', $comp['productid'], 1, 0, 1, 1, $comp['displayorder']), 'middle', 2, 'alt1');
+ $admin->row_text("-- <a href=\"product.php?do=editproduct&productid=$comp[productid]\">$comp[title]</a>", construct_option_list(T('Component'), 'component', $comp['productid'], 1, 0, 1, 1, $comp['displayorder']), 'middle', 2, 'alt1');
// Component versions
if (is_array($versions["$comp[productid]"]))
{
foreach ($versions["$comp[productid]"] AS $version)
{
- $admin->row_text('---- ' . $version['version'], construct_option_list(_('Version'), 'version', $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2');
+ $admin->row_text('---- ' . $version['version'], construct_option_list(T('Version'), 'version', $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2');
}
}
}
}
}
- $admin->row_submit(null, _('Save Display Order'), null);
+ $admin->row_submit(null, T('Save Display Order'), null);
$admin->table_end();
if ($_REQUEST['do'] == 'delete')
{
- $admin->page_confirm(_('Are you sure you want to delete this resolution? Doing so will revert all bugs to the default resolution (which is set in the options panel)?'), 'resolution.php', 'kill', array('resolutionid' => $bugsys->input_clean('resolutionid', TYPE_UINT)));
+ $admin->page_confirm(T('Are you sure you want to delete this resolution? Doing so will revert all bugs to the default resolution (which is set in the options panel)?'), 'resolution.php', 'kill', array('resolutionid' => $bugsys->input_clean('resolutionid', TYPE_UINT)));
}
// ###################################################################
NavLinks::resolutionsAdd();
$navigator->set_focus('link', 'resolutions-add', 'resolutions');
- $admin->page_start(_('Add New Resolution'));
+ $admin->page_start(T('Add New Resolution'));
$admin->form_start('resolution.php', 'insert');
$admin->table_start();
- $admin->table_head(_('New Resolution'));
- $admin->row_input(_('Resolution Title<div><dfn>The title of this resolution flag (eg: `Fixed` or `Bogus`)</dfn></div>'), 'resolution');
- $admin->row_input(_('Display Order<div><dfn>The order in which the resolutions are displayed. The higher the number, the lower down in the list it is.</dfn></div>'), 'displayorder');
+ $admin->table_head(T('New Resolution'));
+ $admin->row_input(T('Resolution Title<div><dfn>The title of this resolution flag (eg: `Fixed` or `Bogus`)</dfn></div>'), 'resolution');
+ $admin->row_input(T('Display Order<div><dfn>The order in which the resolutions are displayed. The higher the number, the lower down in the list it is.</dfn></div>'), 'displayorder');
$admin->row_submit();
$admin->table_end();
$admin->form_end();
$resolution->set_condition();
$resolution->fetch();
- $admin->page_start(_('Edit Resolution'));
+ $admin->page_start(T('Edit Resolution'));
$admin->form_start('resolution.php', 'update');
$admin->form_hidden_field('resolutionid', $resolution->objdata['resolutionid']);
$admin->table_start();
- $admin->table_head(sprintf(_('Edit Resolution - %1$s (id: %2$s)'), $resolution->objdata['resolution'], $resolution->objdata['resolutionid']));
- $admin->row_input(_('Resolution Title<div><dfn>The title of this resolution flag (eg: `Fixed` or `Bogus`)</dfn></div>'), 'resolution', $resolution->objdata['resolution']);
- $admin->row_input(_('Display Order<div><dfn>The order in which the resolutions are displayed. The higher the number, the lower down in the list it is.</dfn></div>'), 'displayorder', $resolution->objdata['displayorder']);
+ $admin->table_head(sprintf(T('Edit Resolution - %1$s (id: %2$s)'), $resolution->objdata['resolution'], $resolution->objdata['resolutionid']));
+ $admin->row_input(T('Resolution Title<div><dfn>The title of this resolution flag (eg: `Fixed` or `Bogus`)</dfn></div>'), 'resolution', $resolution->objdata['resolution']);
+ $admin->row_input(T('Display Order<div><dfn>The order in which the resolutions are displayed. The higher the number, the lower down in the list it is.</dfn></div>'), 'displayorder', $resolution->objdata['displayorder']);
$admin->row_submit();
$admin->table_end();
$admin->form_end();
NavLinks::resolutionsAdd();
$navigator->set_focus('link', 'fields-pages-resolutions', 'fields-pages');
- $admin->page_start(_('Resolution Manager'));
+ $admin->page_start(T('Resolution Manager'));
$resolutions = $db->query("SELECT * FROM " . TABLE_PREFIX . "resolution ORDER BY displayorder");
$admin->form_start('resolution.php', 'null');
$admin->table_start();
- $admin->table_head(_('Resolution Manager'));
+ $admin->table_head(T('Resolution Manager'));
while ($resolution = $db->fetch_array($resolutions))
{
- $admin->row_text("$resolution[displayorder]: <a href=\"resolution.php?do=edit&resolutionid=$resolution[resolutionid]\">$resolution[resolution]</a>", "(resolutionid: $resolution[resolutionid]) <a href=\"resolution.php?do=edit&resolutionid=$resolution[resolutionid]\">[" . _('Edit') . "]</a> <a href=\"resolution.php?do=delete&resolutionid=$resolution[resolutionid]\">[" . _('Delete') . "]</a>");
+ $admin->row_text("$resolution[displayorder]: <a href=\"resolution.php?do=edit&resolutionid=$resolution[resolutionid]\">$resolution[resolution]</a>", "(resolutionid: $resolution[resolutionid]) <a href=\"resolution.php?do=edit&resolutionid=$resolution[resolutionid]\">[" . T('Edit') . "]</a> <a href=\"resolution.php?do=delete&resolutionid=$resolution[resolutionid]\">[" . T('Delete') . "]</a>");
}
$db->free_result($resolutions);
if ($_REQUEST['do'] == 'modify')
{
- $admin->page_start(_('Settings'));
+ $admin->page_start(T('Settings'));
$admin->form_start('setting.php', 'update');
// ###################################################################
$admin->table_start();
- $admin->table_head(_('General Options'));
+ $admin->table_head(T('General Options'));
// authmethod
- $admin->row_span(_('Authentication Method'), 'thead');
+ $admin->row_span(T('Authentication Method'), 'thead');
$methods = $funct->scandir('./includes/auth/');
foreach ($methods[''] AS $path)
{
$admin->list_item(ucwords(str_replace('_', ' ', $matches[1])), $matches[1], ($matches[1] == $bugsys->options['authmethod']));
}
}
- $admin->row_list(_('The authentication class to use to validate cookie data and longins. You may need to edit the actual file for certain authentication systems.'), 'setting[authmethod]');
+ $admin->row_list(T('The authentication class to use to validate cookie data and longins. You may need to edit the actual file for certain authentication systems.'), 'setting[authmethod]');
// allownewreg
- $admin->row_span(_('Allow New Registrations'), 'thead');
- $admin->row_yesno(_('If this is set to <em>yes</em>, then new users will be allowed to register.'), 'setting[allownewreg]', $bugsys->options['allownewreg']);
+ $admin->row_span(T('Allow New Registrations'), 'thead');
+ $admin->row_yesno(T('If this is set to <em>yes</em>, then new users will be allowed to register.'), 'setting[allownewreg]', $bugsys->options['allownewreg']);
// verifyemail
- $admin->row_span(_('Require Activation Email'), 'thead');
- $admin->row_yesno(_('Setting this to yes will force all new users to verify their account with an email activation link.'), 'setting[verifyemail]', $bugsys->options['verifyemail']);
+ $admin->row_span(T('Require Activation Email'), 'thead');
+ $admin->row_yesno(T('Setting this to yes will force all new users to verify their account with an email activation link.'), 'setting[verifyemail]', $bugsys->options['verifyemail']);
// moderatenewusers
- $admin->row_span(_('Moderate New Users'), 'thead');
- $admin->row_yesno(_('All new users will have to be approved by the administration before being able to have normal user rights.'), 'setting[moderatenewusers]', $bugsys->options['moderatenewusers']);
+ $admin->row_span(T('Moderate New Users'), 'thead');
+ $admin->row_yesno(T('All new users will have to be approved by the administration before being able to have normal user rights.'), 'setting[moderatenewusers]', $bugsys->options['moderatenewusers']);
// sendwelcomemail
- $admin->row_span(_('Send New Use Welcome Email'), 'thead');
- $admin->row_yesno(_('Setting this option to <em>yes</em> will send each new verified user a welcome email.'), 'setting[sendwelcomemail]', $bugsys->options['sendwelcomemail']);
+ $admin->row_span(T('Send New Use Welcome Email'), 'thead');
+ $admin->row_yesno(T('Setting this option to <em>yes</em> will send each new verified user a welcome email.'), 'setting[sendwelcomemail]', $bugsys->options['sendwelcomemail']);
// webmasteremail
- $admin->row_span(_('Webmaster Email Address'), 'thead');
- $admin->row_input(_('The email address from which emails will be sent out.'), 'setting[webmasteremail]', $bugsys->options['webmasteremail']);
+ $admin->row_span(T('Webmaster Email Address'), 'thead');
+ $admin->row_input(T('The email address from which emails will be sent out.'), 'setting[webmasteremail]', $bugsys->options['webmasteremail']);
// trackertitle
- $admin->row_span(_('Tracker Title'), 'thead');
- $admin->row_input(_('The global name of the bug tracker. Example: Blue Static Bug Tracker'), 'setting[trackertitle]', $bugsys->options['trackertitle']);
+ $admin->row_span(T('Tracker Title'), 'thead');
+ $admin->row_input(T('The global name of the bug tracker. Example: Blue Static Bug Tracker'), 'setting[trackertitle]', $bugsys->options['trackertitle']);
// trackerurl
- $admin->row_span(_('Tracker Base URL'), 'thead');
- $admin->row_input(_('The base URL of the tracker. This is used when creating external links to the tracker. <strong>Be sure that this does not end in a trailing slash ("/").</strong><br />Example: http://www.bluestatic.org/bugs'), 'setting[trackerurl]', $bugsys->options['trackerurl']);
+ $admin->row_span(T('Tracker Base URL'), 'thead');
+ $admin->row_input(T('The base URL of the tracker. This is used when creating external links to the tracker. <strong>Be sure that this does not end in a trailing slash ("/").</strong><br />Example: http://www.bluestatic.org/bugs'), 'setting[trackerurl]', $bugsys->options['trackerurl']);
// dateformat
- $admin->row_span(_('Date Format'), 'thead');
- $admin->row_input(_('Set the date format used for bug report and comment information. This is based on PHP\'s date() function.'), 'setting[dateformat]', $bugsys->options['dateformat']);
+ $admin->row_span(T('Date Format'), 'thead');
+ $admin->row_input(T('Set the date format used for bug report and comment information. This is based on PHP\'s date() function.'), 'setting[dateformat]', $bugsys->options['dateformat']);
// defaulttimezone
- $admin->row_span(_('Default Time Zone'), 'thead');
- $admin->row_text(_('This controls the time zone that all unregistered users view the tracker with.'), construct_option_select('setting[defaulttimezone]', $bugsys->datef->fetch_timezone_list(), $bugsys->options['defaulttimezone']), $bugsys->options['defaulttimezone']);
+ $admin->row_span(T('Default Time Zone'), 'thead');
+ $admin->row_text(T('This controls the time zone that all unregistered users view the tracker with.'), construct_option_select('setting[defaulttimezone]', $bugsys->datef->fetch_timezone_list(), $bugsys->options['defaulttimezone']), $bugsys->options['defaulttimezone']);
// defaultlanguage
- $admin->row_span(_('Default Language'), 'thead');
- $admin->row_text(_('You can set the default language that all new users (and guests) will use.'), construct_option_select('setting[defaultlanguage]', $bugsys->datastore['language'], $bugsys->options['defaultlanguage'], 'languageid', 'title'), $bugsys->options['defaultlanguage']);
+ $admin->row_span(T('Default Language'), 'thead');
+ $admin->row_text(T('You can set the default language that all new users (and guests) will use.'), construct_option_select('setting[defaultlanguage]', $bugsys->datastore['language'], $bugsys->options['defaultlanguage'], 'languageid', 'title'), $bugsys->options['defaultlanguage']);
// syndicateditems
- $admin->row_span(_('Number of Syndicated Items'), 'thead');
- $admin->row_input(_('The number of bugs to be syndicated at any one time by the Atom XML feed.'), 'setting[syndicateditems]', $bugsys->options['syndicateditems']);
+ $admin->row_span(T('Number of Syndicated Items'), 'thead');
+ $admin->row_input(T('The number of bugs to be syndicated at any one time by the Atom XML feed.'), 'setting[syndicateditems]', $bugsys->options['syndicateditems']);
// redirectheaders
- $admin->row_span(_('Use Header Redirects'), 'thead');
- $admin->row_yesno(_('Instead of displaying an intermediate page informing the user that their action was a success and a redirect is occurring, just send the user to the next screen using HTTP headers. This can save bandwidth.'), 'setting[redirectheaders]', $bugsys->options['redirectheaders']);
+ $admin->row_span(T('Use Header Redirects'), 'thead');
+ $admin->row_yesno(T('Instead of displaying an intermediate page informing the user that their action was a success and a redirect is occurring, just send the user to the next screen using HTTP headers. This can save bandwidth.'), 'setting[redirectheaders]', $bugsys->options['redirectheaders']);
$admin->table_end();
// ###################################################################
$admin->table_start();
- $admin->table_head(_('Bug Reporting Options'));
+ $admin->table_head(T('Bug Reporting Options'));
// allowhtml
- $admin->row_span(_('Allow HTML in Bug Reports'), 'thead');
- $admin->row_yesno(_('Set this to <em>yes</em> if you want to allow users to post raw HTML in their bug reports. This is <strong>very</strong> dangerous and it is not recommended.'), 'setting[allowhtml]', $bugsys->options['allowhtml']);
+ $admin->row_span(T('Allow HTML in Bug Reports'), 'thead');
+ $admin->row_yesno(T('Set this to <em>yes</em> if you want to allow users to post raw HTML in their bug reports. This is <strong>very</strong> dangerous and it is not recommended.'), 'setting[allowhtml]', $bugsys->options['allowhtml']);
// defaultseverity
- $admin->row_span(_('Default Severity'), 'thead');
- $admin->row_text(_('The default severity that is selected when creating a new bug report.'), construct_option_select('setting[defaultseverity]', $bugsys->datastore['severity'], $bugsys->options['defaultseverity'], 'severityid', 'severity'));
+ $admin->row_span(T('Default Severity'), 'thead');
+ $admin->row_text(T('The default severity that is selected when creating a new bug report.'), construct_option_select('setting[defaultseverity]', $bugsys->datastore['severity'], $bugsys->options['defaultseverity'], 'severityid', 'severity'));
// defaultpriority
- $admin->row_span(_('Default Priority'), 'thead');
- $admin->row_text(_('The default priority that will be selected when creating a new bug report. Depending on your permission setup, the user may not be able to set this in a new report so this will act as the value.'), construct_option_select('setting[defaultpriority]', $bugsys->datastore['priority'], $bugsys->options['defaultpriority'], 'priorityid', 'priority'));
+ $admin->row_span(T('Default Priority'), 'thead');
+ $admin->row_text(T('The default priority that will be selected when creating a new bug report. Depending on your permission setup, the user may not be able to set this in a new report so this will act as the value.'), construct_option_select('setting[defaultpriority]', $bugsys->datastore['priority'], $bugsys->options['defaultpriority'], 'priorityid', 'priority'));
// defaultstatus
- $admin->row_span(_('Default Status'), 'thead');
- $admin->row_text(_('The default default that is selected when creating a new bug report. If a user can not assign a status, this will be the one inserted into the database.'), construct_option_select('setting[defaultstatus]', $bugsys->datastore['status'], $bugsys->options['defaultstatus'], 'statusid', 'status'));
+ $admin->row_span(T('Default Status'), 'thead');
+ $admin->row_text(T('The default default that is selected when creating a new bug report. If a user can not assign a status, this will be the one inserted into the database.'), construct_option_select('setting[defaultstatus]', $bugsys->datastore['status'], $bugsys->options['defaultstatus'], 'statusid', 'status'));
// defaultresolve
- $admin->row_span(_('Default Resolution'), 'thead');
- $admin->row_text(_('This is the default bug resolution. If a user is not able to change this field, setting this will act as the default value.'), construct_option_select('setting[defaultresolve]', $bugsys->datastore['resolution'], $bugsys->options['defaultresolve'], 'resolutionid', 'resolution'));
+ $admin->row_span(T('Default Resolution'), 'thead');
+ $admin->row_text(T('This is the default bug resolution. If a user is not able to change this field, setting this will act as the default value.'), construct_option_select('setting[defaultresolve]', $bugsys->datastore['resolution'], $bugsys->options['defaultresolve'], 'resolutionid', 'resolution'));
// defaultassign
- $admin->row_span(_('Default Bug Assignment'), 'thead');
- $admin->row_text(_('This is the default developer new bugs will be assigned to. If a user does not have permisssion to assign bugs, this will be the default. If you don\'t want any default assignment, leave this as <em>Not Selected</em>.'), construct_option_select('setting[defaultassign]', $bugsys->datastore['assignto'], $bugsys->options['defaultassign'], 'userid', 'displayname', 0));
+ $admin->row_span(T('Default Bug Assignment'), 'thead');
+ $admin->row_text(T('This is the default developer new bugs will be assigned to. If a user does not have permisssion to assign bugs, this will be the default. If you don\'t want any default assignment, leave this as <em>Not Selected</em>.'), construct_option_select('setting[defaultassign]', $bugsys->datastore['assignto'], $bugsys->options['defaultassign'], 'userid', 'displayname', 0));
// defaultcomment
- $admin->row_span(_('Default Comment Text'), 'thead');
- $admin->row_textarea(_('If you wish to set a template for entering the initial comment of a bug report, then you may specify this here. However, the template will only take effect on the initial report/comment. Note: the template cannot be forced on the user as there is no way to validate it.'), 'setting[defaultcomment]', $bugsys->options['defaultcomment']);
+ $admin->row_span(T('Default Comment Text'), 'thead');
+ $admin->row_textarea(T('If you wish to set a template for entering the initial comment of a bug report, then you may specify this here. However, the template will only take effect on the initial report/comment. Note: the template cannot be forced on the user as there is no way to validate it.'), 'setting[defaultcomment]', $bugsys->options['defaultcomment']);
$admin->table_end();
// ###################################################################
$admin->table_start();
- $admin->table_head(_('Bug Listing Display Options'));
+ $admin->table_head(T('Bug Listing Display Options'));
// hidestatuses
- $admin->row_span(_('Hide Statuses on Bug Listings'), 'thead');
- $admin->row_text(_('Here you can specify which statuses to hide on the bug list displays. Users have options in their controls to change this from these values, and this does not affect searches or the favorites list.'), construct_option_select('setting[hidestatuses]', $bugsys->datastore['status'], $bugsys->options['hidestatuses'], 'statusid', 'status', 0, true));
+ $admin->row_span(T('Hide Statuses on Bug Listings'), 'thead');
+ $admin->row_text(T('Here you can specify which statuses to hide on the bug list displays. Users have options in their controls to change this from these values, and this does not affect searches or the favorites list.'), construct_option_select('setting[hidestatuses]', $bugsys->datastore['status'], $bugsys->options['hidestatuses'], 'statusid', 'status', 0, true));
// defaultsortkey
- $admin->row_span(_('Default Sort Column'), 'thead');
- $admin->row_text(_('Select the column to sort bugs by on listings. This is only a default setting which users can override in their preferences.'), construct_option_select('setting[defaultsortkey]', ListSorter::fetch_by_text(false), $bugsys->options['defaultsortkey']));
+ $admin->row_span(T('Default Sort Column'), 'thead');
+ $admin->row_text(T('Select the column to sort bugs by on listings. This is only a default setting which users can override in their preferences.'), construct_option_select('setting[defaultsortkey]', ListSorter::fetch_by_text(false), $bugsys->options['defaultsortkey']));
// defaultsortas
- $admin->row_span(_('Default Sort Direction'), 'thead');
- $admin->row_text(_('Specify the default direction to sort bugs in the selected column. This works with and follows the same rules as the Sort Column.'), construct_option_select('setting[defaultsortas]', ListSorter::fetch_as_text(false), $bugsys->options['defaultsortas']));
+ $admin->row_span(T('Default Sort Direction'), 'thead');
+ $admin->row_text(T('Specify the default direction to sort bugs in the selected column. This works with and follows the same rules as the Sort Column.'), construct_option_select('setting[defaultsortas]', ListSorter::fetch_as_text(false), $bugsys->options['defaultsortas']));
// columnoptions
- $admin->row_span(_('Default Column Ordering Options'), 'thead');
- $admin->row_text(_('Specify the order of the columns for bug listings. The value 0 disables the display of a column and if two or more columns have the same position number, they will be displayed in the same column.'), ConstructColumnOptionsSetting());
+ $admin->row_span(T('Default Column Ordering Options'), 'thead');
+ $admin->row_text(T('Specify the order of the columns for bug listings. The value 0 disables the display of a column and if two or more columns have the same position number, they will be displayed in the same column.'), ConstructColumnOptionsSetting());
$admin->table_end();
// ###################################################################
$admin->table_start();
- $admin->table_head(_('Pagination Options'));
+ $admin->table_head(T('Pagination Options'));
// defaultpp
- $admin->row_span(_('Default Per-Page Amount'), 'thead');
- $admin->row_input(_('The number of items (e.g. bugs) to be displayed on a page by default. The user will have the option of over-riding these values.'), 'setting[defaultpp]', $bugsys->options['defaultpp']);
+ $admin->row_span(T('Default Per-Page Amount'), 'thead');
+ $admin->row_input(T('The number of items (e.g. bugs) to be displayed on a page by default. The user will have the option of over-riding these values.'), 'setting[defaultpp]', $bugsys->options['defaultpp']);
// maxpp
- $admin->row_span(_('Maximum Per-Page Value'), 'thead');
- $admin->row_input(_('To prevent your server from experiencing load problems, set the maximum per page limit. Specifying a value here will make sure any user-entered value will not be higher than this, preventing server load problems.'), 'setting[maxpp]', $bugsys->options['maxpp']);
+ $admin->row_span(T('Maximum Per-Page Value'), 'thead');
+ $admin->row_input(T('To prevent your server from experiencing load problems, set the maximum per page limit. Specifying a value here will make sure any user-entered value will not be higher than this, preventing server load problems.'), 'setting[maxpp]', $bugsys->options['maxpp']);
// pagelinks
- $admin->row_span(_('Number of Page Links'), 'thead');
- $admin->row_input(_('The number of pages that will appear in the page navigation system on either side of the current page. Set this to 0 to display all pages.'), 'setting[pagelinks]', $bugsys->options['pagelinks']);
+ $admin->row_span(T('Number of Page Links'), 'thead');
+ $admin->row_input(T('The number of pages that will appear in the page navigation system on either side of the current page. Set this to 0 to display all pages.'), 'setting[pagelinks]', $bugsys->options['pagelinks']);
$admin->table_end();
// trackerversion
$admin->row_span('Version Number', 'thead');
$admin->row_input('Version Number', 'setting[trackerversion]', $bugsys->options['trackerversion']);
+
+ $admin->row_span('Custom Gettext Localizer', 'thead');
+ $admin->row_yesno('Use the custom MOReader implementation rather than the built-in Gettext extension.', 'setting[devgettext]', $bugsys->options['devgettext']);
}
// ###################################################################
if ($_REQUEST['do'] == 'delete')
{
- $admin->page_confirm(_('Are you sure you want to delete this severity? Doing so will revert all bugs to the default severity (which is set in the options panel)?'), 'severity.php', 'kill', array('severityid' => $bugsys->input_clean('severityid', TYPE_UINT)));
+ $admin->page_confirm(T('Are you sure you want to delete this severity? Doing so will revert all bugs to the default severity (which is set in the options panel)?'), 'severity.php', 'kill', array('severityid' => $bugsys->input_clean('severityid', TYPE_UINT)));
}
// ###################################################################
NavLinks::severitiesAdd();
$navigator->set_focus('link', 'severities-add', 'severities');
- $admin->page_start(_('Add New Severity'));
+ $admin->page_start(T('Add New Severity'));
$admin->form_start('severity.php', 'insert');
$admin->table_start();
- $admin->table_head(_('New Severity'));
- $admin->row_input(_('Severity Title<div><dfn>The title of this severity flag (eg: `Major` or `Critical`)</dfn></div>'), 'severity');
- $admin->row_input(_('Display Order<div><dfn>The order in which the severities are displayed. The higher the number, the lower down in the list it is.</dfn></div>'), 'displayorder');
+ $admin->table_head(T('New Severity'));
+ $admin->row_input(T('Severity Title<div><dfn>The title of this severity flag (eg: `Major` or `Critical`)</dfn></div>'), 'severity');
+ $admin->row_input(T('Display Order<div><dfn>The order in which the severities are displayed. The higher the number, the lower down in the list it is.</dfn></div>'), 'displayorder');
$admin->row_submit();
$admin->table_end();
$admin->form_end();
$severity->set_condition();
$severity->fetch();
- $admin->page_start(_('Edit Severity'));
+ $admin->page_start(T('Edit Severity'));
$admin->form_start('severity.php', 'update');
$admin->form_hidden_field('severityid', $severity->objdata['severityid']);
$admin->table_start();
- $admin->table_head(sprintf(_('Edit Severity - %1$s (id: %2$s)'), $severity->objdata['severity'], $severity->objdata['severityid']));
- $admin->row_input(_('Severity Title<div><dfn>The title of this severity flag (eg: `Major` or `Critical`)</dfn></div>'), 'severity', $severity->objdata['severity']);
- $admin->row_input(_('Display Order<div><dfn>The order in which the severities are displayed. The higher the number, the lower down in the list it is.</dfn></div>'), 'displayorder', $severity->objdata['displayorder']);
+ $admin->table_head(sprintf(T('Edit Severity - %1$s (id: %2$s)'), $severity->objdata['severity'], $severity->objdata['severityid']));
+ $admin->row_input(T('Severity Title<div><dfn>The title of this severity flag (eg: `Major` or `Critical`)</dfn></div>'), 'severity', $severity->objdata['severity']);
+ $admin->row_input(T('Display Order<div><dfn>The order in which the severities are displayed. The higher the number, the lower down in the list it is.</dfn></div>'), 'displayorder', $severity->objdata['displayorder']);
$admin->row_submit();
$admin->table_end();
$admin->form_end();
NavLinks::severitiesAdd();
$navigator->set_focus('link', 'fields-pages-severities', 'fields-pages');
- $admin->page_start(_('Severity Manager'));
+ $admin->page_start(T('Severity Manager'));
$severities = $db->query("SELECT * FROM " . TABLE_PREFIX . "severity ORDER BY displayorder");
$admin->form_start('severity.php', 'null');
$admin->table_start();
- $admin->table_head(_('Severity Manager'));
+ $admin->table_head(T('Severity Manager'));
while ($severity = $db->fetch_array($severities))
{
- $admin->row_text("$severity[displayorder]: <a href=\"severity.php?do=edit&severityid=$severity[severityid]\">$severity[severity]</a>", "(severityid: $severity[severityid]) <a href=\"severity.php?do=edit&severityid=$severity[severityid]\">[" . _('Edit') . "]</a> <a href=\"severity.php?do=delete&severityid=$severity[severityid]\">[" . _('Delete') . "]</a>");
+ $admin->row_text("$severity[displayorder]: <a href=\"severity.php?do=edit&severityid=$severity[severityid]\">$severity[severity]</a>", "(severityid: $severity[severityid]) <a href=\"severity.php?do=edit&severityid=$severity[severityid]\">[" . T('Edit') . "]</a> <a href=\"severity.php?do=delete&severityid=$severity[severityid]\">[" . T('Delete') . "]</a>");
}
$db->free_result($severities);
if ($_REQUEST['do'] == 'delete')
{
- $admin->page_confirm(_('Are you sure you want to delete this status? Doing so will revert all bugs to the default status (which is set in the options panel)?'), 'status.php', 'kill', array('statusid' => $bugsys->input_clean('statusid', TYPE_UINT)));
+ $admin->page_confirm(T('Are you sure you want to delete this status? Doing so will revert all bugs to the default status (which is set in the options panel)?'), 'status.php', 'kill', array('statusid' => $bugsys->input_clean('statusid', TYPE_UINT)));
}
// ###################################################################
NavLinks::statusesAdd();
$navigator->set_focus('link', 'statuses-add', 'statuses');
- $admin->page_start(_('Add New Status'));
+ $admin->page_start(T('Add New Status'));
$admin->form_start('status.php', 'insert');
$admin->table_start();
- $admin->table_head(_('New Status'));
- $admin->row_input(_('Status Title<div><dfn>The title of this status flag (eg: `Confirmed` or `Closed (Fixed)`)</dfn></div>'), 'status');
- $admin->row_input(_('Display Order<div><dfn>The order in which the statuses ar displayed.</dfn></div>'), 'displayorder');
- $admin->row_input(_('Status Color<div><dfn>The color of the status. This will be displayed on bug listings page to make viewing easier. Note: you must enter the # sign if you are using HEX values.</dfn></div>'), 'color');
+ $admin->table_head(T('New Status'));
+ $admin->row_input(T('Status Title<div><dfn>The title of this status flag (eg: `Confirmed` or `Closed (Fixed)`)</dfn></div>'), 'status');
+ $admin->row_input(T('Display Order<div><dfn>The order in which the statuses ar displayed.</dfn></div>'), 'displayorder');
+ $admin->row_input(T('Status Color<div><dfn>The color of the status. This will be displayed on bug listings page to make viewing easier. Note: you must enter the # sign if you are using HEX values.</dfn></div>'), 'color');
$admin->row_submit();
$admin->table_end();
$admin->form_end();
$status->set_condition();
$status->fetch();
- $admin->page_start(_('Edit Status'));
+ $admin->page_start(T('Edit Status'));
$admin->form_start('status.php', 'update');
$admin->form_hidden_field('statusid', $status->objdata['statusid']);
$admin->table_start();
- $admin->table_head(sprintf(_('Edit Status - %1$s (id: %2$s)'), $status->objdata['status'], $status->objdata['statusid']));
- $admin->row_input(_('Status Title<div><dfn>The title of this status flag (eg: `Confirmed` or `Closed (Fixed)`)</dfn></div>'), 'status', $status->objdata['status']);
- $admin->row_input(_('Display Order<div><dfn>The order in which the statuses ar displayed.</dfn></div>'), 'displayorder', $status->objdata['displayorder']);
- $admin->row_input(_('Status Color<div><dfn>The color of the status. This will be displayed on bug listings page to make viewing easier. Note: you must enter the # sign if you are using HEX values.</dfn></div>'), 'color', $status->objdata['color']);
+ $admin->table_head(sprintf(T('Edit Status - %1$s (id: %2$s)'), $status->objdata['status'], $status->objdata['statusid']));
+ $admin->row_input(T('Status Title<div><dfn>The title of this status flag (eg: `Confirmed` or `Closed (Fixed)`)</dfn></div>'), 'status', $status->objdata['status']);
+ $admin->row_input(T('Display Order<div><dfn>The order in which the statuses ar displayed.</dfn></div>'), 'displayorder', $status->objdata['displayorder']);
+ $admin->row_input(T('Status Color<div><dfn>The color of the status. This will be displayed on bug listings page to make viewing easier. Note: you must enter the # sign if you are using HEX values.</dfn></div>'), 'color', $status->objdata['color']);
$admin->row_submit();
$admin->table_end();
$admin->form_end();
NavLinks::statusesAdd();
$navigator->set_focus('link', 'fields-pages-statuses', 'fields-pages');
- $admin->page_start(_('Status Manager'));
+ $admin->page_start(T('Status Manager'));
$statuses = $db->query("SELECT * FROM " . TABLE_PREFIX . "status");
$admin->table_start();
- $admin->table_head(_('Status Manager'));
+ $admin->table_head(T('Status Manager'));
while ($status = $db->fetch_array($statuses))
{
$colorblock = '<span style="float: right"><div style="height: 12px; width: 12px; background-color: ' . $status['color'] . '; border: 1px black solid"></div></span>';
- $admin->row_text("$colorblock$status[displayorder]: <a href=\"status.php?do=edit&statusid=$status[statusid]\">$status[status]</a>", "(statusid: $status[statusid]) <a href=\"status.php?do=edit&statusid=$status[statusid]\">[" . _('Edit') . "]</a> <a href=\"status.php?do=delete&statusid=$status[statusid]\">[" . _('Delete') . "]</a>");
+ $admin->row_text("$colorblock$status[displayorder]: <a href=\"status.php?do=edit&statusid=$status[statusid]\">$status[status]</a>", "(statusid: $status[statusid]) <a href=\"status.php?do=edit&statusid=$status[statusid]\">[" . T('Edit') . "]</a> <a href=\"status.php?do=delete&statusid=$status[statusid]\">[" . T('Delete') . "]</a>");
}
$db->free_result($statuses);
if ($_REQUEST['do'] == 'delete')
{
- $admin->page_confirm(_('Are you sure you want to delete this user?'), 'user.php', 'kill', array('userid' => $bugsys->input_clean('userid', TYPE_UINT)));
+ $admin->page_confirm(T('Are you sure you want to delete this user?'), 'user.php', 'kill', array('userid' => $bugsys->input_clean('userid', TYPE_UINT)));
}
// ###################################################################
$navigator->set_focus('link', 'users-add', 'users');
}
- $admin->page_start(($add ? _('Add User') : _('Edit User')));
+ $admin->page_start(($add ? T('Add User') : T('Edit User')));
$admin->form_start('user.php', ($add ? 'insert' : 'update'));
$admin->table_start();
- $admin->table_head(($add ? _('Add User') : sprintf(_('Edit User (userid: %1$s)'), $user->objdata['userid'])));
+ $admin->table_head(($add ? T('Add User') : sprintf(T('Edit User (userid: %1$s)'), $user->objdata['userid'])));
- $admin->row_input(_('Display Name'), 'displayname', $user->objdata['displayname']);
- $admin->row_input(_('Email'), 'email', $user->objdata['email']);
- $admin->row_input(($add ? _('Password') : _('Password (Leave blank for no change)')), 'password');
+ $admin->row_input(T('Display Name'), 'displayname', $user->objdata['displayname']);
+ $admin->row_input(T('Email'), 'email', $user->objdata['email']);
+ $admin->row_input(($add ? T('Password') : T('Password (Leave blank for no change)')), 'password');
foreach ($bugsys->datastore['usergroup'] AS $group)
{
$admin->list_item($group['title'], $group['usergroupid'], ($user->objdata['usergroupid'] == $group['usergroupid']));
}
- $admin->row_list(_('Primary Usergroup'), 'usergroupid');
+ $admin->row_list(T('Primary Usergroup'), 'usergroupid');
$ids = explode(',', $user->objdata['groupids']);
foreach ($bugsys->datastore['usergroup'] AS $id => $group)
}
$admin->list_item($group['title'], $group['usergroupid'], in_array($id, $ids));
}
- $admin->row_checkbox(_('Secondary Usergroups'), 'groupids');
+ $admin->row_checkbox(T('Secondary Usergroups'), 'groupids');
- $admin->row_yesno(_('Show Email Publicly'), 'showemail', $user->objdata['showemail']);
- $admin->row_yesno(_('Show Status Colors on Bug Listings'), 'showcolors', $user->objdata['showcolors']);
+ $admin->row_yesno(T('Show Email Publicly'), 'showemail', $user->objdata['showemail']);
+ $admin->row_yesno(T('Show Status Colors on Bug Listings'), 'showcolors', $user->objdata['showcolors']);
foreach ($bugsys->datastore['language'] AS $language)
{
$admin->list_item($language['title'], $language['languageid'], ($user->objdata['languageid'] == $language['languageid']));
}
- $admin->row_list(_('Language'), 'languageid');
+ $admin->row_list(T('Language'), 'languageid');
foreach ($datef->fetch_timezone_list() AS $value => $string)
{
$admin->list_item($string, $value, ($user->objdata['timezone'] == $value));
}
- $admin->row_list(_('Timezone'), 'timezone');
+ $admin->row_list(T('Timezone'), 'timezone');
- $admin->row_yesno(_('Observe Daylight Savings Time (DST)'), 'usedst', $user->objdata['usedst']);
- $admin->row_text(_('Hidden Statuses on Bug Listing'), construct_option_select('hidestatuses', $bugsys->datastore['status'], $user->objdata['hidestatuses'], 'statusid', 'status', 0, true));
- $admin->row_text(_('Default Sort Order Column'), construct_option_select('defaultsortkey', ListSorter::fetch_by_text(false), $user->objdata['defaultsortkey']));
- $admin->row_text(_('Default Sort Order Direction'), construct_option_select('defaultsortas', ListSorter::fetch_as_text(false), $user->objdata['defaultsortas']));
+ $admin->row_yesno(T('Observe Daylight Savings Time (DST)'), 'usedst', $user->objdata['usedst']);
+ $admin->row_text(T('Hidden Statuses on Bug Listing'), construct_option_select('hidestatuses', $bugsys->datastore['status'], $user->objdata['hidestatuses'], 'statusid', 'status', 0, true));
+ $admin->row_text(T('Default Sort Order Column'), construct_option_select('defaultsortkey', ListSorter::fetch_by_text(false), $user->objdata['defaultsortkey']));
+ $admin->row_text(T('Default Sort Order Direction'), construct_option_select('defaultsortas', ListSorter::fetch_as_text(false), $user->objdata['defaultsortas']));
$admin->table_end();
// -------------------------------------------------------------------
$admin->table_start(false);
- $admin->table_head(_('Email Options'), 6);
+ $admin->table_head(T('Email Options'), 6);
if ($user->objdata['userid'])
{
}
}
- $admin->table_column_head(array('', _('Reporter'), _('Assignee'), _('Favorite'), _('Voter'), _('Commenter')));
+ $admin->table_column_head(array('', T('Reporter'), T('Assignee'), T('Favorite'), T('Voter'), T('Commenter')));
// -------------------------------------------------------------------
- $admin->row_text(_('New bug is added'), '<div style="text-align: center">' . draw_checkbox('emailopts[0][2048]', $checked[0][2048]) . '</div>', 'top', 6);
+ $admin->row_text(T('New bug is added'), '<div style="text-align: center">' . draw_checkbox('emailopts[0][2048]', $checked[0][2048]) . '</div>', 'top', 6);
- $admin->row_text(_('I am made the assignee'), '<div style="text-align: center">' . draw_checkbox('emailopts[0][32]', $checked[0][32]) . '</div>', 'top', 6);
+ $admin->row_text(T('I am made the assignee'), '<div style="text-align: center">' . draw_checkbox('emailopts[0][32]', $checked[0][32]) . '</div>', 'top', 6);
$admin->row_multi_item(array(
- _('Status or resolution changes') => 'l',
+ T('Status or resolution changes') => 'l',
draw_checkbox('emailopts[1][64]', $checked[1][64]) => 'c',
draw_checkbox('emailopts[2][64]', $checked[2][64]) => 'c',
draw_checkbox('emailopts[4][64]', $checked[4][64]) => 'c',
));
$admin->row_multi_item(array(
- _("'Duplicates' field is changed") => 'l',
+ T("'Duplicates' field is changed") => 'l',
draw_checkbox('emailopts[1][128]', $checked[1][128]) => 'c',
draw_checkbox('emailopts[2][128]', $checked[2][128]) => 'c',
draw_checkbox('emailopts[4][128]', $checked[4][128]) => 'c',
));
$admin->row_multi_item(array(
- _('A new comment is added') => 'l',
+ T('A new comment is added') => 'l',
draw_checkbox('emailopts[1][256]', $checked[1][256]) => 'c',
draw_checkbox('emailopts[2][256]', $checked[2][256]) => 'c',
draw_checkbox('emailopts[4][256]', $checked[4][256]) => 'c',
));
$admin->row_multi_item(array(
- _('A new attachment is added') => 'l',
+ T('A new attachment is added') => 'l',
draw_checkbox('emailopts[1][512]', $checked[1][512]) => 'c',
draw_checkbox('emailopts[2][512]', $checked[2][512]) => 'c',
draw_checkbox('emailopts[4][512]', $checked[4][512]) => 'c',
));
$admin->row_multi_item(array(
- _('Any other field changes') => 'l',
+ T('Any other field changes') => 'l',
draw_checkbox('emailopts[1][1024]', $checked[1][1024]) => 'c',
draw_checkbox('emailopts[2][1024]', $checked[2][1024]) => 'c',
draw_checkbox('emailopts[4][1024]', $checked[4][1024]) => 'c',
}
else
{
- $admin->page_start(_('Search Results'));
+ $admin->page_start(T('Search Results'));
$admin->table_start();
- $admin->table_head(_('Search Results'), 4);
- $admin->table_column_head(array(_('Display Name'), _('Email'), _('User ID'), _('Actions')));
+ $admin->table_head(T('Search Results'), 4);
+ $admin->table_column_head(array(T('Display Name'), T('Email'), T('User ID'), T('Actions')));
while ($row = $db->fetch_array($results))
{
$row['displayname'] => 'l',
$row['email'] => 'c',
$row['userid'] => 'c',
- '<a href="user.php?do=edit&userid=' . $row['userid'] . '">[' . _('Edit') . ']</a>' => 'c'
+ '<a href="user.php?do=edit&userid=' . $row['userid'] . '">[' . T('Edit') . ']</a>' => 'c'
));
}
if ($fail)
{
- $admin->error(_('Sorry, we could not find any users that matched your criteria.'));
+ $admin->error(T('Sorry, we could not find any users that matched your criteria.'));
}
}
$pagination->setBitProcessor('AdminPageNavigatorBitCallback');
$pagination->setNavigatorProcessor('AdminPageNavigatorCallback');
- $admin->page_start(_('Show All Users'));
+ $admin->page_start(T('Show All Users'));
$admin->table_start();
- $admin->table_head(_('Show All Users'), 4);
- $admin->table_column_head(array(_('Display Name'), _('Email'), _('User ID'), _('Actions')));
+ $admin->table_head(T('Show All Users'), 4);
+ $admin->table_column_head(array(T('Display Name'), T('Email'), T('User ID'), T('Actions')));
$count = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "user");
$pagination->setTotal($count['count']);
$user['displayname'] => 'l',
$user['email'] => 'c',
$user['userid'] => 'c',
- '<a href="user.php?do=edit&userid=' . $user['userid'] . '">[' . _('Edit') . ']</a>' => 'c'
+ '<a href="user.php?do=edit&userid=' . $user['userid'] . '">[' . T('Edit') . ']</a>' => 'c'
));
}
NavLinks::usersAdd();
$navigator->set_focus('link', 'users-pages-users', 'users-pages');
- $admin->page_start(_('User Search'));
+ $admin->page_start(T('User Search'));
$admin->form_start('user.php', 'search');
$admin->table_start(true, '45%');
- $admin->table_head(_('User Search'));
- $admin->row_input(_('Name/Email/ID'), 'userdata');
+ $admin->table_head(T('User Search'));
+ $admin->row_input(T('Name/Email/ID'), 'userdata');
$admin->row_submit('', ':save:', '');
// define permissions as groups
$permissions = array(
- _('General Permissions') => array(
- 'canviewbugs' => _('Can View Bugs'),
- 'canviewhidden' => _('Can View Hidden Bugs and Comments'),
- 'canviewownhidden' => _('Can View Own Hidden Bugs'),
- 'cansearch' => _('Can Search Bugs'),
- 'cansubscribe' => _('Can Subscribe to Bugs'),
- 'canbeassignedto' => _('Can Be Assigned Bugs')
+ T('General Permissions') => array(
+ 'canviewbugs' => T('Can View Bugs'),
+ 'canviewhidden' => T('Can View Hidden Bugs and Comments'),
+ 'canviewownhidden' => T('Can View Own Hidden Bugs'),
+ 'cansearch' => T('Can Search Bugs'),
+ 'cansubscribe' => T('Can Subscribe to Bugs'),
+ 'canbeassignedto' => T('Can Be Assigned Bugs')
),
- _('Posting/Submitting Permissions') => array(
- 'canvote' => _('Can Vote on Polls'),
- 'cansubmitbugs' => _('Can Submit Bugs'),
- 'canpostcomments' => _('Can Post Comments'),
- 'cangetattach' => _('Can View Attachments'),
- 'canputattach' => _('Can Upload/Edit Own Attachments'),
- 'caneditattach' => _('Can Manage All Attachments')
+ T('Posting/Submitting Permissions') => array(
+ 'canvote' => T('Can Vote on Polls'),
+ 'cansubmitbugs' => T('Can Submit Bugs'),
+ 'canpostcomments' => T('Can Post Comments'),
+ 'cangetattach' => T('Can View Attachments'),
+ 'canputattach' => T('Can Upload/Edit Own Attachments'),
+ 'caneditattach' => T('Can Manage All Attachments')
),
- _('Moderation/Managment Permissions') => array(
- 'caneditown' => _('Can Edit Own Bugs'),
- 'caneditother' => _('Can Edit Others\' Bugs'),
- 'caneditownreply' => _('Can Edit Own Comments'),
- 'caneditotherreply' => _('Can Edit Others\' Comments'),
- 'canassign' => _('Can Assign Bugs'),
- 'canchangestatus' => _('Can Change Status'),
- 'candeletedata' => _('Can Delete Bugs and Comments')
+ T('Moderation/Managment Permissions') => array(
+ 'caneditown' => T('Can Edit Own Bugs'),
+ 'caneditother' => T('Can Edit Others\' Bugs'),
+ 'caneditownreply' => T('Can Edit Own Comments'),
+ 'caneditotherreply' => T('Can Edit Others\' Comments'),
+ 'canassign' => T('Can Assign Bugs'),
+ 'canchangestatus' => T('Can Change Status'),
+ 'candeletedata' => T('Can Delete Bugs and Comments')
),
- _('Administrator Permissions') => array(
- 'canadminpanel' => _('Can Access Control Panel'),
- 'canadminbugs' => _('Can Administer Bug Reports'),
- 'canadminfields' => _('Can Administer Additional Bug Fields'),
- 'canadminversions' => _('Can Administer Products / Components / Versions'),
- 'canadminusers' => _('Can Administer Users'),
- 'canadmingroups' => _('Can Administer Usergroups'),
- 'canadmintools' => _('Can Administer Settings / Maintenance Tools')
+ T('Administrator Permissions') => array(
+ 'canadminpanel' => T('Can Access Control Panel'),
+ 'canadminbugs' => T('Can Administer Bug Reports'),
+ 'canadminfields' => T('Can Administer Additional Bug Fields'),
+ 'canadminversions' => T('Can Administer Products / Components / Versions'),
+ 'canadminusers' => T('Can Administer Users'),
+ 'canadmingroups' => T('Can Administer Usergroups'),
+ 'canadmintools' => T('Can Administer Settings / Maintenance Tools')
)
);
{
if ($bugsys->in['usergroupid'] < 7)
{
- $admin->error(_('You can\'t delete a default usergroup.'));
+ $admin->error(T('You can\'t delete a default usergroup.'));
}
- $admin->page_confirm(_('Are you sure you want to delete this usergroup? All users in this group will be set back to the default registered usergroup (id: 2).'), 'usergroup.php', 'kill', array('usergroupid' => $bugsys->in['usergroupid']));
+ $admin->page_confirm(T('Are you sure you want to delete this usergroup? All users in this group will be set back to the default registered usergroup (id: 2).'), 'usergroup.php', 'kill', array('usergroupid' => $bugsys->in['usergroupid']));
}
// ###################################################################
$navigator->set_focus('link', 'usergroups-add', 'usergroups');
}
- $admin->page_start(($add ? _('New Usergroup') : _('Edit Usergroup')));
+ $admin->page_start(($add ? T('New Usergroup') : T('Edit Usergroup')));
$admin->form_start('usergroup.php', ($add ? 'insert' : 'update'));
// Details
$admin->table_start();
- $admin->table_head(_('Usergroup Details'));
- $admin->row_input(_('Usergroup Title'), 'title', (($add AND $clone) ? '' : $bugsys->sanitize($usergroup->objdata['title'])));
- $admin->row_input(_('Display Title<div><dfn>This is the title that others will be able to see when comments are posted.</dfn></div>'), 'displaytitle', (($add AND $clone) ? '' : $bugsys->sanitize($usergroup->objdata['displaytitle'])));
+ $admin->table_head(T('Usergroup Details'));
+ $admin->row_input(T('Usergroup Title'), 'title', (($add AND $clone) ? '' : $bugsys->sanitize($usergroup->objdata['title'])));
+ $admin->row_input(T('Display Title<div><dfn>This is the title that others will be able to see when comments are posted.</dfn></div>'), 'displaytitle', (($add AND $clone) ? '' : $bugsys->sanitize($usergroup->objdata['displaytitle'])));
$admin->table_end();
// Permission
$admin->table_start();
- $admin->table_head(_('Permission Settings'));
+ $admin->table_head(T('Permission Settings'));
foreach ($permissions AS $group => $settings)
{
// custom field permissions
$admin->table_start();
- $admin->table_head(_('Custom Field Permissions'));
+ $admin->table_head(T('Custom Field Permissions'));
if ($edit OR $clone)
{
while ($field = $db->fetch_array($fields))
{
unset($listitem);
- $admin->list_item(_('No Permission'), 0, $permissions["$field[fieldid]"] == 0);
- $admin->list_item(_('Can View Field'), 1, $permissions["$field[fieldid]"] == 1);
- $admin->list_item(_('Can View, Edit Field'), 2, $permissions["$field[fieldid]"] == 2);
+ $admin->list_item(T('No Permission'), 0, $permissions["$field[fieldid]"] == 0);
+ $admin->list_item(T('Can View Field'), 1, $permissions["$field[fieldid]"] == 1);
+ $admin->list_item(T('Can View, Edit Field'), 2, $permissions["$field[fieldid]"] == 2);
$admin->row_list($field['name'], "custom[$field[fieldid]]");
}
$db->query("UPDATE " . TABLE_PREFIX . "user SET usergroupid = 2 WHERE userid IN (" . implode(',', $idlist) . ")");
}
- $admin->redirect('usergroup.php', _('The selected users have been promoted to the "Registered" usergroup.'));
+ $admin->redirect('usergroup.php', T('The selected users have been promoted to the "Registered" usergroup.'));
}
// ###################################################################
NavLinks::usergroupsAdd();
$navigator->set_focus('link', 'usergroups-approve', 'usergroups');
- $admin->page_start(_('Moderate Awaiting Users'), 3);
+ $admin->page_start(T('Moderate Awaiting Users'), 3);
$admin->form_start('usergroup.php', 'doapprove');
$admin->table_start();
- $admin->table_head(_('Moderate Un-Approved Users'), 3);
+ $admin->table_head(T('Moderate Un-Approved Users'), 3);
- $admin->table_column_head(array(_('Display Name'), _('Usergroup'), _('Approve')));
+ $admin->table_column_head(array(T('Display Name'), T('Usergroup'), T('Approve')));
$users = $db->query("SELECT * FROM " . TABLE_PREFIX . "user WHERE usergroupid IN (3, 4)");
while ($user = $db->fetch_array($users))
NavLinks::usergroupsAdd();
$navigator->set_focus('link', 'users-pages-usergroups', 'users-pages');
- $admin->page_start(_('Usergroup Manager'));
+ $admin->page_start(T('Usergroup Manager'));
$admin->form_start('usergroup.php', 'null');
$admin->table_start();
- $admin->table_head(_('Usergroup Manager'), 3, 'usergroups');
+ $admin->table_head(T('Usergroup Manager'), 3, 'usergroups');
$groups = $db->query("SELECT * FROM " . TABLE_PREFIX . "usergroup ORDER BY usergroupid ASC");
while ($group = $db->fetch_array($groups))
$usergroups["$group[usergroupid]"]['total'] = $group['total'];
}
- $admin->table_column_head(array(_('Usergroup'), _('Number of Users'), _('Action')));
+ $admin->table_column_head(array(T('Usergroup'), T('Number of Users'), T('Action')));
foreach ($usergroups AS $group)
{
$admin->row_multi_item(array(
"<a href=\"usergroup.php?do=edit&usergroupid=$group[usergroupid]\">$group[title]</a>" => 'l',
(!$group['total'] ? '-' : $group['total']) => 'c',
- "<a href=\"usergroup.php?do=edit&usergroupid=$group[usergroupid]\">[" . _('Edit') . "]</a> " .
- "<a href=\"usergroup.php?do=clone&usergroupid=$group[usergroupid]\">[" . _('Clone') . "]</a>" .
- ($group['usergroupid'] > 6 ? " <a href=\"usergroup.php?do=delete&usergroupid=$group[usergroupid]\">[" . _('Delete') . "]</a>" : '') => 'c'
+ "<a href=\"usergroup.php?do=edit&usergroupid=$group[usergroupid]\">[" . T('Edit') . "]</a> " .
+ "<a href=\"usergroup.php?do=clone&usergroupid=$group[usergroupid]\">[" . T('Clone') . "]</a>" .
+ ($group['usergroupid'] > 6 ? " <a href=\"usergroup.php?do=delete&usergroupid=$group[usergroupid]\">[" . T('Delete') . "]</a>" : '') => 'c'
));
}
if ($_REQUEST['do'] == 'delete')
{
- $admin->page_confirm(_('Are you sure you want to delete help text?'), 'userhelp.php', 'kill', array('keystring' => $bugsys->in['keystring']));
+ $admin->page_confirm(T('Are you sure you want to delete help text?'), 'userhelp.php', 'kill', array('keystring' => $bugsys->in['keystring']));
}
// ###################################################################
{
$navigator->set_focus('link', 'options-userhelp-add', 'options-userhelp');
- $admin->page_start(_('New Help Text'));
+ $admin->page_start(T('New Help Text'));
$admin->form_start('userhelp.php', 'insert');
$admin->table_start();
- $admin->table_head(_('New Help Text'));
+ $admin->table_head(T('New Help Text'));
- $admin->row_input(_('Topic Title'), 'title');
- $admin->row_input(_('Unique Key<br />(lowercase letters, underscores, and numbers only)'), 'keystring');
- $admin->row_textarea(_('Body Text'), 'body');
+ $admin->row_input(T('Topic Title'), 'title');
+ $admin->row_input(T('Unique Key<br />(lowercase letters, underscores, and numbers only)'), 'keystring');
+ $admin->row_textarea(T('Body Text'), 'body');
$admin->row_submit();
{
$navigator->set_focus('link', 'options-pages-userhelp', 'options-pages');
- $admin->page_start(_('Edit User Help'));
+ $admin->page_start(T('Edit User Help'));
$admin->form_start('userhelp.php', 'update');
$admin->table_start();
- $admin->table_head(_('Edit User Help'));
+ $admin->table_head(T('Edit User Help'));
$topics = $db->query("SELECT * FROM " . TABLE_PREFIX . "fieldhelp ORDER BY keystring ASC");
while ($topic = $db->fetch_array($topics))
{
$inputfield = '<input type="text" class="input" name="help[' . $topic['keystring'] . '][title]" value="' . $topic['title'] . '" size="35" />';
- $delete = (!in_array($topic['keystring'], UserHelpAPI::not_able_to_delete()) ? '<br /><br /><a href="userhelp.php?do=delete&keystring=' . $topic['keystring'] . '">[' . _('Delete') . ']</a>' : '');
+ $delete = (!in_array($topic['keystring'], UserHelpAPI::not_able_to_delete()) ? '<br /><br /><a href="userhelp.php?do=delete&keystring=' . $topic['keystring'] . '">[' . T('Delete') . ']</a>' : '');
$admin->row_textarea($inputfield . '<br /><em>' . $topic['keystring'] . '</em>' . $delete, 'help[' . $topic['keystring'] . '][body]', $topic['body']);
}
switch ($FILE['error'])
{
case 0: break;
- case 1: $message->addError(_('PHP said the file you uploaded was too big.')); break;
- case 2: $message->addError(_('The file exceeds the allowed upload size.')); break;
- case 3: $message->addError(_('The file was only partially uploaded.')); break;
- case 4: $message->addError(_('The file was not uploaded at all.')); break;
- case 6: $message->addError(_('PHP could not find the /tmp directory.')); break;
+ case 1: $message->addError(T('PHP said the file you uploaded was too big.')); break;
+ case 2: $message->addError(T('The file exceeds the allowed upload size.')); break;
+ case 3: $message->addError(T('The file was only partially uploaded.')); break;
+ case 4: $message->addError(T('The file was not uploaded at all.')); break;
+ case 6: $message->addError(T('PHP could not find the /tmp directory.')); break;
}
// did it upload?
if (!is_uploaded_file($FILE['tmp_name']))
{
- $message->addError(_('The file you specified did not upload.'));
+ $message->addError(T('The file you specified did not upload.'));
}
// TODO - put some MIME-type validation here
if (filesize($FILE['tmp_name']) > $var['Value'])
{
- $message->addError(_('The file you specified exceeds MySQL\'s maximum allowed packet.'));
+ $message->addError(T('The file you specified exceeds MySQL\'s maximum allowed packet.'));
}
$attachapi->set('attachment', file_get_contents($FILE['tmp_name']));
$notif->finalize();
- $message->redirect(_('The attachment has been added to the bug.'), "showreport.php?bugid=$bug[bugid]");
+ $message->redirect(T('The attachment has been added to the bug.'), "showreport.php?bugid=$bug[bugid]");
}
else
{
$attachapi->delete();
- $message->redirect(_('The attachment was successfully deleted.'), "showreport.php?bugid=$bug[bugid]");
+ $message->redirect(T('The attachment was successfully deleted.'), "showreport.php?bugid=$bug[bugid]");
}
else
{
$log->update_history();
- $message->redirect(_('The attachment was successfully modified.'), "showreport.php?bugid=$bug[bugid]");
+ $message->redirect(T('The attachment was successfully modified.'), "showreport.php?bugid=$bug[bugid]");
}
}
- Fixed: Users of UTF8 languages would experience problems after upgrading (if the $utf8 config directive as ON) because the installer wasn't running in UTF8
- Fixed: In Authentication::_createBugdarUser there was a variable capitalization error (bug://report/106)
- Fixed: Comments posted by guests could not be deleted (bug://report/120)
+- Change: There's now a (hidden debug) option to use a custom .mo reader instead of the built-in Gettext extension for localization (bug://report/49)
1.2.1
===============================
);
}
- $message->redirect(_('The comment has been deleted. You will be redirected back to the bug.'), 'showreport.php?bugid=' . $bug['bugid']);
+ $message->redirect(T('The comment has been deleted. You will be redirected back to the bug.'), 'showreport.php?bugid=' . $bug['bugid']);
}
// ###################################################################
if ($bug['initialreport'] == $comment['commentid'])
{
- $message->error(_('You cannot delete this comment because it is attached to the bug as the first comment. You have to delete the entire bug instead (which is not recommended unless it is spam).'));
+ $message->error(T('You cannot delete this comment because it is attached to the bug as the first comment. You have to delete the entire bug instead (which is not recommended unless it is spam).'));
}
- $message->confirm(_('Are you sure you want to delete this comment? After you do so, the data <strong>will</strong> be lost forever. We recommend only deleting spam comments and nothing else.'), 'editcomment.php', 'kill', _('Delete Comment'), 'showreport.php?bugid=' . $bug['bugid'], array('commentid' => $comment['commentid']));
+ $message->confirm(T('Are you sure you want to delete this comment? After you do so, the data <strong>will</strong> be lost forever. We recommend only deleting spam comments and nothing else.'), 'editcomment.php', 'kill', T('Delete Comment'), 'showreport.php?bugid=' . $bug['bugid'], array('commentid' => $comment['commentid']));
}
// ###################################################################
if ($bugsys->in['commentid'] == $bug['initialreport'] AND $bugsys->in['hidden'])
{
- $message->addError(_('You cannot hide the first comment/initial report of a bug. Instead, hide the entire bug.'));
+ $message->addError(T('You cannot hide the first comment/initial report of a bug. Instead, hide the entire bug.'));
}
if (!$message->hasErrors())
$log->update_history();
- $message->redirect(_('The comment was modified successfully.'), "showreport.php?bugid=$bug[bugid]");
+ $message->redirect(T('The comment was modified successfully.'), "showreport.php?bugid=$bug[bugid]");
}
else
{
$bugapi->delete();
- $message->redirect(_('The entire bug has been deleted.'), 'index.php');
+ $message->redirect(T('The entire bug has been deleted.'), 'index.php');
}
// ###################################################################
$message->errorPermission();
}
- $message->confirm(_('Are you sure you want to delete this bug? Doing so will <strong>destroy</strong> all associated data, including comments, attachments, and votes. We strongly recommend only deleting span records and nothing else as users may wish to go back and look at any bug to check its status.'), 'editreport.php', 'kill', _('Delete Bug Permanently'), 'showreport.php?bugid=' . $bug['bugid'], array('bugid' => $bug['bugid']));
+ $message->confirm(T('Are you sure you want to delete this bug? Doing so will <strong>destroy</strong> all associated data, including comments, attachments, and votes. We strongly recommend only deleting span records and nothing else as users may wish to go back and look at any bug to check its status.'), 'editreport.php', 'kill', T('Delete Bug Permanently'), 'showreport.php?bugid=' . $bug['bugid'], array('bugid' => $bug['bugid']));
}
// ###################################################################
{
if (!empty($bugsys->in['comment']) AND $automation['comment'])
{
- $commenttext = $bugsys->in['comment'] . "\n\n" . _('--------------- AUTOMATIC RESPONSE ---------------') . "\n" . $automation['comment'];
+ $commenttext = $bugsys->in['comment'] . "\n\n" . T('--------------- AUTOMATIC RESPONSE ---------------') . "\n" . $automation['comment'];
}
else if (empty($bugsys->in['comment']) AND $automation['comment'])
{
{
$bugapi->update();
$notif->finalize();
- $message->redirect(_('Your reply has been added to the comment list.'), "showreport.php?bugid=$bug[bugid]");
+ $message->redirect(T('Your reply has been added to the comment list.'), "showreport.php?bugid=$bug[bugid]");
}
}
$notif->finalize();
- $message->redirect(_('Your changes to the bug have been saved.'), "showreport.php?bugid=$bug[bugid]");
+ $message->redirect(T('Your changes to the bug have been saved.'), "showreport.php?bugid=$bug[bugid]");
}
/*=====================================================================*\
{
if (!is_array($bugsys->datastore['product']))
{
- $message->error(_('There are no products set up.'));
+ $message->error(T('There are no products set up.'));
}
foreach ($bugsys->datastore['product'] AS $product)
if ($automation['comment'])
{
- $left = _('Add Comment');
+ $left = T('Add Comment');
$right = $automation['comment'];
$trextra = ' class="altcolor"';
continue;
}
- $left = $fields["$id"]['name'] . ' ' . sprintf(_('(Custom #%1$d, type: %2$s)'), $id, $fields["$id"]['type']);
+ $left = $fields["$id"]['name'] . ' ' . sprintf(T('(Custom #%1$d, type: %2$s)'), $id, $fields["$id"]['type']);
$right = $value;
eval('$automations .= "' . $template->fetch('explain_row') . '";');
}
if ($db->query_first("SELECT * FROM " . TABLE_PREFIX . "favorite WHERE userid = " . $bugsys->userinfo['userid'] . " AND bugid = " . $bugsys->in['bugid']))
{
$db->query("DELETE FROM " . TABLE_PREFIX . "favorite WHERE userid = " . $bugsys->userinfo['userid'] . " AND bugid = " . $bugsys->in['bugid']);
- $message->redirect(_('This bug has been removed from your favorites list.'), "showreport.php?bugid=" . $bugsys->in['bugid']);
+ $message->redirect(T('This bug has been removed from your favorites list.'), "showreport.php?bugid=" . $bugsys->in['bugid']);
}
else
{
$db->query("INSERT INTO " . TABLE_PREFIX . "favorite (userid, bugid) VALUES (" . $bugsys->userinfo['userid'] . ", " . $bugsys->in['bugid'] . ")");
- $message->redirect(_('This bug has been added to your favorites list.'), "showreport.php?bugid=" . $bugsys->in['bugid']);
+ $message->redirect(T('This bug has been added to your favorites list.'), "showreport.php?bugid=" . $bugsys->in['bugid']);
}
}
if ($db->num_rows($favorites) < 1)
{
- $message->error(_('You do not have any favorites in your list. To add a bug to your list, while viewing the report, click the [Add to Favorites] link next to the bug\'s ID.'));
+ $message->error(T('You do not have any favorites in your list. To add a bug to your list, while viewing the report, click the [Add to Favorites] link next to the bug\'s ID.'));
}
$sort = new ListSorter('favorite');
$template->setPreParseHook('isso_pre_parse_hook');
$template->setTemplateDir('templates/');
$template->setDatabaseCache(TABLE_PREFIX . 'template');
+$template->langcall = 'T';
// ###################################################################
// global template variables
if (!$bugsys->in['topic'] OR !isset($bugsys->datastore['help'][ $bugsys->in['topic'] ]))
{
- $topic['title'] = _('Invalid');
- $topic['body'] = _('That help topic does not exist in the system.');
+ $topic['title'] = T('Invalid');
+ $topic['body'] = T('That help topic does not exist in the system.');
}
else
{
{
if (!is_array($this->values['fieldchanges']) OR sizeof($this->values['fieldchanges']) != 2 OR !is_array($this->values['fieldchanges']['custom']) OR !is_array($this->values['fieldchanges']['builtin']))
{
- return _('Invalid array type passed. The fieldchaneges array must be a two-dimensional array: array("builtin" => array("fieldname" => "newvalue" ...), "custom" => array("fieldname" => "fieldvalue" ...))');
+ return T('Invalid array type passed. The fieldchaneges array must be a two-dimensional array: array("builtin" => array("fieldname" => "newvalue" ...), "custom" => array("fieldname" => "fieldvalue" ...))');
}
if (sizeof($this->values['fieldchanges']['custom']) < 1 AND sizeof($this->values['fieldchanges']['builtin']) < 1)
{
- return _('You need to specify some fields to change.');
+ return T('You need to specify some fields to change.');
}
$this->values['fieldchanges'] = serialize($this->values['fieldchanges']);
$comment = $this->values['comment'];
if ($this->values['parselinks'])
{
- $comment = str_replace('bug://new', '<a href="newreport.php">' . _('New Bug') . '</a>', $comment);
+ $comment = str_replace('bug://new', '<a href="newreport.php">' . T('New Bug') . '</a>', $comment);
$comment = preg_replace('#bug://((report|problem)/)?([0-9]*)#i', '<a href="showreport.php?bugid=\3">bug \3</a>', $comment);
$comment = preg_replace('#(https?://|www\.)\S+#i', '<a href="\0">\0</a>', $comment);
}
{
if ($this->registry->db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE initialreport = " . $this->values['commentid']))
{
- $this->error(_('You cannot delete this comment because it is attached to the bug as the first comment. You have to delete the entire bug instead (which is not recommended unless it is spam).'));
+ $this->error(T('You cannot delete this comment because it is attached to the bug as the first comment. You have to delete the entire bug instead (which is not recommended unless it is spam).'));
}
}
}
{
global $lang;
$types = array(
- 'input_text' => _('Single-Line Text Box'),
- 'input_checkbox' => _('Checkbox Flag'),
- 'select_single' => _('Drop-Down Menu'),
+ 'input_text' => T('Single-Line Text Box'),
+ 'input_checkbox' => T('Checkbox Flag'),
+ 'select_single' => T('Drop-Down Menu'),
);
if ($type == null)
array_walk($selects, 'trim');
if (sizeof($selects) < 1)
{
- return _('You need to specify some select values.');
+ return T('You need to specify some select values.');
}
else
{
$count = $this->registry->db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "language");
if ($count['count'] < 2)
{
- $this->error(_('At least one language needs to be present. Deleting this language would violate that.'));
+ $this->error(T('At least one language needs to be present. Deleting this language would violate that.'));
}
if ($this->registry->options['defaultlanguage'] == $this->values['languageid'])
{
- $this->error(_('You cannot delete the default language. Please select another language to be the default language and then delete this one.'));
+ $this->error(T('You cannot delete the default language. Please select another language to be the default language and then delete this one.'));
}
}
{
if (!in_array($this->values['direction'], array('ltr', 'rtl')))
{
- return _('The direction must be ltr (left-to-right) or rtl (right-to-left)');
+ return T('The direction must be ltr (left-to-right) or rtl (right-to-left)');
}
return true;
}
if (!$this->registry->funct->is_valid_email($this->values['email']))
{
- return _('The specified email is invalid.');
+ return T('The specified email is invalid.');
}
if ($this->registry->db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE email = '" . $this->registry->db->escape_string($this->values['email']) . "' AND userid <> " . $this->registry->clean($this->values['userid'], TYPE_UINT)))
{
- return _('The specified email is already in use.');
+ return T('The specified email is already in use.');
}
return true;
}
if ($this->registry->db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE displayname = '" . $this->registry->db->escape_string($this->values['displayname']) . "' AND userid <> " . $this->registry->clean($this->values['userid'], TYPE_UINT)))
{
- return _('That display name is already in use by another user.');
+ return T('That display name is already in use by another user.');
}
return true;
}
{
if ($this->values['userid'] == $this->registry->userinfo['userid'])
{
- $this->error(_('You cannot delete your own account!'));
+ $this->error(T('You cannot delete your own account!'));
}
if ($this->values['usergroupid'] == 6)
$count = $this->registry->db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "user WHERE usergroupid = 6 AND userid <> " . $this->values['userid']);
if ($count['count'] < 1)
{
- $this->error(_('At least one other administrator needs to be present before you can delete this user'));
+ $this->error(T('At least one other administrator needs to be present before you can delete this user'));
}
}
}
{
if ($this->values['usergroupid'] < 7)
{
- return _('You can\'t delete a default usergroup.');
+ return T('You can\'t delete a default usergroup.');
}
}
if (preg_match('#[^a-z0-9_]#', $this->values['keystring']))
{
- return _('The unique key can only contain lowercase letters, underscores, and numbers.');
+ return T('The unique key can only contain lowercase letters, underscores, and numbers.');
}
if ($this->registry->db->query_first("SELECT * FROM " . TABLE_PREFIX . "fieldhelp WHERE keystring = '" . $this->registry->escape($this->values['keystring']) . "'"))
{
- return _('The unique key must be unique.');
+ return T('The unique key must be unique.');
}
return true;
{
global $navigator;
- $navigator->add_component('section', 'options-pages', 'options', _('Options'), null);
- $navigator->add_component('link', 'options-pages-home', 'options-pages', _('Home'), 'index.php');
- $navigator->add_component('link', 'options-pages-settings', 'options-pages', _('Bugdar Settings'), 'setting.php');
- $navigator->add_component('link', 'options-pages-languages', 'options-pages', _('Languages'), 'language.php');
- $navigator->add_component('link', 'options-pages-userhelp', 'options-pages', _('User Help Items'), 'userhelp.php');
+ $navigator->add_component('section', 'options-pages', 'options', T('Options'), null);
+ $navigator->add_component('link', 'options-pages-home', 'options-pages', T('Home'), 'index.php');
+ $navigator->add_component('link', 'options-pages-settings', 'options-pages', T('Bugdar Settings'), 'setting.php');
+ $navigator->add_component('link', 'options-pages-languages', 'options-pages', T('Languages'), 'language.php');
+ $navigator->add_component('link', 'options-pages-userhelp', 'options-pages', T('User Help Items'), 'userhelp.php');
}
// ###################################################################
{
global $navigator;
- $navigator->add_component('section', 'options-languages', 'options', _('Languages'), null);
- $navigator->add_component('link', 'options-languages-add', 'options-languages', _('Add New Language'), 'language.php?do=add');
+ $navigator->add_component('section', 'options-languages', 'options', T('Languages'), null);
+ $navigator->add_component('link', 'options-languages-add', 'options-languages', T('Add New Language'), 'language.php?do=add');
}
// ###################################################################
global $navigator;
NavLinks::languagesAdd();
- $navigator->add_component('link', 'options-languages-edit', 'options-languages', _('Edit Language'), 'language.php?do=edit&languageid=' . $id);
- $navigator->add_component('link', 'options-languages-delete', 'options-languages', _('Delete'), 'language.php?do=delete&languageid=' . $id);
+ $navigator->add_component('link', 'options-languages-edit', 'options-languages', T('Edit Language'), 'language.php?do=edit&languageid=' . $id);
+ $navigator->add_component('link', 'options-languages-delete', 'options-languages', T('Delete'), 'language.php?do=delete&languageid=' . $id);
}
// ###################################################################
{
global $navigator;
- $navigator->add_component('section', 'options-userhelp', 'options', _('User Help Items'), null);
- $navigator->add_component('link', 'options-userhelp-add', 'options-userhelp', _('Add New Item'), 'userhelp.php?do=add');
+ $navigator->add_component('section', 'options-userhelp', 'options', T('User Help Items'), null);
+ $navigator->add_component('link', 'options-userhelp-add', 'options-userhelp', T('Add New Item'), 'userhelp.php?do=add');
}
// ###################################################################
{
global $navigator;
- $navigator->add_component('section', 'products', 'products', _('Products'), null);
- $navigator->add_component('link', 'products-manage', 'products', _('Manage Products'), 'product.php');
- $navigator->add_component('link', 'products-add', 'products', _('Add New Product'), 'product.php?do=addproduct');
+ $navigator->add_component('section', 'products', 'products', T('Products'), null);
+ $navigator->add_component('link', 'products-manage', 'products', T('Manage Products'), 'product.php');
+ $navigator->add_component('link', 'products-add', 'products', T('Add New Product'), 'product.php?do=addproduct');
}
// ###################################################################
global $navigator;
NavLinks::productsAdd();
- $navigator->add_component('section', 'products-edit', 'products', _('Edit Product'), null);
- $navigator->add_component('link', 'products-edit', 'products-edit', _('Edit Product'), 'product.php?do=editproduct&productid=' . $id);
- $navigator->add_component('link', 'products-edit-version', 'products-edit', _('Add New Version'), 'product.php?do=addversion&productid=' . $id);
- $navigator->add_component('link', 'products-edit-delete', 'products-edit', _('Delete Product'), 'product.php?do=deleteproduct&productid=' . $id);
+ $navigator->add_component('section', 'products-edit', 'products', T('Edit Product'), null);
+ $navigator->add_component('link', 'products-edit', 'products-edit', T('Edit Product'), 'product.php?do=editproduct&productid=' . $id);
+ $navigator->add_component('link', 'products-edit-version', 'products-edit', T('Add New Version'), 'product.php?do=addversion&productid=' . $id);
+ $navigator->add_component('link', 'products-edit-delete', 'products-edit', T('Delete Product'), 'product.php?do=deleteproduct&productid=' . $id);
}
// ###################################################################
{
global $navigator;
- $navigator->add_component('section', 'fields-pages', 'fields', _('Fields'), null);
- $navigator->add_component('link', 'fields-pages-fields', 'fields-pages', _('Custom Fields'), 'field.php');
- $navigator->add_component('link', 'fields-pages-priorities', 'fields-pages', _('Priorities'), 'priority.php');
- $navigator->add_component('link', 'fields-pages-resolutions', 'fields-pages', _('Resolutions'), 'resolution.php');
- $navigator->add_component('link', 'fields-pages-severities', 'fields-pages', _('Severities'), 'severity.php');
- $navigator->add_component('link', 'fields-pages-statuses', 'fields-pages', _('Statuses'), 'status.php');
- $navigator->add_component('link', 'fields-pages-automations', 'fields-pages', _('Automations'), 'automation.php');
+ $navigator->add_component('section', 'fields-pages', 'fields', T('Fields'), null);
+ $navigator->add_component('link', 'fields-pages-fields', 'fields-pages', T('Custom Fields'), 'field.php');
+ $navigator->add_component('link', 'fields-pages-priorities', 'fields-pages', T('Priorities'), 'priority.php');
+ $navigator->add_component('link', 'fields-pages-resolutions', 'fields-pages', T('Resolutions'), 'resolution.php');
+ $navigator->add_component('link', 'fields-pages-severities', 'fields-pages', T('Severities'), 'severity.php');
+ $navigator->add_component('link', 'fields-pages-statuses', 'fields-pages', T('Statuses'), 'status.php');
+ $navigator->add_component('link', 'fields-pages-automations', 'fields-pages', T('Automations'), 'automation.php');
}
// ###################################################################
{
global $navigator;
- $navigator->add_component('section', 'fields', 'fields', _('Custom Fields'), null);
- $navigator->add_component('link', 'fields-add', 'fields', _('Add New Custom Field'), 'field.php?do=add');
+ $navigator->add_component('section', 'fields', 'fields', T('Custom Fields'), null);
+ $navigator->add_component('link', 'fields-add', 'fields', T('Add New Custom Field'), 'field.php?do=add');
}
// ###################################################################
global $navigator;
NavLinks::fieldsAdd();
- $navigator->add_component('link', 'fields-delete', 'fields', _('Delete'), 'field.php?do=delete&fieldid=' . $id);
+ $navigator->add_component('link', 'fields-delete', 'fields', T('Delete'), 'field.php?do=delete&fieldid=' . $id);
}
// ###################################################################
{
global $navigator;
- $navigator->add_component('section', 'priorities', 'fields', _('Priorities'), null);
- $navigator->add_component('link', 'priorities-add', 'priorities', _('Add New Priority'), 'priority.php?do=add');
+ $navigator->add_component('section', 'priorities', 'fields', T('Priorities'), null);
+ $navigator->add_component('link', 'priorities-add', 'priorities', T('Add New Priority'), 'priority.php?do=add');
}
// ###################################################################
global $navigator;
NavLinks::prioritiesAdd();
- $navigator->add_component('link', 'priorities-delete', 'priorities', _('Delete'), 'priority.php?do=delete&priorityid=' . $id);
+ $navigator->add_component('link', 'priorities-delete', 'priorities', T('Delete'), 'priority.php?do=delete&priorityid=' . $id);
}
// ###################################################################
{
global $navigator;
- $navigator->add_component('section', 'resolutions', 'fields', _('Resolutions'), null);
- $navigator->add_component('link', 'resolutions-add', 'resolutions', _('Add New Resolution'), 'resolution.php?do=add');
+ $navigator->add_component('section', 'resolutions', 'fields', T('Resolutions'), null);
+ $navigator->add_component('link', 'resolutions-add', 'resolutions', T('Add New Resolution'), 'resolution.php?do=add');
}
// ###################################################################
global $navigator;
NavLinks::resolutionsAdd();
- $navigator->add_component('link', 'resolutions-delete', 'resolutions', _('Delete'), 'resolution.php?do=delete&resolutionid=' . $id);
+ $navigator->add_component('link', 'resolutions-delete', 'resolutions', T('Delete'), 'resolution.php?do=delete&resolutionid=' . $id);
}
// ###################################################################
{
global $navigator;
- $navigator->add_component('section', 'severities', 'fields', _('Severities'), null);
- $navigator->add_component('link', 'severities-add', 'severities', _('Add New Severity'), 'severity.php?do=add');
+ $navigator->add_component('section', 'severities', 'fields', T('Severities'), null);
+ $navigator->add_component('link', 'severities-add', 'severities', T('Add New Severity'), 'severity.php?do=add');
}
// ###################################################################
global $navigator;
NavLinks::severitiesAdd();
- $navigator->add_component('link', 'severities-delete', 'severities', _('Delete'), 'severity.php?do=delete&severityid=' . $id);
+ $navigator->add_component('link', 'severities-delete', 'severities', T('Delete'), 'severity.php?do=delete&severityid=' . $id);
}
// ###################################################################
{
global $navigator;
- $navigator->add_component('section', 'statuses', 'fields', _('Severities'), null);
- $navigator->add_component('link', 'statuses-add', 'statuses', _('Add New Status'), 'status.php?do=add');
+ $navigator->add_component('section', 'statuses', 'fields', T('Severities'), null);
+ $navigator->add_component('link', 'statuses-add', 'statuses', T('Add New Status'), 'status.php?do=add');
}
// ###################################################################
global $navigator;
NavLinks::statusesAdd();
- $navigator->add_component('link', 'statuses-delete', 'statuses', _('Delete'), 'status.php?do=delete&statusid=' . $id);
+ $navigator->add_component('link', 'statuses-delete', 'statuses', T('Delete'), 'status.php?do=delete&statusid=' . $id);
}
// ###################################################################
{
global $navigator;
- $navigator->add_component('section', 'automations', 'fields', _('Automations'), null);
- $navigator->add_component('link', 'automations-add', 'automations', _('Add New Automation'), 'automation.php?do=add');
+ $navigator->add_component('section', 'automations', 'fields', T('Automations'), null);
+ $navigator->add_component('link', 'automations-add', 'automations', T('Add New Automation'), 'automation.php?do=add');
}
// ###################################################################
global $navigator;
NavLinks::automationsAdd();
- $navigator->add_component('link', 'automations-delete', 'automations', _('Delete'), 'automation.php?do=delete&actionid=' . $id);
+ $navigator->add_component('link', 'automations-delete', 'automations', T('Delete'), 'automation.php?do=delete&actionid=' . $id);
}
// ###################################################################
{
global $navigator;
- $navigator->add_component('section', 'users-pages', 'users', _('Users & Permissions'), null);
- $navigator->add_component('link', 'users-pages-users', 'users-pages', _('Users'), 'user.php');
- $navigator->add_component('link', 'users-pages-usergroups', 'users-pages', _('Usergroups'), 'usergroup.php');
- $navigator->add_component('link', 'users-pages-permissions', 'users-pages', _('Product-Level Permissions'), 'permission.php');
+ $navigator->add_component('section', 'users-pages', 'users', T('Users & Permissions'), null);
+ $navigator->add_component('link', 'users-pages-users', 'users-pages', T('Users'), 'user.php');
+ $navigator->add_component('link', 'users-pages-usergroups', 'users-pages', T('Usergroups'), 'usergroup.php');
+ $navigator->add_component('link', 'users-pages-permissions', 'users-pages', T('Product-Level Permissions'), 'permission.php');
}
// ###################################################################
{
global $navigator;
- $navigator->add_component('section', 'users', 'users', _('Users'), null);
- $navigator->add_component('link', 'users-showall', 'users', _('Show All Users'), 'user.php?do=showall');
- $navigator->add_component('link', 'users-add', 'users', _('Add New User'), 'user.php?do=add');
+ $navigator->add_component('section', 'users', 'users', T('Users'), null);
+ $navigator->add_component('link', 'users-showall', 'users', T('Show All Users'), 'user.php?do=showall');
+ $navigator->add_component('link', 'users-add', 'users', T('Add New User'), 'user.php?do=add');
}
// ###################################################################
global $navigator;
NavLinks::usersAdd();
- $navigator->add_component('link', 'users-delete', 'users', _('Delete'), 'user.php?do=delete&userid=' . $id);
+ $navigator->add_component('link', 'users-delete', 'users', T('Delete'), 'user.php?do=delete&userid=' . $id);
}
// ###################################################################
{
global $navigator;
- $navigator->add_component('section', 'usergroups', 'users', _('Usergroups'), null);
- $navigator->add_component('link', 'usergroups-add', 'usergroups', _('Add New Usergroup'), 'usergroup.php?do=add');
- $navigator->add_component('link', 'usergroups-approve', 'usergroups', _('Moderate Awaiting Users'), 'usergroup.php?do=approve');
+ $navigator->add_component('section', 'usergroups', 'users', T('Usergroups'), null);
+ $navigator->add_component('link', 'usergroups-add', 'usergroups', T('Add New Usergroup'), 'usergroup.php?do=add');
+ $navigator->add_component('link', 'usergroups-approve', 'usergroups', T('Moderate Awaiting Users'), 'usergroup.php?do=approve');
}
// ###################################################################
global $navigator;
NavLinks::usergroupsAdd();
- $navigator->add_component('link', 'usergroups-delete', 'usergroups', _('Delete'), 'usergroup.php?do=delete&userid=' . $id);
+ $navigator->add_component('link', 'usergroups-delete', 'usergroups', T('Delete'), 'usergroup.php?do=delete&userid=' . $id);
}
}
*/
function errorPermission()
{
- $this->error(_('You do not have permission to access this page. If you think that this is an error, please contact an administrator.'));
+ $this->error(T('You do not have permission to access this page. If you think that this is an error, please contact an administrator.'));
}
// ###################################################################
--- /dev/null
+<?php
+/*=====================================================================*\
+|| ###################################################################
+|| # Bugdar
+|| # Copyright ©2002-2007 Blue Static
+|| #
+|| # This program is free software; you can redistribute it and/or modify
+|| # it under the terms of the GNU General Public License as published by
+|| # the Free Software Foundation; version 2 of the License.
+|| #
+|| # This program is distributed in the hope that it will be useful, but
+|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+|| # more details.
+|| #
+|| # You should have received a copy of the GNU General Public License along
+|| # with this program; if not, write to the Free Software Foundation, Inc.,
+|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+|| ###################################################################
+\*=====================================================================*/
+
+/**
+ * Message Object File Reader (.mo reader)
+ *
+ * Reads a MO file that is used by gettext but without needing the gettext
+ * extension. The format is detailed here:
+ * http://www.gnu.org/software/gettext/manual/html_node/MO-Files.html
+ *
+ * @author rsesek
+ * @copyright Copyright (c)2006 - 2008, Blue Static
+ * @version $Revision$
+ * @package Bugdar
+ *
+ */
+class MOReader
+{
+ /**
+ * The name of the file to use
+ * @var string
+ */
+ var $filename;
+
+ /**
+ * The file pointer of the MO file
+ * @var resource
+ */
+ var $file = null;
+
+ /**
+ * Is the MO file a big endian one?
+ * @var boolean
+ */
+ var $bigEndian = false;
+
+ /**
+ * The string table as an array
+ * @var array
+ */
+ var $strings = array();
+
+ /**
+ * Creates a new MOReader given a path to a MO file
+ */
+ function MOReader($filename)
+ {
+ $this->filename = $filename;
+ $this->_loadFile();
+ }
+
+ /**
+ * Returns the translated string for T, or the original if none exists
+ *
+ * @param string Native string to look up a translation for
+ *
+ * @return string
+ */
+ function T($str)
+ {
+ if (empty($this->strings[$str]))
+ {
+ return $str;
+ }
+ return $this->strings[$str];
+ }
+
+ /**
+ * Reads $size number of bytes
+ *
+ * @param integer Number of bytes to read
+ *
+ * @return string
+ */
+ function _readBytes($size)
+ {
+ $stream = fread($this->file, 4 * $size);
+ if ($this->bigEndian)
+ {
+ return unpack('N' . $size, $stream);
+ }
+ else
+ {
+ return unpack('V' . $size, $stream);
+ }
+ }
+
+ /**
+ * Lodas the MO data information into the stirng table
+ */
+ function _loadFile()
+ {
+ global $bugsys;
+
+ $this->file = @fopen($this->filename, 'r');
+ if (!$this->file)
+ {
+ $bugsys->debug("could not open MO file {$this->filename}");
+ return;
+ }
+
+ // read the magic number
+ $stream = $this->_readBytes(1);
+ $stream = dechex($stream[1]);
+ if ($stream == '950412de')
+ {
+ $this->bigEndian = false;
+ }
+ else if ($stream == 'de120495')
+ {
+ $this->bigEndian = true;
+ }
+ else
+ {
+ trigger_error('Invalid MO file format');
+ }
+
+ // read the revision (unused in MOs)
+ $this->_readBytes(1);
+
+ // read the number of strings
+ $count = $this->_readBytes(1);
+ $count = $count[1];
+
+ // get the start positions of the original and translated tables
+ $offsetO = $this->_readBytes(1);
+ $offsetT = $this->_readBytes(1);
+
+ fseek($this->file, $offsetO[1]);
+ $tableO = $this->_readBytes(2 * $count);
+ fseek($this->file, $offsetT[1]);
+ $tableT = $this->_readBytes(2 * $count);
+
+ for ($i = 0; $i < $count; $i++)
+ {
+ if ($tableO[$i * 2 + 1] > 0)
+ {
+ fseek($this->file, $tableO[$i * 2 + 2]);
+ $O = fread($this->file, $tableO[$i * 2 + 1]);
+ }
+
+ if ($tableT[$i * 2 + 1] > 0)
+ {
+ fseek($this->file, $tableT[$i * 2 + 2]);
+ $this->strings[$O] = fread($this->file, $tableT[$i * 2 + 1]);
+ }
+ }
+
+ fclose($this->file);
+ }
+}
+
+/*=====================================================================*\
+|| ###################################################################
+|| # $HeadURL$
+|| # $Id$
+|| ###################################################################
+\*=====================================================================*/
+?>
\ No newline at end of file
global $lang;
$keys = array(
- 'lastpost' => _('Last Post Time'),
- 'bugid' => _('Bug ID'),
- 'summary' => _('Summary'),
- 'reporter' => _('Reporter'),
- 'product' => _('Product'),
- 'component' => _('Component'),
- 'version' => _('Version'),
- 'status' => _('Status'),
- 'resolution' => _('Resolution'),
- 'priority' => _('Priority'),
- 'severity' => _('Severity'),
- 'votes' => _('Votes'),
- 'assignedto' => _('Assigned To')
+ 'lastpost' => T('Last Post Time'),
+ 'bugid' => T('Bug ID'),
+ 'summary' => T('Summary'),
+ 'reporter' => T('Reporter'),
+ 'product' => T('Product'),
+ 'component' => T('Component'),
+ 'version' => T('Version'),
+ 'status' => T('Status'),
+ 'resolution' => T('Resolution'),
+ 'priority' => T('Priority'),
+ 'severity' => T('Severity'),
+ 'votes' => T('Votes'),
+ 'assignedto' => T('Assigned To')
);
if ($key === false)
global $lang;
$keys = array(
- 'desc' => _('Descending'),
- 'asc' => _('Ascending')
+ 'desc' => T('Descending'),
+ 'asc' => T('Ascending')
);
if ($key === false)
case 'summary':
return $open . '<a href="showreport.php?bugid=' . $bug['bugid'] . $params . '">' . $bug['summary'] . '</a>' . $close;
case 'reporter':
- return $open . ($bug['userid'] ? $bug['username'] : _('Guest')) . $close;
+ return $open . ($bug['userid'] ? $bug['username'] : T('Guest')) . $close;
case 'lastpost':
- return "\n\t\t<div>" . $bug['lastposttime'] . "</div>\n\t\t<div>" . _('by') . ' ' . ($bug['lastpost'] ? $bug['lastpost'] : _('Guest')) . "</div>\n\t";
+ return "\n\t\t<div>" . $bug['lastposttime'] . "</div>\n\t\t<div>" . T('by') . ' ' . ($bug['lastpost'] ? $bug['lastpost'] : T('Guest')) . "</div>\n\t";
case 'votes':
- return "\n\t\t<div>" . _('For:') . ' ' . $bug['votefor'] . "</div>\n\t\t<div>" . _('Against:') . ' ' . $bug['voteagainst'] . "</div>\n\t";
+ return "\n\t\t<div>" . T('For:') . ' ' . $bug['votefor'] . "</div>\n\t\t<div>" . T('Against:') . ' ' . $bug['voteagainst'] . "</div>\n\t";
default:
return $open . $bug["$column"] . $close;
}
if (!$userinfo['userid'])
{
- $userinfo['displayname'] = _('Guest');
+ $userinfo['displayname'] = T('Guest');
$userinfo['showemail'] = false;
}
{
if ($userinfo['showemail'])
{
- $username = sprintf(_('%1$s <%2$s>'), $userinfo['displayname'], $userinfo['email']);
+ $username = sprintf(T('%1$s <%2$s>'), $userinfo['displayname'], $userinfo['email']);
}
else
{
if ($field['required'] AND empty($inputdata["$fieldname"]) AND !$searchMode)
{
- $errorlist[] = sprintf(_('The field "%1$s" is a required.'), $field['name']);
+ $errorlist[] = sprintf(T('The field "%1$s" is a required.'), $field['name']);
continue;
}
{
if (!preg_match('#' . str_replace('#', '\#', $field['regexmatch']) . '#si', $inputdata["$fieldname"]))
{
- $errorlist[] = sprintf(_('%1$s does not match the specified format'), $field['name']);
+ $errorlist[] = sprintf(T('%1$s does not match the specified format'), $field['name']);
continue;
}
}
$stylevar['right'] = ($language['direction'] == 'ltr' ? 'right' : 'left');
// start gettext engine
-putenv("LANG=$language[langcode]");
-putenv("LANGUAGE=$language[langcode]");
+if (!$bugsys->options['devgettext'])
+{
+ putenv("LANG=$language[langcode]");
+ putenv("LANGUAGE=$language[langcode]");
-setlocale(LC_ALL, $language['langcode']);
+ setlocale(LC_ALL, $language['langcode']);
-bindtextdomain('MESSAGES', $bugsys->apppath . 'locale/');
-textdomain('MESSAGES');
+ bindtextdomain('MESSAGES', $bugsys->apppath . 'locale/');
+ textdomain('MESSAGES');
-bind_textdomain_codeset('MESSAGES', $language['charset']);
+ bind_textdomain_codeset('MESSAGES', $language['charset']);
+}
+else
+{
+ $bugsys->debug("using custom MOReader instead of Gettext");
+}
require_once('./includes/definitions.php');
// mail system
$bugsys->load('mail', 'mail', true);
$mail->setFromAddress($bugsys->options['webmasteremail']);
-$mail->setFromName(_('Bugdar Notification'));
+$mail->setFromName(T('Bugdar Notification'));
/*=====================================================================*\
|| ###################################################################
// ###################################################################
// LEXICAL STRING CONSTANTS
-define('L_INVALID_ID', _('That is an invalid ID.'));
+define('L_INVALID_ID', T('That is an invalid ID.'));
// ###################################################################
// determines the user's language
return $lang;
}
+/**
+ * Translation function. This will take in a native (English) string and return either
+ * a translated version or, if it cannot find one, the native string back. If the devgettext
+ * setting is enabled, this will use MOReader to load a .mo file, otherwise it will fall back onto
+ * making a call to _(), the built-in Gettext implementation.
+ *
+ * @param string Native string
+ *
+ * @return string Translated string
+ */
+function T($str)
+{
+ global $bugsys;
+ static $mo;
+
+ if (!$bugsys->options['devgettext'])
+ {
+ return _($str);
+ }
+
+ if ($mo === null)
+ {
+ require_once './includes/class_mo.php';
+ $info = fetch_user_language();
+ if ($info['langcode'] == null)
+ {
+ $bugsys->debug("cannot translate '$str'");
+ return $str;
+ }
+ $mo = new MOReader("locale/$info[langcode]/LC_MESSAGES/messages.mo");
+ }
+
+ return $mo->T($str);
+}
+
/*=====================================================================*\
|| ###################################################################
|| # $HeadURL$
if (!$count['count'])
{
- $message->error(_('There are no bugs to display. This could be because you do not have permission to view bugs, or there may be none in the database.'));
+ $message->error(T('There are no bugs to display. This could be because you do not have permission to view bugs, or there may be none in the database.'));
}
$pagination->setTotal($count['count']);
if ($bugsys->userinfo['userid'] AND $_REQUEST['do'] != 'logout' AND $_POST['do'] != 'cplogin' AND $_REQUEST['do'] != 'cplogout')
{
- $message->error(_('You are already logged in.'));
+ $message->error(T('You are already logged in.'));
}
// ###################################################################
$db->query("INSERT INTO " . TABLE_PREFIX . "adminsession (sessionid, userid, dateline) VALUES ('$hash', " . $auth->bugdarUser['userid'] . ", " . TIMENOW . ")");
$funct->cookie(COOKIE_PREFIX . 'adminsession', $hash, false);
}
- $message->redirect(_('Welcome back! You are now logged in.'), $url);
+ $message->redirect(T('Welcome back! You are now logged in.'), $url);
}
else
{
- $message->error(_('Invalid email or password.'));
+ $message->error(T('Invalid email or password.'));
}
}
$db->query("DELETE FROM " . TABLE_PREFIX . "adminsession WHERE sessionid = '" . $bugsys->input_escape(COOKIE_PREFIX . 'adminsession') . "'");
$auth->clearCookies();
$funct->cookie(COOKIE_PREFIX . 'adminsession');
- $message->redirect(_('You have been logged out.'), ($_SERVER['HTTP_REFERER'] ? $_SERVER['HTTP_REFERER'] : 'index.php'));
+ $message->redirect(T('You have been logged out.'), ($_SERVER['HTTP_REFERER'] ? $_SERVER['HTTP_REFERER'] : 'index.php'));
}
else
{
- $message->error(_('You need to be logged in to access this feature.'));
+ $message->error(T('You need to be logged in to access this feature.'));
}
}
$mail->send($user->objdata['email'], $user->objdata['displayname']);
- $message->message(sprintf(_('An email has been dispatched to %1$s that contains instructions on how to reset your password.'), $user->objdata['email']));
+ $message->message(sprintf(T('An email has been dispatched to %1$s that contains instructions on how to reset your password.'), $user->objdata['email']));
}
}
if ($bugsys->in['fix_password'] != $bugsys->in['confirm_password'])
{
- $message->addError(_('The passwords you entered do not patch.'));
+ $message->addError(T('The passwords you entered do not patch.'));
}
if (empty($bugsys->in['fix_password']))
{
- $message->addError(_('Your new password cannot be empty.'));
+ $message->addError(T('Your new password cannot be empty.'));
}
$user->set('password', $bugsys->in['fix_password']);
$db->query("DELETE FROM " . TABLE_PREFIX . "passwordreset WHERE userid = " . $activation['userid']);
$user->update();
- $message->redirect(_('Your password has been changed successfully. You will now be redirected to the login page.'), 'login.php');
+ $message->redirect(T('Your password has been changed successfully. You will now be redirected to the login page.'), 'login.php');
}
else
{
$activation = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "passwordreset WHERE activatorid = '" . $bugsys->input_escape('activator') . "'");
if (!$activation)
{
- $message->error(_('Invalid activation reset key. Please make sure you copied the URL exactly as it appeared in the email.'));
+ $message->error(T('Invalid activation reset key. Please make sure you copied the URL exactly as it appeared in the email.'));
}
eval('$template->flush("' . $template->fetch('passwordreset') . '");');
{
$db->query("DELETE FROM " . TABLE_PREFIX . "adminsession WHERE sessionid = '" . $bugsys->input_escape(COOKIE_PREFIX . 'adminsession') . "'");
$funct->cookie(COOKIE_PREFIX . 'adminsession');
- $message->redirect(_('You have been logged out.'), 'admin/');
+ $message->redirect(T('You have been logged out.'), 'admin/');
}
else
{
- $message->error(_('You are not logged in.'));
+ $message->error(T('You are not logged in.'));
}
}
$notif->finalize();
- $message->redirect(_('The bug has been added to the database.'), ($bugsys->in['submit_reload'] == '' ? "showreport.php?bugid=" . $bug->values['bugid'] : 'newreport.php'));
+ $message->redirect(T('The bug has been added to the database.'), ($bugsys->in['submit_reload'] == '' ? "showreport.php?bugid=" . $bug->values['bugid'] : 'newreport.php'));
}
else
{
{
if (!is_array($bugsys->datastore['product']))
{
- $message->error(_('No products have been setup, therefore no bugs can be added.'));
+ $message->error(T('No products have been setup, therefore no bugs can be added.'));
}
if (!is_array($bugsys->datastore['version']))
{
- $message->error(_('No versions have been setup underneath your product(s), therefore no bugs can be added.'));
+ $message->error(T('No versions have been setup underneath your product(s), therefore no bugs can be added.'));
}
$select['severity'] = construct_datastore_select('severity', 'severity', 'severityid', ($bugsys->in['severity'] ? $bugsys->in['severity'] : $bugsys->options['defaultseverity']));
{
if ($bugsys->userinfo['userid'])
{
- $message->error(_('Sorry, you are already registered.'));
+ $message->error(T('Sorry, you are already registered.'));
}
if (!$bugsys->options['allownewreg'])
{
- $message->error(_('Sorry, we don\'t allow new registrations.'));
+ $message->error(T('Sorry, we don\'t allow new registrations.'));
}
if ($bugsys->in['email'] != $bugsys->in['confirmemail'])
{
- $message->addError(_('The emails you entered do not match.'));
+ $message->addError(T('The emails you entered do not match.'));
}
if ($bugsys->in['password'] != $bugsys->in['confirmpassword'])
{
- $message->addError(_('The passwords you entered did not match.'));
+ $message->addError(T('The passwords you entered did not match.'));
}
if ($bugsys->options['verifyemail'])
$mail->send($bugsys->in['email'], $bugsys->in['displayname']);
- $message->message(_('You now need to activate your account via email.'));
+ $message->message(T('You now need to activate your account via email.'));
}
else if ($usergroupid == 4 OR $usergroupid == 2)
{
if ($usergroupid == 4)
{
- $message->message(_('Your account is pending approval.'));
+ $message->message(T('Your account is pending approval.'));
}
else
{
- $message->message(_('Thank you for registering. You may now use your account.'));
+ $message->message(T('Thank you for registering. You may now use your account.'));
}
}
}
{
if ($bugsys->userinfo['userid'])
{
- $message->error(_('Sorry, you are already registered.'));
+ $message->error(T('Sorry, you are already registered.'));
}
if (!$bugsys->options['allownewreg'])
{
- $message->error(_('Sorry, we don\'t allow new registrations.'));
+ $message->error(T('Sorry, we don\'t allow new registrations.'));
}
foreach ($bugsys->datastore['language'] AS $value => $temp)
$mail->send($user['email'], $user['displayname']);
}
- $message->message(_('Your account is now activated and you can now login.'));
+ $message->message(T('Your account is now activated and you can now login.'));
}
else
{
- $message->error(_('Sorry, we could not match your registration string. Please make sure you entered the correct URL.'));
+ $message->error(T('Sorry, we could not match your registration string. Please make sure you entered the correct URL.'));
}
}
{
if (!is_array($bugsys->datastore['product']))
{
- $message->error(_('No products are setup, therefore there can be no bugs and thus search cannot function.'));
+ $message->error(T('No products are setup, therefore there can be no bugs and thus search cannot function.'));
}
if (!is_array($bugsys->datastore['version']))
{
- $message->error(_('No versions have been added underneath your product(s), there can be no bugs and thus search cannot function.'));
+ $message->error(T('No versions have been added underneath your product(s), there can be no bugs and thus search cannot function.'));
}
$productSelect = ConstructProductSelect();
// have to search something
if (sizeof($querybuild) < 1)
{
- $message->error(sprintf(_('You have to enter some criteria to search for. Note that words less than %1$d characters are ignored by the search engine (and some other very common words, too).'), SEARCH_WORD_MIN));
+ $message->error(sprintf(T('You have to enter some criteria to search for. Note that words less than %1$d characters are ignored by the search engine (and some other very common words, too).'), SEARCH_WORD_MIN));
}
// -------------------------------------------------------------------
if ($numrows < 1)
{
- $message->error(_('No search results were returned that matched your criteria. Please <a href="search.php?new=1">try again</a> with different search requirements.'));
+ $message->error(T('No search results were returned that matched your criteria. Please <a href="search.php?new=1">try again</a> with different search requirements.'));
}
while ($result = $db->fetch_array($search))
$log->update_history();
}
- $message->redirect(_('The specified bugs have been updated and you will now return to your search results.'), 'search.php?searchid=' . $bugsys->in['searchid']);
+ $message->redirect(T('The specified bugs have been updated and you will now return to your search results.'), 'search.php?searchid=' . $bugsys->in['searchid']);
}
// ###################################################################
}
else
{
- $message->error(_('The search results are trying to export are invalid. Please start over <a href="search.php?new=1">here</a> and try again.'));
+ $message->error(T('The search results are trying to export are invalid. Please start over <a href="search.php?new=1">here</a> and try again.'));
}
if (!$search)
{
- $message->error(_('Your search has expired because it is older than one hour. Please start over <a href="search.php?new=1">here</a>.'));
+ $message->error(T('Your search has expired because it is older than one hour. Please start over <a href="search.php?new=1">here</a>.'));
}
$bugs = $db->query("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid IN ($search[ids]) $search[orderby]");
$xml .= "\n</bugdarExport>";
- $funct->download_file($xml, _('bugdar-search-' . $search['searchid'] . '.xml'), true);
+ $funct->download_file($xml, T('bugdar-search-' . $search['searchid'] . '.xml'), true);
}
// ###################################################################
$search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . $bugsys->userinfo['userid']);
if (!$search)
{
- $message->addError(_('The search does not exist.'));
+ $message->addError(T('The search does not exist.'));
}
if ($search['name'])
{
- $message->addError(sprintf(_('This search has already been named "%1$s".'), $search['name']));
+ $message->addError(sprintf(T('This search has already been named "%1$s".'), $search['name']));
}
if (empty($bugsys->in['name']))
{
- $message->addError(_('The name cannot be empty.'));
+ $message->addError(T('The name cannot be empty.'));
}
if (!$message->hasErrors())
{
$db->query("UPDATE " . TABLE_PREFIX . "search SET name = '" . $bugsys->input_escape('name') . "' WHERE searchid = " . $bugsys->in['searchid']);
- $message->redirect(_('Your search has been saved.'), 'search.php?searchid=' . $search['searchid']);
+ $message->redirect(T('Your search has been saved.'), 'search.php?searchid=' . $search['searchid']);
}
else
{
{
if (!$search['ids'])
{
- $message->error(_('No bugs matched your search criteria. Please <a href="search.php?new=1">try again</a> with different search requirements.'));
+ $message->error(T('No bugs matched your search criteria. Please <a href="search.php?new=1">try again</a> with different search requirements.'));
}
$searchid = $search['searchid'];
while ($field = $db->fetch_array($customfields))
{
- $fieldlist["$field[fieldid]"] = sprintf(_('Custom Field %1$s (%2$s)'), $field['fieldid'], $field['name']);
+ $fieldlist["$field[fieldid]"] = sprintf(T('Custom Field %1$s (%2$s)'), $field['fieldid'], $field['name']);
}
// ###################################################################
{
if ($matches[1] == 'comment')
{
- $log['field'] = sprintf(_('Comment #%1$s %2$s'), $log['commentid'], ucwords($matches[2]));
+ $log['field'] = sprintf(T('Comment #%1$s %2$s'), $log['commentid'], ucwords($matches[2]));
}
else if ($matches[1] == 'attachment')
{
- $log['field'] = sprintf(_('Attachment #2%1$s %2$s'), $log['attachmentid'], ucwords($matches[2]));
+ $log['field'] = sprintf(T('Attachment #2%1$s %2$s'), $log['attachmentid'], ucwords($matches[2]));
}
}
else if (preg_match('#^.?custom(.field)?([0-9]+?)#', $log['field'], $matches))
$show['subscribe'] = can_perform('cansubscribe', $bug['product']);
$favorite = (bool)$db->query_first("SELECT * FROM " . TABLE_PREFIX . "favorite WHERE bugid = $bug[bugid] AND userid = " . $bugsys->userinfo['userid']);
-$favoritetext = ($favorite ? _('Remove from Favorites') : _('Add to Favorites'));
+$favoritetext = ($favorite ? T('Remove from Favorites') : T('Add to Favorites'));
$bug['userinfo'] = construct_user_display($bug);
$bug['datetime'] = $datef->format($bugsys->options['dateformat'], $bug['dateline']);
<content type="html">
' . htmlspecialchars('<table cellspacing="0" cellpadding="3" border="0">
<tr>
- <td><strong>' . _('Bug ID') . ':</strong></td>
+ <td><strong>' . T('Bug ID') . ':</strong></td>
<td>' . $bug['bugid'] . '</td>
</tr>
<tr>
- <td><strong>' . _('Summary') . ':</strong></td>
+ <td><strong>' . T('Summary') . ':</strong></td>
<td>' . $bug['summary'] . '</td>
</tr>
<tr>
- <td><strong>' . _('Product/Component/Version') . ':</strong></td>
+ <td><strong>' . T('Product/Component/Version') . ':</strong></td>
<td>' . $bugsys->datastore['product']["$bug[product]"]['title'] . '/' . (($bug['component']) ? $bugsys->datastore['product']["$bug[component]"]['title'] . '/' : '') . $bugsys->datastore['version']["$bug[version]"]['version'] . '</td>
</tr>
<tr>
- <td><strong>' . _('Status') . ':</strong></td>
+ <td><strong>' . T('Status') . ':</strong></td>
<td>' . $bugsys->datastore['status']["$bug[status]"]['status'] . '</td>
</tr>
<tr>
- <td><strong>' . _('Severity') . ':</strong></td>
+ <td><strong>' . T('Severity') . ':</strong></td>
<td>' . $bugsys->datastore['severity']["$bug[severity]"]['severity'] . '</td>
</table>
echo '<?xml version="1.0" encoding="' . $language['charset'] . '"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <title>' . sprintf(_('%1$s Syndication Feed'), $bugsys->options['trackertitle']) . '</title>
+ <title>' . sprintf(T('%1$s Syndication Feed'), $bugsys->options['trackertitle']) . '</title>
<link href="' . $bugsys->options['trackerurl'] . '"/>
<updated>' . gmdate('Y-m-d\TH:i:s\Z', $lastupdated) . '</updated>
$db->query("DELETE FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->in['searchid']);
- $message->redirect(_('This saved search has been removed from your list.'), 'userctrl.php');
+ $message->redirect(T('This saved search has been removed from your list.'), 'userctrl.php');
}
// ###################################################################
$message->errorPermission();
}
- $message->confirm(_('Are you sure you want to delete this saved search?'), 'userctrl.php', 'killsearch', _('Delete'), _('Cancel'), array('searchid' => $bugsys->in['searchid']));
+ $message->confirm(T('Are you sure you want to delete this saved search?'), 'userctrl.php', 'killsearch', T('Delete'), T('Cancel'), array('searchid' => $bugsys->in['searchid']));
}
// ###################################################################
{
if (empty($bugsys->in['validate']))
{
- $message->addError(_('You need to enter your current password to change your email or password'));
+ $message->addError(T('You need to enter your current password to change your email or password'));
}
else
{
if (md5(md5($bugsys->in['validate']) . md5($bugsys->userinfo['salt'])) != $bugsys->userinfo['password'])
{
- $message->addError(_('Your authentication password does not match the one in our records'));
+ $message->addError(T('Your authentication password does not match the one in our records'));
}
}
}
{
if (!empty($bugsys->in['email_change']) AND empty($bugsys->in['email_confirm']))
{
- $message->addError(_('You need to enter both the email and confirm email fields to change your address'));
+ $message->addError(T('You need to enter both the email and confirm email fields to change your address'));
}
if ($bugsys->in['email_change'] != $bugsys->in['email_confirm'])
{
- $message->addError(_('Your email and confirm email addresses do not match'));
+ $message->addError(T('Your email and confirm email addresses do not match'));
}
$userapi->set('email', $bugsys->in['email_change']);
{
if (!empty($bugsys->in['password_change']) AND empty($bugsys->in['password_confirm']))
{
- $message->addError(_('You need to enter both the password and confirm password fields to change your password'));
+ $message->addError(T('You need to enter both the password and confirm password fields to change your password'));
}
else
{
if ($bugsys->in['password_change'] != $bugsys->in['password_confirm'])
{
- $message->addError(_('Your password and confirm password do not match'));
+ $message->addError(T('Your password and confirm password do not match'));
}
}
}
}
- $message->redirect(_('The changes to your account have been made.'), 'userctrl.php');
+ $message->redirect(T('The changes to your account have been made.'), 'userctrl.php');
}
}
if ($vote['uservote'])
{
- $message->error(_('You have already voted on this bug.'));
+ $message->error(T('You have already voted on this bug.'));
}
// handle userids
}
else
{
- $message->error(_('You need to specify whether you want to vote for or against this bug.'));
+ $message->error(T('You need to specify whether you want to vote for or against this bug.'));
}
$db->query("UPDATE " . TABLE_PREFIX . "vote SET userids = '$userids', votefor = $votefor, voteagainst = $voteagainst WHERE bugid = $bug[bugid]");
- $message->redirect(_('Your vote has been added.'), "showreport.php?bugid=$bug[bugid]");
+ $message->redirect(T('Your vote has been added.'), "showreport.php?bugid=$bug[bugid]");
}
/*=====================================================================*\