From 0ae68631f0f60335e3348a68eee42eea69b5e78f Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 25 Aug 2005 04:44:05 +0000 Subject: [PATCH] r380: Converting some hard-coded text to the language system --- admin/autoaction.php | 16 ++++++++-------- admin/field.php | 20 ++++++++++---------- admin/global.php | 24 ++++++++++++------------ admin/index.php | 2 +- admin/language.php | 2 +- admin/product.php | 2 +- admin/severity.php | 4 ++-- admin/status.php | 4 ++-- admin/usergroup.php | 8 ++++---- editcomment.php | 2 +- newreport.php | 6 +++--- search.php | 4 ++-- showreport.php | 2 +- 13 files changed, 48 insertions(+), 48 deletions(-) diff --git a/admin/autoaction.php b/admin/autoaction.php index 710b4f0..ab62e71 100644 --- a/admin/autoaction.php +++ b/admin/autoaction.php @@ -144,7 +144,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') $admin->table_start(); $admin->table_head(lang::r((($add) ? 'New Automatic Action' : 'Edit Auto Action'))); - $admin->row_input(lang::r('Name'), 'name', $action['name']); + $admin->row_input(lang::p('name'), 'name', $action['name']); $admin->row_textarea(lang::r('Description'), 'description', $action['description']); $admin->row_textarea(lang::r('Add Comment'), 'comment', $action['comment']); @@ -153,10 +153,10 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') // ------------------------------------------------------------------- // built-in fields construct_datastore_select('severity', 'severity', 'severityid', $action['fields']['builtin']['severity'], true, true); - $admin->row_list(lang::r('Severity'), 'fields[severity]'); + $admin->row_list(lang::p('severity'), 'fields[severity]'); construct_datastore_select('priority', 'priority', 'priorityid', $action['fields']['builtin']['priority'], true, true); - $admin->row_list(lang::r('Priority'), 'fields[priority]'); + $admin->row_list(lang::p('priority'), 'fields[priority]'); construct_datastore_select('status', 'status', 'statusid', $action['fields']['builtin']['status'], true, true); $admin->row_list(lang::r('Status'), 'fields[status]'); @@ -187,8 +187,8 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') case 'input_checkbox': $admin->list_item('', 0, ((!$action['fields']['custom']["$field[fieldid]"]) ? true : false)); - $admin->list_item(lang::r('Checked'), 1, (($action['fields']['custom']["$field[fieldid]"] == 1) ? true : false)); - $admin->list_item(lang::r('Un-Checked'), 2, (($action['fields']['custom']["$field[fieldid]"] == 2) ? true : false)); + $admin->list_item(lang::p('checked'), 1, (($action['fields']['custom']["$field[fieldid]"] == 1) ? true : false)); + $admin->list_item(lang::p('unchecked'), 2, (($action['fields']['custom']["$field[fieldid]"] == 2) ? true : false)); $admin->row_list($field['name'], "fields[custom][$field[fieldid]]"); break; @@ -218,15 +218,15 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') if ($_REQUEST['do'] == 'modify') { - $admin->page_start(lang::r('Automatic Actions')); + $admin->page_start(lang::p('automatic_actions')); $admin->table_start(); - $admin->table_head(lang::r('Automatic Actions')); + $admin->table_head(lang::p('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::r('Edit') . "] [" . lang::r('Delete') . "]"); + $admin->row_text($action['name'] . "\n
$action[description]
", "[" . lang::p('edit') . "] [" . lang::r('Delete') . "]"); } $admin->row_span('[' . lang::r('Add New Action') . ']', 'tfoot', 'center', 3); diff --git a/admin/field.php b/admin/field.php index 5afe91e..3de46cd 100644 --- a/admin/field.php +++ b/admin/field.php @@ -18,9 +18,9 @@ if (!can_perform('canadminfields')) } $TYPES = array( - 'input_text' => lang::r('Single-Line Text Box'), - 'input_checkbox' => lang::r('Checkbox Flag'), - 'select_single' => lang::r('Drop-Down Menu'), + 'input_text' => lang::p('single_line_text_box'), + 'input_checkbox' => lang::p('checkbox_flag'), + 'select_single' => lang::p('drop_dwon_menu'), ); // ################################################################### @@ -174,7 +174,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') { $admin->form_hidden_field('step', 1); $admin->table_start(true, '40%'); - $admin->table_head(lang::r('Select Type')); + $admin->table_head(lang::p('select_type')); } else { @@ -219,8 +219,8 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') } // global fields - $admin->row_span(lang::r('Global Fields'), 'thead', 'center'); - $admin->row_text(lang::r('Field Type'), $TYPES["$type"]); + $admin->row_span(lang::p('global_fields'), 'thead', 'center'); + $admin->row_text(lang::p('field_type'), $TYPES["$type"]); $admin->row_input(lang::r('Display Name'), 'name', $field['name']); $admin->row_textarea(lang::r('Description'), 'description', $field['description']); $admin->row_yesno(lang::r('Required'), 'required', $field['required']); @@ -238,7 +238,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') break; case 'input_checkbox': - $admin->row_yesno(lang::r('Checked By Default'), 'defaultvalue', $field['defaultvalue']); + $admin->row_yesno(lang::p('checked_by_default'), 'defaultvalue', $field['defaultvalue']); break; case 'select_single': @@ -248,7 +248,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') } // end table - $admin->row_submit((($edit) ? '[' . lang::r('Delete Field') . ']' : '')); + $admin->row_submit((($edit) ? '[' . lang::p('delete_field') . ']' : '')); $admin->table_end(); $admin->form_end(); } @@ -264,7 +264,7 @@ if ($_REQUEST['do'] == 'modify') $admin->table_start(); $admin->table_head(lang::p('additional_bug_fields'), 3); - $admin->table_column_head(array(lang::r('Display Name/Description'), lang::r('Field ID'), lang::r('Actions'))); + $admin->table_column_head(array(lang::p('display_name_description'), lang::p('field_id'), lang::p('actions'))); $fields = $db->query("SELECT * FROM " . TABLE_PREFIX . "bugfield ORDER BY fieldid ASC"); while ($field = $db->fetch_array($fields)) @@ -273,7 +273,7 @@ if ($_REQUEST['do'] == 'modify') array( "$field[name]
$field[description]
" => 'l', "(fieldid: $field[fieldid])" => 'c', - "[" . lang::r('Edit') . "] [" . lang::r('Delete') . "]" => 'c' + "[" . lang::p('edit') . "] [" . lang::r('Delete') . "]" => 'c' ) ); } diff --git a/admin/global.php b/admin/global.php index 62ed91c..100e56e 100755 --- a/admin/global.php +++ b/admin/global.php @@ -20,27 +20,27 @@ require_once('./includes/functions.php'); $globalnav = array( lang::r('Admin Locations') => array( - lang::r('Home') => 'index.php', - lang::r('Logout') => '../login.php?do=cplogout' + lang::p('home') => 'index.php', + lang::p('logout') => '../login.php?do=cplogout' ), lang::r('Options') => array( - lang::r('BugStrike Settings') => 'setting.php', + lang::p('bugstrike_settings') => 'setting.php', //'Manage Languages' => 'language.php' ), - lang::r('Bug Fields') => array( - lang::r('Products / Versions / Components') => 'product.php', - lang::r('Priorities') => 'priority.php', - lang::r('Resolutions') => 'resolution.php', - lang::r('Severities') => 'severity.php', - lang::r('Statuses') => 'status.php', + lang::p('bug_fields') => array( + lang::p('producs_versions_components') => 'product.php', + lang::p('priorities') => 'priority.php', + lang::p('resolutions') => 'resolution.php', + lang::p('severities') => 'severity.php', + lang::p('statuses') => 'status.php', lang::r('Custom Bug Fields') => 'field.php', - lang::r('Automatic Actions') => 'autoaction.php' + lang::p('automatic_actions') => 'autoaction.php' ), - lang::r('User Management') => array( - lang::r('Usergroups') => 'usergroup.php' + lang::p('user_management') => array( + lang::p('usergroups') => 'usergroup.php' ) ); diff --git a/admin/index.php b/admin/index.php index 09a21a9..7967be5 100755 --- a/admin/index.php +++ b/admin/index.php @@ -15,7 +15,7 @@ require_once('./global.php'); $admin->page_start('Index'); $admin->table_start(true, '25%'); -$admin->table_head(lang::r('BugStrike Administration Menu')); +$admin->table_head(lang::p('admin_menu')); $navdata = '