From 0997bef78aeabce04ba0b77ca22f468e6542e08c Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 5 Jul 2007 00:10:02 +0000 Subject: [PATCH] r1566: Fixed an issue where header names weren't translated due to the fact that $bugsys->columnNames[] was being loaded (with gettexed strings) before the language system was initialized --- docs/changes.txt | 3 +- includes/definitions.php | 60 ++++++++++++++++++++++++++++++++++++++++ includes/init.php | 2 ++ includes/permissions.php | 34 +---------------------- 4 files changed, 65 insertions(+), 34 deletions(-) create mode 100644 includes/definitions.php diff --git a/docs/changes.txt b/docs/changes.txt index bc830ef..53dfc93 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -1,10 +1,11 @@ -1.2.0 +1.2.0 Release Candidate 2 =============================== - Fixed: In userctrl_search.tpl, the floated elements need to be before unfloated ones otherwise Gecko engine offsets it by a line - Fixed: Closed a SQL injection vector in register.php - Fixed: Users could not vote against a bug due to too tight sanitization (bug://report/84) - Fixed: A "call to undefined function A()" would be thrown under some occasions when viewing a bug - Change: Email templates are now found in the locale/ directory so they can be translated (bug://report/81) +- Fixed: Column headers were not translated for multiple languages (bug://report/79) 1.2.0 Release Candidate 1 =============================== diff --git a/includes/definitions.php b/includes/definitions.php new file mode 100644 index 0000000..780c7b0 --- /dev/null +++ b/includes/definitions.php @@ -0,0 +1,60 @@ +columns = array( + 'bugid' => 1, + 'summary' => 2, + 'reporter' => 4, + 'product' => 8, + 'component' => 16, + 'version' => 32, + 'status' => 64, + 'resolution' => 128, + 'priority' => 256, + 'severity' => 512, + 'lastpost' => 1024, + 'votes' => 2048, + 'assignedto' => 4096 +); + +$bugsys->columnNames = array( + 'bugid' => _('ID'), + 'summary' => _('Summary'), + 'reporter' => _('Reporter'), + 'product' => _('Product'), + 'component' => _('Component'), + 'version' => _('Version'), + 'status' => _('Status'), + 'resolution' => _('Resolution'), + 'priority' => _('Priority'), + 'severity' => _('Severity'), + 'lastpost' => _('Last Post'), + 'votes' => _('Votes'), + 'assignedto' => _('Assigned To') +); + +/*=====================================================================*\ +|| ################################################################### +|| # $HeadURL$ +|| # $Id$ +|| ################################################################### +\*=====================================================================*/ +?> \ No newline at end of file diff --git a/includes/init.php b/includes/init.php index 0cb7ce4..cd3f39d 100755 --- a/includes/init.php +++ b/includes/init.php @@ -148,6 +148,8 @@ textdomain('MESSAGES'); bind_textdomain_codeset('MESSAGES', $language['charset']); +require_once('./includes/definitions.php'); + // ################################################################### // initialize the date system $bugsys->load('date', 'datef', true); diff --git a/includes/permissions.php b/includes/permissions.php index 901d871..8ef5a2b 100644 --- a/includes/permissions.php +++ b/includes/permissions.php @@ -71,42 +71,10 @@ $bugsys->emailoptions = array( ) ); -$bugsys->columns = array( - 'bugid' => 1, - 'summary' => 2, - 'reporter' => 4, - 'product' => 8, - 'component' => 16, - 'version' => 32, - 'status' => 64, - 'resolution' => 128, - 'priority' => 256, - 'severity' => 512, - 'lastpost' => 1024, - 'votes' => 2048, - 'assignedto' => 4096 -); - -$bugsys->columnNames = array( - 'bugid' => _('ID'), - 'summary' => _('Summary'), - 'reporter' => _('Reporter'), - 'product' => _('Product'), - 'component' => _('Component'), - 'version' => _('Version'), - 'status' => _('Status'), - 'resolution' => _('Resolution'), - 'priority' => _('Priority'), - 'severity' => _('Severity'), - 'lastpost' => _('Last Post'), - 'votes' => _('Votes'), - 'assignedto' => _('Assigned To') -); - /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ -?> +?> \ No newline at end of file -- 2.43.5