From 01e7306415e2090989d35269972148d51256aa2a Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 25 Aug 2005 01:22:33 +0000 Subject: [PATCH] r373: Register language phrases --- admin/autoaction.php | 36 +++++++++++++++--------------- admin/field.php | 52 ++++++++++++++++++++++---------------------- admin/global.php | 30 ++++++++++++------------- admin/index.php | 2 +- admin/jump.php | 2 +- admin/language.php | 26 +++++++++++----------- admin/product.php | 4 ++-- admin/setting.php | 2 +- admin/severity.php | 4 ++-- admin/status.php | 4 ++-- admin/usergroup.php | 8 +++---- attachment.php | 28 ++++++++++++------------ editcomment.php | 6 ++--- editreport.php | 6 ++--- favourite.php | 4 ++-- login.php | 12 +++++----- newcomment.php | 2 +- newreport.php | 8 +++---- register.php | 30 ++++++++++++------------- search.php | 4 ++-- showhistory.php | 2 +- showreport.php | 2 +- viewattachment.php | 2 +- vote.php | 4 ++-- 24 files changed, 140 insertions(+), 140 deletions(-) diff --git a/admin/autoaction.php b/admin/autoaction.php index da70d2b..710b4f0 100644 --- a/admin/autoaction.php +++ b/admin/autoaction.php @@ -49,7 +49,7 @@ if ($_REQUEST['do'] == 'delete') $admin->error(lang::p('error_invalid_id')); } - $admin->page_confirm('Are you sure you want to delete this action?', "autoaction.php?do=kill&actionid=$action[actionid]"); + $admin->page_confirm(lang::r('Are you sure you want to delete this action?'), "autoaction.php?do=kill&actionid=$action[actionid]"); } // ################################################################### @@ -58,7 +58,7 @@ if ($_POST['do'] == 'insert' OR $_POST['do'] == 'update') { if (empty($bugsys->in['name'])) { - $admin->error('You need to specify a name for this action.'); + $admin->error(lang::r('You need to specify a name for this action.')); } foreach ($bugsys->in['fields'] AS $key => $value) @@ -79,7 +79,7 @@ if ($_POST['do'] == 'insert' OR $_POST['do'] == 'update') if (count($deltas['custom']) < 1 AND count($deltas['builtin']) < 1) { - $admin->error('You need to specify some fields to change.'); + $admin->error(lang::r('You need to specify some fields to change.')); } if ($_POST['do'] == 'insert') @@ -132,7 +132,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') $action['fields'] = unserialize($action['fieldchanges']); } - $admin->page_start((($add) ? 'New Automatic Action' : 'Edit Auto Action')); + $admin->page_start(lang::r((($add) ? 'New Automatic Action' : 'Edit Auto Action'))); $admin->form_start('autoaction.php', (($add) ? 'insert' : 'update')); @@ -142,27 +142,27 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') } $admin->table_start(); - $admin->table_head((($add) ? 'New Automatic Action' : 'Edit Auto Action')); + $admin->table_head(lang::r((($add) ? 'New Automatic Action' : 'Edit Auto Action'))); - $admin->row_input('Name', 'name', $action['name']); - $admin->row_textarea('Description', 'description', $action['description']); - $admin->row_textarea('Add Comment', 'comment', $action['comment']); + $admin->row_input(lang::r('Name'), 'name', $action['name']); + $admin->row_textarea(lang::r('Description'), 'description', $action['description']); + $admin->row_textarea(lang::r('Add Comment'), 'comment', $action['comment']); $admin->row_span('Field Changes', 'thead', 'center'); // ------------------------------------------------------------------- // built-in fields construct_datastore_select('severity', 'severity', 'severityid', $action['fields']['builtin']['severity'], true, true); - $admin->row_list('Severity', 'fields[severity]'); + $admin->row_list(lang::r('Severity'), 'fields[severity]'); construct_datastore_select('priority', 'priority', 'priorityid', $action['fields']['builtin']['priority'], true, true); - $admin->row_list('Priority', 'fields[priority]'); + $admin->row_list(lang::r('Priority'), 'fields[priority]'); construct_datastore_select('status', 'status', 'statusid', $action['fields']['builtin']['status'], true, true); - $admin->row_list('Status', 'fields[status]'); + $admin->row_list(lang::r('Status'), 'fields[status]'); construct_datastore_select('resolution', 'resolution', 'resolutionid', $action['fields']['builtin']['resolution'], true, true); - $admin->row_list('Resolution', 'fields[resolution]'); + $admin->row_list(lang::r('Resolution'), 'fields[resolution]'); $admin->row_span('', 'tcat', 'center'); @@ -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('Checked', 1, (($action['fields']['custom']["$field[fieldid]"] == 1) ? true : false)); - $admin->list_item('Un-Checked', 2, (($action['fields']['custom']["$field[fieldid]"] == 2) ? 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->row_list($field['name'], "fields[custom][$field[fieldid]]"); break; @@ -218,18 +218,18 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') if ($_REQUEST['do'] == 'modify') { - $admin->page_start('Automatic Actions'); + $admin->page_start(lang::r('Automatic Actions')); $admin->table_start(); - $admin->table_head('Automatic Actions'); + $admin->table_head(lang::r('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]
", "[Edit] [Delete]"); + $admin->row_text($action['name'] . "\n
$action[description]
", "[" . lang::r('Edit') . "] [" . lang::r('Delete') . "]"); } - $admin->row_span('[Add New Action]', 'tfoot', 'center', 3); + $admin->row_span('[' . lang::r('Add New Action') . ']', 'tfoot', 'center', 3); $admin->table_end(); $admin->page_end(); diff --git a/admin/field.php b/admin/field.php index a8091fd..5afe91e 100644 --- a/admin/field.php +++ b/admin/field.php @@ -18,9 +18,9 @@ if (!can_perform('canadminfields')) } $TYPES = array( - 'input_text' => 'Single-Line Text Box', - 'input_checkbox' => 'Checkbox Flag', - 'select_single' => 'Drop-Down Menu', + 'input_text' => lang::r('Single-Line Text Box'), + 'input_checkbox' => lang::r('Checkbox Flag'), + 'select_single' => lang::r('Drop-Down Menu'), ); // ################################################################### @@ -45,7 +45,7 @@ if ($_REQUEST['do'] == 'kill') $db->query("ALTER TABLE " . TABLE_PREFIX . "bugvaluefill DROP field$field[fieldid]"); $db->query("OPTIMIZE TABLE " . TABLE_PREFIX . "bugvaluefill"); - $admin->redirect('field.php?do=modify', 'The field has been successfully removed from the system.'); + $admin->redirect('field.php?do=modify', lang::r('The field has been successfully removed from the system.')); } // ################################################################### @@ -58,7 +58,7 @@ if ($_REQUEST['do'] == 'delete') $admin->error(lang::p('error_invalid_id')); } - $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=$field[fieldid]"); + $admin->page_confirm(lang::r('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=$field[fieldid]"); } // ################################################################### @@ -85,11 +85,11 @@ if ($_REQUEST['do'] == 'update') if (empty($bugsys->in['name'])) { - $admin->error('You must specify a display name.'); + $admin->error(lang::r('You must specify a display name.')); } if (!isset($TYPES["$type"]) AND $add) { - $admin->error('Invalid field type specified.'); + $admin->error(lang::r('Invalid field type specified.')); } switch ($type) @@ -115,7 +115,7 @@ if ($_REQUEST['do'] == 'update') array_walk($selects, 'trim'); if (count($selects) < 1) { - $admin->error('You need to specify some select values.'); + $admin->error(lang::r('You need to specify some select values.')); } $extradata = "'" . $bugsys->escape(serialize($selects)) . "', " . intval($bugsys->in['usedefault']); @@ -153,7 +153,7 @@ if ($_REQUEST['do'] == 'update') ); } - $admin->redirect('field.php?do=modify', (($add) ? 'The custom bug field has been added.' : 'The bug field has been updated.')); + $admin->redirect('field.php?do=modify', lang::r((($add) ? 'The custom bug field has been added.' : 'The bug field has been updated.'))); } // ################################################################### @@ -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('Select Type'); + $admin->table_head(lang::r('Select Type')); } else { @@ -219,36 +219,36 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') } // global fields - $admin->row_span('Global Fields', 'thead', 'center'); - $admin->row_text('Field Type', $TYPES["$type"]); - $admin->row_input('Display Name', 'name', $field['name']); - $admin->row_textarea('Description', 'description', $field['description']); - $admin->row_yesno('Required', 'required', $field['required']); - $admin->row_yesno('Can Be Searched', 'cansearch', ((isset($field['cansearch'])) ? $field['cansearch'] : true)); + $admin->row_span(lang::r('Global Fields'), 'thead', 'center'); + $admin->row_text(lang::r('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']); + $admin->row_yesno(lang::r('Can Be Searched'), 'cansearch', ((isset($field['cansearch'])) ? $field['cansearch'] : true)); // type-specific fields - $admin->row_span('Type-Specific Fields', 'thead', 'center'); + $admin->row_span(lang::r('Type-Specific Fields'), 'thead', 'center'); switch ($type) { case 'input_text': - $admin->row_input('Default Value', 'defaultvalue', $field['defaultvalue']); - $admin->row_input('Regular Expression Match', 'regexmatch', $field['regexmatch']); - $admin->row_input('Maximum Length', 'maxlength', $field['maxlength'], 2, 10); + $admin->row_input(lang::r('Default Value'), 'defaultvalue', $field['defaultvalue']); + $admin->row_input(lang::r('Regular Expression Match'), 'regexmatch', $field['regexmatch']); + $admin->row_input(lang::r('Maximum Length'), 'maxlength', $field['maxlength'], 2, 10); break; case 'input_checkbox': - $admin->row_yesno('Checked By Default', 'defaultvalue', $field['defaultvalue']); + $admin->row_yesno(lang::r('Checked By Default'), 'defaultvalue', $field['defaultvalue']); break; case 'select_single': - $admin->row_textarea('Selection Values', 'selects', stripslashes(implode("\n", unserialize($field['selects'])))); - $admin->row_yesno('Make the First Option Default', 'usedefault', $field['usedefault']); + $admin->row_textarea(lang::r('Selection Values'), 'selects', stripslashes(implode("\n", unserialize($field['selects'])))); + $admin->row_yesno(lang::r('Make the First Option Default'), 'usedefault', $field['usedefault']); break; } // end table - $admin->row_submit((($edit) ? '[Delete Field]' : '')); + $admin->row_submit((($edit) ? '[' . lang::r('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('Display Name/Description', 'Field ID', 'Actions')); + $admin->table_column_head(array(lang::r('Display Name/Description'), lang::r('Field ID'), lang::r('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', - "[Edit] [Delete]" => 'c' + "[" . lang::r('Edit') . "] [" . lang::r('Delete') . "]" => 'c' ) ); } diff --git a/admin/global.php b/admin/global.php index 180a8a0..62ed91c 100755 --- a/admin/global.php +++ b/admin/global.php @@ -19,28 +19,28 @@ require_once('./includes/functions.php'); // admin navigation $globalnav = array( - 'Admin Locations' => array( - 'Home' => 'index.php', - 'Logout' => '../login.php?do=cplogout' + lang::r('Admin Locations') => array( + lang::r('Home') => 'index.php', + lang::r('Logout') => '../login.php?do=cplogout' ), - 'Options' => array( - 'BugStrike Settings' => 'setting.php', + lang::r('Options') => array( + lang::r('BugStrike Settings') => 'setting.php', //'Manage Languages' => 'language.php' ), - 'Bug Fields' => array( - 'Products / Versions / Components' => 'product.php', - 'Priorities' => 'priority.php', - 'Resolutions' => 'resolution.php', - 'Severities' => 'severity.php', - 'Statuses' => 'status.php', - 'Custom Bug Fields' => 'field.php', - 'Automatic Actions' => 'autoaction.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::r('Custom Bug Fields') => 'field.php', + lang::r('Automatic Actions') => 'autoaction.php' ), - 'User Management' => array( - 'Usergroups' => 'usergroup.php' + lang::r('User Management') => array( + lang::r('Usergroups') => 'usergroup.php' ) ); diff --git a/admin/index.php b/admin/index.php index 185a4ba..09a21a9 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('BugStrike Administration Menu'); +$admin->table_head(lang::r('BugStrike Administration Menu')); $navdata = '