Permalink
Browse files

MOre language updates

  • Loading branch information...
1 parent 565f7a9 commit e20217b3f366d65f2cc839cffbeccd7289e689d3 martin committed Aug 4, 2002
Showing with 92 additions and 52 deletions.
  1. +25 −17 course/delete.php
  2. +20 −20 course/edit.php
  3. +4 −4 course/editsection.html
  4. +2 −1 course/editsection.php
  5. +10 −9 course/enrol.html
  6. +4 −1 course/enrol.php
  7. +27 −0 lang/en/moodle.php
View
@@ -11,11 +11,13 @@
error("You must be an administrator to use this page.");
}
+ $stradmin = get_string("admin");
+
if (!$id) {
- print_header("Delete a course", "Delete a course",
- "<A HREF=\"$CFG->wwwroot/admin\">Admin</A> -> Delete a course");
+ $strdelete = get_string("deletecourse");
+ print_header($strdelete, $strdelete, "<A HREF=\"$CFG->wwwroot/admin\">$stradmin</A> -> $strdelete");
if ($courses = get_records_sql("SELECT * from course WHERE category > 0 ORDER BY fullname")) {
- print_heading("Choose a course to delete");
+ print_heading("choosecourse");
print_simple_box_start("CENTER");
foreach ($courses as $course) {
echo "<A HREF=\"delete.php?id=$course->id\">$course->fullname</A><BR>";
@@ -34,9 +36,13 @@
}
if (! $delete) {
- print_header("Delete $course->shortname ?", "Delete $course->shortname ?",
- "<A HREF=\"$CFG->wwwroot/admin\">Admin</A> -> Delete $course->shortname ?");
- notice_yesno("Are you absolutely sure you want to completely delete this course and all the data it contains?<BR><BR>$course->fullname", "delete.php?id=$course->id&delete=".md5($course->timemodified), "delete.php");
+ $strdeletecheck = get_string("deletecheck", "", $course->shortname);
+ $strdeletecheckfull = get_string("deletecheckfull");
+ print_header($strdeletecheck, $strdeletecheck,
+ "<A HREF=\"$CFG->wwwroot/admin\">$stradmin</A> -> $strdeletecheck");
+ notice_yesno("$strdeletecheckfull<BR><BR>$course->fullname",
+ "delete.php?id=$course->id&delete=".md5($course->timemodified),
+ "delete.php");
exit;
}
@@ -45,10 +51,12 @@
}
// OK checks done, delete the course now.
- print_header("Deleting $course->shortname", "Deleting $course->shortname",
- "<A HREF=\"$CFG->wwwroot/admin\">Admin</A> -> Deleting $course->shortname");
- print_heading("Deleting $course->fullname");
+ $strdeletingcheck = get_string("deletingcheck", "", $course->shortname);
+ print_header($strdeletingcheck, $strdeletingcheck,
+ "<A HREF=\"$CFG->wwwroot/admin\">$stradmin</A> -> $strdeletingcheck");
+ print_heading($strdeletingcheck);
+ $strdeleted = get_string("deleted");
// First delete every instance of every module
if ($allmods = get_records_sql("SELECT * FROM modules") ) {
@@ -74,7 +82,7 @@
}
}
- notify("Deleted $count instances of $modname");
+ notify("$strdeleted $count instances of $modname");
}
} else {
error("No modules are installed!");
@@ -83,32 +91,32 @@
// Delete any user stuff
if (delete_records("user_students", "course", $course->id)) {
- notify("Deleted student enrolments");
+ notify("$strdeleted student enrolments");
}
if (delete_records("user_teachers", "course", $course->id)) {
- notify("Deleted teachers");
+ notify("$strdeleted teachers");
}
// Delete logs
if (delete_records("log", "course", $course->id)) {
- notify("Deleted logs");
+ notify("$strdeleted logs");
}
// Delete any course stuff
if (delete_records("course_sections", "course", $course->id)) {
- notify("Deleted course sections");
+ notify("$strdeleted course sections");
}
if (delete_records("course_modules", "course", $course->id)) {
- notify("Deleted course modules");
+ notify("$strdeleted course modules");
}
if (delete_records("course", "id", $course->id)) {
- notify("Deleted the main course record");
+ notify("$strdeleted the main course record");
}
- print_heading("$course->shortname has been completely deleted");
+ print_heading( get_string("deletedcourse", "", $course->shortname) );
print_continue("delete.php");
View
@@ -38,15 +38,14 @@
validate_form($course, $form, $err);
-
if (count($err) == 0) {
$form->timemodified = time();
if ($course) {
if (update_record("course", $form)) {
add_to_log($course->id, "course", "update", "edit.php?id=$id", "");
- redirect("view.php?id=$course->id", "Changes saved");
+ redirect("view.php?id=$course->id", get_string("changessaved"));
} else {
error("Serious Error! Could not update the course record! (id = $form->id)");
}
@@ -81,11 +80,11 @@
$form = $course;
} else {
$form->startdate = time() + 3600 * 24;
- $form->teacher = "Facilitator";
- $form->student = "Student";
- $form->fullname = "Course Fullname 101";
- $form->shortname = "CF101";
- $form->summary = "Write a concise and interesting paragraph here that explains what this course is about.";
+ $form->fullname = get_string("defaultcoursefullname");
+ $form->shortname = get_string("defaultcourseshortname");
+ $form->teacher = get_string("defaultcourseteacher");
+ $form->student = get_string("defaultcoursestudent");
+ $form->summary = get_string("defaultcoursesummary");
$form->format = "weeks";
$form->numsections = 10;
$form->newsitems = 5;
@@ -95,20 +94,21 @@
$form->categories = get_records_sql_menu("SELECT id,name FROM course_categories");
- $editcoursesettings = get_string("editcoursesettings");
+ $streditcoursesettings = get_string("editcoursesettings");
+ $streditcoursesettings = get_string("editcoursesettings");
if (isset($course)) {
- print_header($editcoursesettings, "$course->fullname",
+ print_header($streditcoursesettings, "$course->fullname",
"<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>
- -> $editcoursesettings", $focus);
+ -> $streditcoursesettings", $focus);
} else {
- print_header("Admin: Creating a new course", "$site->shortname: Administration",
- "<A HREF=\"$CFG->wwwroot/admin/\">Admin</A>
- -> Create a new course", $focus);
+ print_header(get_string("addnewcourse"), get_string("addnewcourse"),
+ "<A HREF=\"$CFG->wwwroot/admin/\">".get_string("admin")."</A>
+ -> ".get_string("addnewcourse"), $focus);
}
print_simple_box_start("center", "", "$THEME->cellheading");
- print_heading($editcoursesettings);
+ print_heading($streditcoursesettings);
include("edit.html");
print_simple_box_end();
@@ -121,22 +121,22 @@
function validate_form($course, &$form, &$err) {
if (empty($form->fullname))
- $err["fullname"] = "Missing full name";
+ $err["fullname"] = get_string("missingfullname");
if (empty($form->shortname))
- $err["shortname"] = "Missing short name";
+ $err["shortname"] = get_string("missingshortname");
if (empty($form->summary))
- $err["summary"] = "Missing summary";
+ $err["summary"] = get_string("missingsummary");
if (empty($form->teacher))
- $err["teacher"] = "Must choose something";
+ $err["teacher"] = get_string("missingteacher");
if (empty($form->student))
- $err["student"] = "Must choose something";
+ $err["student"] = get_string("missingstudent");
if (! $form->category)
- $err["category"] = "You need to choose a category";
+ $err["category"] = get_string("missingcategory");
return;
}
View
@@ -1,12 +1,12 @@
<BLOCKQUOTE>
<FORM name="form" method="post" action="editsection.php">
-<P><B>Summary of <? echo "$sectionname $form->section"; ?></B></P>
+<P><B><? print_string("summaryof", "", "$sectionname $form->section") ?></B></P>
<TEXTAREA NAME=summary COLS=60 ROWS=4 WRAP=virtual><?=$form->summary ?></TEXTAREA>
-<BR><FONT SIZE=1>(Maximum of 255 characters)</FONT>
+<BR><FONT SIZE=1>(<? print_string("maximumchars", "", "255") ?>)</FONT>
<P>
<INPUT type="hidden" name=id value="<?=$form->id ?>">
-<INPUT type="submit" value="Save all changes">
-<INPUT type="reset" value="Revert">
+<INPUT type="submit" value="<? print_string("savechanges") ?>">
+<INPUT type="reset" value="<? print_string("revert") ?>">
</P>
</FORM>
</BLOCKQUOTE>
View
@@ -43,8 +43,9 @@
}
$sectionname = $COURSE_SECTION[$course->format];
+ $stredit = get_string("edit", "", " $sectionname $section->section");
- print_header("Edit $sectionname $section->section", "Edit $sectionname $section->section", "", "form.summary");
+ print_header($stredit, $stredit, "", "form.summary");
include("editsection.html");
View
@@ -3,13 +3,14 @@
<table cellpadding=20>
<tr valign=top>
<td>
- <P ALIGN=CENTER>This course requires an "enrolment key" - a one-time<BR>
- password that you should have got from
+ <P ALIGN=CENTER>
<? if ($teacher) {
- echo "<A HREF=\"../user/view.php?id=$teacher->id&course=$site->id\">$teacher->firstname $teacher->lastname.</A>";
- } else {
- echo "your teacher";
- }
+ $teacher->fullname = "$teacher->firstname $teacher->lastname";
+ $teachername = "<A HREF=../user/view.php?id=$teacher->id&course=$site->id>$teacher->fullname</A>.";
+ } else {
+ $teachername = get_string("yourteacher", "", strtolower($course->teacher));
+ }
+ print_string("enrolmentkeyfrom", "", $teachername);
?>
</P>
</td>
@@ -19,7 +20,7 @@
<form name="form" method="post" action="enrol.php">
<table>
<tr>
- <td width=50% align=right><P>Enrolment Key:</P></td>
+ <td width=50% align=right><P><? print_string("enrolmentkey") ?>:</P></td>
<td width=50% >
<input type="password" name="password" size=20 value="<? p($password) ?>" >
<input type="hidden" name="id" value="<? p($id) ?>" >
@@ -28,9 +29,9 @@
<td width=50%>&nbsp;</td>
<td width=50%>
<table cellpadding=1 cellspacing=0><tr>
- <td><input type=submit value=Login></form></td>
+ <td><input type=submit value="<? print_string("login") ?>"></form></td>
<td><form action="<?=$CFG->wwwroot?>/" method=post>
- <input type=submit value=Cancel></form></td>
+ <input type=submit value="<? print_string("cancel") ?>"></form></td>
</tr></table>
</td>
View
@@ -81,7 +81,10 @@
$teacher = get_teacher($course->id);
- print_header("Login to $course->shortname", "Login to $course->shortname", "<A HREF=\".\">Courses</A> -> Login to $course->shortname", "form.password");
+ $strloginto = get_string("loginto", "", $course->shortname);
+ $strcourses = get_string("courses");
+
+ print_header($strloginto, $strloginto, "<A HREF=\".\">$strcourses</A> -> $strloginto", "form.password");
print_course($course);
View
@@ -13,10 +13,12 @@
$string[alreadyconfirmed] = "Registration has already been confirmed";
$string[assignteachers] = "Assign teachers";
$string[availablecourses] = "Available Courses";
+$string[cancel] = "Cancel";
$string[category] = "Category";
$string[changepassword] = "Change password";
$string[changedpassword] = "Changed password";
$string[changessaved] = "Changes saved";
+$string[choosecourse] = "Choose a course";
$string[city] = "City/town";
$string[confirmed] = "Your registration has been confirmed";
$string["continue"] = "Continue";
@@ -26,8 +28,19 @@
$string[createaccount] = "Create my new account";
$string[createuserandpass] = "Create a new username and password to log in with";
$string[currentlocaltime] = "your current local time";
+$string[defaultcoursefullname] = "Course Fullname 101";
+$string[defaultcourseshortname] = "CF101";
+$string[defaultcoursestudent] = "Student";
+$string[defaultcoursesummary] = "Write a concise and interesting paragraph here that explains what this course is about";
+$string[defaultcourseteacher] = "Facilitator";
$string[delete] = "Delete";
+$string[deletecheck] = "Delete \$a ?";
+$string[deletecheckfull] = "Are you absolutely sure you want to completely delete this course and all the data it contains?";
$string[deletecourse] = "Delete a course";
+$string[deleted] = "Deleted";
+$string[deletedcourse] = "\$a has been completely deleted";
+$string[deletingcourse] = "Deleting \$a";
+$string[edit] = "Edit \$a";
$string[editcoursesettings] = "Edit course settings";
$string[editmyprofile] = "Edit my profile";
$string[edituser] = "Edit user accounts";
@@ -59,6 +72,8 @@
$string[emailexists] = "This email address is already registered.";
$string[emailmustbereal] = "Note: your email address must be a real one";
$string[enrolmentkey] = "Enrolment key";
+$string[enrolmentkeyfrom] = "This course requires an 'enrolment key' - a one-time<BR>
+password that you should have got from \$a";
$string[entercourse] = "Click to enter this course";
$string[enteremailaddress] = "Enter in your email address to reset your
password and have the new password sent to you via email.";
@@ -89,6 +104,7 @@
$string[loginas] = "Login as";
$string[loginguest] = "Login as a guest";
$string[loginsite] = "Login to the site";
+$string[loginto] = "Login to \$a";
$string[loginusing] = "Login using your username and password";
$string[loginsteps] = "Hi! For full access to courses you'll need to take
a minute to create a new account for yourself on this web site.
@@ -110,13 +126,20 @@
</OL>";
$string[logout] = "Logout";
$string[mainmenu] = "Main menu";
+$string[maximumchars] = "Maximum of \$a characters";
+$string[missingcategory] = "You need to choose a category";
$string[missingcity] = "Missing city/town";
$string[missingcountry] = "Missing country";
$string[missingemail] = "Missing email address";
$string[missingfirstname] = "Missing first name";
+$string[missingfullname] = "Missing full name";
$string[missinglastname] = "Missing last name";
+$string[missingshortname] = "Missing short name";
$string[missingnewpassword] = "Missing new password";
$string[missingpassword] = "Missing password";
+$string[missingstudent] = "Must choose something";
+$string[missingsummary] = "Missing summary";
+$string[missingteacher] = "Must choose something";
$string[missingusername] = "Missing username";
$string[movedown] = "Move down";
$string[moveup] = "Move up";
@@ -168,6 +191,8 @@
$string[personalprofile] = "Personal profile";
$string[phone] = "Phone";
$string[returningtosite] = "Returning to this web site?";
+$string[revert] = "Revert";
+$string[savechanges] = "Save changes";
$string[section] = "Section";
$string[selectacountry] = "Select a country";
$string[senddetails] = "Send my details via email";
@@ -182,6 +207,7 @@
$string[startdate] = "Course start date";
$string[startsignup] = "Start now by creating a new account!";
$string[summary] = "Summary";
+$string[summaryof] = "Summary of \$a";
$string[supplyinfo] = "Please supply some information about yourself";
$string[teacheronly] = "for the \$a only";
$string[textformat] = "Plain text format";
@@ -213,5 +239,6 @@
$string[wordforstudenteg] = "eg Student, Participant etc";
$string[wrongpassword] = "Incorrect password for this username";
$string[yes] = "Yes";
+$string[yourteacher] = "your \$a";
?>

0 comments on commit e20217b

Please sign in to comment.