Permalink
Browse files

Fixes to allow graphs to be translated

  • Loading branch information...
1 parent 89b5432 commit 3b9a79f977295d8033c095dc77ca66e3d7f82139 moodler committed Nov 21, 2002
Showing with 15 additions and 4 deletions.
  1. +12 −4 course/loggraph.php
  2. +3 −0 lang/en/moodle.php
View
@@ -64,20 +64,24 @@
$graph = new graph(750, 400);
- $graph->parameter['title'] = "Hits on $course->shortname by $user->firstname $user->lastname";
+
+ $a->coursename = $course->shortname;
+ $a->username = "$user->firstname $user->lastname";
+ $graph->parameter['title'] = get_string("hitsoncourse", "", $a);
$graph->x_data = $days;
$graph->y_data['logs'] = $logs;
$graph->y_format['logs'] = array('colour' => 'blue','line' => 'line');
- $graph->y_label_left = "Hits";
+ $graph->y_label_left = get_string("hits");
$graph->label_size = "6";
$graph->y_order = array('logs');
$graph->parameter['shadow'] = 'none';
+ error_reporting(5);
$graph->draw_stack();
break;
@@ -112,20 +116,24 @@
$maxlogs = max($logs);
$graph = new graph(750, 400);
- $graph->parameter['title'] = "Today's hits on $course->shortname by $user->firstname $user->lastname";
+
+ $a->coursename = $course->shortname;
+ $a->username = "$user->firstname $user->lastname";
+ $graph->parameter['title'] = get_string("hitsoncoursetoday", "", $a);
$graph->x_data = $hours;
$graph->y_data['logs'] = $logs;
$graph->y_format['logs'] = array('colour' => 'blue','bar' => 'fill','legend' =>'actual','bar_size' => 0.9);
- $graph->y_label_left = "Hits";
+ $graph->y_label_left = get_string("hits");
$graph->label_size = "6";
$graph->y_order = array('logs');
$graph->parameter['shadow'] = 'none';
+ error_reporting(5);
$graph->draw_stack();
break;
View
@@ -214,6 +214,9 @@
$string['helprichtext'] = "About the Richtext HTML editor";
$string['helpquestions'] = "How to ask questions";
$string['hide'] = "Hide";
+$string['hits'] = "Hits";
+$string['hitsoncourse'] = "Hits on \$a->coursename by \$a->username";
+$string['hitsoncoursetoday'] = "Today's hits on \$a->coursename by \$a->username";
$string['home'] = "Home";
$string['hour'] = "hour";
$string['hours'] = "hours";

0 comments on commit 3b9a79f

Please sign in to comment.