MDL-54962 mod_data: Approval status is now translated.
authorAdrian Greeve <adrian@moodle.com>
Fri, 8 Jul 2016 02:53:39 +0000 (10:53 +0800)
committerAdrian Greeve <adrian@moodle.com>
Fri, 8 Jul 2016 02:53:39 +0000 (10:53 +0800)
It was using hardcoded English. Now it uses get_string.

mod/data/lib.php

index 0902635..d4da9cb 100644 (file)
@@ -1332,9 +1332,9 @@ function data_print_template($template, $records, $data, $search='', $page=0, $r
         if (!$data->approval) {
             $replacement[] = '';
         } else if ($record->approved) {
-            $replacement[] = 'approved';
+            $replacement[] = get_string('approved', 'data');
         } else {
-            $replacement[] = 'notapproved';
+            $replacement[] = get_string('notapproved', 'data');
         }
 
         $patterns[]='##comments##';