From 3db1919bafb5aa1735e845f5ba0b9495dcd6e939 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 12 Aug 2002 09:38:31 +0000 Subject: [PATCH] More language fixes --- lang/en/forum.php | 1 - lang/en/journal.php | 17 +++++++++++++++++ lang/en/moodle.php | 6 ++++++ mod/forum/lib.php | 2 +- mod/journal/edit.html | 4 ++-- mod/journal/edit.php | 8 ++++++-- mod/journal/index.php | 19 ++++++++++++++----- mod/journal/lib.php | 32 ++++++++++++++------------------ mod/journal/mod.html | 14 +++++++------- mod/journal/report.php | 4 ++-- mod/journal/view.php | 26 +++++++++++++++----------- 11 files changed, 84 insertions(+), 49 deletions(-) diff --git a/lang/en/forum.php b/lang/en/forum.php index 9ecb59423c..2cf2ce2e04 100644 --- a/lang/en/forum.php +++ b/lang/en/forum.php @@ -34,7 +34,6 @@ $string[namesocial] = "Social forum"; $string[nameteacher] = "Teacher forum"; $string[nodiscussions] = "There are no discussion topics yet in this forum"; $string[noposts] = "No posts"; -$string[numwords] = "\$a words"; $string[numposts] = "\$a posts"; $string[olderdiscussions] = "Older discussions"; $string[parentofthispost] = "Parent of this post"; diff --git a/lang/en/journal.php b/lang/en/journal.php index f4a86af23f..584428c7bc 100644 --- a/lang/en/journal.php +++ b/lang/en/journal.php @@ -6,6 +6,23 @@ $string[modulenameplural] = "Journals"; #------------------------------------------------------------ +$string[alwaysopen] = "Always open"; +$string[blankentry] = "Blank entry"; +$string[daysavailable] = "Days available"; +$string[editingends] = "Editing period ends"; +$string[editingended] = "Editing period has ended"; +$string[journalname] = "Journal name"; +$string[journalquestion] = "Journal question"; +$string[journalrating1] = "Not satisfactory"; +$string[journalrating2] = "Satisfactory"; +$string[journalrating3] = "Outstanding"; $string[noentry] = "No entry"; +$string[notopenuntil] = "This journal won't be open until"; +$string[notstarted] = "You have not started this journal yet"; +$string[noratinggiven] = "No rating given"; +$string[overallrating] = "Overall rating"; +$string[rate] = "Rate"; +$string[startoredit] = "Start or edit my journal entry"; +$string[viewallentries] = "View all journal entries"; ?> diff --git a/lang/en/moodle.php b/lang/en/moodle.php index c7572b63e5..1e39cada22 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -100,6 +100,7 @@ $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."; $string[error] = "Error"; +$string[feedback] = "Feedback"; $string[files] = "Files"; $string[firstname] = "First name"; $string[firsttime] = "Is this your first time here?"; @@ -125,6 +126,7 @@ $string[leavetokeep] = "Leave blank to keep current password"; $string[invalidlogin] = "Invalid login, please try again"; $string[invalidemail] = "Invalid email address"; $string[lastaccess] = "Last access"; +$string[lastedited] = "Last edited"; $string[lastmodified] = "Last modified"; $string[lastname] = "Last name"; $string[latestnews] = "Latest news"; @@ -222,6 +224,10 @@ $string[notenrolled] = "\$a is not enrolled in this course."; $string[nothingnew] = "Nothing new since your last login"; $string[now] = "now"; $string[numberweeks] = "Number of weeks/topics"; +$string[numdays] = "\$a days"; +$string[numweeks] = "\$a weeks"; +$string[numyears] = "\$a years"; +$string[numwords] = "\$a words"; $string[ok] = "OK"; $string[opentoguests] = "Open to guests?"; $string[optional] = "optional"; diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 76dffb553d..daabe4be3d 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -183,7 +183,7 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link $numwords = count_words($post->message); echo "wwwroot/mod/forum/discuss.php?d=$post->discussion\">"; echo get_string("readtherest", "forum"); - echo " (".get_string("numwords", "forum", $numwords).")..."; + echo " (".get_string("numwords", "", $numwords).")..."; } else { // Print whole message echo text_to_html($post->message); diff --git a/mod/journal/edit.html b/mod/journal/edit.html index b554b4f1b2..eacfeb308b 100644 --- a/mod/journal/edit.html +++ b/mod/journal/edit.html @@ -3,8 +3,8 @@

- - +"> +">

diff --git a/mod/journal/edit.php b/mod/journal/edit.php index d129fd6b16..70d4ae8921 100644 --- a/mod/journal/edit.php +++ b/mod/journal/edit.php @@ -57,14 +57,18 @@ /// Otherwise fill and print the form. + $strjournal = get_string("modulename", "journal"); + $strjournals = get_string("modulenameplural", "journal"); + $stredit = get_string("edit"); + if (! $entry ) { $entry->text = ""; } print_header("$course->shortname: $journal->name", "$course->fullname", "id>$course->shortname -> - id>Journals -> - id\">$journal->name -> Edit", "form.text"); + id>$strjournals -> + id\">$journal->name -> $stredit", "form.text"); echo "
\n"; diff --git a/mod/journal/index.php b/mod/journal/index.php index 0004c21e80..5ef9baa7a7 100644 --- a/mod/journal/index.php +++ b/mod/journal/index.php @@ -16,7 +16,16 @@ $navigation = "id\">$course->shortname ->"; } - print_header("$course->shortname: Journals", "$course->fullname", "$navigation Journals", ""); + $strjournal = get_string("modulename", "journal"); + $strjournals = get_string("modulenameplural", "journal"); + $stredit = get_string("edit"); + $strview = get_string("view"); + $strweek = get_string("week"); + $strtopic = get_string("topic"); + $strquestion = get_string("question"); + $stranswer = get_string("answer"); + + print_header("$course->shortname: $strjournals", "$course->fullname", "$navigation $strjournals", ""); if (! $journals = get_all_instances_in_course("journal", $course->id, "cw.section ASC")) { @@ -27,13 +36,13 @@ $timenow = time(); if ($course->format == "weeks") { - $table->head = array ("Week", "Question", "Answer"); + $table->head = array ($strweek, $strquestion, $stranswer); $table->align = array ("CENTER", "LEFT", "LEFT"); } else if ($course->format == "topics") { - $table->head = array ("Topic", "Question", "Answer"); + $table->head = array ($strtopic, $strquestion, $stranswer); $table->align = array ("CENTER", "LEFT", "LEFT"); } else { - $table->head = array ("Name", "Answer"); + $table->head = array ($strquestion, $stranswer); $table->align = array ("LEFT", "LEFT"); } @@ -68,10 +77,10 @@ } echo "
"; + print_table($table); print_footer($course); - ?> diff --git a/mod/journal/lib.php b/mod/journal/lib.php index b48bd16858..0606430120 100644 --- a/mod/journal/lib.php +++ b/mod/journal/lib.php @@ -1,14 +1,10 @@ "Outstanding", - "2" => "Satisfactory", - "1" => "Not satisfactory"); +$JOURNAL_RATING = array ("3" => get_string("journalrating3", "journal"), + "2" => get_string("journalrating2", "journal"), + "1" => get_string("journalrating1", "journal") ); -function journal_user_summary($course, $user, $mod, $journal) { - global $CFG; -} - function journal_user_outline($course, $user, $mod, $journal) { if ($entry = get_record_sql("SELECT * FROM journal_entries @@ -16,7 +12,7 @@ function journal_user_outline($course, $user, $mod, $journal) { $numwords = count(preg_split("/\w\b/", $entry->text)) - 1; - $result->info = "$numwords words"; + $result->info = get_string("numwords", "", $numwords); $result->time = $entry->modified; return $result; } @@ -31,7 +27,7 @@ function journal_user_complete($course, $user, $mod, $journal) { print_simple_box_start(); if ($entry->modified) { - echo "

Last edited: ".userdate($entry->modified)."

"; + echo "

".get_string("lastedited").": ".userdate($entry->modified)."

"; } if ($entry->text) { echo text_to_html($entry->text); @@ -144,7 +140,7 @@ function journal_print_user_entry($course, $user, $entry, $teachers, $ratings) { echo ""; echo "cellheading\">$user->firstname $user->lastname"; if ($entry) { - echo "  Last edited: ".userdate($entry->modified).""; + echo "  ".get_string("lastedited").": ".userdate($entry->modified).""; } echo ""; @@ -152,7 +148,7 @@ function journal_print_user_entry($course, $user, $entry, $teachers, $ratings) { if ($entry) { echo text_to_html($entry->text); } else { - echo "No entry"; + print_string("noentry", "journal"); } echo ""; @@ -163,8 +159,8 @@ function journal_print_user_entry($course, $user, $entry, $teachers, $ratings) { $entry->teacher = $USER->id; } print_user_picture($entry->teacher, $course->id, $teachers[$entry->teacher]->picture); - echo "cellheading\">Teacher Feedback:"; - choose_from_menu($ratings, "r$entry->id", $entry->rating, "Rate..."); + echo "cellheading\">".get_string("feedback").":"; + choose_from_menu($ratings, "r$entry->id", $entry->rating, get_string("rate", "journal")."..."); if ($entry->timemarked) { echo "  ".userdate($entry->timemarked).""; } @@ -226,7 +222,7 @@ function journal_delete_instance($id) { function journal_print_feedback($course, $entry) { - global $CFG, $THEME, $RATING; + global $CFG, $THEME, $JOURNAL_RATING; if (! $teacher = get_record("user", "id", $entry->teacher)) { error("Weird journal error"); @@ -246,11 +242,11 @@ function journal_print_feedback($course, $entry) { echo "\ncellcontent\">"; echo "

"; - if ($RATING[$entry->rating]) { - echo "Overall rating: "; - echo $RATING[$entry->rating]; + if ($JOURNAL_RATING[$entry->rating]) { + echo get_string("overallrating", "journal").": "; + echo $JOURNAL_RATING[$entry->rating]; } else { - echo "No rating given"; + print_string("noratinggiven"); } echo "

"; diff --git a/mod/journal/mod.html b/mod/journal/mod.html index f55eadf123..e3c118050e 100644 --- a/mod/journal/mod.html +++ b/mod/journal/mod.html @@ -1,31 +1,31 @@
- + - + - +

Journal Name:

:

Journal Question:

:

Days available:

:

days == "") { $form->days == "14"; } diff --git a/mod/journal/report.php b/mod/journal/report.php index ebd4e176b4..8ddf4a0e07 100644 --- a/mod/journal/report.php +++ b/mod/journal/report.php @@ -94,14 +94,14 @@ if ($usersdone = journal_get_users_done($journal)) { foreach ($usersdone as $user) { $entry = $entrybyuser[$user->id]; - journal_print_user_entry($course, $user, $entry, $teachers, $RATING); + journal_print_user_entry($course, $user, $entry, $teachers, $JOURNAL_RATING); } } foreach ($users as $user) { if (! $usersdone[$user->id]) { $entry = NULL; - journal_print_user_entry($course, $user, $entry, $teachers, $RATING); + journal_print_user_entry($course, $user, $entry, $teachers, $JOURNAL_RATING); } } echo "
"; diff --git a/mod/journal/view.php b/mod/journal/view.php index c303532230..e28201208f 100644 --- a/mod/journal/view.php +++ b/mod/journal/view.php @@ -28,12 +28,16 @@ if ($course->category) { $navigation = "id\">$course->shortname ->"; } + + $strjournal = get_string("modulename", "journal"); + $strjournals = get_string("modulenameplural", "journal"); + print_header("$course->shortname: $journal->name", "$course->fullname", - "$navigation id>Journals -> $journal->name", "", "", true, + "$navigation id>$strjournals -> $journal->name", "", "", true, update_module_icon($cm->id, $course->id)); if (isteacher($course->id)) { - echo "

id\">View all responses

"; + echo "

id\">".get_string("viewallentries","journal")."

"; } echo "
\n"; @@ -65,7 +69,7 @@ if ($timenow < $timefinish) { $options = array ("id" => "$cm->id"); echo "
"; - print_single_button("edit.php", $options, "Start or edit my journal entry"); + print_single_button("edit.php", $options, get_string("startoredit","journal")); echo "
"; } @@ -73,41 +77,41 @@ WHERE user='$USER->id' AND journal='$journal->id'")) { if (empty($entry->text)) { - echo "

Blank entry

"; + echo "

".get_string("blankentry","journal")."

"; } else { echo text_to_html($entry->text); } } else { - echo "You have not started this journal yet."; + echo "".get_string("notstarted","journal").""; } print_simple_box_end(); if ($timenow < $timefinish) { if ($entry->modified) { - echo "

Last edited: "; + echo "

".get_string("lastedited").": "; echo userdate($entry->modified); - echo " (".count_words($entry->text)." words)"; + echo " (".get_string("numwords", "", count_words($entry->text)).")"; echo "

"; } if ($journal->days) { - echo "

Editing period ends: "; + echo "

".get_string("editingends", "journal").": "; echo userdate($timefinish)."

"; } } else { - echo "

Editing period has ended: "; + echo "

".get_string("editingended", "journal").": "; echo userdate($timefinish)."

"; } if ($entry->comment || $entry->rating) { - print_heading("Feedback"); + print_heading(get_string("feedback")); journal_print_feedback($course, $entry); } } else { - echo "

This journal won't be open until: "; + echo "

".get_string("notopenuntil", "journal").": "; echo userdate($timestart)."

"; } -- 2.39.5