r1048: Converting all $lang->string() stuff to use the gettext call
authorRobert Sesek <rsesek@bluestatic.org>
Thu, 17 Aug 2006 23:46:17 +0000 (23:46 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Thu, 17 Aug 2006 23:46:17 +0000 (23:46 +0000)
42 files changed:
admin/autoaction.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
editcomment.php
editreport.php
explain.php
favourite.php
help.php
includes/api_autoaction.php
includes/api_comment.php
includes/api_field.php
includes/api_user.php
includes/api_usergroup.php
includes/api_userhelp.php
includes/class_admin_navigation.php
includes/class_notification.php
includes/class_sort.php
includes/init.php
includes/language.php
includes/settings.php
login.php
newreport.php
register.php
search.php
showhistory.php
showreport.php
syndicate.php
userctrl.php
vote.php

index b81adcd79645e7e67f12c2ae37986629b2d26162..45930bb54b28b37c3b7b6830758cb0a241569ae9 100644 (file)
@@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill')
 
 if ($_REQUEST['do'] == 'delete')
 {
-       $admin->page_confirm($lang->string('Are you sure you want to delete this action?'), "autoaction.php?do=kill&amp;actionid=$action[actionid]");
+       $admin->page_confirm(_('Are you sure you want to delete this action?'), "autoaction.php?do=kill&amp;actionid=$action[actionid]");
 }
 
 // ###################################################################
@@ -125,7 +125,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit')
                $navigator->set_focus('link', 'autoactions-add', 'autoactions');
        }
 
-       $admin->page_start(($add ? $lang->string('New Automatic Action') : $lang->string('Edit Automatic Action')));
+       $admin->page_start(($add ? _('New Automatic Action') : _('Edit Automatic Action')));
        
        $admin->form_start('autoaction.php', ($add ? 'insert' : 'update'));
        
@@ -135,27 +135,27 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit')
        }
        
        $admin->table_start();
-       $admin->table_head(($add ? $lang->string('New Automatic Action') : $lang->string('Edit Automatic Action')));
+       $admin->table_head(($add ? _('New Automatic Action') : _('Edit Automatic Action')));
        
-       $admin->row_input($lang->string('Name'), 'name', $action->objdata['name']);
-       $admin->row_textarea($lang->string('Description'), 'description', $action->objdata['description']);
-       $admin->row_textarea($lang->string('Add Comment'), 'comment', $action->objdata['comment']);
+       $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_span($lang->string('Field Changes'), 'thead', 'center');
+       $admin->row_span(_('Field Changes'), 'thead', 'center');
                
        // -------------------------------------------------------------------
        // built-in fields      
        construct_datastore_select('severity', 'severity', 'severityid', $action->objdata['fields']['builtin']['severity'], true, true);
-       $admin->row_list($lang->string('Severity'), 'fields[severity]');
+       $admin->row_list(_('Severity'), 'fields[severity]');
        
        construct_datastore_select('priority', 'priority', 'priorityid', $action->objdata['fields']['builtin']['priority'], true, true);
-       $admin->row_list($lang->string('Priority'), 'fields[priority]');
+       $admin->row_list(_('Priority'), 'fields[priority]');
        
        construct_datastore_select('status', 'status', 'statusid', $action->objdata['fields']['builtin']['status'], true, true);
-       $admin->row_list($lang->string('Status'), 'fields[status]');
+       $admin->row_list(_('Status'), 'fields[status]');
        
        construct_datastore_select('resolution', 'resolution', 'resolutionid', $action->objdata['fields']['builtin']['resolution'], true, true);
-       $admin->row_list($lang->string('Resolution'), 'fields[resolution]');
+       $admin->row_list(_('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('', 0, ((!$action->objdata['fields']['custom']["$field[fieldid]"]) ? true : false));
-                               $admin->list_item($lang->string('Checked'), 1, (($action->objdata['fields']['custom']["$field[fieldid]"] == 1) ? true : false));
-                               $admin->list_item($lang->string('Un-Checked'), 2, (($action->objdata['fields']['custom']["$field[fieldid]"] == 2) ? true : false));
+                               $admin->list_item(_('Checked'), 1, (($action->objdata['fields']['custom']["$field[fieldid]"] == 1) ? true : false));
+                               $admin->list_item(_('Un-Checked'), 2, (($action->objdata['fields']['custom']["$field[fieldid]"] == 2) ? true : false));
                                $admin->row_list($field['name'], "fields[custom][$field[fieldid]]");
                        break;
                        
@@ -214,15 +214,15 @@ if ($_REQUEST['do'] == 'modify')
        NavLinks::autoactionsAdd();
        $navigator->set_focus('link', 'fields-pages-autoactions', 'fields-pages');
        
-       $admin->page_start($lang->string('Automatic Actions'));
+       $admin->page_start(_('Automatic Actions'));
        
        $admin->table_start();
-       $admin->table_head($lang->string('Automatic Actions'));
+       $admin->table_head(_('Automatic Actions'));
        
        $actions = $db->query("SELECT * FROM " . TABLE_PREFIX . "autoaction ORDER BY name ASC");
        while ($action = $db->fetch_array($actions))
        {
-               $admin->row_text($action['name'] . "\n<div class=\"smallfont\">$action[description]</div>", "<a href=\"autoaction.php?do=edit&amp;actionid=$action[actionid]\">[" . $lang->string('Edit') . "]</a> <a href=\"autoaction.php?do=delete&amp;actionid=$action[actionid]\">[" . $lang->string('Delete') . "]</a>");
+               $admin->row_text($action['name'] . "\n<div class=\"smallfont\">$action[description]</div>", "<a href=\"autoaction.php?do=edit&amp;actionid=$action[actionid]\">[" . _('Edit') . "]</a> <a href=\"autoaction.php?do=delete&amp;actionid=$action[actionid]\">[" . _('Delete') . "]</a>");
        }
        
        $admin->table_end();
index 97dd6548a33bca81c98c7c044deb1c1dbe2f1a06..3e898062e91cdbc367bc1d3ac1b234985ea1383d 100644 (file)
@@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill')
 
 if ($_REQUEST['do'] == 'delete')
 {      
-       $admin->page_confirm($lang->string('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?do=kill&amp;fieldid=" . $bugsys->in['fieldid']);
+       $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?do=kill&amp;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 ? $lang->string('The custom field has been added') : $lang->string('The custom field has been updated')));
+       $admin->redirect('field.php?do=modify', ($add ? _('The custom field has been added') : _('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 ? $lang->string('Add New Custom Field') : $lang->string('Edit Custom Field')));
+       $admin->page_start(($add ? _('Add New Custom Field') : _('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($lang->string('Select Type'));
+               $admin->table_head(_('Select Type'));
        }
        else
        {
                $admin->table_start();
-               $admin->table_head(($add ? $lang->string('Add New Bug Field') . ' - ' . FieldAPI::field_types($bugsys->in['type']) : $lang->string('Edit Field')));
+               $admin->table_head(($add ? _('Add New Bug Field') . ' - ' . FieldAPI::field_types($bugsys->in['type']) : _('Edit Field')));
        }
        
        if ($edit)
@@ -198,7 +198,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit')
                {
                        $admin->list_item($description, $name);
                }
-               $admin->row_list($lang->string('Field Type'), 'type', false);
+               $admin->row_list(_('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($lang->string('Global Fields'), 'thead', 'center');
-               $admin->row_text($lang->string('Field Type'), FieldAPI::field_types($type));
-               $admin->row_input($lang->string('Display Name'), 'name', $field->objdata['name']);
-               $admin->row_textarea($lang->string('Description'), 'description', $field->objdata['description']);
-               $admin->row_yesno($lang->string('Required'), 'required', $field->objdata['required']);
-               $admin->row_yesno($lang->string('Can Be Searched'), 'cansearch', ((isset($field->objdata['cansearch'])) ? $field->objdata['cansearch'] : true));
+               $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));
                
                // type-specific fields
-               $admin->row_span($lang->string('Type-Specific Fields'), 'thead', 'center');
+               $admin->row_span(_('Type-Specific Fields'), 'thead', 'center');
                
                switch ($type)
                {
                        case 'input_text':
-                               $admin->row_input($lang->string('Default Value'), 'defaultvalue', $field->objdata['defaultvalue']);
-                               $admin->row_input($lang->string('Regular Expression Match'), 'regexmatch', $field->objdata['regexmatch']);
-                               $admin->row_input($lang->string('Maximum Length'), 'maxlength', $field->objdata['maxlength'], 2, 10);
+                               $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);
                        break;
                        
                        case 'input_checkbox':
-                               $admin->row_yesno($lang->string('Checked By Default'), 'defaultvalue', $field->objdata['defaultvalue']);
+                               $admin->row_yesno(_('Checked By Default'), 'defaultvalue', $field->objdata['defaultvalue']);
                        break;
                        
                        case 'select_single':
-                               $admin->row_textarea($lang->string('Selection Values'), 'selects', stripslashes(implode("\n", unserialize($field->objdata['selects']))));
-                               $admin->row_yesno($lang->string('Make the First Option Default'), 'usedefault', $field->objdata['usedefault']);
+                               $admin->row_textarea(_('Selection Values'), 'selects', stripslashes(implode("\n", unserialize($field->objdata['selects']))));
+                               $admin->row_yesno(_('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($lang->string('Custom Field Permissions'));
+               $admin->table_head(_('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($lang->string('No Permission'), 0, $permissions["$usergroup[usergroupid]"] == 0);
-                       $admin->list_item($lang->string('Can View Field'), 1, $permissions["$usergroup[usergroupid]"] == 1);
-                       $admin->list_item($lang->string('Can View, Edit Field'), 2, $permissions["$usergroup[usergroupid]"] == 2);
+                       $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->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($lang->string('Additional Bug Fields'));
+       $admin->page_start(_('Additional Bug Fields'));
        
        $admin->table_start();
-       $admin->table_head($lang->string('Additional Bug Fields'), 3, 'custom_bug_fields');
-       $admin->table_column_head(array($lang->string('Display Name/Description'), $lang->string('Field ID'), $lang->string('Actions')));
+       $admin->table_head(_('Additional Bug Fields'), 3, 'custom_bug_fields');
+       $admin->table_column_head(array(_('Display Name/Description'), _('Field ID'), _('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]\">[" . $lang->string('Edit') . "]</a> <a href=\"field.php?do=delete&amp;fieldid=$field[fieldid]\">[" . $lang->string('Delete') . "]</a>" => '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'
                        )
                );
        }
index c3be2b3e11024c432f3b5848f27a32200c9bc428..4e8cb6eaf0c236f010e3fb14900756f0d391f407 100755 (executable)
@@ -28,13 +28,13 @@ require_once('./includes/functions.php');
 // admin navigation
 
 $bugsys->load('printer_navigation', 'navigator', true);
-$navigator->add_top_link($lang->string('Home'), '../index.php');
-$navigator->add_top_link($lang->string('Logout'), '../login.php?do=cplogout');
+$navigator->add_top_link(_('Home'), '../index.php');
+$navigator->add_top_link(_('Logout'), '../login.php?do=cplogout');
 
-$navigator->add_component('tab', 'options', null, $lang->string('Options'), 'index.php');
-$navigator->add_component('tab', 'products', null, $lang->string('Products'), 'product.php');
-$navigator->add_component('tab', 'fields', null, $lang->string('Fields'), 'field.php');
-$navigator->add_component('tab', 'users', null, $lang->string('Users &amp; Permissions'), 'user.php');
+$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');
 
 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->set('realm', $lang->string('Administration'));
+$admin->set('realm', _('Administration'));
 $admin->css_link('../framework/printer.css.php');
 
 // ###################################################################
@@ -80,7 +80,7 @@ if ($_COOKIE[COOKIE_PREFIX . 'adminsession'])
                        $funct->cookie(COOKIE_PREFIX . 'adminsession', '');
                        admin_login();
                        // do we need this message?
-                       $admin->error($lang->string('Invalid admin session has been terminated.'));
+                       $admin->error(_('Invalid admin session has been terminated.'));
                }
                else
                {
index 53e50f45f1bbdcf139652410f8b0002548630f2d..89d20e634e86c67dc1b0da02f07a60737d94f354 100755 (executable)
@@ -49,33 +49,33 @@ if (!defined('NO_VERSION_CHEK') OR constant('NO_VERSION_CHECK') != true)
 // ###################################################################
 
 $admin->table_start();
-$admin->table_head($lang->string('Welcome to the Bugdar Admin Panel'));
+$admin->table_head(_('Welcome to the Bugdar Admin Panel'));
 
 // -------------------------------------------------------------------
-$admin->row_span($lang->string('Version Information'), 'thead');
-$admin->row_text($lang->string('Bugdar Version'), $bugsys->options['trackerversion']);
-$admin->row_text($lang->string('PHP Version'), phpversion());
+$admin->row_span(_('Version Information'), 'thead');
+$admin->row_text(_('Bugdar Version'), $bugsys->options['trackerversion']);
+$admin->row_text(_('PHP Version'), phpversion());
 
 $mysql = $db->query_first("SELECT VERSION() AS version");
-$admin->row_text($lang->string('MySQL Version'), $mysql['version']);
+$admin->row_text(_('MySQL Version'), $mysql['version']);
 
-$admin->row_text($lang->string('Web Server'), ($_SERVER['SERVER_SOFTWARE'] ? $_SERVER['SERVER_SOFTWARE'] : $SERVER['SERVER_SOFTWARE']));
+$admin->row_text(_('Web Server'), ($_SERVER['SERVER_SOFTWARE'] ? $_SERVER['SERVER_SOFTWARE'] : $SERVER['SERVER_SOFTWARE']));
 
 // -------------------------------------------------------------------
-$admin->row_span($lang->string('Server Options'), 'thead');
+$admin->row_span(_('Server Options'), 'thead');
 
 $mysql = $db->query_first("SHOW VARIABLES LIKE 'max_allowed_packet'");
-$admin->row_text($lang->string('MySQL: Maximum Packet Size'), $mysql['Value']);
+$admin->row_text(_('MySQL: Maximum Packet Size'), $mysql['Value']);
 
-$admin->row_text($lang->string('MySQL: Maximum Upload Size'), $funct->fetch_max_attachment_size());
+$admin->row_text(_('MySQL: Maximum Upload Size'), $funct->fetch_max_attachment_size());
 
 $mysql = $db->query_first("SHOW VARIABLES LIKE 'ft_min_word_len'");
-$admin->row_text($lang->string('MySQL: Full-Text Search Minimum Word Length'), $mysql['Value']);
+$admin->row_text(_('MySQL: Full-Text Search Minimum Word Length'), $mysql['Value']);
 
-$admin->row_text($lang->string('PHP: Safe Mode'), ((ini_get('safe_mode') == 1 OR strtolower(ini_get('safe_mode')) == 'on') ? $lang->string('Yes') : $lang->string('No')));
-$admin->row_text($lang->string('PHP: Register Globals'), ((ini_get('register_globals') == 1 OR strtolower(ini_get('register_globals')) == 'on') ? $lang->string('Yes') : $lang->string('No')));
-$admin->row_text($lang->string('PHP: Magic Quotes GPC'), ((ini_get('magic_quotes_gpc') == 1 OR strtolower(ini_get('magic_quotes_gpc')) == 'on') ? $lang->string('Yes') : $lang->string('No')));
-$admin->row_text($lang->string('PHP: Magic Quotes Sybase'), ((ini_get('magic_quotes_sybase') == 1 OR strtolower(ini_get('magic_quotes_sybase')) == 'on') ? $lang->string('Yes') : $lang->string('No')));
+$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')));
 
 // -------------------------------------------------------------------
 
index 72eea723334a0e9dbc209928be285799445b99f1..10de8a048c90b7e47efa2911c540eb70a62fd4d6 100644 (file)
@@ -47,12 +47,12 @@ if ($_REQUEST['do'] == 'kill')
        $count = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "language");
        if ($count['count'] < 2)
        {
-               $admin->error($lang->string('At least one language needs to be present. Deleting this language would violate that.'));
+               $admin->error(_('At least one language needs to be present. Deleting this language would violate that.'));
        }
        
        if ($bugsys->options['defaultlanguage'] == $bugsys->in['languageid'])
        {
-               $admin->error($lang->string('You cannot delete the default language. Please select another language to be the default language and then delete this one.'));
+               $admin->error(_('You cannot delete the default language. Please select another language to be the default language and then delete this one.'));
        }
        
        $db->query("DELETE FROM " . TABLE_PREFIX . "language WHERE languageid = " . $bugsys->in['languageid']);
@@ -65,7 +65,7 @@ if ($_REQUEST['do'] == 'kill')
 
 if ($_REQUEST['do'] == 'delete')
 {
-       $admin->page_confirm($lang->string('Are you sure you want to delete this language?'), 'language.php?do=kill&amp;languageid=' . $bugsys->input_clean('languageid', TYPE_UINT));
+       $admin->page_confirm(_('Are you sure you want to delete this language?'), 'language.php?do=kill&amp;languageid=' . $bugsys->input_clean('languageid', TYPE_UINT));
 }
 
 // ###################################################################
@@ -96,20 +96,20 @@ if ($_REQUEST['do'] == 'add')
        NavLinks::languagesAdd();
        $navigator->set_focus('link', 'options-languages-add', 'options-languages');
        
-       $admin->page_start($lang->string('New Language'));
+       $admin->page_start(_('New Language'));
        
        $admin->form_start('language.php', 'insert');
        $admin->table_start();
-       $admin->table_head($lang->string('New Language'));
+       $admin->table_head(_('New Language'));
        
-       $admin->row_input($lang->string('Title'), 'title');
-       $admin->row_input($lang->string('Character Set'), 'charset', 'utf-8');
-       $admin->list_item($lang->string('Left-to-Right'), 'ltr', true);
-       $admin->list_item($lang->string('Right-to-Left'), 'rtl');
-       $admin->row_list($lang->string('Direction'), 'direction');
-       $admin->row_input($lang->string('Path to XML'), 'filename');
-       $admin->row_yesno($lang->string('User Selectable'), 'userselect', true);
-       $admin->row_yesno($lang->string('Debug Mode (run directly from XML)'), 'langdebug', false);
+       $admin->row_input(_('Title'), 'title');
+       $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_input(_('Path to XML'), 'filename');
+       $admin->row_yesno(_('User Selectable'), 'userselect', true);
+       $admin->row_yesno(_('Debug Mode (run directly from XML)'), 'langdebug', false);
        
        $admin->row_submit();
        $admin->table_end();
@@ -153,22 +153,22 @@ if ($_REQUEST['do'] == 'edit')
                $admin->error($lang->getlex('error_invalid_id'));
        }
        
-       $admin->page_start($lang->string('Edit Language'));
+       $admin->page_start(_('Edit Language'));
        
        $admin->form_start('language.php', 'update');
        $admin->table_start();
-       $admin->table_head(sprintf($lang->string('Edit Language - %1$s'), $language['title']));
+       $admin->table_head(sprintf(_('Edit Language - %1$s'), $language['title']));
        
        $admin->form_hidden_field('languageid', $language['languageid']);
        
-       $admin->row_input($lang->string('Title'), 'title', $language['title']);
-       $admin->row_input($lang->string('Character Set'), 'charset', $language['charset']);
-       $admin->list_item($lang->string('Left-to-Right'), 'ltr', (($language['direction'] == 'ltr') ? true : false));
-       $admin->list_item($lang->string('Right-to-Left'), 'rtl', (($language['direction'] == 'rtl') ? true : false));
-       $admin->row_list($lang->string('Direction'), 'direction');
-       $admin->row_input($lang->string('Path to XML'), 'filename', $language['filename']);
-       $admin->row_yesno($lang->string('User Selectable'), 'userselect', $language['userselect']);
-       $admin->row_yesno($lang->string('Debug Mode (run directly from XML)'), 'langdebug', (bool)$language['debug']);
+       $admin->row_input(_('Title'), 'title', $language['title']);
+       $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_input(_('Path to XML'), 'filename', $language['filename']);
+       $admin->row_yesno(_('User Selectable'), 'userselect', $language['userselect']);
+       $admin->row_yesno(_('Debug Mode (run directly from XML)'), 'langdebug', (bool)$language['debug']);
        
        $admin->row_submit();
        $admin->table_end();
@@ -199,12 +199,12 @@ if ($_REQUEST['do'] == 'modify')
        NavLinks::languagesAdd();
        $navigator->set_focus('link', 'options-pages-languages', 'options-pages');
        
-       $admin->page_start($lang->string('Manage Languages'));
+       $admin->page_start(_('Manage Languages'));
                
        $admin->table_start();
-       $admin->table_head($lang->string('Manage Languages'), 4, 'language_manage');
+       $admin->table_head(_('Manage Languages'), 4, 'language_manage');
        
-       $admin->table_column_head(array($lang->string('Title'), $lang->string('Charset'), $lang->string('Options'), $lang->string('Actions')));
+       $admin->table_column_head(array(_('Title'), _('Charset'), _('Options'), _('Actions')));
        
        $languages = $db->query("SELECT * FROM " . TABLE_PREFIX . "language ORDER BY languageid ASC");
        while ($language = $db->fetch_array($languages))
@@ -212,8 +212,8 @@ if ($_REQUEST['do'] == 'modify')
                $admin->row_multi_item(array(
                        $language['title'] => 'l',
                        $language['charset'] => 'c',
-                       (($bugsys->options['defaultlanguage'] == $language['languageid']) ? '<strong>' . $lang->string('DEFAULT LANGUAGE') . '</strong> / ' : '') . ($language['userselect'] ? $lang->string('User Selectable') : $lang->string('Private')) => 'c',
-                       "<a href=\"language.php?do=edit&amp;languageid=$language[languageid]\">[" . $lang->string('Edit Settings') . "]</a> <a href=\"language.php?do=reload&amp;languageid=$language[languageid]\">[" . $lang->string('Reload XML') . "]</a>" => 'c'
+                       (($bugsys->options['defaultlanguage'] == $language['languageid']) ? '<strong>' . _('DEFAULT LANGUAGE') . '</strong> / ' : '') . ($language['userselect'] ? _('User Selectable') : _('Private')) => 'c',
+                       "<a href=\"language.php?do=edit&amp;languageid=$language[languageid]\">[" . _('Edit Settings') . "]</a> <a href=\"language.php?do=reload&amp;languageid=$language[languageid]\">[" . _('Reload XML') . "]</a>" => 'c'
                ));
        }
        
index ee5dbd1cec2b1bd0b1fa3b290f9bfca6785042bc..1ed29a3ba0dc06ad1d496acfda7e0ffb95717d60 100755 (executable)
@@ -37,29 +37,29 @@ if (!can_perform('canadmingroups'))
 // define permissions as groups
 
 $permissions = array(
-       $lang->string('General Permissions') => array(
-               'canviewbugs' => $lang->string('Can View Bugs'),
-               'canviewhidden' => $lang->string('Can View Hidden Bugs and Comments'),
-               'cansubscribe' => $lang->string('Can Subscribe to Bugs'),
+       _('General Permissions') => array(
+               'canviewbugs' => _('Can View Bugs'),
+               'canviewhidden' => _('Can View Hidden Bugs and Comments'),
+               'cansubscribe' => _('Can Subscribe to Bugs'),
        ),
        
-       $lang->string('Posting/Submitting Permissions') => array(
-               'canvote' => $lang->string('Can Vote on Polls'),
-               'cansubmitbugs' => $lang->string('Can Submit Bugs'),
-               'canpostcomments' => $lang->string('Can Post Comments'),
-               'cangetattach' => $lang->string('Can View Attachments'),
-               'canputattach' => $lang->string('Can Upload/Edit Own Attachments'),
-               'caneditattach' => $lang->string('Can Manage All Attachments')
+       _('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')
        ),
        
-       $lang->string('Moderation/Managment Permissions') => array(
-               'caneditown' => $lang->string('Can Edit Own Bugs'),
-               'caneditother' => $lang->string('Can Edit Others\' Bugs'),
-               'caneditownreply' => $lang->string('Can Edit Own Comments'),
-               'caneditotherreply' => $lang->string('Can Edit Others\' Comments'),
-               'canassign' => $lang->string('Can Assign Bugs'),
-               'canchangestatus' => $lang->string('Can Change Status'),
-               'candeletedata' => $lang->string('Can Delete Bugs and Comments')
+       _('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')
        )
 );
 
@@ -86,7 +86,7 @@ if ($_REQUEST['do'] == 'kill')
 
 if ($_REQUEST['do'] == 'delete')
 {
-       $admin->page_confirm($lang->string('Are you sure you want to revert this permission mask?'), 'permission.php?do=kill&amp;usergroupid=' . $bugsys->input_clean('usergroupid', TYPE_UINT) . '&amp;productid=' . $bugsys->input_clean('productid', TYPE_UINT));
+       $admin->page_confirm(_('Are you sure you want to revert this permission mask?'), 'permission.php?do=kill&amp;usergroupid=' . $bugsys->input_clean('usergroupid', TYPE_UINT) . '&amp;productid=' . $bugsys->input_clean('productid', TYPE_UINT));
 }
 
 // ###################################################################
@@ -106,7 +106,7 @@ if ($_REQUEST['do'] == 'edit')
                $admin->error($lang->getlex('error_invalid_id'));
        }
        
-       $admin->page_start($lang->string('Edit Permissions'));
+       $admin->page_start(_('Edit Permissions'));
        
        $admin->form_start('permission.php', 'update');
        $admin->form_hidden_field('usergroupid', $usergroup['usergroupid']);
@@ -124,7 +124,7 @@ if ($_REQUEST['do'] == 'edit')
        
        // Permission
        $admin->table_start();
-       $admin->table_head(sprintf($lang->string('Permissions: %1$s - %2$s'), $usergroup['title'], $product['title']));
+       $admin->table_head(sprintf(_('Permissions: %1$s - %2$s'), $usergroup['title'], $product['title']));
        
        foreach ($permissions AS $group => $settings)
        {
@@ -174,10 +174,10 @@ if ($_POST['do'] == 'update')
 
 if ($_REQUEST['do'] == 'modify')
 {
-       $admin->page_start($lang->string('Permission Manager'));
+       $admin->page_start(_('Permission Manager'));
        
        $admin->table_start();
-       $admin->table_head($lang->string('Permission Manager'));
+       $admin->table_head(_('Permission Manager'));
        
        $groups = $db->query("SELECT * FROM " . TABLE_PREFIX . "usergroup ORDER BY usergroupid ASC");
        while ($group = $db->fetch_array($groups))
@@ -188,7 +188,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]\">[" . $lang->string('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]\">[" . _('Expand') . "]</a>" : ''), 'top', 2, 'alt3');
                
                if ($bugsys->in['usergroupid'] == $group['usergroupid'])
                {
@@ -206,14 +206,14 @@ if ($_REQUEST['do'] == 'modify')
                                
                                if (!isset($permissions["$product[productid]"]))
                                {
-                                       $statuslink = $lang->string('Inherited From Usergroup Settings: ');
-                                       $statuslink .= "<a href=\"permission.php?do=edit&amp;usergroupid=$groupid&amp;productid=$prodid\">[" . $lang->string('Customize') . ']</a>';
+                                       $statuslink = _('Inherited From Usergroup Settings: ');
+                                       $statuslink .= "<a href=\"permission.php?do=edit&amp;usergroupid=$groupid&amp;productid=$prodid\">[" . _('Customize') . ']</a>';
                                }
                                else
                                {
-                                       $statuslink = $lang->string('Customized: ');
-                                       $statuslink .= "<a href=\"permission.php?do=edit&amp;usergroupid=$groupid&amp;productid=$prodid\">[" . $lang->string('Edit') . ']</a>';
-                                       $statuslink .= " <a href=\"permission.php?do=delete&amp;usergroupid=$groupid&amp;productid=$prodid\">[" . $lang->string('Revert') . ']</a>';
+                                       $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>';
                                }
                                
                                $admin->row_text($product['title'], $statuslink);
index f7328310eb1ac267c1b2dbc69735b7544c5b4d82..cb55b6d17c11e666a465f3376680f3be27250861 100755 (executable)
@@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill')
 
 if ($_REQUEST['do'] == 'delete')
 {
-       $admin->page_confirm($lang->string('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?do=kill&amp;priorityid=' . $bugsys->input_clean('priorityid', TYPE_UINT));
+       $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?do=kill&amp;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($lang->string('Add New Priority'));
+       $admin->page_start(_('Add New Priority'));
        
        $admin->form_start('priority.php', 'insert');
        $admin->table_start();
-       $admin->table_head($lang->string('New Priority'));
-       $admin->row_input($lang->string('Priority Title<div><dfn>The title of this priority flag (eg: `Slated for Development` or `Address Now`)</dfn></div>'), 'priority');
-       $admin->row_input($lang->string('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(_('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->row_submit();
        $admin->table_end();
        $admin->form_end();
@@ -118,14 +118,14 @@ if ($_REQUEST['do'] == 'edit')
        $priority->set_condition();
        $priority->fetch();
        
-       $admin->page_start($lang->string('Edit Priority'));
+       $admin->page_start(_('Edit Priority'));
        
        $admin->form_start('priority.php', 'update');
        $admin->form_hidden_field('priorityid', $priority->objdata['priorityid']);
        $admin->table_start();
-       $admin->table_head(sprintf($lang->string('Edit Priority `%1$s` (id: %2$s)'), $priority->objdata['priority'], $priority->objdata['priorityid']));
-       $admin->row_input($lang->string('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($lang->string('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(_('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->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($lang->string('Priority Manager'));
+       $admin->page_start(_('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($lang->string('Priority Manager'));
+       $admin->table_head(_('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]\">[" . $lang->string('Edit') . "]</a> <a href=\"priority.php?do=delete&amp;priorityid=$priority[priorityid]\">[" . $lang->string('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]\">[" . _('Edit') . "]</a> <a href=\"priority.php?do=delete&amp;priorityid=$priority[priorityid]\">[" . _('Delete') . "]</a>");
        }
        $db->free_result($priorities);
        
index 3c4e92f1686813efcc7eab04108c60ab54cb2f83..044fc799003f20fd763dcf579b178055528d6cb9 100755 (executable)
@@ -94,7 +94,7 @@ if ($_REQUEST['do'] == 'killversion')
 
 if ($_REQUEST['do'] == 'deleteversion')
 {
-       $admin->page_confirm($lang->string('Are you sure you want to delete this version? Doing so will do <strong>delete all the bugs with this version</strong>.'), 'product.php?do=killversion&amp;versionid=' . $bugsys->input_clean('versionid', TYPE_UINT));
+       $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?do=killversion&amp;versionid=' . $bugsys->input_clean('versionid', TYPE_UINT));
 }
 
 // ###################################################################
@@ -113,7 +113,7 @@ if ($_REQUEST['do'] == 'addversion')
        NavLinks::productsEdit($bugsys->input_clean('productid', TYPE_UINT));
        $navigator->set_focus('link', 'products-edit-version', 'products-edit');
        
-       $admin->page_start($lang->string('Add Version'));
+       $admin->page_start(_('Add Version'));
        
        if ($bugsys->in['productid'] != -1)
        {
@@ -131,9 +131,9 @@ if ($_REQUEST['do'] == 'addversion')
        $admin->form_start('product.php', 'insertversion');
        $admin->form_hidden_field('productid', $bugsys->in['productid']);
        $admin->table_start();
-       $admin->table_head($lang->string('Add New Version'));
-       $admin->row_input($lang->string('Version Number<div><dfn>This is the version string for this product.</dfn></div>'), 'version');
-       $admin->row_input($lang->string('Display Order<div><dfn>The order in which the versions are displayed.</dfn></div>'), 'displayorder');
+       $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_submit();
        $admin->table_end();
        $admin->form_end();
@@ -147,7 +147,7 @@ if ($_REQUEST['do'] == 'updateversion')
 {
        if (empty($bugsys->in['version']))
        {
-               $admin->error($lang->string('Please fill in a version number.'));
+               $admin->error(_('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) . " WHERE versionid = " . $bugsys->input_clean('versionid', TYPE_UINT));
@@ -160,7 +160,7 @@ if ($_REQUEST['do'] == 'updateversion')
 
 if ($_REQUEST['do'] == 'editversion')
 {
-       $admin->page_start($lang->string('Edit Version'));
+       $admin->page_start(_('Edit Version'));
        
        $version = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "version WHERE versionid = " . $bugsys->input_clean('versionid', TYPE_UINT));
        if (!is_array($version))
@@ -171,9 +171,9 @@ if ($_REQUEST['do'] == 'editversion')
        $admin->form_start('product.php', 'updateversion');
        $admin->form_hidden_field('versionid', $version['versionid']);
        $admin->table_start();
-       $admin->table_head(sprintf($lang->string('Edit Version - %1$s'), $version['version']));
-       $admin->row_input($lang->string('Version Number<div><dfn>This is the version string for this product.</dfn></div>'), 'version', $version['version']);
-       $admin->row_input($lang->string('Display Order<div><dfn>The order in which the versions are displayed.</dfn></div>'), 'displayorder', $version['displayorder']);
+       $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_submit();
        $admin->table_end();
        $admin->form_end();
@@ -205,7 +205,7 @@ if ($_REQUEST['do'] == 'killproduct')
 
 if ($_REQUEST['do'] == 'deleteproduct')
 {
-       $admin->page_confirm($lang->string('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?do=killproduct&amp;productid=' . $bugsys->input_clean('productid', TYPE_UINT));
+       $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?do=killproduct&amp;productid=' . $bugsys->input_clean('productid', TYPE_UINT));
 }
 
 // ###################################################################
@@ -214,7 +214,7 @@ if ($_REQUEST['do'] == 'insertproduct')
 {
        if (empty($bugsys->in['title']))
        {
-               $admin->error($lang->string('Please go back and fill in the title field.'));
+               $admin->error(_('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($lang->string('Add New Product'));
+       $admin->page_start(_('Add New Product'));
        
        $admin->form_start('product.php', 'insertproduct');
        $admin->form_hidden_field('componentmother', $bugsys->in['productid']);
        $admin->table_start();
-       $admin->table_head($lang->string('Add Product'));
-       $admin->row_input($lang->string('Title'), 'title');
-       $admin->row_textarea($lang->string('Description<div><dfn>A short description of this product.</dfn></div>'), 'description');
-       $admin->row_input($lang->string('Display Order<div><dfn>The order in which the products are displayed.</dfn></div>'), 'displayorder');
+       $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->row_submit();
        $admin->table_end();
        $admin->form_end();
@@ -266,7 +266,7 @@ if ($_REQUEST['do'] == 'updateproduct')
 {
        if (empty($bugsys->in['title']))
        {
-               $admin->error($lang->string('Please go back and fill in the title field.'));
+               $admin->error(_('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($lang->string('Edit Product'));
+       $admin->page_start(_('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($lang->string('Edit Product - %1$s'), $product['title']));
-       $admin->row_input($lang->string('Title'), 'title', $product['title']);
-       $admin->row_textarea($lang->string('Description<div><dfn>A short description of this product.</dfn></div>'), 'description', $product['description']);
-       $admin->row_input($lang->string('Display Order<div><dfn>The order in which the products are displayed.</dfn></div>'), 'displayorder', $product['displayorder']);
+       $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->row_submit();
        $admin->table_end();
        $admin->form_end();
@@ -335,7 +335,7 @@ if ($_REQUEST['do'] == 'modify')
 {
        $navigator->set_focus('link', 'products-manage', 'products');
        
-       $admin->page_start($lang->string('Products and Versions'));
+       $admin->page_start(_('Products and Versions'));
        
        $javascript = <<<EOF
 <script type="text/javascript">
@@ -375,15 +375,15 @@ EOF;
        $versions = (array)$version;
        
        $admin->table_start();
-       $admin->table_head($lang->string('Products / Versions'));
+       $admin->table_head(_('Products / Versions'));
        
        // Handle our global versions
        if (is_array($versions['0']))
        {
-               $admin->row_text($lang->string('Global Versions'), construct_option_list($lang->string('Product'), -1, 0, 0, 1, 0, -1), 'middle', 2, 'alt3');
+               $admin->row_text(_('Global Versions'), construct_option_list(_('Product'), -1, 0, 0, 1, 0, -1), 'middle', 2, 'alt3');
                foreach ($versions['0'] AS $version)
                {
-                       $admin->row_text('-- ' . $version['version'], construct_option_list($lang->string('Version'), $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2');
+                       $admin->row_text('-- ' . $version['version'], construct_option_list(_('Version'), $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2');
                }
        }
        
@@ -391,28 +391,28 @@ 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($lang->string('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(_('Product'), $product['productid'], 1, 1, 1, 1, $product['displayorder']), 'middle', 2, 'alt3');
                
                // Versions
                foreach ($versions["$product[productid]"] AS $version)
                {
-                       $admin->row_text('-- ' . $version['version'], construct_option_list($lang->string('Version'), $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2');
+                       $admin->row_text('-- ' . $version['version'], construct_option_list(_('Version'), $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2');
                }
                
                // Components
                foreach ((array)$component["$product[productid]"] AS $comp)
                {
-                       $admin->row_text("-- <a href=\"product.php?do=editproduct&amp;productid=$comp[productid]\">$comp[title]</a>", construct_option_list($lang->string('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(_('Component'), $comp['productid'], 1, 0, 1, 1, $comp['displayorder']), 'middle', 2, 'alt1');
                        
                        // Component versions
                        foreach ($versions["$comp[productid]"] AS $version)
                        {
-                               $admin->row_text('---- ' . $version['version'], construct_option_list($lang->string('Version'), $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2');
+                               $admin->row_text('---- ' . $version['version'], construct_option_list(_('Version'), $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2');
                        }
                }
        }
        
-       $admin->row_submit(null, $lang->string('Save Display Order'), null);
+       $admin->row_submit(null, _('Save Display Order'), null);
        
        $admin->table_end();
        
index 057877f9d510457c94b6b1b5489dcc812030d031..0fb551d2c3f6ce62243ecaf5c0ff19b3ebfc6635 100755 (executable)
@@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill')
 
 if ($_REQUEST['do'] == 'delete')
 {
-       $admin->page_confirm($lang->string('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?do=kill&amp;resolutionid=' . $bugsys->input_clean('resolutionid', TYPE_UINT));
+       $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?do=kill&amp;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($lang->string('Add New Resolution'));
+       $admin->page_start(_('Add New Resolution'));
        
        $admin->form_start('resolution.php', 'insert');
        $admin->table_start();
-       $admin->table_head($lang->string('New Resolution'));
-       $admin->row_input($lang->string('Resolution Title<div><dfn>The title of this resolution flag (eg: `Fixed` or `Bogus`)</dfn></div>'), 'resolution');
-       $admin->row_input($lang->string('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(_('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->row_submit();
        $admin->table_end();
        $admin->form_end();
@@ -118,14 +118,14 @@ if ($_REQUEST['do'] == 'edit')
        $resolution->set_condition();
        $resolution->fetch();
        
-       $admin->page_start($lang->string('Edit Resolution'));
+       $admin->page_start(_('Edit Resolution'));
        
        $admin->form_start('resolution.php', 'update');
        $admin->form_hidden_field('resolutionid', $resolution->objdata['resolutionid']);
        $admin->table_start();
-       $admin->table_head(sprintf($lang->string('Edit Resolution - %1$s (id: %2$s)'), $resolution->objdata['resolution'], $resolution->objdata['resolutionid']));
-       $admin->row_input($lang->string('Resolution Title<div><dfn>The title of this resolution flag (eg: `Fixed` or `Bogus`)</dfn></div>'), 'resolution', $resolution->objdata['resolution']);
-       $admin->row_input($lang->string('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(_('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->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($lang->string('Resolution Manager'));
+       $admin->page_start(_('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($lang->string('Resolution Manager'));
+       $admin->table_head(_('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]\">[" . $lang->string('Edit') . "]</a> <a href=\"resolution.php?do=delete&amp;resolutionid=$resolution[resolutionid]\">[" . $lang->string('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]\">[" . _('Edit') . "]</a> <a href=\"resolution.php?do=delete&amp;resolutionid=$resolution[resolutionid]\">[" . _('Delete') . "]</a>");
        }
        $db->free_result($resolutions);
        
index 8c8f45819654a8d639bb2ccddcf6dadff88903b3..7c1d1587473ae9c259a7a117809de147f72cee00 100755 (executable)
@@ -62,7 +62,7 @@ if ($_POST['do'] == 'update')
 
 if ($_REQUEST['do'] == 'modify')
 {
-       $admin->page_start($lang->string('Settings'));
+       $admin->page_start(_('Settings'));
        
        $admin->form_start('setting.php', 'update');
        
@@ -102,8 +102,8 @@ if ($_REQUEST['do'] == 'modify')
                                        break;
                                        
                                        case 'yesno':                                   
-                                               $admin->list_item($lang->string('Yes'), '1', ($bugsys->options["$key"] ? true : false));
-                                               $admin->list_item($lang->string('No'), '0', ($bugsys->options["$key"] ? false : true));
+                                               $admin->list_item(_('Yes'), '1', ($bugsys->options["$key"] ? true : false));
+                                               $admin->list_item(_('No'), '0', ($bugsys->options["$key"] ? false : true));
                                                $admin->row_list($options[4], 'setting[' . $key . ']', false);
                                        break;
                                        
index a674d535f23a91d2c7fbe31b6b01b25b4ce136ab..b17bedf36d1cbc0a6093f7b905c91d1635b6c8e1 100755 (executable)
@@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill')
 
 if ($_REQUEST['do'] == 'delete')
 {
-       $admin->page_confirm($lang->string('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?do=kill&amp;severityid=' . $bugsys->input_clean('severityid', TYPE_UINT));
+       $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?do=kill&amp;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($lang->string('Add New Severity'));
+       $admin->page_start(_('Add New Severity'));
        
        $admin->form_start('severity.php', 'insert');
        $admin->table_start();
-       $admin->table_head($lang->string('New Severity'));
-       $admin->row_input($lang->string('Severity Title<div><dfn>The title of this severity flag (eg: `Major` or `Critical`)</dfn></div>'), 'severity');
-       $admin->row_input($lang->string('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(_('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->row_submit();
        $admin->table_end();
        $admin->form_end();
@@ -118,14 +118,14 @@ if ($_REQUEST['do'] == 'edit')
        $severity->set_condition();
        $severity->fetch();
        
-       $admin->page_start($lang->string('Edit Severity'));
+       $admin->page_start(_('Edit Severity'));
        
        $admin->form_start('severity.php', 'update');
        $admin->form_hidden_field('severityid', $severity->objdata['severityid']);
        $admin->table_start();
-       $admin->table_head(sprintf($lang->string('Edit Severity - %1$s (id: %2$s)'), $severity->objdata['severity'], $severity->objdata['severityid']));
-       $admin->row_input($lang->string('Severity Title<div><dfn>The title of this severity flag (eg: `Major` or `Critical`)</dfn></div>'), 'severity', $severity->objdata['severity']);
-       $admin->row_input($lang->string('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(_('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->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($lang->string('Severity Manager'));
+       $admin->page_start(_('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($lang->string('Severity Manager'));
+       $admin->table_head(_('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]\">[" . $lang->string('Edit') . "]</a> <a href=\"severity.php?do=delete&amp;severityid=$severity[severityid]\">[" . $lang->string('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]\">[" . _('Edit') . "]</a> <a href=\"severity.php?do=delete&amp;severityid=$severity[severityid]\">[" . _('Delete') . "]</a>");
        }
        $db->free_result($severities);
        
index 86d5f22f05b4b9325e9fe188a423ec4ee82c3aa2..edb3280d1bc048426a72d7bb36728c872f173b82 100755 (executable)
@@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill')
 
 if ($_REQUEST['do'] == 'delete')
 {
-       $admin->page_confirm($lang->string('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?do=kill&amp;statusid=' . $bugsys->input_clean('statusid', TYPE_UINT));
+       $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?do=kill&amp;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($lang->string('Add New Status'));
+       $admin->page_start(_('Add New Status'));
        
        $admin->form_start('status.php', 'insert');
        $admin->table_start();
-       $admin->table_head($lang->string('New Status'));
-       $admin->row_input($lang->string('Status Title<div><dfn>The title of this status flag (eg: `Confirmed` or `Closed (Fixed)`)</dfn></div>'), 'status');
-       $admin->row_input($lang->string('Display Order<div><dfn>The order in which the statuses ar displayed.</dfn></div>'), 'displayorder');
-       $admin->row_input($lang->string('Status Colour<div><dfn>The colour 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(_('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 Colour<div><dfn>The colour 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($lang->string('Edit Status'));
+       $admin->page_start(_('Edit Status'));
        
        $admin->form_start('status.php', 'update');
        $admin->form_hidden_field('statusid', $status->objdata['statusid']);
        $admin->table_start();
-       $admin->table_head(sprintf($lang->string('Edit Status - %1$s (id: %2$s)'), $status->objdata['status'], $status->objdata['statusid']));
-       $admin->row_input($lang->string('Status Title<div><dfn>The title of this status flag (eg: `Confirmed` or `Closed (Fixed)`)</dfn></div>'), 'status', $status->objdata['status']);
-       $admin->row_input($lang->string('Display Order<div><dfn>The order in which the statuses ar displayed.</dfn></div>'), 'displayorder', $status->objdata['displayorder']);
-       $admin->row_input($lang->string('Status Colour<div><dfn>The colour 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(_('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 Colour<div><dfn>The colour 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($lang->string('Status Manager'));
+       $admin->page_start(_('Status Manager'));
        
        $statuses = $db->query("SELECT * FROM " . TABLE_PREFIX . "status");
        
        $admin->table_start();
-       $admin->table_head($lang->string('Status Manager'));
+       $admin->table_head(_('Status Manager'));
        
        while ($status = $db->fetch_array($statuses))
        {
                $colourblock = '<span style="float: right"><div style="height: 12px; width: 12px; background-color: ' . $status['color'] . '; border: 1px black solid"></div></span>';
-               $admin->row_text("$colourblock$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]\">[" . $lang->string('Edit') . "]</a> <a href=\"status.php?do=delete&amp;statusid=$status[statusid]\">[" . $lang->string('Delete') . "]</a>");
+               $admin->row_text("$colourblock$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>");
        }
        $db->free_result($statuses);
        
index 176467f1b951398ea04ac4fca173f0835afd7d0d..2bfc2a9e3f34f608aaa0df1fa44cbacea64b618b 100644 (file)
@@ -73,7 +73,7 @@ if ($_REQUEST['do'] == 'kill')
 
 if ($_REQUEST['do'] == 'delete')
 {
-       $admin->page_confirm($lang->string('Are you sure you want to delete this user?'), 'user.php?do=kill&amp;userid=' . $bugsys->input_clean('userid', TYPE_UINT));
+       $admin->page_confirm(_('Are you sure you want to delete this user?'), 'user.php?do=kill&amp;userid=' . $bugsys->input_clean('userid', TYPE_UINT));
 }
 
 // ###################################################################
@@ -168,7 +168,7 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
                $navigator->set_focus('link', 'users-add', 'users');
        }
                
-       $admin->page_start(($add ? $lang->string('Add User') : $lang->string('Edit User')));
+       $admin->page_start(($add ? _('Add User') : _('Edit User')));
        
        $admin->form_start('user.php', ($add ? 'insert' : 'update'));
        
@@ -179,43 +179,43 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
        
        $admin->table_start();
        
-       $admin->table_head(($add ? $lang->string('Add User') : sprintf($lang->string('Edit User (userid: %1$s)'), $user->objdata['userid'])));
+       $admin->table_head(($add ? _('Add User') : sprintf(_('Edit User (userid: %1$s)'), $user->objdata['userid'])));
        
-       $admin->row_input($lang->string('Display Name'), 'displayname', $user->objdata['displayname']);
-       $admin->row_input($lang->string('Email'), 'email', $user->objdata['email']);
-       $admin->row_input(($add ? $lang->string('Password') : $lang->string('Password (Leave blank for no change)')), 'password');
+       $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');
        
        foreach ($bugsys->datastore['usergroup'] AS $group)
        {
                $admin->list_item($group['title'], $group['usergroupid'], ($user->objdata['usergroupid'] == $group['usergroupid']));
        }
-       $admin->row_list($lang->string('Usergroup'), 'usergroupid');
+       $admin->row_list(_('Usergroup'), 'usergroupid');
        
-       $admin->row_yesno($lang->string('Show Email Publicly'), 'showemail', $user->objdata['showemail']);
-       $admin->row_yesno($lang->string('Show Status Colours on Bug Listings'), 'showcolours', $user->objdata['showcolours']);
+       $admin->row_yesno(_('Show Email Publicly'), 'showemail', $user->objdata['showemail']);
+       $admin->row_yesno(_('Show Status Colours on Bug Listings'), 'showcolours', $user->objdata['showcolours']);
        
        foreach ($bugsys->datastore['language'] AS $language)
        {
                $admin->list_item($language['title'], $language['languageid'], ($user->objdata['languageid'] == $language['languageid']));
        }
-       $admin->row_list($lang->string('Language'), 'languageid');
+       $admin->row_list(_('Language'), 'languageid');
        
        foreach ($datef->fetch_timezone_list() AS $value => $string)
        {
                $admin->list_item($string, $value, ($user->objdata['timezone'] == $value));
        }
-       $admin->row_list($lang->string('Timezone'), 'timezone');
+       $admin->row_list(_('Timezone'), 'timezone');
        
-       $admin->row_yesno($lang->string('Observe Daylight Savings Time (DST)'), 'usedst', $user->objdata['usedst']);
-       $admin->row_text($lang->string('Hidden Statuses on Bug Listing'), construct_option_select('hidestatuses', $bugsys->datastore['status'], $user->objdata['hidestatuses'], 'statusid', 'status', 0, true));
-       $admin->row_text($lang->string('Default Sort Order Column'), construct_option_select('defaultsortkey', ListSorter::fetch_by_text(false), $user->objdata['defaultsortkey']));
-       $admin->row_text($lang->string('Default Sort Order Direction'), construct_option_select('defaultsortas', ListSorter::fetch_as_text(false), $user->objdata['defaultsortas']));   
+       $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->table_end();
        
        // -------------------------------------------------------------------
        $admin->table_start(false);
-       $admin->table_head($lang->string('Email Options'), 6);
+       $admin->table_head(_('Email Options'), 6);
        
        $options = $db->query("SELECT * FROM " . TABLE_PREFIX . "useremail WHERE userid = " . $user->objdata['userid']);
        while ($opt = $db->fetch_array($options))
@@ -232,16 +232,16 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
                }
        }
        
-       $admin->table_column_head(array('', $lang->string('Reporter'), $lang->string('Assignee'), $lang->string('Favourite'), $lang->string('Voter'), $lang->string('Commenter')));
+       $admin->table_column_head(array('', _('Reporter'), _('Assignee'), _('Favourite'), _('Voter'), _('Commenter')));
        
        // -------------------------------------------------------------------
        
-       $admin->row_text($lang->string('New bug is added'), '<div style="text-align: center">' . draw_checkbox('emailopts[0][2048]', $checked[0][2048]) . '</div>', 'top', 6);
+       $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($lang->string('I am made the assignee'), '<div style="text-align: center">' . draw_checkbox('emailopts[0][32]', $checked[0][32]) . '</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_multi_item(array(
-               $lang->string('Status or resolution changes') => 'l',
+               _('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',
@@ -250,7 +250,7 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
        ));
        
        $admin->row_multi_item(array(
-               $lang->string("'Duplicates' field is changed") => 'l',
+               _("'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',
@@ -259,7 +259,7 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
        ));
        
        $admin->row_multi_item(array(
-               $lang->string('A new comment is added') => 'l',
+               _('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',
@@ -268,7 +268,7 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
        ));
        
        $admin->row_multi_item(array(
-               $lang->string('A new attachment is added') => 'l',
+               _('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',
@@ -277,7 +277,7 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
        ));
        
        $admin->row_multi_item(array(
-               $lang->string('Any other field changes') => 'l',
+               _('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',
@@ -326,11 +326,11 @@ if ($_REQUEST['do'] == 'search')
                }
                else
                {
-                       $admin->page_start($lang->string('Search Results'));
+                       $admin->page_start(_('Search Results'));
                        
                        $admin->table_start();
-                       $admin->table_head($lang->string('Search Results'), 4);
-                       $admin->table_column_head(array($lang->string('Display Name'), $lang->string('Email'), $lang->string('User ID'), $lang->string('Actions')));
+                       $admin->table_head(_('Search Results'), 4);
+                       $admin->table_column_head(array(_('Display Name'), _('Email'), _('User ID'), _('Actions')));
                        
                        while ($row = $db->fetch_array($results))
                        {
@@ -338,7 +338,7 @@ if ($_REQUEST['do'] == 'search')
                                        $row['displayname'] => 'l',
                                        $row['email'] => 'c',
                                        $row['userid'] => 'c',
-                                       '<a href="user.php?do=edit&amp;userid=' . $row['userid'] . '">[' . $lang->string('Edit') . ']</a>' => 'c'
+                                       '<a href="user.php?do=edit&amp;userid=' . $row['userid'] . '">[' . _('Edit') . ']</a>' => 'c'
                                ));
                        }
                        
@@ -350,7 +350,7 @@ if ($_REQUEST['do'] == 'search')
        
        if ($fail)
        {
-               $admin->error($lang->string('Sorry, we could not find any users that matched your criteria.'));
+               $admin->error(_('Sorry, we could not find any users that matched your criteria.'));
        }
 }
 
@@ -361,13 +361,13 @@ if ($_REQUEST['do'] == 'modify')
        NavLinks::usersAdd();
        $navigator->set_focus('link', 'users-pages-users', 'users-pages');
        
-       $admin->page_start($lang->string('User Search'));
+       $admin->page_start(_('User Search'));
        
        $admin->form_start('user.php', 'search');
        $admin->table_start(true, '45%');
        
-       $admin->table_head($lang->string('User Search'));
-       $admin->row_input($lang->string('Name/Email/ID'), 'userdata');
+       $admin->table_head(_('User Search'));
+       $admin->row_input(_('Name/Email/ID'), 'userdata');
        
        $admin->row_submit('', ':save:', '');
        
index d0ea9a0e73fe086b69077661df1151727eb5e918..9927d18d2f67fcbb1bec85371e9600e495fcfb39 100755 (executable)
@@ -37,41 +37,41 @@ if (!can_perform('canadmingroups'))
 // define permissions as groups
 
 $permissions = array(
-       $lang->string('General Permissions') => array(
-               'canviewbugs' => $lang->string('Can View Bugs'),
-               'canviewhidden' => $lang->string('Can View Hidden Bugs and Comments'),
-               'cansearch' => $lang->string('Can Search Bugs'),
-               'cansubscribe' => $lang->string('Can Subscribe to Bugs'),
-               'canbeassignedto' => $lang->string('Can Be Assigned Bugs')
+       _('General Permissions') => array(
+               'canviewbugs' => _('Can View Bugs'),
+               'canviewhidden' => _('Can View Hidden Bugs and Comments'),
+               'cansearch' => _('Can Search Bugs'),
+               'cansubscribe' => _('Can Subscribe to Bugs'),
+               'canbeassignedto' => _('Can Be Assigned Bugs')
        ),
        
-       $lang->string('Posting/Submitting Permissions') => array(
-               'canvote' => $lang->string('Can Vote on Polls'),
-               'cansubmitbugs' => $lang->string('Can Submit Bugs'),
-               'canpostcomments' => $lang->string('Can Post Comments'),
-               'cangetattach' => $lang->string('Can View Attachments'),
-               'canputattach' => $lang->string('Can Upload/Edit Own Attachments'),
-               'caneditattach' => $lang->string('Can Manage All Attachments')
+       _('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')
        ),
        
-       $lang->string('Moderation/Managment Permissions') => array(
-               'caneditown' => $lang->string('Can Edit Own Bugs'),
-               'caneditother' => $lang->string('Can Edit Others\' Bugs'),
-               'caneditownreply' => $lang->string('Can Edit Own Comments'),
-               'caneditotherreply' => $lang->string('Can Edit Others\' Comments'),
-               'canassign' => $lang->string('Can Assign Bugs'),
-               'canchangestatus' => $lang->string('Can Change Status'),
-               'candeletedata' => $lang->string('Can Delete Bugs and Comments')
+       _('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')
        ),
        
-       $lang->string('Administrator Permissions') => array(
-               'canadminpanel' => $lang->string('Can Access Control Panel'),
-               'canadminbugs' => $lang->string('Can Administer Bug Reports'),
-               'canadminfields' => $lang->string('Can Administer Additional Bug Fields'),
-               'canadminversions' => $lang->string('Can Administer Products / Components / Versions'),
-               'canadminusers' => $lang->string('Can Administer Users'),
-               'canadmingroups' => $lang->string('Can Administer Usergroups'),
-               'canadmintools' => $lang->string('Can Administer Settings / Maintenance Tools')
+       _('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')
        )
 );
 
@@ -100,10 +100,10 @@ if ($_REQUEST['do'] == 'delete')
 {
        if ($bugsys->in['usergroupid'] < 7)
        {
-               $admin->error($lang->string('You can\'t delete a default usergroup.'));
+               $admin->error(_('You can\'t delete a default usergroup.'));
        }
        
-       $admin->page_confirm($lang->string('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?do=kill&amp;usergroupid=' . $bugsys->in['usergroupid']);
+       $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?do=kill&amp;usergroupid=' . $bugsys->in['usergroupid']);
 }
 
 // ###################################################################
@@ -124,7 +124,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit')
                $navigator->set_focus('link', 'usergroups-add', 'usergroups');
        }
        
-       $admin->page_start(($add ? $lang->string('New Usergroup') : $lang->string('Edit Usergroup')));
+       $admin->page_start(($add ? _('New Usergroup') : _('Edit Usergroup')));
        
        $admin->form_start('usergroup.php', ($add ? 'insert' : 'update'));
        
@@ -144,15 +144,15 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit')
        
        // Details
        $admin->table_start();
-       $admin->table_head($lang->string('Usergroup Details'));
-       $admin->row_input($lang->string('Usergroup Title'), 'title', $bugsys->sanitize($usergroup->objdata['title']));
-       $admin->row_input($lang->string('Display Title<div><dfn>This is the title that others will be able to see when comments are posted.</dfn></div>'), 'displaytitle', $bugsys->sanitize($usergroup->objdata['displaytitle']));
+       $admin->table_head(_('Usergroup Details'));
+       $admin->row_input(_('Usergroup Title'), 'title', $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', $bugsys->sanitize($usergroup->objdata['displaytitle']));
        $admin->table_end();
        
        // Permission
        $admin->table_start();
                
-       $admin->table_head($lang->string('Permission Settings'));
+       $admin->table_head(_('Permission Settings'));
        
        foreach ($permissions AS $group => $settings)
        {
@@ -167,7 +167,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit')
                
        // custom field permissions
        $admin->table_start();
-       $admin->table_head($lang->string('Custom Field Permissions'));
+       $admin->table_head(_('Custom Field Permissions'));
        
        if ($edit)
        {
@@ -182,9 +182,9 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit')
        while ($field = $db->fetch_array($fields))
        {
                unset($listitem);
-               $admin->list_item($lang->string('No Permission'), 0, $permissions["$field[fieldid]"] == 0);
-               $admin->list_item($lang->string('Can View Field'), 1, $permissions["$field[fieldid]"] == 1);
-               $admin->list_item($lang->string('Can View, Edit Field'), 2, $permissions["$field[fieldid]"] == 2);
+               $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->row_list($field['name'], "custom[$field[fieldid]]");
        }
        
@@ -286,11 +286,11 @@ if ($_REQUEST['do'] == 'modify')
        NavLinks::usergroupsAdd();
        $navigator->set_focus('link', 'users-pages-usergroups', 'users-pages');
        
-       $admin->page_start($lang->string('Usergroup Manager'));
+       $admin->page_start(_('Usergroup Manager'));
        
        $admin->form_start('usergroup.php', 'null');
        $admin->table_start();
-       $admin->table_head($lang->string('Usergroup Manager'), 3, 'usergroups');
+       $admin->table_head(_('Usergroup Manager'), 3, 'usergroups');
        
        $groups = $db->query("SELECT * FROM " . TABLE_PREFIX . "usergroup ORDER BY usergroupid ASC");
        while ($group = $db->fetch_array($groups))
@@ -311,10 +311,10 @@ if ($_REQUEST['do'] == 'modify')
                $usergroups["$group[usergroupid]"]['total'] = $group['total'];
        }
        
-       $admin->table_column_head(array($lang->string('Usergroup'), $lang->string('Number of Users'), $lang->string('Action')));
+       $admin->table_column_head(array(_('Usergroup'), _('Number of Users'), _('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]\">[" . $lang->string('Edit') . "]</a>" . (($group['usergroupid'] > 6) ? "<a href=\"usergroup.php?do=delete&amp;usergroupid=$group[usergroupid]\">[" . $lang->string('Delete') . "]</a>" : '') => 'c'));
+               $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>" . (($group['usergroupid'] > 6) ? "<a href=\"usergroup.php?do=delete&amp;usergroupid=$group[usergroupid]\">[" . _('Delete') . "]</a>" : '') => 'c'));
        }
        
        $admin->table_end();
index 828a3f8236bcb9868cb4647cae3b5f4d59cef550..7ec9e875cd3c52ac8a7b67d83334e21441346dcc 100755 (executable)
@@ -59,7 +59,7 @@ if ($_REQUEST['do'] == 'kill')
 
 if ($_REQUEST['do'] == 'delete')
 {
-       $admin->page_confirm($lang->string('Are you sure you want to delete help text?'), 'userhelp.php?do=kill&amp;keystring=' . $bugsys->in['keystring']);
+       $admin->page_confirm(_('Are you sure you want to delete help text?'), 'userhelp.php?do=kill&amp;keystring=' . $bugsys->in['keystring']);
 }
 
 // ###################################################################
@@ -81,16 +81,16 @@ if ($_REQUEST['do'] == 'add')
 {
        $navigator->set_focus('link', 'options-userhelp-add', 'options-userhelp');
        
-       $admin->page_start($lang->string('New Help Text'));
+       $admin->page_start(_('New Help Text'));
        
        $admin->form_start('userhelp.php', 'insert');
        
        $admin->table_start();
-       $admin->table_head($lang->string('New Help Text'));
+       $admin->table_head(_('New Help Text'));
        
-       $admin->row_input($lang->string('Topic Title'), 'title');
-       $admin->row_input($lang->string('Unique Key<br />(lowercase letters, underscores, and numbers only)'), 'keystring');
-       $admin->row_textarea($lang->string('Body Text'), 'body');
+       $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_submit();
        
@@ -127,18 +127,18 @@ if ($_REQUEST['do'] == 'modify')
 {
        $navigator->set_focus('link', 'options-pages-userhelp', 'options-pages');
        
-       $admin->page_start($lang->string('Edit User Help'));
+       $admin->page_start(_('Edit User Help'));
        
        $admin->form_start('userhelp.php', 'update');
        
        $admin->table_start();
-       $admin->table_head($lang->string('Edit User Help'));
+       $admin->table_head(_('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'] . '">[' . $lang->string('Delete') . ']</a>' : '');
+               $delete = (!in_array($topic['keystring'], UserHelpAPI::not_able_to_delete()) ? '<br /><br /><a href="userhelp.php?do=delete&amp;keystring=' . $topic['keystring'] . '">[' . _('Delete') . ']</a>' : '');
                
                $admin->row_textarea($inputfield . '<br /><em>' . $topic['keystring'] . '</em>' . $delete, 'help[' . $topic['keystring'] . '][body]', $topic['body']);
        }
index 0d1477ea5cc8a4aa838689ee7975208f86d3a212..f5d0858501c3bdf0fb82ee867ee02d3e495de71c 100755 (executable)
@@ -79,24 +79,24 @@ if ($_POST['do'] == 'insert')
        switch ($FILE['error'])
        {
                case 0: break;
-               case 1: $message->add_error($lang->string('PHP said the file you uploaded was too big.')); break;
-               case 2: $message->add_error($lang->string('The file exceeds the allowed upload size.')); break;
-               case 3: $message->add_error($lang->string('The file was only partially uploaded.')); break;
-               case 4: $message->add_error($lang->string('The file was not uploaded at all.')); break;
-               case 6: $message->add_error($lang->string('PHP could not find the /tmp directory.')); break;
+               case 1: $message->add_error(_('PHP said the file you uploaded was too big.')); break;
+               case 2: $message->add_error(_('The file exceeds the allowed upload size.')); break;
+               case 3: $message->add_error(_('The file was only partially uploaded.')); break;
+               case 4: $message->add_error(_('The file was not uploaded at all.')); break;
+               case 6: $message->add_error(_('PHP could not find the /tmp directory.')); break;
        }
        
        // did it upload?
        if (!is_uploaded_file($FILE['tmp_name']))
        {
-               $message->add_error($lang->string('The file you specified did not upload.'));
+               $message->add_error(_('The file you specified did not upload.'));
        }
        
        // #*# put some MIME-type validation here
        
        if (filesize($FILE['tmp_name']) > $var['Value'])
        {
-               $message->add_error($lang->string('The file you specified exceeds MySQL\'s maximum allowed packet.'));
+               $message->add_error(_('The file you specified exceeds MySQL\'s maximum allowed packet.'));
        }
        
        $attachapi->set('attachment',   file_get_contents($FILE['tmp_name']));
@@ -149,7 +149,7 @@ if ($_POST['do'] == 'insert')
                
                $notif->finalize();
                
-               $message->redirect($lang->string('The attachment has been added to the bug.'), "showreport.php?bugid=$bug[bugid]");
+               $message->redirect(_('The attachment has been added to the bug.'), "showreport.php?bugid=$bug[bugid]");
        }
        else
        {
@@ -213,7 +213,7 @@ if ($_POST['do'] == 'update')
        
        $log->update_history();
        
-       $message->redirect($lang->string('The attachment was successfully modified.'), "showreport.php?bugid=$bug[bugid]");
+       $message->redirect(_('The attachment was successfully modified.'), "showreport.php?bugid=$bug[bugid]");
 }
 
 // ###################################################################
index 4064eba455efd963c35dbf068ebb58204884f51d..e99d51e4d6f42eeef4b221c3242dd4a2a1278d97 100644 (file)
@@ -99,7 +99,7 @@ if ($_POST['do'] == 'kill')
                );
        }
        
-       $message->redirect($lang->string('The comment has been deleted. You will be redirected back to the bug.'), 'showreport.php?bugid=' . $bug['bugid']);
+       $message->redirect(_('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'])
        {
-               $messsage->error($lang->string('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).'));
+               $messsage->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->confirm($lang->string('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', $lang->string('Delete Comment'), 'showreport.php?bugid=' . $bug['bugid'], array('commentid' => $comment['commentid']));
+       $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']));
 }
 
 // ###################################################################
@@ -133,7 +133,7 @@ if ($_POST['do'] == 'update')
        
        if ($bugsys->in['commentid'] == $bug['initialreport'] AND $bugsys->in['hidden'])
        {
-               $message->add_error($lang->string('You cannot hide the first comment/initial report of a bug. Instead, hide the entire bug.'));
+               $message->add_error(_('You cannot hide the first comment/initial report of a bug. Instead, hide the entire bug.'));
        }
        
        if (!$message->items)
@@ -167,7 +167,7 @@ if ($_POST['do'] == 'update')
                
                $log->update_history();
                
-               $message->redirect($lang->string('The comment was modified successfully.'), "showreport.php?bugid=$bug[bugid]");
+               $message->redirect(_('The comment was modified successfully.'), "showreport.php?bugid=$bug[bugid]");
        }
        else
        {
index 06a059dd099ac9946c17e10abc1ba0c2ebc988ad..723ac9709bc91a8c9458d9c82201925039011811 100644 (file)
@@ -91,7 +91,7 @@ if ($_POST['do'] == 'kill')
        
        $bugapi->delete();
        
-       $message->redirect($lang->string('The entire bug has been deleted.'), 'index.php');
+       $message->redirect(_('The entire bug has been deleted.'), 'index.php');
 }
 
 // ###################################################################
@@ -103,7 +103,7 @@ if ($_REQUEST['do'] == 'delete')
                $message->error_permission();
        }
        
-       $message->confirm($lang->string('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', $lang->string('Delete Bug Permanently'), 'showreport.php?bugid=' . $bug['bugid'], array('bugid' => $bug['bugid']));
+       $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']));
 }
 
 // ###################################################################
@@ -170,7 +170,7 @@ if ($_POST['do'] == 'update')
        {
                if (!empty($bugsys->in['comment']) AND $autoaction['comment'])
                {
-                       $commenttext = $bugsys->in['comment'] . "\n\n" . $lang->string('--------------- AUTOMATIC RESPONSE ---------------') . "\n" . $autoaction['comment'];
+                       $commenttext = $bugsys->in['comment'] . "\n\n" . _('--------------- AUTOMATIC RESPONSE ---------------') . "\n" . $autoaction['comment'];
                }
                else if (empty($bugsys->in['comment']) AND $autoaction['comment'])
                {
@@ -199,7 +199,7 @@ if ($_POST['do'] == 'update')
                if (!((can_perform('caneditown', $bug['product']) AND $bugsys->userinfo['userid'] == $bug['userid']) OR (can_perform('caneditother', $bug['product']) AND $bugsys->userinfo['userid'] != $bug['userid'])))
                {
                        $bugapi->update();
-                       $message->redirect($lang->string('Your reply has been added to the comment list.'), "showreport.php?bugid=$bug[bugid]");
+                       $message->redirect(_('Your reply has been added to the comment list.'), "showreport.php?bugid=$bug[bugid]");
                }
        }
        
@@ -229,7 +229,7 @@ if ($_POST['do'] == 'update')
        
        $notif->finalize();
        
-       $message->redirect($lang->string('Your changes to the bug have been saved.'), "showreport.php?bugid=$bug[bugid]");
+       $message->redirect(_('Your changes to the bug have been saved.'), "showreport.php?bugid=$bug[bugid]");
 }
 
 /*=====================================================================*\
index 6ed02c9fb188c4a1482b6983a1b1800ffeafa163..7728f7f5ef5a7fe28372464041609755c57c9b62 100644 (file)
@@ -115,7 +115,7 @@ if ($_REQUEST['do'] == 'autoactions')
                
                if ($autoaction['comment'])
                {
-                       $left = $lang->string('Add Comment');
+                       $left = _('Add Comment');
                        $right = $autoaction['comment'];
                        $trextra = ' style="background-color: ' . $stylevar['alt_colour'] . '"';
                        
@@ -138,7 +138,7 @@ if ($_REQUEST['do'] == 'autoactions')
                                continue;
                        }
                        
-                       $left = $fields["$id"]['name'] . ' ' . sprintf($lang->string('(Custom #%1$d, type: %2$s)'), $id, $fields["$id"]['type']);
+                       $left = $fields["$id"]['name'] . ' ' . sprintf(_('(Custom #%1$d, type: %2$s)'), $id, $fields["$id"]['type']);
                        $right = $value;
                        eval('$autoactions .= "' . $template->fetch('explain_row') . '";');
                }
index 5b7a5aafe7fc3e90575e80e8a3821cf2013b47dd..ae8abbf75dded706f452d87bbc1c073a85b371d2 100644 (file)
@@ -54,12 +54,12 @@ if ($_REQUEST['do'] == 'handle')
        if ($db->query_first("SELECT * FROM " . TABLE_PREFIX . "favourite WHERE userid = " . $bugsys->userinfo['userid'] . " AND bugid = " . $bugsys->in['bugid']))
        {
                $db->query("DELETE FROM " . TABLE_PREFIX . "favourite WHERE userid = " . $bugsys->userinfo['userid'] . " AND bugid = " . $bugsys->in['bugid']);
-               $message->redirect($lang->string('This bug has been removed from your favourites list.'), "showreport.php?bugid=" . $bugsys->in['bugid']);
+               $message->redirect(_('This bug has been removed from your favourites list.'), "showreport.php?bugid=" . $bugsys->in['bugid']);
        }
        else
        {
                $db->query("INSERT INTO " . TABLE_PREFIX . "favourite (userid, bugid) VALUES (" . $bugsys->userinfo['userid'] . ", " . $bugsys->in['bugid'] . ")");
-               $message->redirect($lang->string('This bug has been added to your favourites list.'), "showreport.php?bugid=" . $bugsys->in['bugid']);
+               $message->redirect(_('This bug has been added to your favourites list.'), "showreport.php?bugid=" . $bugsys->in['bugid']);
        }
 }
 
index 91751578a37c018ae464542c4b999aa8bf2a29a7..a45ced5afab4dbe228989f6c2c78825d9fad3ba2 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'] = $lang->string('Invalid');
-       $topic['body'] = $lang->string('That help topic does not exist in the system.');
+       $topic['title'] = _('Invalid');
+       $topic['body'] = _('That help topic does not exist in the system.');
 }
 else
 {
index ddc27104c2275c64fe5abf7f01e12a9fc6da96bf..77e792dd1b1b002c914a644ba579f87cea769141 100644 (file)
@@ -104,12 +104,12 @@ class AutoActionAPI 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 $this->registry->lang->string('Invalid array type passed. The fieldchaneges array must be a two-dimensional array: array("builtin" => array("fieldname" => "newvalue" ...), "custom" => array("fieldname" => "fieldvalue" ...))');
+                       return _('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 $this->registry->lang->string('You need to specify some fields to change.');
+                       return _('You need to specify some fields to change.');
                }
                
                $this->values['fieldchanges'] = serialize($this->values['fieldchanges']);
index e3ea307bff611707c4f30a25813ce4592e797464..62769eceec08c1d21407113704d0b14f655d5225 100644 (file)
@@ -111,7 +111,7 @@ class CommentAPI extends API
        {
                if ($this->registry->db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE initialreport = " . $this->values['commentid']))
                {
-                       $this->error($this->registry->lang->string('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(_('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 e21e68ea54972d746dde69431e2dd01a191b7eb9..83c2645d216534698e3118b0c1e074eb7926c81a 100644 (file)
@@ -82,9 +82,9 @@ class FieldAPI extends API
        {
                global $lang;
                $types = array(
-                       'input_text'            => $lang->string('Single-Line Text Box'),
-                       'input_checkbox'        => $lang->string('Checkbox Flag'),
-                       'select_single'         => $lang->string('Drop-Down Menu'),
+                       'input_text'            => _('Single-Line Text Box'),
+                       'input_checkbox'        => _('Checkbox Flag'),
+                       'select_single'         => _('Drop-Down Menu'),
                );
                
                if ($type == null)
@@ -168,7 +168,7 @@ class FieldAPI extends API
                        array_walk($selects, 'trim');
                        if (sizeof($selects) < 1)
                        {
-                               return $this->registry->lang->string('You need to specify some select values.');
+                               return _('You need to specify some select values.');
                        }
                        else
                        {
index 690d6a3dc9a6d09b88a5d5944665e808c70b5b09..dc869a22d90b0c54fa2ef84fcbccaecef4f99205 100644 (file)
@@ -143,11 +143,11 @@ class UserAPI extends API
                
                if (!$this->registry->funct->is_valid_email($this->values['email']))
                {
-                       return $this->registry->lang->string('The specified email is invalid.');
+                       return _('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 $this->registry->lang->string('The specified email is already in use.');
+                       return _('The specified email is already in use.');
                }
                return true;
        }
@@ -167,7 +167,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 $this->registry->lang->string('That display name is already in use by another user.');
+                       return _('That display name is already in use by another user.');
                }
                return true;
        }
@@ -230,7 +230,7 @@ class UserAPI extends API
        {
                if ($this->values['userid'] == $this->registry->userinfo['userid'])
                {
-                       $this->error($lang->string('You cannot delete your own account!'));
+                       $this->error(_('You cannot delete your own account!'));
                }
                
                if ($this->values['usergroupid'] == 6)
@@ -238,7 +238,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($lang->string('At least one other administrator needs to be present before you can delete this user'));
+                               $this->error(_('At least one other administrator needs to be present before you can delete this user'));
                        }
                }
        }
index 01a0a2c80b5578599988de651db157e8b04d06c1..4f2ff0c829cec1a98560e183a6038ad1cc602863 100644 (file)
@@ -93,7 +93,7 @@ class UsergroupAPI extends API
        {
                if ($this->values['usergroupid'] < 7)
                {
-                       return $this->registry->lang->string('You can\'t delete a default usergroup.');
+                       return _('You can\'t delete a default usergroup.');
                }
        }
        
index 3d767f72aae85790c9d059b78792aa2ea3e0a595..2bf72a73c4a64d6a42467207e949a80db1ee511b 100644 (file)
@@ -150,12 +150,12 @@ class UserHelpAPI extends API
                
                if (preg_match('#[^a-z0-9_]#', $this->values['keystring']))
                {
-                       return $this->registry->lang->string('The unique key can only contain lowercase letters, underscores, and numbers.');
+                       return _('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 $this->registry->lang->string('The unique key must be unique.');
+                       return _('The unique key must be unique.');
                }
                
                return true;
index 276a29a04edb3245526731d8a08da0cc5b835d04..1db926f9e8f25b15ace3fd2874a16c6a64eafb56 100644 (file)
@@ -43,11 +43,11 @@ class NavLinks
        {
                global $navigator, $lang;
                
-               $navigator->add_component('section', 'options-pages', 'options', $lang->string('Options'), null);
-               $navigator->add_component('link', 'options-pages-home', 'options-pages', $lang->string('Home'), 'index.php');
-               $navigator->add_component('link', 'options-pages-settings', 'options-pages', $lang->string('Bugdar Settings'), 'setting.php');
-               $navigator->add_component('link', 'options-pages-languages', 'options-pages', $lang->string('Languages'), 'language.php');
-               $navigator->add_component('link', 'options-pages-userhelp', 'options-pages', $lang->string('User Help Items'), 'userhelp.php');
+               $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');
        }
        
        // ###################################################################
@@ -60,8 +60,8 @@ class NavLinks
        {
                global $navigator, $lang;
                
-               $navigator->add_component('section', 'options-languages', 'options', $lang->string('Languages'), null);
-               $navigator->add_component('link', 'options-languages-add', 'options-languages', $lang->string('Add New Language'), 'language.php?do=add');
+               $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');
        }
        
        // ###################################################################
@@ -77,9 +77,9 @@ class NavLinks
                global $navigator, $lang;
                
                NavLinks::languagesAdd();
-               $navigator->add_component('link', 'options-languages-edit', 'options-languages', $lang->string('Edit Language'), 'language.php?do=edit&amp;languageid=' . $id);
-               $navigator->add_component('link', 'options-languages-reload', 'options-languages', $lang->string('Reload XML'), 'language.php?do=reload&amp;languageid=' . $id);
-               $navigator->add_component('link', 'options-languages-delete', 'options-languages', $lang->string('Delete'), 'language.php?do=delete&amp;languageid=' . $id);
+               $navigator->add_component('link', 'options-languages-edit', 'options-languages', _('Edit Language'), 'language.php?do=edit&amp;languageid=' . $id);
+               $navigator->add_component('link', 'options-languages-reload', 'options-languages', _('Reload XML'), 'language.php?do=reload&amp;languageid=' . $id);
+               $navigator->add_component('link', 'options-languages-delete', 'options-languages', _('Delete'), 'language.php?do=delete&amp;languageid=' . $id);
        }
        
        // ###################################################################
@@ -92,8 +92,8 @@ class NavLinks
        {
                global $navigator, $lang;
                
-               $navigator->add_component('section', 'options-userhelp', 'options', $lang->string('User Help Items'), null);
-               $navigator->add_component('link', 'options-userhelp-add', 'options-userhelp', $lang->string('Add New Item'), 'userhelp.php?do=add');
+               $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');
        }
        
        // ###################################################################
@@ -106,9 +106,9 @@ class NavLinks
        {
                global $navigator, $lang;
                
-               $navigator->add_component('section', 'products', 'products', $lang->string('Products'), null);
-               $navigator->add_component('link', 'products-manage', 'products', $lang->string('Manage Products'), 'product.php');
-               $navigator->add_component('link', 'products-add', 'products', $lang->string('Add New Product'), 'product.php?do=addproduct');
+               $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');
        }
        
        // ###################################################################
@@ -124,10 +124,10 @@ class NavLinks
                global $navigator, $lang;
                
                NavLinks::productsAdd();
-               $navigator->add_component('section', 'products-edit', 'products', $lang->string('Edit Product'), null);
-               $navigator->add_component('link', 'products-edit', 'products-edit', $lang->string('Edit Product'), 'product.php?do=editproduct&amp;productid=' . $id);
-               $navigator->add_component('link', 'products-edit-version', 'products-edit', $lang->string('Add New Version'), 'product.php?do=addversion&amp;productid=' . $id);
-               $navigator->add_component('link', 'products-edit-delete', 'products-edit', $lang->string('Delete Product'), 'product.php?do=deleteproduct&amp;productid=' . $id);
+               $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);
        }
        
        // ###################################################################
@@ -140,13 +140,13 @@ class NavLinks
        {
                global $navigator, $lang;
                
-               $navigator->add_component('section', 'fields-pages', 'fields', $lang->string('Fields'), null);
-               $navigator->add_component('link', 'fields-pages-fields', 'fields-pages',  $lang->string('Custom Fields'), 'field.php');
-               $navigator->add_component('link', 'fields-pages-priorities', 'fields-pages', $lang->string('Priorities'), 'priority.php');
-               $navigator->add_component('link', 'fields-pages-resolutions', 'fields-pages', $lang->string('Resolutions'), 'resolution.php');
-               $navigator->add_component('link', 'fields-pages-severities', 'fields-pages', $lang->string('Severities'), 'severity.php');
-               $navigator->add_component('link', 'fields-pages-statuses', 'fields-pages', $lang->string('Statuses'), 'status.php');
-               $navigator->add_component('link', 'fields-pages-autoactions', 'fields-pages', $lang->string('Automatic Actions'), 'autoaction.php');
+               $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-autoactions', 'fields-pages', _('Automatic Actions'), 'autoaction.php');
        }
        
        // ###################################################################
@@ -159,8 +159,8 @@ class NavLinks
        {
                global $navigator, $lang;
                
-               $navigator->add_component('section', 'fields', 'fields', $lang->string('Custom Fields'), null);
-               $navigator->add_component('link', 'fields-add', 'fields', $lang->string('Add New Custom Field'), 'field.php?do=add');
+               $navigator->add_component('section', 'fields', 'fields', _('Custom Fields'), null);
+               $navigator->add_component('link', 'fields-add', 'fields', _('Add New Custom Field'), 'field.php?do=add');
        }
        
        // ###################################################################
@@ -176,7 +176,7 @@ class NavLinks
                global $navigator, $lang;
                
                NavLinks::fieldsAdd();
-               $navigator->add_component('link', 'fields-delete', 'fields', $lang->string('Delete'), 'field.php?do=delete&amp;fieldid=' . $id);
+               $navigator->add_component('link', 'fields-delete', 'fields', _('Delete'), 'field.php?do=delete&amp;fieldid=' . $id);
        }
        
        // ###################################################################
@@ -189,8 +189,8 @@ class NavLinks
        {
                global $navigator, $lang;
                
-               $navigator->add_component('section', 'priorities', 'fields', $lang->string('Priorities'), null);
-               $navigator->add_component('link', 'priorities-add', 'priorities', $lang->string('Add New Priority'), 'priority.php?do=add');
+               $navigator->add_component('section', 'priorities', 'fields', _('Priorities'), null);
+               $navigator->add_component('link', 'priorities-add', 'priorities', _('Add New Priority'), 'priority.php?do=add');
        }
        
        // ###################################################################
@@ -206,7 +206,7 @@ class NavLinks
                global $navigator, $lang;
                
                NavLinks::prioritiesAdd();
-               $navigator->add_component('link', 'priorities-delete', 'priorities', $lang->string('Delete'), 'priority.php?do=delete&amp;priorityid=' . $id);
+               $navigator->add_component('link', 'priorities-delete', 'priorities', _('Delete'), 'priority.php?do=delete&amp;priorityid=' . $id);
        }
        
        // ###################################################################
@@ -219,8 +219,8 @@ class NavLinks
        {
                global $navigator, $lang;
                
-               $navigator->add_component('section', 'resolutions', 'fields', $lang->string('Resolutions'), null);
-               $navigator->add_component('link', 'resolutions-add', 'resolutions', $lang->string('Add New Resolution'), 'resolution.php?do=add');
+               $navigator->add_component('section', 'resolutions', 'fields', _('Resolutions'), null);
+               $navigator->add_component('link', 'resolutions-add', 'resolutions', _('Add New Resolution'), 'resolution.php?do=add');
        }
        
        // ###################################################################
@@ -236,7 +236,7 @@ class NavLinks
                global $navigator, $lang;
                
                NavLinks::resolutionsAdd();
-               $navigator->add_component('link', 'resolutions-delete', 'resolutions', $lang->string('Delete'), 'resolution.php?do=delete&amp;resolutionid=' . $id);
+               $navigator->add_component('link', 'resolutions-delete', 'resolutions', _('Delete'), 'resolution.php?do=delete&amp;resolutionid=' . $id);
        }
        
        // ###################################################################
@@ -249,8 +249,8 @@ class NavLinks
        {
                global $navigator, $lang;
                
-               $navigator->add_component('section', 'severities', 'fields', $lang->string('Severities'), null);
-               $navigator->add_component('link', 'severities-add', 'severities', $lang->string('Add New Severity'), 'severity.php?do=add');
+               $navigator->add_component('section', 'severities', 'fields', _('Severities'), null);
+               $navigator->add_component('link', 'severities-add', 'severities', _('Add New Severity'), 'severity.php?do=add');
        }
        
        // ###################################################################
@@ -266,7 +266,7 @@ class NavLinks
                global $navigator, $lang;
                
                NavLinks::severitiesAdd();
-               $navigator->add_component('link', 'severities-delete', 'severities', $lang->string('Delete'), 'severity.php?do=delete&amp;severityid=' . $id);
+               $navigator->add_component('link', 'severities-delete', 'severities', _('Delete'), 'severity.php?do=delete&amp;severityid=' . $id);
        }
        
        // ###################################################################
@@ -279,8 +279,8 @@ class NavLinks
        {
                global $navigator, $lang;
                
-               $navigator->add_component('section', 'statuses', 'fields', $lang->string('Severities'), null);
-               $navigator->add_component('link', 'statuses-add', 'statuses', $lang->string('Add New Status'), 'status.php?do=add');
+               $navigator->add_component('section', 'statuses', 'fields', _('Severities'), null);
+               $navigator->add_component('link', 'statuses-add', 'statuses', _('Add New Status'), 'status.php?do=add');
        }
        
        // ###################################################################
@@ -296,7 +296,7 @@ class NavLinks
                global $navigator, $lang;
                
                NavLinks::statusesAdd();
-               $navigator->add_component('link', 'statuses-delete', 'statuses', $lang->string('Delete'), 'status.php?do=delete&amp;statusid=' . $id);
+               $navigator->add_component('link', 'statuses-delete', 'statuses', _('Delete'), 'status.php?do=delete&amp;statusid=' . $id);
        }
        
        // ###################################################################
@@ -309,8 +309,8 @@ class NavLinks
        {
                global $navigator, $lang;
                
-               $navigator->add_component('section', 'autoactions', 'fields', $lang->string('Automatic Actions'), null);
-               $navigator->add_component('link', 'autoactions-add', 'autoactions', $lang->string('Add New Automatic Action'), 'autoaction.php?do=add');
+               $navigator->add_component('section', 'autoactions', 'fields', _('Automatic Actions'), null);
+               $navigator->add_component('link', 'autoactions-add', 'autoactions', _('Add New Automatic Action'), 'autoaction.php?do=add');
        }
        
        // ###################################################################
@@ -326,7 +326,7 @@ class NavLinks
                global $navigator, $lang;
                
                NavLinks::autoactionsAdd();
-               $navigator->add_component('link', 'autoactions-delete', 'autoactions', $lang->string('Delete'), 'autoaction.php?do=delete&amp;actionid=' . $id);
+               $navigator->add_component('link', 'autoactions-delete', 'autoactions', _('Delete'), 'autoaction.php?do=delete&amp;actionid=' . $id);
        }
        
        // ###################################################################
@@ -339,10 +339,10 @@ class NavLinks
        {
                global $navigator, $lang;
                
-               $navigator->add_component('section', 'users-pages', 'users', $lang->string('Users &amp; Permissions'), null);
-               $navigator->add_component('link', 'users-pages-users', 'users-pages', $lang->string('Users'), 'user.php');
-               $navigator->add_component('link', 'users-pages-usergroups', 'users-pages', $lang->string('Usergroups'), 'usergroup.php');
-               $navigator->add_component('link', 'users-pages-permissions', 'users-pages', $lang->string('Usergroup Permissions'), 'permission.php');
+               $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', _('Usergroup Permissions'), 'permission.php');
        }
        
        // ###################################################################
@@ -355,8 +355,8 @@ class NavLinks
        {
                global $navigator, $lang;
                
-               $navigator->add_component('section', 'users', 'users', $lang->string('Users'), null);
-               $navigator->add_component('link', 'users-add', 'users', $lang->string('Add New User'), 'user.php?do=add');
+               $navigator->add_component('section', 'users', 'users', _('Users'), null);
+               $navigator->add_component('link', 'users-add', 'users', _('Add New User'), 'user.php?do=add');
        }
        
        // ###################################################################
@@ -372,7 +372,7 @@ class NavLinks
                global $navigator, $lang;
                
                NavLinks::usersAdd();
-               $navigator->add_component('link', 'users-delete', 'users', $lang->string('Delete'), 'user.php?do=delete&amp;userid=' . $id);
+               $navigator->add_component('link', 'users-delete', 'users', _('Delete'), 'user.php?do=delete&amp;userid=' . $id);
        }
        
        // ###################################################################
@@ -385,8 +385,8 @@ class NavLinks
        {
                global $navigator, $lang;
                
-               $navigator->add_component('section', 'usergroups', 'users', $lang->string('Usergroups'), null);
-               $navigator->add_component('link', 'usergroups-add', 'usergroups', $lang->string('Add New Usergroup'), 'usergroup.php?do=add');
+               $navigator->add_component('section', 'usergroups', 'users', _('Usergroups'), null);
+               $navigator->add_component('link', 'usergroups-add', 'usergroups', _('Add New Usergroup'), 'usergroup.php?do=add');
        }
        
        // ###################################################################
@@ -402,7 +402,7 @@ class NavLinks
                global $navigator, $lang;
                
                NavLinks::usergroupsAdd();
-               $navigator->add_component('link', 'usergroups-delete', 'usergroups', $lang->string('Delete'), 'usergroup.php?do=delete&amp;userid=' . $id);
+               $navigator->add_component('link', 'usergroups-delete', 'usergroups', _('Delete'), 'usergroup.php?do=delete&amp;userid=' . $id);
        }
 }
 
index a7f19ce369f87816d08f1ed923239f1f324aed4a..e14a01630d3f828586385a676561c16aad1fa7fc 100644 (file)
@@ -288,7 +288,7 @@ class NotificationCenter
                if ($this->users["$userid"]['options'][0] & $this->registry->emailoptions['notifications']['assignedto'] AND in_array($userid, $this->roles['-notapplicable-']))
                {
                        $this->notices["$userid"][] = sprintf(
-$this->registry->lang->string('You are no longer assigned to this bug, per %1$s\'s changes.'),
+_('You are no longer assigned to this bug, per %1$s\'s changes.'),
 
                                construct_user_display($this->registry->userinfo, false)
                        );
@@ -308,7 +308,7 @@ $this->registry->lang->string('You are no longer assigned to this bug, per %1$s\
                if ($this->users["$userid"]['options'][0] & $this->registry->emailoptions['notifications']['assignedto'] AND in_array($userid, $this->roles['-notapplicable-']))
                {
                        $this->notices["$userid"][] = sprintf(
-$this->registry->lang->string('You have been assigned to this bug by %1$s.'),
+_('You have been assigned to this bug by %1$s.'),
                                
                                construct_user_display($this->registry->userinfo, false)
                        );
@@ -330,7 +330,7 @@ $this->registry->lang->string('You have been assigned to this bug by %1$s.'),
                foreach ($userlist AS $userid => $user)
                {
                        $this->notices["$user[userid]"][] = sprintf(
-$this->registry->lang->string('The status field has changed from "%1$s" to "%2$s".'),
+_('The status field has changed from "%1$s" to "%2$s".'),
                                
                                $this->registry->datastore['status']["$old"]['status'],
                                $this->registry->datastore['status']["$new"]['status']
@@ -353,7 +353,7 @@ $this->registry->lang->string('The status field has changed from "%1$s" to "%2$s
                foreach ($userlist AS $userid => $user)
                {
                        $this->notices["$user[userid]"][] = sprintf(
-$this->registry->lang->string('The resolution field has changed from "%1$s" to "%2$s".'),
+_('The resolution field has changed from "%1$s" to "%2$s".'),
                                
                                $this->registry->datastore['resolution']["$old"]['resolution'],
                                $this->registry->datastore['resolution']["$new"]['resolution']
@@ -376,7 +376,7 @@ $this->registry->lang->string('The resolution field has changed from "%1$s" to "
                foreach ($userlist AS $userid => $user)
                {
                        $this->notices["$user[userid]"][] = sprintf(
-$this->registry->lang->string('The duplicates list has changed from "%1$s" to %2$s".'),
+_('The duplicates list has changed from "%1$s" to %2$s".'),
                                
                                $old,
                                $new
@@ -399,7 +399,7 @@ $this->registry->lang->string('The duplicates list has changed from "%1$s" to %2
                foreach ($userlist AS $userid => $user)
                {
                        $this->notices["$user[userid]"][] = sprintf(
-$this->registry->lang->string('The severity field has changed from "%1$s" to "%2$s".'),
+_('The severity field has changed from "%1$s" to "%2$s".'),
                                
                                $this->registry->datastore['severity']["$old"]['severity'],
                                $this->registry->datastore['severity']["$new"]['severity']
@@ -422,7 +422,7 @@ $this->registry->lang->string('The severity field has changed from "%1$s" to "%2
                foreach ($userlist AS $userid => $user)
                {
                        $this->notices["$user[userid]"][] = sprintf(
-$this->registry->lang->string('The priority field has changed from "%1$s" to "%2$s".'),
+_('The priority field has changed from "%1$s" to "%2$s".'),
                                
                                $this->registry->datastore['priority']["$old"]['priority'],
                                $this->registry->datastore['priority']["$new"]['priority']
@@ -447,7 +447,7 @@ $this->registry->lang->string('The priority field has changed from "%1$s" to "%2
                foreach ($userlist AS $userid => $user)
                {
                        $this->notices["$user[userid]"][] = sprintf(
-$this->registry->lang->string('The product, component, and version combination has changed from "%1$s" to "%2$s".'),
+_('The product, component, and version combination has changed from "%1$s" to "%2$s".'),
                                
                                $this->registry->datastore['product']["$old[0]"]['title'] . '/' . ($old[1] ? $this->registry->datastore['product']["$old[1]"]['title'] . '/' : '') . $this->registry->datastore['version']["$old[2]"]['version'],
                                $this->registry->datastore['product']["$new[0]"]['title'] . '/' . ($new[1] ? $this->registry->datastore['product']["$new[1]"]['title'] . '/' : '') . $this->registry->datastore['version']["$new[2]"]['version']
@@ -470,7 +470,7 @@ $this->registry->lang->string('The product, component, and version combination h
                foreach ($userlist AS $userid => $user)
                {
                        $this->notices["$user[userid]"][] = sprintf(
-$this->registry->lang->string('The following comment was added by %1$s on %2$s:
+_('The following comment was added by %1$s on %2$s:
 ============================================
 %3$s
 ============================================'),
@@ -498,7 +498,7 @@ $this->registry->lang->string('The following comment was added by %1$s on %2$s:
                foreach ($userlist AS $userid => $user)
                {
                        $this->notices["$user[userid]"][] = sprintf(
-$this->registry->lang->string('The %1$s field changed from "%2$s" to "%3$s".'),
+_('The %1$s field changed from "%2$s" to "%3$s".'),
                                
                                $name,
                                $old,
@@ -524,7 +524,7 @@ $this->registry->lang->string('The %1$s field changed from "%2$s" to "%3$s".'),
                foreach ($userlist AS $userid => $user)
                {
                        $this->notices["$userid"][] = sprintf(
-$this->registry->lang->string('%1$s has uploaded a new attachment:
+_('%1$s has uploaded a new attachment:
 ============================================
 File name: %2$s
 Description: %3$s
@@ -569,7 +569,7 @@ View: %6$s
                        if (!is_array($this->users["$user[userid]"]))
                        {
                                $this->notices["$user[userid]"][] = sprintf(
-$this->registry->lang->string('
+_('
 This bug has been added to the database:
 ============================================
 Bug ID: %1$s
@@ -639,7 +639,7 @@ Initial report:
        */
        function finalize()
        {
-               $this->registry->mail->set('subject',   sprintf($this->registry->lang->string('%1$s Bug Notification - %2$s'), $this->registry->options['trackertitle'], $this->bug['summary']));
+               $this->registry->mail->set('subject',   sprintf(_('%1$s Bug Notification - %2$s'), $this->registry->options['trackertitle'], $this->bug['summary']));
                foreach ($this->notices AS $userid => $noticelist)
                {
                        if ($userid == $this->registry->userinfo['userid'])
@@ -648,7 +648,7 @@ Initial report:
                        }
                        
                        $this->registry->mail->to_add($this->users["$userid"]['displayname'], $this->users["$userid"]['email']);
-                       $this->registry->mail->set('bodytext', sprintf($this->registry->lang->string('Hi %1$s,
+                       $this->registry->mail->set('bodytext', sprintf(_('Hi %1$s,
 
 You are receiving this email because you have opted to get notifications for the %2$s bug tracker.
 
index 97861b7f31a6bb4fdfbf0fae017b6553178a5a0e..67add11c185ca2725ff3221eeb6231a0c4ed792e 100644 (file)
@@ -173,15 +173,15 @@ class ListSorter
                global $lang;
                
                $keys = array(
-                       'lastpost'              => $lang->string('Last Post Time'),
-                       'id'                    => $lang->string('Bug ID'),
-                       'summary'               => $lang->string('Summary'),
-                       'reporter'              => $lang->string('Reporter'),
-                       'product'               => $lang->string('Product'),
-                       'status'                => $lang->string('Status'),
-                       'resolution'    => $lang->string('Resolution'),
-                       'priority'              => $lang->string('Priority'),
-                       'severity'              => $lang->string('Severity')
+                       'lastpost'              => _('Last Post Time'),
+                       'id'                    => _('Bug ID'),
+                       'summary'               => _('Summary'),
+                       'reporter'              => _('Reporter'),
+                       'product'               => _('Product'),
+                       'status'                => _('Status'),
+                       'resolution'    => _('Resolution'),
+                       'priority'              => _('Priority'),
+                       'severity'              => _('Severity')
                );
                
                if ($key === false)
@@ -209,8 +209,8 @@ class ListSorter
                global $lang;
                
                $keys = array(
-                       'desc'  => $lang->string('Descending'),
-                       'asc'   => $lang->string('Ascending')
+                       'desc'  => _('Descending'),
+                       'asc'   => _('Ascending')
                );
                
                if ($key === false)
index 553366f40c88e16eb16a67f28c2a537316b10424..ed2b31e6d09be3df8dc335e9838b907c900eadea 100755 (executable)
@@ -146,7 +146,7 @@ $datef->fetch_offset();
 // mail system
 $bugsys->load('mail', 'mail', true);
 $mail->set('from',             $bugsys->options['webmasteremail']);
-$mail->set('fromname', $lang->string('Bugdar Notification'));
+$mail->set('fromname', _('Bugdar Notification'));
 
 // ###################################################################
 // load permissions
index 0301733fb1f26c3f18143b8fcb97bc8a807877e9..81459943a233743846167258d295a2f300735261 100644 (file)
@@ -22,7 +22,7 @@
 // ###################################################################
 // LEXICAL STRING CONSTANTS
 
-$lang->setlex('error_invalid_id', $lang->string('That is an invalid ID.'));
+$lang->setlex('error_invalid_id', _('That is an invalid ID.'));
 
 // ###################################################################
 // updates the localization cache
index 50db308b7d1c590d42f9d88b8c31a372f4f53d02..e1a6f4d41cea66c1289703207644f4c3b8fee9ff 100755 (executable)
@@ -38,52 +38,52 @@ require_once('./includes/class_sort.php');
 
 $settings = array(
 'general' => array(
-       ':lang'                         => $lang->string('General Options'),
+       ':lang'                         => _('General Options'),
        
-       'allownewreg'           => array('yesno', 1, false, $lang->string('Allow New Registrations'), $lang->string('If this is set to <em>yes</em>, then new users will be allowed to register.')),
-       'verifyemail'           => array('yesno', 0, false, $lang->string('Require Activation Email'), $lang->string('Setting this to yes will force all new users to verify their account with an email activation link.')),
-       'moderatenewusers'      => array('yesno', 0, false, $lang->string('Moderate New Users'), $lang->string('All new users will have to be approved by the administration before being able to have normal user rights.')),
-       'sendwelcomemail'       => array('yesno', 1, false, $lang->string('Send New Use Welcome Email'), $lang->string('Setting this option to <em>yes</em> will send each new verified user a welcome email.')),
-       'webmasteremail'        => array('textbox', '', false, $lang->string('Webmaster Email Address'), $lang->string('The email address from which emails will be sent out.')),
-       'trackertitle'          => array('textbox', '', false, $lang->string('Tracker Title'), $lang->string('The global name of the bug tracker. Example: Blue Static Bug Tracker')),
-       'trackerurl'            => array('textbox', '', false, $lang->string('Tracker Base URL'), $lang->string('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')),
-       'dateformat'            => array('textbox', 'F j, Y h:i:s A', false, $lang->string('Date Format'), $lang->string('Set the date format used for bug report and comment information. This is based on PHP\'s date() function.')),
-       'defaultlanguage'       => array('" . construct_option_select("setting[defaultlanguage]", $bugsys->datastore["language"], $bugsys->options["defaultlanguage"], "languageid", "title") . "', 1, false, $lang->string('Default Language'), $lang->string('You can set the default language that all new users (and guests) will use.')),
-       'syndicateditems'       => array('textbox', 10, false, $lang->string('Number of Syndicated Items'), $lang->string('The number of bugs to be syndicated at any one time by the Atom XML feed.'))
+       'allownewreg'           => array('yesno', 1, false, _('Allow New Registrations'), _('If this is set to <em>yes</em>, then new users will be allowed to register.')),
+       'verifyemail'           => array('yesno', 0, false, _('Require Activation Email'), _('Setting this to yes will force all new users to verify their account with an email activation link.')),
+       'moderatenewusers'      => array('yesno', 0, false, _('Moderate New Users'), _('All new users will have to be approved by the administration before being able to have normal user rights.')),
+       'sendwelcomemail'       => array('yesno', 1, false, _('Send New Use Welcome Email'), _('Setting this option to <em>yes</em> will send each new verified user a welcome email.')),
+       'webmasteremail'        => array('textbox', '', false, _('Webmaster Email Address'), _('The email address from which emails will be sent out.')),
+       'trackertitle'          => array('textbox', '', false, _('Tracker Title'), _('The global name of the bug tracker. Example: Blue Static Bug Tracker')),
+       'trackerurl'            => array('textbox', '', false, _('Tracker Base URL'), _('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')),
+       'dateformat'            => array('textbox', 'F j, Y h:i:s A', false, _('Date Format'), _('Set the date format used for bug report and comment information. This is based on PHP\'s date() function.')),
+       'defaultlanguage'       => array('" . construct_option_select("setting[defaultlanguage]", $bugsys->datastore["language"], $bugsys->options["defaultlanguage"], "languageid", "title") . "', 1, false, _('Default Language'), _('You can set the default language that all new users (and guests) will use.')),
+       'syndicateditems'       => array('textbox', 10, false, _('Number of Syndicated Items'), _('The number of bugs to be syndicated at any one time by the Atom XML feed.'))
 ),
 
 'reporting' => array(
-       ':lang'                         => $lang->string('Bug Reporting Options'),
+       ':lang'                         => _('Bug Reporting Options'),
        
-       'allowhtml'                     => array('yesno', 0, false, $lang->string('Allow HTML in Bug Reports'), $lang->string('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.')),
-       'defaultseverity'       => array('" . construct_option_select("setting[defaultseverity]", $bugsys->datastore["severity"],  $bugsys->options["defaultseverity"], "severityid", "severity") . "', 2, false, $lang->string('Default Severity'), $lang->string('The default severity that is selected when creating a new bug report.')),
-       'defaultpriority'       => array('" . construct_option_select("setting[defaultpriority]", $bugsys->datastore["priority"],  $bugsys->options["defaultpriority"], "priorityid", "priority") . "', 3, false, $lang->string('Default Priority'), $lang->string('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.')),
-       'defaultstatus'         => array('" . construct_option_select("setting[defaultstatus]", $bugsys->datastore["status"],  $bugsys->options["defaultstatus"], "statusid", "status") . "', 1, false, $lang->string('Default Status'), $lang->string('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.')),
-       'defaultresolve'        => array('" . construct_option_select("setting[defaultresolve]", $bugsys->datastore["resolution"],  $bugsys->options["defaultresolve"], "resolutionid", "resolution") . "', 1, false, $lang->string('Default Resolution'), $lang->string('This is the default bug resolution. If a user is not able to change this field, setting this will act as the default value.')),
-       'defaultassign'         => array('" . construct_option_select("setting[defaultassign]", $bugsys->datastore["assignto"],  $bugsys->options["defaultassign"], "userid", "displayname", 0) . "', 0, false, $lang->string('Default Bug Assignment'), $lang->string('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>.')),
-       'defaultcomment'        => array('textarea', '', false, $lang->string('Default Comment Text'), $lang->string('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.'))
+       'allowhtml'                     => array('yesno', 0, false, _('Allow HTML in Bug Reports'), _('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.')),
+       'defaultseverity'       => array('" . construct_option_select("setting[defaultseverity]", $bugsys->datastore["severity"],  $bugsys->options["defaultseverity"], "severityid", "severity") . "', 2, false, _('Default Severity'), _('The default severity that is selected when creating a new bug report.')),
+       'defaultpriority'       => array('" . construct_option_select("setting[defaultpriority]", $bugsys->datastore["priority"],  $bugsys->options["defaultpriority"], "priorityid", "priority") . "', 3, false, _('Default Priority'), _('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.')),
+       'defaultstatus'         => array('" . construct_option_select("setting[defaultstatus]", $bugsys->datastore["status"],  $bugsys->options["defaultstatus"], "statusid", "status") . "', 1, false, _('Default Status'), _('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.')),
+       'defaultresolve'        => array('" . construct_option_select("setting[defaultresolve]", $bugsys->datastore["resolution"],  $bugsys->options["defaultresolve"], "resolutionid", "resolution") . "', 1, false, _('Default Resolution'), _('This is the default bug resolution. If a user is not able to change this field, setting this will act as the default value.')),
+       'defaultassign'         => array('" . construct_option_select("setting[defaultassign]", $bugsys->datastore["assignto"],  $bugsys->options["defaultassign"], "userid", "displayname", 0) . "', 0, false, _('Default Bug Assignment'), _('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>.')),
+       'defaultcomment'        => array('textarea', '', false, _('Default Comment Text'), _('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.'))
 ),
 
 'display' => array(
-       ':lang'                         => $lang->string('Bug Listing Display Options'),
+       ':lang'                         => _('Bug Listing Display Options'),
        
-       'hidestatuses'          => array('" . construct_option_select("setting[hidestatuses]", $bugsys->datastore["status"], $bugsys->options["hidestatuses"], "statusid", "status", 0, true) . "', '0', false, $lang->string('Hide Statuses on Bug Listings'), $lang->string('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 favourites list.')),
-       'defaultsortkey'        => array('" . construct_option_select("setting[defaultsortkey]", ListSorter::fetch_by_text(false), $bugsys->options["defaultsortkey"]) . "', 'lastpost', false, $lang->string('Default Sort Column'), $lang->string('Select the column to sort bugs by on listings. This is only a default setting which users can override in their preferences.')),
-       'defaultsortas'         => array('" . construct_option_select("setting[defaultsortas]", ListSorter::fetch_as_text(false), $bugsys->options["defaultsortas"]) . "', 'desc', false, $lang->string('Default Sort Direction'), $lang->string('Specify the default direction to sort bugs in the selected column. This works with and follows the same rules as the Sort Column.'))
+       'hidestatuses'          => array('" . construct_option_select("setting[hidestatuses]", $bugsys->datastore["status"], $bugsys->options["hidestatuses"], "statusid", "status", 0, true) . "', '0', false, _('Hide Statuses on Bug Listings'), _('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 favourites list.')),
+       'defaultsortkey'        => array('" . construct_option_select("setting[defaultsortkey]", ListSorter::fetch_by_text(false), $bugsys->options["defaultsortkey"]) . "', 'lastpost', false, _('Default Sort Column'), _('Select the column to sort bugs by on listings. This is only a default setting which users can override in their preferences.')),
+       'defaultsortas'         => array('" . construct_option_select("setting[defaultsortas]", ListSorter::fetch_as_text(false), $bugsys->options["defaultsortas"]) . "', 'desc', false, _('Default Sort Direction'), _('Specify the default direction to sort bugs in the selected column. This works with and follows the same rules as the Sort Column.'))
 ),
 
 'pagination' => array(
-       ':lang'                         => $lang->string('Pagination Options'),
+       ':lang'                         => _('Pagination Options'),
        
-       'defaultpp'                     => array('textbox', 20, false, $lang->string('Default Per-Page Amount'), $lang->string('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.')),
-       'maxpp'                         => array('textbox', 100, false, $lang->string('Maximum Per-Page Value'), $lang->string('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.')),
-       'pagelinks'                     => array('textbox', 3, false, $lang->string('Number of Page Links'), $lang->string('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.'))
+       'defaultpp'                     => array('textbox', 20, false, _('Default Per-Page Amount'), _('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.')),
+       'maxpp'                         => array('textbox', 100, false, _('Maximum Per-Page Value'), _('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.')),
+       'pagelinks'                     => array('textbox', 3, false, _('Number of Page Links'), _('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.'))
 ),
 
 'untouchables' => array(
-       ':lang'                         => $lang->string('Untouchables'),
+       ':lang'                         => _('Untouchables'),
        
-       'trackerversion'        => array('textbox', '[#]version[#]', true, $lang->string('Tracker Version Number'), $lang->string('Do not touch this!'))
+       'trackerversion'        => array('textbox', '[#]version[#]', true, _('Tracker Version Number'), _('Do not touch this!'))
 )
 );
 
index bef43110a068db76f29394033a9e2b4208c5e14a..d7abdda08e3d5fe7b3861991b694641f26d5a852 100755 (executable)
--- a/login.php
+++ b/login.php
@@ -33,7 +33,7 @@ require_once('./global.php');
 
 if ($bugsys->userinfo['userid'] AND $_REQUEST['do'] != 'logout' AND $_POST['do'] != 'cplogin' AND $_REQUEST['do'] != 'cplogout')
 {
-       $message->error($lang->string('You are already logged in.'));
+       $message->error(_('You are already logged in.'));
 }
 
 // ###################################################################
@@ -84,10 +84,10 @@ if ($_POST['do'] == 'login' OR $_POST['do'] == 'cplogin')
                        $funct->cookie(COOKIE_PREFIX . 'authkey');
                }
                
-               $message->error($lang->string('Invalid email or password.'));
+               $message->error(_('Invalid email or password.'));
        }
        
-       $message->redirect($lang->string('Welcome back! You are now logged in.'), $url);
+       $message->redirect(_('Welcome back! You are now logged in.'), $url);
 }
 
 // ###################################################################
@@ -99,11 +99,11 @@ if ($_REQUEST['do'] == 'logout')
                $funct->cookie(COOKIE_PREFIX . 'userid');
                $funct->cookie(COOKIE_PREFIX . 'authkey');
                $funct->cookie(COOKIE_PREFIX . 'adminsession');
-               $message->redirect($lang->string('You have been logged out.'), ($_SERVER['HTTP_REFERER'] ? $_SERVER['HTTP_REFERER'] : 'index.php'));
+               $message->redirect(_('You have been logged out.'), ($_SERVER['HTTP_REFERER'] ? $_SERVER['HTTP_REFERER'] : 'index.php'));
        }
        else
        {
-               $message->error($lang->string('You need to be logged in to access this feature.'));
+               $message->error(_('You need to be logged in to access this feature.'));
        }
 }
 
@@ -114,11 +114,11 @@ if ($_REQUEST['do'] == 'cplogout')
        if ($_COOKIE[COOKIE_PREFIX . 'adminsession'])
        {
                $funct->cookie(COOKIE_PREFIX . 'adminsession');
-               $message->redirect($lang->string('You have been logged out.'), 'admin/');
+               $message->redirect(_('You have been logged out.'), 'admin/');
        }
        else
        {
-               $message->error($lang->string('You are not logged in.'));
+               $message->error(_('You are not logged in.'));
        }
 }
 
index fe603ea56ca93e80df1badaf03dd0134634450ff..b843910160267f0a4ddea53ed042c3660f8c9cb7 100755 (executable)
@@ -95,7 +95,7 @@ if ($_POST['do'] == 'insert')
        $pcv = parse_pcv_select($bugsys->in['pcv_select'], true);
        if (!$pcv)
        {
-               $message->add_error($lang->string('Invalid product/component/version selected.'));
+               $message->add_error(_('Invalid product/component/version selected.'));
        }
        $bug->set('product',            $pcv['product']);
        $bug->set('component',          $pcv['component']);
@@ -129,7 +129,7 @@ if ($_POST['do'] == 'insert')
                
                $notif->finalize();
                
-               $message->redirect($lang->string('The bug has been added to the database.'), ($bugsys->in['submit_reload'] == '' ? "showreport.php?bugid=" . $bug->values['bugid'] : 'newreport.php'));
+               $message->redirect(_('The bug has been added to the database.'), ($bugsys->in['submit_reload'] == '' ? "showreport.php?bugid=" . $bug->values['bugid'] : 'newreport.php'));
        }
        else
        {
index 25c94b3f131160a789a6029cf9eb970f7bb44fde..adfc313a81d478de099600720c85d241f9b1f5d1 100755 (executable)
@@ -39,22 +39,22 @@ if ($_POST['do'] == 'insert')
 {
        if ($bugsys->userinfo['userid'])
        {
-               $message->error($lang->string('Sorry, you are already registered.'));
+               $message->error(_('Sorry, you are already registered.'));
        }
        
        if (!$bugsys->options['allownewreg'])
        {
-               $message->error($lang->string('Sorry, we don\'t allow new registrations.'));
+               $message->error(_('Sorry, we don\'t allow new registrations.'));
        }
 
        if ($bugsys->in['email'] != $bugsys->in['confirmemail'])
        {
-               $message->add_error($lang->string('The emails you entered do not match.'));
+               $message->add_error(_('The emails you entered do not match.'));
        }
        
        if ($bugsys->in['password'] != $bugsys->in['confirmpassword'])
        {
-               $message->add_error($lang->string('The passwords you entered did not match.'));
+               $message->add_error(_('The passwords you entered did not match.'));
        }
                
        if (!$message->items)
@@ -97,8 +97,8 @@ if ($_POST['do'] == 'insert')
                        $db->query("INSERT INTO " . TABLE_PREFIX . "useractivation (userid, activator, dateline, usergroupid) VALUES ($userid, '$activationid', " . TIMENOW . ", 2)");
                        
                        $mail->to = $bugsys->in['email'];
-                       $mail->subject =  sprintf($lang->string('Welcome to %1$s'), $bugsys->options['trackertitle']);
-                       $mail->body = sprintf($lang->string('Hi %1$s,
+                       $mail->subject =  sprintf(_('Welcome to %1$s'), $bugsys->options['trackertitle']);
+                       $mail->body = sprintf(_('Hi %1$s,
 
 Welcome to the %2$s tracker. Before you can begin posting bug reports, you\'ll need to activae your account. To do this, please click this link:
 
@@ -113,15 +113,15 @@ Welcome to the %2$s tracker. Before you can begin posting bug reports, you\'ll n
                        
                        $mail->send();
                
-                       $message->message($lang->string('You now need to activate your account via email.'));
+                       $message->message(_('You now need to activate your account via email.'));
                }
                else if ($usergroupid == 4 OR $usergroupid == 2)
                {
                        if ($bugsys->options['sendwelcomemail'])
                        {
                                $mail->to = $bugsys->in['email'];
-                               $mail->subject = sprintf($lang->string('Welcome to %1$s'), $bugsys->options['trackertitle']);
-                               $mail->body = sprintf($lang->string('Hi %1$s,
+                               $mail->subject = sprintf(_('Welcome to %1$s'), $bugsys->options['trackertitle']);
+                               $mail->body = sprintf(_('Hi %1$s,
 
 Thank you for taking the time to register at %2$s. We look forward to your contributations to making our products better.
 
@@ -135,11 +135,11 @@ If you have any questions, please don\'t hesitate to contact the webmaster.'),
                        
                        if ($usergroupid == 4)
                        {
-                               $message->message($lang->string('Your account is pending approval.'));
+                               $message->message(_('Your account is pending approval.'));
                        }
                        else
                        {
-                               $message->message($lang->string('Thank you for registering. You may now use your account.'));
+                               $message->message(_('Thank you for registering. You may now use your account.'));
                        }
                }
        }
@@ -157,12 +157,12 @@ if (empty($_REQUEST['do']))
 {
        if ($bugsys->userinfo['userid'])
        {
-               $message->error($lang->string('Sorry, you are already registered.'));
+               $message->error(_('Sorry, you are already registered.'));
        }
        
        if (!$bugsys->options['allownewreg'])
        {
-               $message->error($lang->string('Sorry, we don\'t allow new registrations.'));
+               $message->error(_('Sorry, we don\'t allow new registrations.'));
        }
 
        foreach ($bugsys->datastore['language'] AS $value => $temp)
@@ -189,8 +189,8 @@ if ($_REQUEST['do'] == 'activate')
                if ($bugsys->options['sendwelcomemail'])
                {
                        $mail->to = $user['email'];
-                       $mail->subject = sprintf($lang->string('Welcome to %1$s'), $bugsys->options['trackertitle']);
-                       $mail->body = sprintf($lang->string('Hi %1$s,
+                       $mail->subject = sprintf(_('Welcome to %1$s'), $bugsys->options['trackertitle']);
+                       $mail->body = sprintf(_('Hi %1$s,
 
 Thank you for taking the time to register at %2$s. We look forward to your contributations to making our products better.
 
@@ -201,11 +201,11 @@ If you have any questions, please don\'t hesitate to contact the webmaster.'),
                        $mail->send();
                }
                
-               $message->message($lang->string('Your account is now activated and you can now login.'));
+               $message->message(_('Your account is now activated and you can now login.'));
        }
        else
        {
-               $message->error($lang->string('Sorry, we could not match your registration string. Please make sure you entered the correct URL.'));
+               $message->error(_('Sorry, we could not match your registration string. Please make sure you entered the correct URL.'));
        }
 }
 
index c4c969940ec1e803eb5551d04f65bedc5f0c4e3b..c5d6c75d750190ec5e70c4f4452194819bf5a1a0 100644 (file)
@@ -243,7 +243,7 @@ if ($_REQUEST['do'] == 'process')
        // have to search something
        if (sizeof($querybuild) < 1)
        {
-               $message->error(sprintf($lang->string('You have to enter some criteria to search for. Node 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(_('You have to enter some criteria to search for. Node that words less than %1$d characters are ignored by the search engine (and some other very common words, too).'), SEARCH_WORD_MIN));
        }
        
        // -------------------------------------------------------------------
@@ -270,7 +270,7 @@ if ($_REQUEST['do'] == 'process')
        
        if ($numrows < 1)
        {
-               $message->error($lang->string('No search results were returned that matched your criteria.'));
+               $message->error(_('No search results were returned that matched your criteria.'));
        }
        
        while ($result = $db->fetch_array($search))
index 55ba2ec95f03557d7dbf53b651ee461dc5d3804a..9bf9534b6fd7b91c68f05d88efa66cb9082a9f90 100644 (file)
@@ -67,7 +67,7 @@ $customfields = $db->query("
 
 while ($field = $db->fetch_array($customfields))
 {
-       $fieldlist["custom.field$field[fieldid]"] = sprintf($lang->string('Custom Field %1$s (%2$s)'), $field['fieldid'], $field['name']);
+       $fieldlist["custom.field$field[fieldid]"] = sprintf(_('Custom Field %1$s (%2$s)'), $field['fieldid'], $field['name']);
 }
 
 // ###################################################################
@@ -109,11 +109,11 @@ foreach ($logs AS $dateline => $logitems)
                {
                        if ($matches[1] == 'comment')
                        {
-                               $log['field'] = sprintf($lang->string('Comment #%1$s %2$s'), $log['commentid'], ucwords($matches[2]));
+                               $log['field'] = sprintf(_('Comment #%1$s %2$s'), $log['commentid'], ucwords($matches[2]));
                        }
                        else if ($matches[1] == 'attachment')
                        {
-                               $log['field'] = sprintf($lang->string('Attachment #2%1$s %2$s'), $log['attachmentid'], ucwords($matches[2]));
+                               $log['field'] = sprintf(_('Attachment #2%1$s %2$s'), $log['attachmentid'], ucwords($matches[2]));
                        }
                }
                else if (preg_match('#^custom.field([0-9]+?)#', $log['field'], $matches))
index 4956d29c940a02d2ea509d85963bbbad9c47a72a..42434118b8ac5ff4958530f7e4e21642f2fafcfc 100644 (file)
@@ -204,7 +204,7 @@ else
 $show['subscribe'] = can_perform('cansubscribe', $bug['product']);
 
 $favourite = (bool)$db->query_first("SELECT * FROM " . TABLE_PREFIX . "favourite WHERE bugid = $bug[bugid] AND userid = " . $bugsys->userinfo['userid']);
-$favouritetext = ($favourite ? $lang->string('Remove from Favourites') : $lang->string('Add to Favourites'));
+$favouritetext = ($favourite ? _('Remove from Favourites') : _('Add to Favourites'));
 
 $bug['userinfo'] = construct_user_display($bug);
 $bug['datetime'] = $datef->format($bugsys->options['dateformat'], $bug['dateline']);
index 42ce5cd9fa36d39795007f0f46bb08a96f47638c..4c4b3d379bdc319e674816f83dad23e15b08eebe 100644 (file)
@@ -57,7 +57,7 @@ $bugs_fetch = $db->query("
 while ($bug = $db->fetch_array($bugs_fetch))
 {
        $bug['storytext'] = htmlspecialchars(sprintf(
-               $lang->string('<table cellspacing="0" cellpadding="3" border="0">
+               _('<table cellspacing="0" cellpadding="3" border="0">
 <tr>
        <td><strong>Bug ID:</strong></td>
        <td>%1$s</td>
@@ -101,7 +101,7 @@ if (SYND_TYPE == 'atom')
        echo '<?xml version="1.0" encoding="utf-8"?>
 <feed xmlns="http://www.w3.org/2005/Atom">
 
-       <title>' . sprintf($lang->string('%1$s Syndication Feed'), $bugsys->options['trackertitle']) . '</title>
+       <title>' . sprintf(_('%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 182d71d2f45129a652f2dcf48b514141b6558872..016eba65e219ae3636500feb6ae946b9bb8f55f7 100644 (file)
@@ -61,13 +61,13 @@ if ($_POST['do'] == 'update')
        {
                if (empty($bugsys->in['validate']))
                {
-                       $message->add_error($lang->string('You need to enter your current password to change your email or password'));
+                       $message->add_error(_('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->add_error($lang->string('Your authentication password does not match the one in our records'));
+                               $message->add_error(_('Your authentication password does not match the one in our records'));
                        }
                }
        }
@@ -78,12 +78,12 @@ if ($_POST['do'] == 'update')
        {
                if (!empty($bugsys->in['email']) AND empty($bugsys->in['email_confirm']))
                {
-                       $message->add_error($lang->string('You need to enter both the email and confirm email fields to change your address'));
+                       $message->add_error(_('You need to enter both the email and confirm email fields to change your address'));
                }
                
                if ($bugsys->in['email'] != $bugsys->in['email_confirm'])
                {
-                       $message->add_error($lang->string('Your email and confirm email addresses do not match'));
+                       $message->add_error(_('Your email and confirm email addresses do not match'));
                }
                
                $userapi->set('email',  $bugsys->in['email']);
@@ -95,13 +95,13 @@ if ($_POST['do'] == 'update')
        {
                if (!empty($bugsys->in['password']) AND empty($bugsys->in['password_confirm']))
                {
-                       $message->add_error($lang->string('You need to enter both the password and confirm password fields to change your password'));
+                       $message->add_error(_('You need to enter both the password and confirm password fields to change your password'));
                }
                else
                {
                        if ($bugsys->in['password'] != $bugsys->in['password_confirm'])
                        {
-                               $message->add_error($lang->string('Your password and confirm password do not match'));
+                               $message->add_error(_('Your password and confirm password do not match'));
                        }
                }
                
@@ -164,7 +164,7 @@ if ($_POST['do'] == 'update')
                        $db->query("INSERT INTO " . TABLE_PREFIX . "useremail (userid, relation, mask) VALUES (" . $bugsys->userinfo['userid'] . ", $relation, $bitmask)");
                }
                
-               $message->redirect($lang->string('The changes to your account have been made.'), 'userctrl.php');
+               $message->redirect(_('The changes to your account have been made.'), 'userctrl.php');
        }
 }
 
index 564fe2d34074b06816a0bcbe9dd555ed3947b58a..a776b022dd97568c7ec13a1a5ac2f8234455269a 100644 (file)
--- a/vote.php
+++ b/vote.php
@@ -51,7 +51,7 @@ if ($_REQUEST['do'] == 'vote')
        
        if ($vote['uservote'])
        {
-               $message->error($lang->string('You have already voted on this bug.'));
+               $message->error(_('You have already voted on this bug.'));
        }
        
        // handle userids
@@ -83,12 +83,12 @@ if ($_REQUEST['do'] == 'vote')
        }
        else
        {
-               $message->error($lang->string('You need to specify whether you want to vote for or against this bug.'));
+               $message->error(_('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($lang->string('Your vote has been added.'), "showreport.php?bugid=$bug[bugid]");
+       $message->redirect(_('Your vote has been added.'), "showreport.php?bugid=$bug[bugid]");
 }
 
 /*=====================================================================*\