From 0125b072b7905397ffbdcc09710e93af66bc68ff Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 17 Aug 2006 23:46:17 +0000 Subject: [PATCH] r1048: Converting all $lang->string() stuff to use the gettext call --- admin/autoaction.php | 32 ++++----- admin/field.php | 54 +++++++------- admin/global.php | 16 ++--- admin/index.php | 28 ++++---- admin/language.php | 56 +++++++-------- admin/permission.php | 60 ++++++++-------- admin/priority.php | 24 +++---- admin/product.php | 64 ++++++++--------- admin/resolution.php | 24 +++---- admin/setting.php | 6 +- admin/severity.php | 24 +++---- admin/status.php | 28 ++++---- admin/user.php | 64 ++++++++--------- admin/usergroup.php | 88 +++++++++++------------ admin/userhelp.php | 18 ++--- attachment.php | 18 ++--- editcomment.php | 10 +-- editreport.php | 10 +-- explain.php | 4 +- favourite.php | 4 +- help.php | 4 +- includes/api_autoaction.php | 4 +- includes/api_comment.php | 2 +- includes/api_field.php | 8 +-- includes/api_user.php | 10 +-- includes/api_usergroup.php | 2 +- includes/api_userhelp.php | 4 +- includes/class_admin_navigation.php | 108 ++++++++++++++-------------- includes/class_notification.php | 28 ++++---- includes/class_sort.php | 22 +++--- includes/init.php | 2 +- includes/language.php | 2 +- includes/settings.php | 58 +++++++-------- login.php | 14 ++-- newreport.php | 4 +- register.php | 34 ++++----- search.php | 4 +- showhistory.php | 6 +- showreport.php | 2 +- syndicate.php | 4 +- userctrl.php | 14 ++-- vote.php | 6 +- 42 files changed, 487 insertions(+), 487 deletions(-) diff --git a/admin/autoaction.php b/admin/autoaction.php index b81adcd..45930bb 100644 --- a/admin/autoaction.php +++ b/admin/autoaction.php @@ -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&actionid=$action[actionid]"); + $admin->page_confirm(_('Are you sure you want to delete this action?'), "autoaction.php?do=kill&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
$action[description]
", "[" . $lang->string('Edit') . "] [" . $lang->string('Delete') . "]"); + $admin->row_text($action['name'] . "\n
$action[description]
", "[" . _('Edit') . "] [" . _('Delete') . "]"); } $admin->table_end(); diff --git a/admin/field.php b/admin/field.php index 97dd654..3e89806 100644 --- a/admin/field.php +++ b/admin/field.php @@ -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&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&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]
$field[description]
" => 'l', "$field[fieldid]" => 'c', - "[" . $lang->string('Edit') . "] [" . $lang->string('Delete') . "]" => 'c' + "[" . _('Edit') . "] [" . _('Delete') . "]" => 'c' ) ); } diff --git a/admin/global.php b/admin/global.php index c3be2b3..4e8cb6e 100755 --- a/admin/global.php +++ b/admin/global.php @@ -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 & 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 & 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 { diff --git a/admin/index.php b/admin/index.php index 53e50f4..89d20e6 100755 --- a/admin/index.php +++ b/admin/index.php @@ -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'))); // ------------------------------------------------------------------- diff --git a/admin/language.php b/admin/language.php index 72eea72..10de8a0 100644 --- a/admin/language.php +++ b/admin/language.php @@ -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&languageid=' . $bugsys->input_clean('languageid', TYPE_UINT)); + $admin->page_confirm(_('Are you sure you want to delete this language?'), 'language.php?do=kill&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']) ? '' . $lang->string('DEFAULT LANGUAGE') . ' / ' : '') . ($language['userselect'] ? $lang->string('User Selectable') : $lang->string('Private')) => 'c', - "[" . $lang->string('Edit Settings') . "] [" . $lang->string('Reload XML') . "]" => 'c' + (($bugsys->options['defaultlanguage'] == $language['languageid']) ? '' . _('DEFAULT LANGUAGE') . ' / ' : '') . ($language['userselect'] ? _('User Selectable') : _('Private')) => 'c', + "[" . _('Edit Settings') . "] [" . _('Reload XML') . "]" => 'c' )); } diff --git a/admin/permission.php b/admin/permission.php index ee5dbd1..1ed29a3 100755 --- a/admin/permission.php +++ b/admin/permission.php @@ -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&usergroupid=' . $bugsys->input_clean('usergroupid', TYPE_UINT) . '&productid=' . $bugsys->input_clean('productid', TYPE_UINT)); + $admin->page_confirm(_('Are you sure you want to revert this permission mask?'), 'permission.php?do=kill&usergroupid=' . $bugsys->input_clean('usergroupid', TYPE_UINT) . '&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'] ? "[" . $lang->string('Expand') . "]" : ''), 'top', 2, 'alt3'); + $admin->row_text($group['title'], ($bugsys->in['usergroupid'] != $group['usergroupid'] ? "[" . _('Expand') . "]" : ''), '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 .= "[" . $lang->string('Customize') . ']'; + $statuslink = _('Inherited From Usergroup Settings: '); + $statuslink .= "[" . _('Customize') . ']'; } else { - $statuslink = $lang->string('Customized: '); - $statuslink .= "[" . $lang->string('Edit') . ']'; - $statuslink .= " [" . $lang->string('Revert') . ']'; + $statuslink = _('Customized: '); + $statuslink .= "[" . _('Edit') . ']'; + $statuslink .= " [" . _('Revert') . ']'; } $admin->row_text($product['title'], $statuslink); diff --git a/admin/priority.php b/admin/priority.php index f732831..cb55b6d 100755 --- a/admin/priority.php +++ b/admin/priority.php @@ -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&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&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
The title of this priority flag (eg: `Slated for Development` or `Address Now`)
'), 'priority'); - $admin->row_input($lang->string('Display Order
The order in which the priorities are displayed. The higher the number, the lower down in the list it is.
'), 'displayorder'); + $admin->table_head(_('New Priority')); + $admin->row_input(_('Priority Title
The title of this priority flag (eg: `Slated for Development` or `Address Now`)
'), 'priority'); + $admin->row_input(_('Display Order
The order in which the priorities are displayed. The higher the number, the lower down in the list it is.
'), '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
The title of this priority flag (eg: `Slated for Development` or `Address Now`)
'), 'priority', $priority->objdata['priority']); - $admin->row_input($lang->string('Display Order
The order in which the priorities are displayed. The higher the number, the lower down in the list it is.
'), '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
The title of this priority flag (eg: `Slated for Development` or `Address Now`)
'), 'priority', $priority->objdata['priority']); + $admin->row_input(_('Display Order
The order in which the priorities are displayed. The higher the number, the lower down in the list it is.
'), '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]: $priority[priority]", "(priorityid: $priority[priorityid]) [" . $lang->string('Edit') . "] [" . $lang->string('Delete') . "]"); + $admin->row_text("$priority[displayorder]: $priority[priority]", "(priorityid: $priority[priorityid]) [" . _('Edit') . "] [" . _('Delete') . "]"); } $db->free_result($priorities); diff --git a/admin/product.php b/admin/product.php index 3c4e92f..044fc79 100755 --- a/admin/product.php +++ b/admin/product.php @@ -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 delete all the bugs with this version.'), 'product.php?do=killversion&versionid=' . $bugsys->input_clean('versionid', TYPE_UINT)); + $admin->page_confirm(_('Are you sure you want to delete this version? Doing so will do delete all the bugs with this version.'), 'product.php?do=killversion&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
This is the version string for this product.
'), 'version'); - $admin->row_input($lang->string('Display Order
The order in which the versions are displayed.
'), 'displayorder'); + $admin->table_head(_('Add New Version')); + $admin->row_input(_('Version Number
This is the version string for this product.
'), 'version'); + $admin->row_input(_('Display Order
The order in which the versions are displayed.
'), '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
This is the version string for this product.
'), 'version', $version['version']); - $admin->row_input($lang->string('Display Order
The order in which the versions are displayed.
'), 'displayorder', $version['displayorder']); + $admin->table_head(sprintf(_('Edit Version - %1$s'), $version['version'])); + $admin->row_input(_('Version Number
This is the version string for this product.
'), 'version', $version['version']); + $admin->row_input(_('Display Order
The order in which the versions are displayed.
'), '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 and any bugs that have been assigned those products or components?'), 'product.php?do=killproduct&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 and any bugs that have been assigned those products or components?'), 'product.php?do=killproduct&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
A short description of this product.
'), 'description'); - $admin->row_input($lang->string('Display Order
The order in which the products are displayed.
'), 'displayorder'); + $admin->table_head(_('Add Product')); + $admin->row_input(_('Title'), 'title'); + $admin->row_textarea(_('Description
A short description of this product.
'), 'description'); + $admin->row_input(_('Display Order
The order in which the products are displayed.
'), '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
A short description of this product.
'), 'description', $product['description']); - $admin->row_input($lang->string('Display Order
The order in which the products are displayed.
'), 'displayorder', $product['displayorder']); + $admin->table_head(sprintf(_('Edit Product - %1$s'), $product['title'])); + $admin->row_input(_('Title'), 'title', $product['title']); + $admin->row_textarea(_('Description
A short description of this product.
'), 'description', $product['description']); + $admin->row_input(_('Display Order
The order in which the products are displayed.
'), '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 = << @@ -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("$product[title]", construct_option_list($lang->string('Product'), $product['productid'], 1, 1, 1, 1, $product['displayorder']), 'middle', 2, 'alt3'); + $admin->row_text("$product[title]", 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("-- $comp[title]", construct_option_list($lang->string('Component'), $comp['productid'], 1, 0, 1, 1, $comp['displayorder']), 'middle', 2, 'alt1'); + $admin->row_text("-- $comp[title]", 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(); diff --git a/admin/resolution.php b/admin/resolution.php index 057877f..0fb551d 100755 --- a/admin/resolution.php +++ b/admin/resolution.php @@ -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&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&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
The title of this resolution flag (eg: `Fixed` or `Bogus`)
'), 'resolution'); - $admin->row_input($lang->string('Display Order
The order in which the resolutions are displayed. The higher the number, the lower down in the list it is.
'), 'displayorder'); + $admin->table_head(_('New Resolution')); + $admin->row_input(_('Resolution Title
The title of this resolution flag (eg: `Fixed` or `Bogus`)
'), 'resolution'); + $admin->row_input(_('Display Order
The order in which the resolutions are displayed. The higher the number, the lower down in the list it is.
'), '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
The title of this resolution flag (eg: `Fixed` or `Bogus`)
'), 'resolution', $resolution->objdata['resolution']); - $admin->row_input($lang->string('Display Order
The order in which the resolutions are displayed. The higher the number, the lower down in the list it is.
'), '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
The title of this resolution flag (eg: `Fixed` or `Bogus`)
'), 'resolution', $resolution->objdata['resolution']); + $admin->row_input(_('Display Order
The order in which the resolutions are displayed. The higher the number, the lower down in the list it is.
'), '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]: $resolution[resolution]", "(resolutionid: $resolution[resolutionid]) [" . $lang->string('Edit') . "] [" . $lang->string('Delete') . "]"); + $admin->row_text("$resolution[displayorder]: $resolution[resolution]", "(resolutionid: $resolution[resolutionid]) [" . _('Edit') . "] [" . _('Delete') . "]"); } $db->free_result($resolutions); diff --git a/admin/setting.php b/admin/setting.php index 8c8f458..7c1d158 100755 --- a/admin/setting.php +++ b/admin/setting.php @@ -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; diff --git a/admin/severity.php b/admin/severity.php index a674d53..b17bedf 100755 --- a/admin/severity.php +++ b/admin/severity.php @@ -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&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&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
The title of this severity flag (eg: `Major` or `Critical`)
'), 'severity'); - $admin->row_input($lang->string('Display Order
The order in which the severities are displayed. The higher the number, the lower down in the list it is.
'), 'displayorder'); + $admin->table_head(_('New Severity')); + $admin->row_input(_('Severity Title
The title of this severity flag (eg: `Major` or `Critical`)
'), 'severity'); + $admin->row_input(_('Display Order
The order in which the severities are displayed. The higher the number, the lower down in the list it is.
'), '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
The title of this severity flag (eg: `Major` or `Critical`)
'), 'severity', $severity->objdata['severity']); - $admin->row_input($lang->string('Display Order
The order in which the severities are displayed. The higher the number, the lower down in the list it is.
'), '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
The title of this severity flag (eg: `Major` or `Critical`)
'), 'severity', $severity->objdata['severity']); + $admin->row_input(_('Display Order
The order in which the severities are displayed. The higher the number, the lower down in the list it is.
'), '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]: $severity[severity]", "(severityid: $severity[severityid]) [" . $lang->string('Edit') . "] [" . $lang->string('Delete') . "]"); + $admin->row_text("$severity[displayorder]: $severity[severity]", "(severityid: $severity[severityid]) [" . _('Edit') . "] [" . _('Delete') . "]"); } $db->free_result($severities); diff --git a/admin/status.php b/admin/status.php index 86d5f22..edb3280 100755 --- a/admin/status.php +++ b/admin/status.php @@ -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&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&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
The title of this status flag (eg: `Confirmed` or `Closed (Fixed)`)
'), 'status'); - $admin->row_input($lang->string('Display Order
The order in which the statuses ar displayed.
'), 'displayorder'); - $admin->row_input($lang->string('Status Colour
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.
'), 'color'); + $admin->table_head(_('New Status')); + $admin->row_input(_('Status Title
The title of this status flag (eg: `Confirmed` or `Closed (Fixed)`)
'), 'status'); + $admin->row_input(_('Display Order
The order in which the statuses ar displayed.
'), 'displayorder'); + $admin->row_input(_('Status Colour
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.
'), '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
The title of this status flag (eg: `Confirmed` or `Closed (Fixed)`)
'), 'status', $status->objdata['status']); - $admin->row_input($lang->string('Display Order
The order in which the statuses ar displayed.
'), 'displayorder', $status->objdata['displayorder']); - $admin->row_input($lang->string('Status Colour
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.
'), '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
The title of this status flag (eg: `Confirmed` or `Closed (Fixed)`)
'), 'status', $status->objdata['status']); + $admin->row_input(_('Display Order
The order in which the statuses ar displayed.
'), 'displayorder', $status->objdata['displayorder']); + $admin->row_input(_('Status Colour
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.
'), '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 = '
'; - $admin->row_text("$colourblock$status[displayorder]: $status[status]", "(statusid: $status[statusid]) [" . $lang->string('Edit') . "] [" . $lang->string('Delete') . "]"); + $admin->row_text("$colourblock$status[displayorder]: $status[status]", "(statusid: $status[statusid]) [" . _('Edit') . "] [" . _('Delete') . "]"); } $db->free_result($statuses); diff --git a/admin/user.php b/admin/user.php index 176467f..2bfc2a9 100644 --- a/admin/user.php +++ b/admin/user.php @@ -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&userid=' . $bugsys->input_clean('userid', TYPE_UINT)); + $admin->page_confirm(_('Are you sure you want to delete this user?'), 'user.php?do=kill&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'), '
' . draw_checkbox('emailopts[0][2048]', $checked[0][2048]) . '
', 'top', 6); + $admin->row_text(_('New bug is added'), '
' . draw_checkbox('emailopts[0][2048]', $checked[0][2048]) . '
', 'top', 6); - $admin->row_text($lang->string('I am made the assignee'), '
' . draw_checkbox('emailopts[0][32]', $checked[0][32]) . '
', 'top', 6); + $admin->row_text(_('I am made the assignee'), '
' . draw_checkbox('emailopts[0][32]', $checked[0][32]) . '
', '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', - '[' . $lang->string('Edit') . ']' => 'c' + '[' . _('Edit') . ']' => '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:', ''); diff --git a/admin/usergroup.php b/admin/usergroup.php index d0ea9a0..9927d18 100755 --- a/admin/usergroup.php +++ b/admin/usergroup.php @@ -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&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&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
This is the title that others will be able to see when comments are posted.
'), '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
This is the title that others will be able to see when comments are posted.
'), '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("$group[title]" => 'l', ((!$group['total']) ? '-' : $group['total']) => 'c', "[" . $lang->string('Edit') . "]" . (($group['usergroupid'] > 6) ? "[" . $lang->string('Delete') . "]" : '') => 'c')); + $admin->row_multi_item(array("$group[title]" => 'l', ((!$group['total']) ? '-' : $group['total']) => 'c', "[" . _('Edit') . "]" . (($group['usergroupid'] > 6) ? "[" . _('Delete') . "]" : '') => 'c')); } $admin->table_end(); diff --git a/admin/userhelp.php b/admin/userhelp.php index 828a3f8..7ec9e87 100755 --- a/admin/userhelp.php +++ b/admin/userhelp.php @@ -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&keystring=' . $bugsys->in['keystring']); + $admin->page_confirm(_('Are you sure you want to delete help text?'), 'userhelp.php?do=kill&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
(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
(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 = ''; - $delete = (!in_array($topic['keystring'], UserHelpAPI::not_able_to_delete()) ? '

[' . $lang->string('Delete') . ']' : ''); + $delete = (!in_array($topic['keystring'], UserHelpAPI::not_able_to_delete()) ? '

[' . _('Delete') . ']' : ''); $admin->row_textarea($inputfield . '
' . $topic['keystring'] . '' . $delete, 'help[' . $topic['keystring'] . '][body]', $topic['body']); } diff --git a/attachment.php b/attachment.php index 0d1477e..f5d0858 100755 --- a/attachment.php +++ b/attachment.php @@ -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]"); } // ################################################################### diff --git a/editcomment.php b/editcomment.php index 4064eba..e99d51e 100644 --- a/editcomment.php +++ b/editcomment.php @@ -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 will 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 will 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 { diff --git a/editreport.php b/editreport.php index 06a059d..723ac97 100644 --- a/editreport.php +++ b/editreport.php @@ -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 destroy 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 destroy 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]"); } /*=====================================================================*\ diff --git a/explain.php b/explain.php index 6ed02c9..7728f7f 100644 --- a/explain.php +++ b/explain.php @@ -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') . '";'); } diff --git a/favourite.php b/favourite.php index 5b7a5aa..ae8abbf 100644 --- a/favourite.php +++ b/favourite.php @@ -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']); } } diff --git a/help.php b/help.php index 9175157..a45ced5 100644 --- 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 { diff --git a/includes/api_autoaction.php b/includes/api_autoaction.php index ddc2710..77e792d 100644 --- a/includes/api_autoaction.php +++ b/includes/api_autoaction.php @@ -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']); diff --git a/includes/api_comment.php b/includes/api_comment.php index e3ea307..62769ec 100644 --- a/includes/api_comment.php +++ b/includes/api_comment.php @@ -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).')); } } } diff --git a/includes/api_field.php b/includes/api_field.php index e21e68e..83c2645 100644 --- a/includes/api_field.php +++ b/includes/api_field.php @@ -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 { diff --git a/includes/api_user.php b/includes/api_user.php index 690d6a3..dc869a2 100644 --- a/includes/api_user.php +++ b/includes/api_user.php @@ -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')); } } } diff --git a/includes/api_usergroup.php b/includes/api_usergroup.php index 01a0a2c..4f2ff0c 100644 --- a/includes/api_usergroup.php +++ b/includes/api_usergroup.php @@ -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.'); } } diff --git a/includes/api_userhelp.php b/includes/api_userhelp.php index 3d767f7..2bf72a7 100644 --- a/includes/api_userhelp.php +++ b/includes/api_userhelp.php @@ -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; diff --git a/includes/class_admin_navigation.php b/includes/class_admin_navigation.php index 276a29a..1db926f 100644 --- a/includes/class_admin_navigation.php +++ b/includes/class_admin_navigation.php @@ -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&languageid=' . $id); - $navigator->add_component('link', 'options-languages-reload', 'options-languages', $lang->string('Reload XML'), 'language.php?do=reload&languageid=' . $id); - $navigator->add_component('link', 'options-languages-delete', 'options-languages', $lang->string('Delete'), 'language.php?do=delete&languageid=' . $id); + $navigator->add_component('link', 'options-languages-edit', 'options-languages', _('Edit Language'), 'language.php?do=edit&languageid=' . $id); + $navigator->add_component('link', 'options-languages-reload', 'options-languages', _('Reload XML'), 'language.php?do=reload&languageid=' . $id); + $navigator->add_component('link', 'options-languages-delete', 'options-languages', _('Delete'), 'language.php?do=delete&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&productid=' . $id); - $navigator->add_component('link', 'products-edit-version', 'products-edit', $lang->string('Add New Version'), 'product.php?do=addversion&productid=' . $id); - $navigator->add_component('link', 'products-edit-delete', 'products-edit', $lang->string('Delete Product'), 'product.php?do=deleteproduct&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&productid=' . $id); + $navigator->add_component('link', 'products-edit-version', 'products-edit', _('Add New Version'), 'product.php?do=addversion&productid=' . $id); + $navigator->add_component('link', 'products-edit-delete', 'products-edit', _('Delete Product'), 'product.php?do=deleteproduct&productid=' . $id); } // ################################################################### @@ -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&fieldid=' . $id); + $navigator->add_component('link', 'fields-delete', 'fields', _('Delete'), 'field.php?do=delete&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&priorityid=' . $id); + $navigator->add_component('link', 'priorities-delete', 'priorities', _('Delete'), 'priority.php?do=delete&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&resolutionid=' . $id); + $navigator->add_component('link', 'resolutions-delete', 'resolutions', _('Delete'), 'resolution.php?do=delete&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&severityid=' . $id); + $navigator->add_component('link', 'severities-delete', 'severities', _('Delete'), 'severity.php?do=delete&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&statusid=' . $id); + $navigator->add_component('link', 'statuses-delete', 'statuses', _('Delete'), 'status.php?do=delete&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&actionid=' . $id); + $navigator->add_component('link', 'autoactions-delete', 'autoactions', _('Delete'), 'autoaction.php?do=delete&actionid=' . $id); } // ################################################################### @@ -339,10 +339,10 @@ class NavLinks { global $navigator, $lang; - $navigator->add_component('section', 'users-pages', 'users', $lang->string('Users & 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 & 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&userid=' . $id); + $navigator->add_component('link', 'users-delete', 'users', _('Delete'), 'user.php?do=delete&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&userid=' . $id); + $navigator->add_component('link', 'usergroups-delete', 'usergroups', _('Delete'), 'usergroup.php?do=delete&userid=' . $id); } } diff --git a/includes/class_notification.php b/includes/class_notification.php index a7f19ce..e14a016 100644 --- a/includes/class_notification.php +++ b/includes/class_notification.php @@ -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. diff --git a/includes/class_sort.php b/includes/class_sort.php index 97861b7..67add11 100644 --- a/includes/class_sort.php +++ b/includes/class_sort.php @@ -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) diff --git a/includes/init.php b/includes/init.php index 553366f..ed2b31e 100755 --- a/includes/init.php +++ b/includes/init.php @@ -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 diff --git a/includes/language.php b/includes/language.php index 0301733..8145994 100644 --- a/includes/language.php +++ b/includes/language.php @@ -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 diff --git a/includes/settings.php b/includes/settings.php index 50db308..e1a6f4d 100755 --- a/includes/settings.php +++ b/includes/settings.php @@ -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 yes, 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 yes 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. Be sure that this does not end in a trailing slash ("/").
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 yes, 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 yes 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. Be sure that this does not end in a trailing slash ("/").
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 yes if you want to allow users to post raw HTML in their bug reports. This is very 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 Not Selected.')), - '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 yes if you want to allow users to post raw HTML in their bug reports. This is very 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 Not Selected.')), + '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!')) ) ); diff --git a/login.php b/login.php index bef4311..d7abdda 100755 --- 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.')); } } diff --git a/newreport.php b/newreport.php index fe603ea..b843910 100755 --- a/newreport.php +++ b/newreport.php @@ -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 { diff --git a/register.php b/register.php index 25c94b3..adfc313 100755 --- a/register.php +++ b/register.php @@ -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.')); } } diff --git a/search.php b/search.php index c4c9699..c5d6c75 100644 --- a/search.php +++ b/search.php @@ -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)) diff --git a/showhistory.php b/showhistory.php index 55ba2ec..9bf9534 100644 --- a/showhistory.php +++ b/showhistory.php @@ -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)) diff --git a/showreport.php b/showreport.php index 4956d29..4243411 100644 --- a/showreport.php +++ b/showreport.php @@ -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']); diff --git a/syndicate.php b/syndicate.php index 42ce5cd..4c4b3d3 100644 --- a/syndicate.php +++ b/syndicate.php @@ -57,7 +57,7 @@ $bugs_fetch = $db->query(" while ($bug = $db->fetch_array($bugs_fetch)) { $bug['storytext'] = htmlspecialchars(sprintf( - $lang->string(' + _('
@@ -101,7 +101,7 @@ if (SYND_TYPE == 'atom') echo ' - ' . sprintf($lang->string('%1$s Syndication Feed'), $bugsys->options['trackertitle']) . ' + ' . sprintf(_('%1$s Syndication Feed'), $bugsys->options['trackertitle']) . ' ' . gmdate('Y-m-d\TH:i:s\Z', $lastupdated) . ' diff --git a/userctrl.php b/userctrl.php index 182d71d..016eba6 100644 --- a/userctrl.php +++ b/userctrl.php @@ -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'); } } diff --git a/vote.php b/vote.php index 564fe2d..a776b02 100644 --- 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]"); } /*=====================================================================*\ -- 2.43.5
Bug ID: %1$s