View Issue Details

IDProjectCategoryView StatusLast Update
0008397mantisbtlocalizationpublic2009-06-26 12:05
Reporterseiji Assigned Tothraxisp  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformPCOSLinuxOS VersionGentoo Linux
Fixed in Version1.1.5 
Summary0008397: Localize bug_graph_bystatus
Description

bug_graph_bystatus.php shows status as graph legends or table header.
but they are not localized.

See attached patch file.

Tagspatch
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;
bug_graph_bystatus.diff.txt (908 bytes)   

Activities

vboctor

vboctor

2007-09-25 23:11

manager   ~0015716

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.

kobo

kobo

2008-01-13 10:39

reporter   ~0016655

Last edited: 2008-01-13 10:42

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.
The implementation of the Patch did not help.

thraxisp

thraxisp

2008-01-13 11:05

reporter   ~0016656

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().

kobo

kobo

2008-01-13 11:21

reporter   ~0016657

I'm not too familiar with the code of Mantis.
Can you please direct me to the places when I need to alter the code?

thraxisp

thraxisp

2009-05-19 19:51

reporter   ~0021843

fixed already