From 0e96f80e7e5dbfb1ee62c8741d3c9a698c83ef15 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 10 Jul 2005 06:24:24 +0000 Subject: [PATCH] r286: Putting multilingual support off until 1.1. This is just too large of a system to implement so late at B2. However we'll leave the groundwork there (and the partially localized strings) so we can pick up where we left off. --- admin/global.php | 3 +- admin/language.php | 125 +++++++++++++++++++++++++++++++++++++++++++++ docs/roadmap.txt | 2 - docs/todo.txt | 2 +- 4 files changed, 128 insertions(+), 4 deletions(-) create mode 100644 admin/language.php diff --git a/admin/global.php b/admin/global.php index 49a84ef..4d719a8 100755 --- a/admin/global.php +++ b/admin/global.php @@ -25,7 +25,8 @@ $globalnav = array( ), 'Options' => array( - 'BugStrike Options' => 'options.php' + 'BugStrike Options' => 'options.php', + //'Manage Languages' => 'language.php' ), 'Bug Fields' => array( diff --git a/admin/language.php b/admin/language.php new file mode 100644 index 0000000..58e54c4 --- /dev/null +++ b/admin/language.php @@ -0,0 +1,125 @@ +query_first("SELECT * FROM " . TABLE_PREFIX . "language WHERE languageid = " . intval($bugsys->in['languageid'])); + if (!$language) + { + $admin->error(lang::p('error_invalid_id')); + } + + $admin->page_start("Edit Language"); + + $admin->form_start('language.php', 'update'); + $admin->table_start(); + $admin->table_head('Edit Language - ' . $language['title']); + + $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_submit(); + $admin->table_end(); + $admin->form_end(); + + $admin->page_end(); +} + +// ################################################################### + +if ($_REQUEST['do'] == 'modify') +{ + $admin->page_start('Manage Languages'); + + $admin->table_start(); + $admin->table_head('Manage Languages', 4); + + $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)) + { + $admin->row_multi_item(array( + $language['title'] => 'l', + $language['charset'] => 'c', + (($language['default']) ? 'DEFAULT LANGUAGE / ' : '') . (($language['userselect']) ? 'User Selectable' : 'Private Language') => 'c', + "[Edit Settings] [Manage Phrases]" => 'c' + )); + } + + $admin->row_span('[Add New Language]', 'tfoot', 'center', 4); + $admin->table_end(); + + $admin->page_end(); +} + +/*=====================================================================*\ +|| ################################################################### +|| # $HeadURL$ +|| # $Id$ +|| ################################################################### +\*=====================================================================*/ +?> \ No newline at end of file diff --git a/docs/roadmap.txt b/docs/roadmap.txt index 5eec4f7..27283db 100755 --- a/docs/roadmap.txt +++ b/docs/roadmap.txt @@ -8,13 +8,11 @@ BUGTRACK 1.0 ---------------------------------------- BETA 2 ---------------------------------------- -- Complete phrase tool system for administrators ---------------------------------------- BETA 3 ---------------------------------------- - Create new style -- Cleanup phrases - Create installer system - Inline help system (?) diff --git a/docs/todo.txt b/docs/todo.txt index 89a65ea..40d31a6 100755 --- a/docs/todo.txt +++ b/docs/todo.txt @@ -15,7 +15,6 @@ BUGTRACK 1.0 GENERAL USER END ---------------------------------------- - New style -- Language independence - Make summary field longer - Make it so that you can modify bug fields on showreport.php @@ -31,6 +30,7 @@ BUGTRACK 1.1 CORE SYSTEM CHANGES ---------------------------------------- - Switch to power-programming classes +- Language independence ---------------------------------------- BUG REPORTING/EDITING -- 2.43.5