]> git.mjollnir.org Git - moodle.git/commitdiff
More translating ...
authormartin <martin>
Mon, 12 Aug 2002 14:59:37 +0000 (14:59 +0000)
committermartin <martin>
Mon, 12 Aug 2002 14:59:37 +0000 (14:59 +0000)
course/mod.php

index 2acd839d314e7edd53ac9f840f71d4545b1fcb64..1f1e1e9d4f362bfd57e001e207c8471ddea731f7 100644 (file)
             error("This module doesn't exist");
         }
 
-        $sectionname = get_string("name$course->format");
-
         if (! $form = get_record($module->name, "id", $cm->instance)) {
             error("The required instance of this module doesn't exist");
         }
         $form->instance     = $cm->instance;
         $form->mode         = "update";
 
+        $sectionname    = get_string("name$course->format");
         $fullmodulename = strtolower(get_string("modulename", $module->name));
-        $pageheading = "Updating a $fullmodulename in $sectionname $cw->section";
+
+        if ($form->section) {
+            $heading->what = $fullmodulename;
+            $heading->in   = "$sectionname $cw->section";
+            $pageheading = get_string("updatingain", "moodle", $heading);
+        } else {
+            $pageheading = get_string("updatinga", "moodle", $fullmodulename);
+        }
 
         
     } else if (isset($add)) {
             error("This course doesn't exist");
         }
 
-        $sectionname = get_string("name$course->format");
-
         if (! $module = get_record("modules", "name", $add)) {
             error("This module type doesn't exist");
         }
         $form->instance   = $cm->instance;
         $form->mode       = "add";
 
+        $sectionname    = get_string("name$course->format");
         $fullmodulename = strtolower(get_string("modulename", $module->name));
 
-        $pageheading = "Adding a new $fullmodulename";
-
         if ($form->section) {
-            $pageheading .= " to $sectionname $form->section";
+            $heading->what = $fullmodulename;
+            $heading->to   = "$sectionname $form->section";
+            $pageheading = get_string("addinganewto", "moodle", $heading);
+        } else {
+            $pageheading = get_string("addinganew", "moodle", $fullmodulename);
         }
 
     } else {
         error("You can't modify this course!");
     }
 
+    $streditinga = get_string("editinga", "moodle", $fullmodulename);
+
     if ($course->category) {
-        print_header("$course->shortname: Editing a $fullmodulename", 
-                     "$course->shortname: Editing a $fullmodulename",
+        print_header("$course->shortname: $streditinga", "$course->fullname",
                      "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> -> 
-                      Editing a $fullmodulename", "form.name", "", false);
+                      $streditinga", "form.name", "", false);
     } else {
-        print_header("$course->shortname: Editing a $fullmodulename", 
-                     "$course->shortname: Editing a $fullmodulename",
-                     "Editing a $fullmodulename", "form.name", "", false);
+        print_header("$course->shortname: $streditinga", "$course->fullname",
+                     "$streditinga", "form.name", "", false);
     }
 
     $modform = "../mod/$module->name/mod.html";