From 963301c57df65f84554cb43918d06971c57e8187 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 12 Aug 2002 14:59:37 +0000 Subject: [PATCH] More translating ... --- course/mod.php | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/course/mod.php b/course/mod.php index 2acd839d31..1f1e1e9d4f 100644 --- a/course/mod.php +++ b/course/mod.php @@ -153,8 +153,6 @@ 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"); } @@ -171,8 +169,16 @@ $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)) { @@ -189,8 +195,6 @@ 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"); } @@ -202,12 +206,15 @@ $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 { @@ -220,15 +227,15 @@ 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", "wwwroot/course/view.php?id=$course->id\">$course->shortname -> - 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"; -- 2.39.5