r1608: Merging r1607 from trunk
authorRobert Sesek <rsesek@bluestatic.org>
Fri, 21 Mar 2008 03:35:30 +0000 (03:35 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Fri, 21 Mar 2008 03:35:30 +0000 (03:35 +0000)
47 files changed:
admin/automation.php
admin/field.php
admin/global.php
admin/index.php
admin/language.php
admin/permission.php
admin/priority.php
admin/product.php
admin/resolution.php
admin/setting.php
admin/severity.php
admin/status.php
admin/user.php
admin/usergroup.php
admin/userhelp.php
attachment.php
docs/changes.txt
editcomment.php
editreport.php
explain.php
favorite.php
global.php
help.php
includes/api_automation.php
includes/api_comment.php
includes/api_field.php
includes/api_language.php
includes/api_user.php
includes/api_usergroup.php
includes/api_userhelp.php
includes/class_admin_navigation.php
includes/class_message_reporter.php
includes/class_mo.php [new file with mode: 0644]
includes/class_sort.php
includes/functions.php
includes/init.php
includes/language.php
index.php
login.php
newreport.php
register.php
search.php
showhistory.php
showreport.php
syndicate.php
userctrl.php
vote.php

index c69ef71cc5c2c5090f948d13eda11621cdc89bb0..5d1ea04749d350624168d23317815169ddb8d957 100644 (file)
@@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill')
 
 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']));
 }
 
 // ###################################################################
@@ -133,7 +133,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit')
                $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'));
        
@@ -143,27 +143,27 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit')
        }
        
        $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');
        
@@ -180,8 +180,8 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit')
                        
                        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;
                        
@@ -214,15 +214,15 @@ if ($_REQUEST['do'] == 'modify')
        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&amp;actionid=$action[actionid]\">[" . _('Edit') . "]</a> <a href=\"automation.php?do=delete&amp;actionid=$action[actionid]\">[" . _('Delete') . "]</a>");
+               $admin->row_text($action['name'] . "\n<div class=\"smallfont\">$action[description]</div>", "<a href=\"automation.php?do=edit&amp;actionid=$action[actionid]\">[" . T('Edit') . "]</a> <a href=\"automation.php?do=delete&amp;actionid=$action[actionid]\">[" . T('Delete') . "]</a>");
        }
        
        $admin->table_end();
index 5489a8ff958ae1744d8097c2849dca55367c41dd..c27f40c204339b4503533a85ef70376c1eec5524 100644 (file)
@@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill')
 
 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']));
 }
 
 // ###################################################################
@@ -135,7 +135,7 @@ if ($_REQUEST['do'] == 'update')
                        (" . 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')));
 }
 
 // ###################################################################
@@ -159,7 +159,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit')
                $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)
        {
@@ -169,12 +169,12 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit')
        {
                $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)
@@ -198,7 +198,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == '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();
@@ -209,31 +209,31 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit')
                $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;
                }
                
@@ -241,7 +241,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit')
                
                // custom field permissions
                $admin->table_start();
-               $admin->table_head(_('Custom Field Permissions'));
+               $admin->table_head(T('Custom Field Permissions'));
                
                if ($edit)
                {
@@ -256,9 +256,9 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == '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]]");
                }
                
@@ -281,11 +281,11 @@ if ($_REQUEST['do'] == 'modify')
        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))
@@ -294,7 +294,7 @@ if ($_REQUEST['do'] == 'modify')
                        array(
                                "$field[name]<div class=\"smallfont\"><em>$field[description]</em></div>" => 'l',
                                "$field[fieldid]" => 'c',
-                               "<a href=\"field.php?do=edit&amp;fieldid=$field[fieldid]\">[" . _('Edit') . "]</a> <a href=\"field.php?do=delete&amp;fieldid=$field[fieldid]\">[" . _('Delete') . "]</a>" => 'c'
+                               "<a href=\"field.php?do=edit&amp;fieldid=$field[fieldid]\">[" . T('Edit') . "]</a> <a href=\"field.php?do=delete&amp;fieldid=$field[fieldid]\">[" . T('Delete') . "]</a>" => 'c'
                        )
                );
        }
index 68ee72d840bedadaa40a828346ff6fc9c907f89e..89eacdfd7877e1c5e2dd96d8dc7b2be90dc369fb 100755 (executable)
@@ -28,13 +28,13 @@ require_once('./includes/functions.php');
 // 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 &amp; 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 &amp; Permissions'), 'user.php');
 
 require_once('./includes/class_admin_navigation.php');
 
@@ -42,7 +42,7 @@ 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');
 
@@ -54,14 +54,14 @@ function admin_login()
        
        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();
        
@@ -83,7 +83,7 @@ if (can_perform('canadminpanel'))
                $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
@@ -138,22 +138,22 @@ function AdminPageNavigatorCallback($baselink, $nextpage, $prevpage, $show, $pag
        
        if ($show['first'])
        {
-               $return .= '<a href="' . $baselink . 'p=1&amp;pp=' . $paginator->getPerPage() . '">' . _('First') . '</a> ...';
+               $return .= '<a href="' . $baselink . 'p=1&amp;pp=' . $paginator->getPerPage() . '">' . T('First') . '</a> ...';
        }
        if ($show['prev'])
        {
-               $return .= '<a href="' . $baselink . 'p=' . $prevpage . '&amp;pp=' . $paginator->getPerPage() . '">' . _('Prev') . '</a> ...';
+               $return .= '<a href="' . $baselink . 'p=' . $prevpage . '&amp;pp=' . $paginator->getPerPage() . '">' . T('Prev') . '</a> ...';
        }
        
        $return .= $pagebits;
        
        if ($show['next'])
        {
-               $return .= '... <a href="' . $baselink . 'p=' . $nextpage . '&amp;pp=' . $paginator->getPerPage() . '">' . _('Next') . '</a>';
+               $return .= '... <a href="' . $baselink . 'p=' . $nextpage . '&amp;pp=' . $paginator->getPerPage() . '">' . T('Next') . '</a>';
        }
        if ($show['last'])
        {
-               $return .= '... <a href="' . $baselink . 'p=' . $paginator->getPageCount() . '&amp;pp=' . $paginator->getPerPage() . '">' . _('Last') . '</a>';
+               $return .= '... <a href="' . $baselink . 'p=' . $paginator->getPageCount() . '&amp;pp=' . $paginator->getPerPage() . '">' . T('Last') . '</a>';
        }
        return '<div style="margin-top: 15px; float: ' . $stylevar['right'] . '">' . $return . '</div>';
 }
index af3dd1c136587009043f5f5449c6784dcf75e6ad..4375764e48da58d76adc2a9c6466289039cd621b 100755 (executable)
@@ -25,7 +25,7 @@ NavLinks::optionsPages();
 $navigator->set_focus('tab', 'options', null);
 $navigator->set_focus('link', 'options-pages-home', 'options-pages');
 
-$admin->page_start(_('Home'));
+$admin->page_start(T('Home'));
 
 // ###################################################################
 
@@ -37,11 +37,11 @@ if (!(defined('NO_VERSION_CHECK') AND constant('NO_VERSION_CHECK') == true))
                $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>');
                }
        }
 }
@@ -49,34 +49,34 @@ if (!(defined('NO_VERSION_CHECK') AND constant('NO_VERSION_CHECK') == true))
 // ###################################################################
 
 $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')));
 
 // -------------------------------------------------------------------
 
index fc39e086cbeb5a8dcad37b7c8018aa206c44ddac..fdad1581267440bac1eb4f08969d130f2523fa35 100644 (file)
@@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill')
 
 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)));
 }
 
 // ###################################################################
@@ -81,19 +81,19 @@ if ($_REQUEST['do'] == 'add')
        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();
@@ -133,21 +133,21 @@ if ($_REQUEST['do'] == 'edit')
        
        $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();
@@ -163,12 +163,12 @@ if ($_REQUEST['do'] == 'modify')
        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))
@@ -176,7 +176,7 @@ if ($_REQUEST['do'] == 'modify')
                $admin->row_multi_item(array(
                        "<a href=\"language.php?do=edit&amp;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'
                ));
        }
        
index 627063ec3d1a379ace95eb4d1f058cfd754473d6..43ffea9577c51c026c933dbe7b74f4754a62d5a4 100755 (executable)
@@ -37,30 +37,30 @@ if (!can_perform('canadmingroups'))
 // 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')
        )
 );
 
@@ -87,7 +87,7 @@ if ($_REQUEST['do'] == 'kill')
 
 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)));
 }
 
 // ###################################################################
@@ -107,7 +107,7 @@ if ($_REQUEST['do'] == 'edit')
                $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']);
@@ -125,7 +125,7 @@ if ($_REQUEST['do'] == 'edit')
        
        // 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)
        {
@@ -175,10 +175,10 @@ if ($_POST['do'] == 'update')
 
 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))
@@ -189,7 +189,7 @@ if ($_REQUEST['do'] == 'modify')
        
        foreach ($usergroups AS $group)
        {
-               $admin->row_text($group['title'], ($bugsys->in['usergroupid'] != $group['usergroupid'] ? "<a href=\"permission.php?do=modify&amp;usergroupid=$group[usergroupid]\">[" . _('Expand') . "]</a>" : ''), 'top', 2, 'alt3');
+               $admin->row_text($group['title'], ($bugsys->in['usergroupid'] != $group['usergroupid'] ? "<a href=\"permission.php?do=modify&amp;usergroupid=$group[usergroupid]\">[" . T('Expand') . "]</a>" : ''), 'top', 2, 'alt3');
                
                if ($bugsys->in['usergroupid'] == $group['usergroupid'])
                {
@@ -207,14 +207,14 @@ if ($_REQUEST['do'] == 'modify')
                                
                                if (!isset($permissions["$product[productid]"]))
                                {
-                                       $statuslink = _('Inherited From Usergroup Settings: ');
-                                       $statuslink .= "<a href=\"permission.php?do=edit&amp;usergroupid=$groupid&amp;productid=$prodid\">[" . _('Customize') . ']</a>';
+                                       $statuslink = T('Inherited From Usergroup Settings: ');
+                                       $statuslink .= "<a href=\"permission.php?do=edit&amp;usergroupid=$groupid&amp;productid=$prodid\">[" . T('Customize') . ']</a>';
                                }
                                else
                                {
-                                       $statuslink = _('Customized: ');
-                                       $statuslink .= "<a href=\"permission.php?do=edit&amp;usergroupid=$groupid&amp;productid=$prodid\">[" . _('Edit') . ']</a>';
-                                       $statuslink .= " <a href=\"permission.php?do=delete&amp;usergroupid=$groupid&amp;productid=$prodid\">[" . _('Revert') . ']</a>';
+                                       $statuslink = T('Customized: ');
+                                       $statuslink .= "<a href=\"permission.php?do=edit&amp;usergroupid=$groupid&amp;productid=$prodid\">[" . T('Edit') . ']</a>';
+                                       $statuslink .= " <a href=\"permission.php?do=delete&amp;usergroupid=$groupid&amp;productid=$prodid\">[" . T('Revert') . ']</a>';
                                }
                                
                                $admin->row_text($product['title'], $statuslink);
index 19cacb1ca4ce97db47feddc9a4bf572226624952..93bc424246f1c44b098853eb704db96ffcba3680 100755 (executable)
@@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill')
 
 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)));
 }
 
 // ###################################################################
@@ -78,13 +78,13 @@ if ($_REQUEST['do'] == 'add')
        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();
@@ -118,14 +118,14 @@ if ($_REQUEST['do'] == 'edit')
        $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();
@@ -140,17 +140,17 @@ if ($_REQUEST['do'] == 'modify')
        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&amp;priorityid=$priority[priorityid]\">$priority[priority]</a>", "(priorityid: $priority[priorityid]) <a href=\"priority.php?do=edit&amp;priorityid=$priority[priorityid]\">[" . _('Edit') . "]</a> <a href=\"priority.php?do=delete&amp;priorityid=$priority[priorityid]\">[" . _('Delete') . "]</a>");
+               $admin->row_text("$priority[displayorder]: <a href=\"priority.php?do=edit&amp;priorityid=$priority[priorityid]\">$priority[priority]</a>", "(priorityid: $priority[priorityid]) <a href=\"priority.php?do=edit&amp;priorityid=$priority[priorityid]\">[" . T('Edit') . "]</a> <a href=\"priority.php?do=delete&amp;priorityid=$priority[priorityid]\">[" . T('Delete') . "]</a>");
        }
        $db->free_result($priorities);
        
index a0b15992d401a4ac24610d9620a014b3cdb349cc..82705fde99b07c71538ed6a194482443d72cd51f 100755 (executable)
@@ -41,22 +41,22 @@ function construct_option_list($type_display, $type, $id, $edit, $addcomponent,
        
        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);
@@ -65,7 +65,7 @@ function construct_option_list($type_display, $type, $id, $edit, $addcomponent,
        
        $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 . '\')" />';
 }
 
 // ###################################################################
@@ -92,7 +92,7 @@ if ($_REQUEST['do'] == 'killversion')
 
 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)));
 }
 
 // ###################################################################
@@ -124,15 +124,15 @@ if ($_REQUEST['do'] == 'addversion')
                $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();
@@ -146,7 +146,7 @@ if ($_REQUEST['do'] == 'updateversion')
 {
        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));
@@ -159,7 +159,7 @@ if ($_REQUEST['do'] == 'updateversion')
 
 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))
@@ -170,10 +170,10 @@ if ($_REQUEST['do'] == 'editversion')
        $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();
@@ -205,7 +205,7 @@ if ($_REQUEST['do'] == 'killproduct')
 
 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)));
 }
 
 // ###################################################################
@@ -214,7 +214,7 @@ if ($_REQUEST['do'] == 'insertproduct')
 {
        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("
@@ -244,15 +244,15 @@ if ($_REQUEST['do'] == 'addproduct')
        }
        $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();
@@ -266,7 +266,7 @@ if ($_REQUEST['do'] == 'updateproduct')
 {
        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']))
@@ -287,7 +287,7 @@ if ($_REQUEST['do'] == 'editproduct')
        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))
@@ -298,10 +298,10 @@ if ($_REQUEST['do'] == 'editproduct')
        $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();
@@ -338,7 +338,7 @@ if ($_REQUEST['do'] == 'modify')
 {
        $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">
@@ -378,15 +378,15 @@ EOF;
        }
        
        $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');
                }
        }
        
@@ -394,14 +394,14 @@ EOF;
        foreach ($products AS $product)
        {
                // Product
-               $admin->row_text("<a href=\"product.php?do=editproduct&amp;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&amp;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');
                        }
                }
                
@@ -410,21 +410,21 @@ EOF;
                {
                        foreach ($components["$product[productid]"] AS $comp)
                        {
-                               $admin->row_text("-- <a href=\"product.php?do=editproduct&amp;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&amp;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();
        
index d74cffa6c3e3799ad896a8174e9d3a5369723e6d..1f8d3893f5264a2d1113cd687f4635a58fd6d442 100755 (executable)
@@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill')
 
 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)));
 }
 
 // ###################################################################
@@ -78,13 +78,13 @@ if ($_REQUEST['do'] == 'add')
        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();
@@ -118,14 +118,14 @@ if ($_REQUEST['do'] == 'edit')
        $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();
@@ -140,17 +140,17 @@ if ($_REQUEST['do'] == 'modify')
        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&amp;resolutionid=$resolution[resolutionid]\">$resolution[resolution]</a>", "(resolutionid: $resolution[resolutionid]) <a href=\"resolution.php?do=edit&amp;resolutionid=$resolution[resolutionid]\">[" . _('Edit') . "]</a> <a href=\"resolution.php?do=delete&amp;resolutionid=$resolution[resolutionid]\">[" . _('Delete') . "]</a>");
+               $admin->row_text("$resolution[displayorder]: <a href=\"resolution.php?do=edit&amp;resolutionid=$resolution[resolutionid]\">$resolution[resolution]</a>", "(resolutionid: $resolution[resolutionid]) <a href=\"resolution.php?do=edit&amp;resolutionid=$resolution[resolutionid]\">[" . T('Edit') . "]</a> <a href=\"resolution.php?do=delete&amp;resolutionid=$resolution[resolutionid]\">[" . T('Delete') . "]</a>");
        }
        $db->free_result($resolutions);
        
index e7b5c0878f12cf63ba568cc121719feefa8e7c0f..17d486d2572f5d08971400017599ddb24c26791f 100755 (executable)
@@ -72,7 +72,7 @@ if ($_POST['do'] == 'update')
 
 if ($_REQUEST['do'] == 'modify')
 {
-       $admin->page_start(_('Settings'));
+       $admin->page_start(T('Settings'));
        
        $admin->form_start('setting.php', 'update');
        
@@ -80,10 +80,10 @@ if ($_REQUEST['do'] == 'modify')
        
        // ###################################################################
        $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)
        {
@@ -92,129 +92,129 @@ if ($_REQUEST['do'] == 'modify')
                        $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 (&quot;/&quot;).</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 (&quot;/&quot;).</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();
        
@@ -227,6 +227,9 @@ if ($_REQUEST['do'] == 'modify')
                // 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']);
        }
 
        // ###################################################################
index 59bac7bed91bda7260e4c9654cf42833e290a043..6b7aa7e329765345bc0b410d39d205cd3477f662 100755 (executable)
@@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill')
 
 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)));
 }
 
 // ###################################################################
@@ -78,13 +78,13 @@ if ($_REQUEST['do'] == 'add')
        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();
@@ -118,14 +118,14 @@ if ($_REQUEST['do'] == 'edit')
        $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();
@@ -140,17 +140,17 @@ if ($_REQUEST['do'] == 'modify')
        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&amp;severityid=$severity[severityid]\">$severity[severity]</a>", "(severityid: $severity[severityid]) <a href=\"severity.php?do=edit&amp;severityid=$severity[severityid]\">[" . _('Edit') . "]</a> <a href=\"severity.php?do=delete&amp;severityid=$severity[severityid]\">[" . _('Delete') . "]</a>");
+               $admin->row_text("$severity[displayorder]: <a href=\"severity.php?do=edit&amp;severityid=$severity[severityid]\">$severity[severity]</a>", "(severityid: $severity[severityid]) <a href=\"severity.php?do=edit&amp;severityid=$severity[severityid]\">[" . T('Edit') . "]</a> <a href=\"severity.php?do=delete&amp;severityid=$severity[severityid]\">[" . T('Delete') . "]</a>");
        }
        $db->free_result($severities);
        
index ccc2371c562f2b48b848d96ff7cd0eecdc44f5d7..88ea3cd3403957d2a67e2df07cd4535305dd8801 100755 (executable)
@@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill')
 
 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)));
 }
 
 // ###################################################################
@@ -79,14 +79,14 @@ if ($_REQUEST['do'] == 'add')
        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();
@@ -121,15 +121,15 @@ if ($_REQUEST['do'] == 'edit')
        $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();
@@ -144,17 +144,17 @@ if ($_REQUEST['do'] == 'modify')
        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&amp;statusid=$status[statusid]\">$status[status]</a>", "(statusid: $status[statusid]) <a href=\"status.php?do=edit&amp;statusid=$status[statusid]\">[" . _('Edit') . "]</a> <a href=\"status.php?do=delete&amp;statusid=$status[statusid]\">[" . _('Delete') . "]</a>");
+               $admin->row_text("$colorblock$status[displayorder]: <a href=\"status.php?do=edit&amp;statusid=$status[statusid]\">$status[status]</a>", "(statusid: $status[statusid]) <a href=\"status.php?do=edit&amp;statusid=$status[statusid]\">[" . T('Edit') . "]</a> <a href=\"status.php?do=delete&amp;statusid=$status[statusid]\">[" . T('Delete') . "]</a>");
        }
        $db->free_result($statuses);
        
index 0a5da95d58e1b7d3b739b4ee3924f242e80d8200..a2d9a0e15c62022ee09e3de6764012eb81ee8d79 100644 (file)
@@ -73,7 +73,7 @@ if ($_REQUEST['do'] == 'kill')
 
 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)));
 }
 
 // ###################################################################
@@ -179,7 +179,7 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
                $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'));
        
@@ -190,17 +190,17 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
        
        $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)
@@ -211,33 +211,33 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
                }
                $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'])
        {
@@ -257,16 +257,16 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
                }
        }
        
-       $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',
@@ -275,7 +275,7 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
        ));
        
        $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',
@@ -284,7 +284,7 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
        ));
        
        $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',
@@ -293,7 +293,7 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
        ));
        
        $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',
@@ -302,7 +302,7 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
        ));
        
        $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',
@@ -351,11 +351,11 @@ if ($_REQUEST['do'] == 'search')
                }
                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))
                        {
@@ -363,7 +363,7 @@ if ($_REQUEST['do'] == 'search')
                                        $row['displayname'] => 'l',
                                        $row['email'] => 'c',
                                        $row['userid'] => 'c',
-                                       '<a href="user.php?do=edit&amp;userid=' . $row['userid'] . '">[' . _('Edit') . ']</a>' => 'c'
+                                       '<a href="user.php?do=edit&amp;userid=' . $row['userid'] . '">[' . T('Edit') . ']</a>' => 'c'
                                ));
                        }
                        
@@ -375,7 +375,7 @@ if ($_REQUEST['do'] == 'search')
        
        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.'));
        }
 }
 
@@ -390,10 +390,10 @@ if ($_REQUEST['do'] == 'showall')
        $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']);
@@ -406,7 +406,7 @@ if ($_REQUEST['do'] == 'showall')
                        $user['displayname'] => 'l',
                        $user['email'] => 'c',
                        $user['userid'] => 'c',
-                       '<a href="user.php?do=edit&amp;userid=' . $user['userid'] . '">[' . _('Edit') . ']</a>' => 'c'
+                       '<a href="user.php?do=edit&amp;userid=' . $user['userid'] . '">[' . T('Edit') . ']</a>' => 'c'
                ));
        }
        
@@ -424,13 +424,13 @@ if ($_REQUEST['do'] == 'modify')
        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:', '');
        
index 0a7362a83e0dc7f3dd843a45176de5479e71bbb3..7cefd891cc50d9c982f805252673890f91d6c707 100755 (executable)
@@ -37,42 +37,42 @@ if (!can_perform('canadmingroups'))
 // 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')
        )
 );
 
@@ -101,10 +101,10 @@ if ($_REQUEST['do'] == 'delete')
 {
        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']));
 }
 
 // ###################################################################
@@ -126,7 +126,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit' OR $_REQUEST['do'] ==
                $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'));
        
@@ -153,15 +153,15 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit' OR $_REQUEST['do'] ==
        
        // 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)
        {
@@ -176,7 +176,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit' OR $_REQUEST['do'] ==
                
        // custom field permissions
        $admin->table_start();
-       $admin->table_head(_('Custom Field Permissions'));
+       $admin->table_head(T('Custom Field Permissions'));
        
        if ($edit OR $clone)
        {
@@ -191,9 +191,9 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit' OR $_REQUEST['do'] ==
        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]]");
        }
        
@@ -345,7 +345,7 @@ if ($_POST['do'] == 'doapprove')
                $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.'));
 }
 
 // ###################################################################
@@ -355,13 +355,13 @@ if ($_REQUEST['do'] == 'approve')
        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))
@@ -387,11 +387,11 @@ if ($_REQUEST['do'] == 'modify')
        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))
@@ -412,16 +412,16 @@ if ($_REQUEST['do'] == 'modify')
                $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&amp;usergroupid=$group[usergroupid]\">$group[title]</a>" => 'l',
                        (!$group['total'] ? '-' : $group['total']) => 'c',
 
-                       "<a href=\"usergroup.php?do=edit&amp;usergroupid=$group[usergroupid]\">[" . _('Edit') . "]</a> " .
-                       "<a href=\"usergroup.php?do=clone&amp;usergroupid=$group[usergroupid]\">[" . _('Clone') . "]</a>" .
-                       ($group['usergroupid'] > 6 ? " <a href=\"usergroup.php?do=delete&amp;usergroupid=$group[usergroupid]\">[" . _('Delete') . "]</a>" : '') => 'c'
+                       "<a href=\"usergroup.php?do=edit&amp;usergroupid=$group[usergroupid]\">[" . T('Edit') . "]</a> " .
+                       "<a href=\"usergroup.php?do=clone&amp;usergroupid=$group[usergroupid]\">[" . T('Clone') . "]</a>" .
+                       ($group['usergroupid'] > 6 ? " <a href=\"usergroup.php?do=delete&amp;usergroupid=$group[usergroupid]\">[" . T('Delete') . "]</a>" : '') => 'c'
                ));
        }
        
index e74778000684a6529adbefab3b165c57d84e4a72..55000555757b9b35a484e84f53e6b11d2cbb94d8 100755 (executable)
@@ -59,7 +59,7 @@ if ($_REQUEST['do'] == 'kill')
 
 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']));
 }
 
 // ###################################################################
@@ -81,16 +81,16 @@ if ($_REQUEST['do'] == 'add')
 {
        $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();
        
@@ -127,18 +127,18 @@ if ($_REQUEST['do'] == 'modify')
 {
        $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&amp;keystring=' . $topic['keystring'] . '">[' . _('Delete') . ']</a>' : '');
+               $delete = (!in_array($topic['keystring'], UserHelpAPI::not_able_to_delete()) ? '<br /><br /><a href="userhelp.php?do=delete&amp;keystring=' . $topic['keystring'] . '">[' . T('Delete') . ']</a>' : '');
                
                $admin->row_textarea($inputfield . '<br /><em>' . $topic['keystring'] . '</em>' . $delete, 'help[' . $topic['keystring'] . '][body]', $topic['body']);
        }
index a2ba7929766cd2c551681fd1512f9d617e34c6cb..3406c8d1e40f06616843b51a01d6a251141d845f 100755 (executable)
@@ -84,24 +84,24 @@ if ($_POST['do'] == 'insert')
        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']));
@@ -154,7 +154,7 @@ if ($_POST['do'] == 'insert')
                
                $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
        {
@@ -211,7 +211,7 @@ if ($_POST['do'] == 'update')
                
                $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
        {
@@ -231,7 +231,7 @@ if ($_POST['do'] == 'update')
                
                $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]");
        }
 }
 
index 69a2f7e09dfe073bd44a555bf296023a082d0db2..19ea96022a9330bfa0b664402fff51f9dede0e2c 100644 (file)
@@ -8,6 +8,7 @@
 - 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
 ===============================
index a9ca64dbc35f1b9275b3130062c0d10fad257967..2dbf56e4893130f489b79f5df8a3f631aef78bb9 100644 (file)
@@ -99,7 +99,7 @@ if ($_POST['do'] == 'kill')
                );
        }
        
-       $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']);
 }
 
 // ###################################################################
@@ -113,10 +113,10 @@ if ($_REQUEST['do'] == 'delete')
        
        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']));
 }
 
 // ###################################################################
@@ -134,7 +134,7 @@ if ($_POST['do'] == 'update')
        
        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())
@@ -168,7 +168,7 @@ if ($_POST['do'] == 'update')
                
                $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
        {
index f7128e01c163a761e802d4710bfec8edfb70cbef..fe2734760dcc59452479afba78d988eb85bb0122 100644 (file)
@@ -74,7 +74,7 @@ if ($_POST['do'] == 'kill')
        
        $bugapi->delete();
        
-       $message->redirect(_('The entire bug has been deleted.'), 'index.php');
+       $message->redirect(T('The entire bug has been deleted.'), 'index.php');
 }
 
 // ###################################################################
@@ -86,7 +86,7 @@ if ($_REQUEST['do'] == 'delete')
                $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']));
 }
 
 // ###################################################################
@@ -133,7 +133,7 @@ if ($_POST['do'] == 'update')
        {
                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'])
                {
@@ -166,7 +166,7 @@ if ($_POST['do'] == 'update')
                {
                        $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]");
                }
        }
        
@@ -226,7 +226,7 @@ if ($_POST['do'] == 'update')
        
        $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]");
 }
 
 /*=====================================================================*\
index 365756834a1658ba1d79befec179f55b854efd42..1e130998126c38f176fd7e76e4fb7b99d47ed0a8 100644 (file)
@@ -44,7 +44,7 @@ if ($_REQUEST['do'] == 'products')
 {
        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)
@@ -129,7 +129,7 @@ if ($_REQUEST['do'] == 'automations')
                        
                        if ($automation['comment'])
                        {
-                               $left = _('Add Comment');
+                               $left = T('Add Comment');
                                $right = $automation['comment'];
                                $trextra = ' class="altcolor"';
                                
@@ -157,7 +157,7 @@ if ($_REQUEST['do'] == 'automations')
                                                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') . '";');
                                }
index e549116f4c929d37831ffc58b9ed70ad5975473d..b9a59513910158d26ce7f16da1afeb46dae4cf81 100644 (file)
@@ -56,12 +56,12 @@ if ($_REQUEST['do'] == 'handle')
        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']);
        }
 }
 
@@ -84,7 +84,7 @@ if ($_REQUEST['do'] == 'manage')
        
        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');
index e37eead711e40244a18a860b50a3c1c9835facaa..0405f844ec4f5bad690c208543b0b0ad0f1e3318 100755 (executable)
@@ -30,6 +30,7 @@ $template->setExtension('tpl');
 $template->setPreParseHook('isso_pre_parse_hook');
 $template->setTemplateDir('templates/');
 $template->setDatabaseCache(TABLE_PREFIX . 'template');
+$template->langcall = 'T';
 
 // ###################################################################
 // global template variables
index 9f874b78bf8e2627516819171c9ed813d837caf1..c22ba31dce5225e6c673509bd3f15d0b33d95deb 100644 (file)
--- a/help.php
+++ b/help.php
@@ -29,8 +29,8 @@ require_once('./global.php');
 
 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
 {
index f559bb313a5c7f23ecf85808b2241740e18a1af8..becfda365fbc45d34bcaa07395f98510ee245af3 100644 (file)
@@ -104,12 +104,12 @@ class AutomationAPI extends API
        {
                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']);
index b33f2f7814afa495a2ae79b399a9c96404754333..738c0f2295ac1ed1860e8a56d6ce62b471f1da30 100644 (file)
@@ -84,7 +84,7 @@ class CommentAPI extends API
                $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);
                }
@@ -120,7 +120,7 @@ class CommentAPI extends API
        {
                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).'));
                }
        }
 }
index e74ce9de29a9aecca5076a2ad5f776d5f5c49440..cb303692e323eccebcf46cbb3db376c2b9aaff82 100644 (file)
@@ -82,9 +82,9 @@ class FieldAPI extends API
        {
                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)
@@ -168,7 +168,7 @@ class FieldAPI extends API
                        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
                        {
index f97ce4c4377d2acf0bfea1be3bb892aff92087d1..856f70178c3456c83c01a24567966950f5b3a6a7 100644 (file)
@@ -93,12 +93,12 @@ class LanguageAPI extends API
                $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.'));
                }
        }
        
@@ -123,7 +123,7 @@ class LanguageAPI extends API
        {
                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;
        }
index d8e563cbd5ae5d7cc213f9a1fb3c2d5928b91f30..1b1ee9a6a0be4252385965085eb5745f9ddac0dd 100644 (file)
@@ -146,11 +146,11 @@ class UserAPI extends API
                
                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;
        }
@@ -170,7 +170,7 @@ class UserAPI extends API
                
                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;
        }
@@ -274,7 +274,7 @@ class UserAPI extends API
        {
                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)
@@ -282,7 +282,7 @@ class UserAPI extends API
                        $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'));
                        }
                }
        }
index cd52322d35b8fd4b08f43d2c684d2392b7c610cd..2344287cb7bc3d1d35b3bc36953263044e64f11d 100644 (file)
@@ -93,7 +93,7 @@ class UsergroupAPI extends API
        {
                if ($this->values['usergroupid'] < 7)
                {
-                       return _('You can\'t delete a default usergroup.');
+                       return T('You can\'t delete a default usergroup.');
                }
        }
        
index 1c8605b4518afa3c0969db8718fc6b7884606041..5cedef27b7dc93ce3c55cfcfccd3ddad2db05f48 100644 (file)
@@ -165,12 +165,12 @@ class UserHelpAPI extends API
                
                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;
index 9dc176b4dab984636b95dbdae8064908f1cb414a..7e7549cd3ef48fe0fc72a5ca8ce6d57e0fa6e441 100644 (file)
@@ -43,11 +43,11 @@ class NavLinks
        {
                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');
        }
        
        // ###################################################################
@@ -60,8 +60,8 @@ class NavLinks
        {
                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');
        }
        
        // ###################################################################
@@ -77,8 +77,8 @@ class NavLinks
                global $navigator;
                
                NavLinks::languagesAdd();
-               $navigator->add_component('link', 'options-languages-edit', 'options-languages', _('Edit Language'), 'language.php?do=edit&amp;languageid=' . $id);
-               $navigator->add_component('link', 'options-languages-delete', 'options-languages', _('Delete'), 'language.php?do=delete&amp;languageid=' . $id);
+               $navigator->add_component('link', 'options-languages-edit', 'options-languages', T('Edit Language'), 'language.php?do=edit&amp;languageid=' . $id);
+               $navigator->add_component('link', 'options-languages-delete', 'options-languages', T('Delete'), 'language.php?do=delete&amp;languageid=' . $id);
        }
        
        // ###################################################################
@@ -91,8 +91,8 @@ class NavLinks
        {
                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');
        }
        
        // ###################################################################
@@ -105,9 +105,9 @@ class NavLinks
        {
                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');
        }
        
        // ###################################################################
@@ -123,10 +123,10 @@ class NavLinks
                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&amp;productid=' . $id);
-               $navigator->add_component('link', 'products-edit-version', 'products-edit', _('Add New Version'), 'product.php?do=addversion&amp;productid=' . $id);
-               $navigator->add_component('link', 'products-edit-delete', 'products-edit', _('Delete Product'), 'product.php?do=deleteproduct&amp;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&amp;productid=' . $id);
+               $navigator->add_component('link', 'products-edit-version', 'products-edit', T('Add New Version'), 'product.php?do=addversion&amp;productid=' . $id);
+               $navigator->add_component('link', 'products-edit-delete', 'products-edit', T('Delete Product'), 'product.php?do=deleteproduct&amp;productid=' . $id);
        }
        
        // ###################################################################
@@ -139,13 +139,13 @@ class NavLinks
        {
                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');
        }
        
        // ###################################################################
@@ -158,8 +158,8 @@ class NavLinks
        {
                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');
        }
        
        // ###################################################################
@@ -175,7 +175,7 @@ class NavLinks
                global $navigator;
                
                NavLinks::fieldsAdd();
-               $navigator->add_component('link', 'fields-delete', 'fields', _('Delete'), 'field.php?do=delete&amp;fieldid=' . $id);
+               $navigator->add_component('link', 'fields-delete', 'fields', T('Delete'), 'field.php?do=delete&amp;fieldid=' . $id);
        }
        
        // ###################################################################
@@ -188,8 +188,8 @@ class NavLinks
        {
                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');
        }
        
        // ###################################################################
@@ -205,7 +205,7 @@ class NavLinks
                global $navigator;
                
                NavLinks::prioritiesAdd();
-               $navigator->add_component('link', 'priorities-delete', 'priorities', _('Delete'), 'priority.php?do=delete&amp;priorityid=' . $id);
+               $navigator->add_component('link', 'priorities-delete', 'priorities', T('Delete'), 'priority.php?do=delete&amp;priorityid=' . $id);
        }
        
        // ###################################################################
@@ -218,8 +218,8 @@ class NavLinks
        {
                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');
        }
        
        // ###################################################################
@@ -235,7 +235,7 @@ class NavLinks
                global $navigator;
                
                NavLinks::resolutionsAdd();
-               $navigator->add_component('link', 'resolutions-delete', 'resolutions', _('Delete'), 'resolution.php?do=delete&amp;resolutionid=' . $id);
+               $navigator->add_component('link', 'resolutions-delete', 'resolutions', T('Delete'), 'resolution.php?do=delete&amp;resolutionid=' . $id);
        }
        
        // ###################################################################
@@ -248,8 +248,8 @@ class NavLinks
        {
                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');
        }
        
        // ###################################################################
@@ -265,7 +265,7 @@ class NavLinks
                global $navigator;
                
                NavLinks::severitiesAdd();
-               $navigator->add_component('link', 'severities-delete', 'severities', _('Delete'), 'severity.php?do=delete&amp;severityid=' . $id);
+               $navigator->add_component('link', 'severities-delete', 'severities', T('Delete'), 'severity.php?do=delete&amp;severityid=' . $id);
        }
        
        // ###################################################################
@@ -278,8 +278,8 @@ class NavLinks
        {
                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');
        }
        
        // ###################################################################
@@ -295,7 +295,7 @@ class NavLinks
                global $navigator;
                
                NavLinks::statusesAdd();
-               $navigator->add_component('link', 'statuses-delete', 'statuses', _('Delete'), 'status.php?do=delete&amp;statusid=' . $id);
+               $navigator->add_component('link', 'statuses-delete', 'statuses', T('Delete'), 'status.php?do=delete&amp;statusid=' . $id);
        }
        
        // ###################################################################
@@ -308,8 +308,8 @@ class NavLinks
        {
                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');
        }
        
        // ###################################################################
@@ -325,7 +325,7 @@ class NavLinks
                global $navigator;
                
                NavLinks::automationsAdd();
-               $navigator->add_component('link', 'automations-delete', 'automations', _('Delete'), 'automation.php?do=delete&amp;actionid=' . $id);
+               $navigator->add_component('link', 'automations-delete', 'automations', T('Delete'), 'automation.php?do=delete&amp;actionid=' . $id);
        }
        
        // ###################################################################
@@ -338,10 +338,10 @@ class NavLinks
        {
                global $navigator;
                
-               $navigator->add_component('section', 'users-pages', 'users', _('Users &amp; 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 &amp; 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');
        }
        
        // ###################################################################
@@ -354,9 +354,9 @@ class NavLinks
        {
                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');
        }
        
        // ###################################################################
@@ -372,7 +372,7 @@ class NavLinks
                global $navigator;
                
                NavLinks::usersAdd();
-               $navigator->add_component('link', 'users-delete', 'users', _('Delete'), 'user.php?do=delete&amp;userid=' . $id);
+               $navigator->add_component('link', 'users-delete', 'users', T('Delete'), 'user.php?do=delete&amp;userid=' . $id);
        }
        
        // ###################################################################
@@ -385,9 +385,9 @@ class NavLinks
        {
                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');
        }
        
        // ###################################################################
@@ -403,7 +403,7 @@ class NavLinks
                global $navigator;
                
                NavLinks::usergroupsAdd();
-               $navigator->add_component('link', 'usergroups-delete', 'usergroups', _('Delete'), 'usergroup.php?do=delete&amp;userid=' . $id);
+               $navigator->add_component('link', 'usergroups-delete', 'usergroups', T('Delete'), 'usergroup.php?do=delete&amp;userid=' . $id);
        }
 }
 
index 5321f511cb920dd9a16d38ab6fff07eaf20a0f7c..8473bb840ec41bbd6d922b569ec436cb6ed60798 100755 (executable)
@@ -100,7 +100,7 @@ class MessageReporter
        */
        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.'));
        }
        
        // ###################################################################
diff --git a/includes/class_mo.php b/includes/class_mo.php
new file mode 100644 (file)
index 0000000..abe37f0
--- /dev/null
@@ -0,0 +1,177 @@
+<?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
index cc98d01f52857c598a6d1598cdd2438a41abd31c..4f47faf9c4adc2036be597746068ff98b95fae39 100644 (file)
@@ -200,19 +200,19 @@ class ListSorter
                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)
@@ -240,8 +240,8 @@ class ListSorter
                global $lang;
                
                $keys = array(
-                       'desc'  => _('Descending'),
-                       'asc'   => _('Ascending')
+                       'desc'  => T('Descending'),
+                       'asc'   => T('Ascending')
                );
                
                if ($key === false)
@@ -433,11 +433,11 @@ class ListSorter
                        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;
                }
index d1b56e7b4bb30239d59cb80fbc01a160249491d1..da654bcc0d4e2d82aaaa7c153f96060077b96a50 100755 (executable)
@@ -67,7 +67,7 @@ function construct_user_display($userinfo, $html = true)
        
        if (!$userinfo['userid'])
        {
-               $userinfo['displayname'] = _('Guest');
+               $userinfo['displayname'] = T('Guest');
                $userinfo['showemail'] = false;
        }
        
@@ -79,7 +79,7 @@ function construct_user_display($userinfo, $html = true)
        {
                if ($userinfo['showemail'])
                {
-                       $username = sprintf(_('%1$s &lt;%2$s&gt;'), $userinfo['displayname'], $userinfo['email']);
+                       $username = sprintf(T('%1$s &lt;%2$s&gt;'), $userinfo['displayname'], $userinfo['email']);
                }
                else
                {
@@ -401,7 +401,7 @@ function process_custom_fields(&$bugapi, &$msg, $errorbox = false, $searchMode =
                                
                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;
                }
                
@@ -409,7 +409,7 @@ function process_custom_fields(&$bugapi, &$msg, $errorbox = false, $searchMode =
                {
                        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;
                        }
                }
index 84a77a6a4f3af1367b32ae0c512fde1e351c15b3..757c684a4c55bf90c0bdacb40452112d08f3646e 100755 (executable)
@@ -148,15 +148,22 @@ $stylevar['left'] = ($language['direction'] == 'ltr' ? 'left' : 'right');
 $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');
 
@@ -171,7 +178,7 @@ $datef->fetch_offset();
 // mail system
 $bugsys->load('mail', 'mail', true);
 $mail->setFromAddress($bugsys->options['webmasteremail']);
-$mail->setFromName(_('Bugdar Notification'));
+$mail->setFromName(T('Bugdar Notification'));
 
 /*=====================================================================*\
 || ###################################################################
index 2fd966134c8d4b390078ca1e7d95011e41553772..e808ca9efc37805891ea6bc298925bd21eff3d52 100644 (file)
@@ -36,7 +36,7 @@ if (!function_exists('gettext'))
 // ###################################################################
 // 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
@@ -71,6 +71,41 @@ function fetch_user_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$
index 71958bbff6374bde68ff65a16ca8d63f8bc12783..9181c6ca51dbb168358149d539c112b57310f153 100644 (file)
--- a/index.php
+++ b/index.php
@@ -54,7 +54,7 @@ $count = $db->query_first("
 
 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']);
index f6207762a31f11c3aeec76ca49fef7766ff8777c..e1e54b518405aef40ba5de51b61f716ae4740248 100755 (executable)
--- a/login.php
+++ b/login.php
@@ -39,7 +39,7 @@ APIError(array(new API_Error_Handler($message), 'user_cumulative'));
 
 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.'));
 }
 
 // ###################################################################
@@ -77,11 +77,11 @@ if ($_POST['do'] == 'login' OR $_POST['do'] == 'cplogin')
                        $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.'));
        }
 }
 
@@ -94,11 +94,11 @@ if ($_REQUEST['do'] == 'logout')
                $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.'));
        }
 }
 
@@ -129,7 +129,7 @@ if ($_POST['do'] == 'sendpw')
                
                $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']));
        }
 }
 
@@ -160,11 +160,11 @@ if ($_POST['do'] == 'resetpw')
        
        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']);
@@ -175,7 +175,7 @@ if ($_POST['do'] == 'resetpw')
                $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
        {
@@ -195,7 +195,7 @@ if ($_REQUEST['do'] == 'recoverpw')
        $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') . '");');
@@ -209,11 +209,11 @@ if ($_REQUEST['do'] == 'cplogout')
        {
                $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.'));
        }
 }
 
index cf8dcafbcffe70ea9ee53da3e145011cc2b1bb67..5255a561189058b3c195e6453b96c11db4be6801 100755 (executable)
@@ -126,7 +126,7 @@ if ($_POST['do'] == 'insert')
                
                $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
        {
@@ -141,11 +141,11 @@ if ($_REQUEST['do'] == 'add')
 {
        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']));
index ccb7aa5760473d794ba3887fddc49b427e72cbb6..c849890e122ec25d260812c4061fab8a79613817 100755 (executable)
@@ -39,22 +39,22 @@ if ($_POST['do'] == 'insert')
 {
        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'])
@@ -103,7 +103,7 @@ if ($_POST['do'] == 'insert')
                        
                        $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)
                {
@@ -119,11 +119,11 @@ if ($_POST['do'] == 'insert')
                        
                        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.'));
                        }
                }
        }
@@ -140,12 +140,12 @@ if (empty($_REQUEST['do']))
 {
        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)
@@ -179,11 +179,11 @@ if ($_REQUEST['do'] == 'activate')
                        $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.'));
        }
 }
 
index 6381110d435f7332953a98108e8ca1fc44e77c7c..e22c3b6bb79a2e5c3868db4deac12a955b66db6b 100644 (file)
@@ -111,12 +111,12 @@ if ($_REQUEST['do'] == 'search')
        {
                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();
@@ -359,7 +359,7 @@ if ($_REQUEST['do'] == 'process')
        // 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));
        }
        
        // -------------------------------------------------------------------
@@ -389,7 +389,7 @@ if ($_REQUEST['do'] == 'process')
        
        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))
@@ -564,7 +564,7 @@ if ($_POST['do'] == 'doupdate')
                $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']);
 }
 
 // ###################################################################
@@ -581,12 +581,12 @@ if ($_REQUEST['do'] == 'export')
        }
        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]");
@@ -628,7 +628,7 @@ if ($_REQUEST['do'] == 'export')
        
        $xml .= "\n</bugdarExport>";
        
-       $funct->download_file($xml, _('bugdar-search-' . $search['searchid'] . '.xml'), true);
+       $funct->download_file($xml, T('bugdar-search-' . $search['searchid'] . '.xml'), true);
 }
 
 // ###################################################################
@@ -638,21 +638,21 @@ if ($_POST['do'] == 'dosave')
        $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
        {
@@ -679,7 +679,7 @@ if ($_POST['do'] == 'results')
 {      
        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'];
index 8f608ce72143fc8e4735d53f82df820ad23a4add..ebef405970a74726972d56001c0f378d5a2d5f1e 100644 (file)
@@ -66,7 +66,7 @@ $customfields = $db->query("
 
 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']);
 }
 
 // ###################################################################
@@ -108,11 +108,11 @@ foreach ($logs AS $dateline => $logitems)
                {
                        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))
index 68f7f1489fd79cc8025292aae5f62fc86fad0a6f..7119bad73d9555c2e4f960d6b12f504ef59ffb8a 100644 (file)
@@ -197,7 +197,7 @@ else
 $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']);
index 2240ad286716f66fcd22fc72a5ca1cbeb13eddf2..0f0329bbb9c35e0e6eac4f448a09e0362df95cf1 100644 (file)
@@ -59,23 +59,23 @@ while ($bug = $db->fetch_array($bugs_fetch))
                <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>
                        
@@ -91,7 +91,7 @@ while ($bug = $db->fetch_array($bugs_fetch))
 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>
        
index 64f5a8a6bc6045683317355fbf29cf66de604256..7ef2dcbc84cf751662339639e28fe301f8f5fa51 100644 (file)
@@ -65,7 +65,7 @@ if ($_POST['do'] == 'killsearch')
        
        $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');
 }
 
 // ###################################################################
@@ -78,7 +78,7 @@ if ($_REQUEST['do'] == 'deletesearch')
                $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']));
 }
 
 // ###################################################################
@@ -91,13 +91,13 @@ if ($_POST['do'] == 'update')
        {
                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'));
                        }
                }
        }
@@ -108,12 +108,12 @@ if ($_POST['do'] == 'update')
        {
                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']);
@@ -125,13 +125,13 @@ if ($_POST['do'] == 'update')
        {
                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'));
                        }
                }
                
@@ -194,7 +194,7 @@ if ($_POST['do'] == 'update')
                        }
                }
                
-               $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');
        }
 }
 
index bf6f2a615d9d7eae1a130a4b2f55dc0cbcf192a1..7c35db3db0caa8ccfe5c6ec04f79aead61d640ad 100644 (file)
--- a/vote.php
+++ b/vote.php
@@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'vote')
        
        if ($vote['uservote'])
        {
-               $message->error(_('You have already voted on this bug.'));
+               $message->error(T('You have already voted on this bug.'));
        }
        
        // handle userids
@@ -88,12 +88,12 @@ if ($_REQUEST['do'] == 'vote')
        }
        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]");
 }
 
 /*=====================================================================*\