View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008397 | mantisbt | localization | public | 2007-09-25 12:36 | 2009-06-26 12:05 |
Reporter | seiji | Assigned To | thraxisp | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | PC | OS | Linux | OS Version | Gentoo Linux |
Fixed in Version | 1.1.5 | ||||
Summary | 0008397: Localize bug_graph_bystatus | ||||
Description | bug_graph_bystatus.php shows status as graph legends or table header. See attached patch file. | ||||
Tags | patch | ||||
Attached Files | bug_graph_bystatus.diff.txt (908 bytes)
--- bug_graph_bystatus.php 2007-09-26 01:27:35.000000000 +0900 +++ bug_graph_bystatus.php.new 2007-09-26 01:27:23.000000000 +0900 @@ -61,7 +61,7 @@ $t_start = $t_interval->get_start_timestamp(); // grab all status levels - $t_status_arr = get_enum_to_array( config_get( 'status_enum_string' ) ); + $t_status_arr = get_enum_to_array( lang_get( 'status_enum_string' ) ); $t_bug = array(); @@ -135,9 +135,9 @@ $t_labels = array(); $i = 0; if ($f_summary) { - $t_labels[++$i] = 'open'; - $t_labels[++$i] = 'resolved'; - $t_labels[++$i] = 'closed'; + $t_labels[++$i] = $t_status_arr[OPEN]; + $t_labels[++$i] = $t_status_arr[RESOLVED]; + $t_labels[++$i] = $t_status_arr[CLOSED]; } else { foreach ( $t_status_arr as $t_status => $t_label ) { $t_labels[++$i] = $t_label; | ||||
I've confirmed that the problem exists in the latest code. However, the fix can be incorrect in some corner cases. This is because the fix gets the valid statuses from the localized string rather than the configuration. Hence, if an admin changes the configuration to remove/add a status and then updates the couple of languages that are typically used, then a user using a non-updated language will get a different set of statuses to work with. Hence, the possible status ids must be extracted from the config variable and the labels from the localized strings. |
|
I'm using latest released version but I can not get the graphs or table views. the main modification I have applied to Mantis is by adding two new statuses. Graphs are shown when using the summary views. |
|
kobo, there are changes in the latest svn to address missing or changed status values on the status graphs. There may be a simpler solution to the patch. Language strings for the status values can be added separately to the strings (or automatically added). Display of the status names use lang_get_defaulted(). |
|
I'm not too familiar with the code of Mantis. |
|
fixed already |
|