]> git.mjollnir.org Git - moodle.git/commitdiff
More language fixes
authormartin <martin>
Mon, 12 Aug 2002 09:38:31 +0000 (09:38 +0000)
committermartin <martin>
Mon, 12 Aug 2002 09:38:31 +0000 (09:38 +0000)
lang/en/forum.php
lang/en/journal.php
lang/en/moodle.php
mod/forum/lib.php
mod/journal/edit.html
mod/journal/edit.php
mod/journal/index.php
mod/journal/lib.php
mod/journal/mod.html
mod/journal/report.php
mod/journal/view.php

index 9ecb59423c0267d41da1aeb58d77f509d9a79a43..2cf2ce2e04dc20ffe2fc1e1b2b330dff2fa9f5ac 100644 (file)
@@ -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";
index f4a86af23fc8a44f0937df5ece251c7c3240e001..584428c7bc6981fd5012ae6d6305b3f9a54da6c8 100644 (file)
@@ -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";
 
 ?>
index c7572b63e5ed0209f80e0fb087d9d3203f0045c1..1e39cada222c8845bc697e6d0680df25c2dc573b 100644 (file)
@@ -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";
index 76dffb553d6526c81693f977b30801097831bd12..daabe4be3daa11e4a42b0ba1909c2bb7939db86a 100644 (file)
@@ -183,7 +183,7 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
         $numwords = count_words($post->message);
         echo "<A HREF=\"$CFG->wwwroot/mod/forum/discuss.php?d=$post->discussion\">";
         echo get_string("readtherest", "forum");
-        echo "</A> (".get_string("numwords", "forum", $numwords).")...";
+        echo "</A> (".get_string("numwords", "", $numwords).")...";
     } else {
         // Print whole message
         echo text_to_html($post->message);
index b554b4f1b25b1b68d782c6bc00b5e57940ba0889..eacfeb308b4a63927a53bddb277377238e1d3ad1 100644 (file)
@@ -3,8 +3,8 @@
 <TEXTAREA NAME=text COLS=60 ROWS=10 WRAP="virtual"><? p($entry->text) ?></TEXTAREA>
 <P>
 <INPUT type="hidden" name=id value="<?=$cm->id ?>">
-<INPUT type="submit" value="Save and continue">
-<INPUT type="reset" value="Revert">
+<INPUT type="submit" value="<? print_string("savechanges") ?>">
+<INPUT type="reset" value="<? print_string("revert") ?>">
 </P>
 </FORM>
 </BLOCKQUOTE>
index d129fd6b162cc3e0e442db0777556b4a77bdb9c8..70d4ae89210be9be481ef749cbac879fa3c96d4f 100644 (file)
 
 /// 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",
                  "<A HREF=/course/view.php?id=$course->id>$course->shortname</A> -> 
-                  <A HREF=/mod/journal/index.php?id=$course->id>Journals</A> -> 
-                  <A HREF=\"view.php?id=$cm->id\">$journal->name</A> -> Edit", "form.text");
+                  <A HREF=/mod/journal/index.php?id=$course->id>$strjournals</A> -> 
+                  <A HREF=\"view.php?id=$cm->id\">$journal->name</A> -> $stredit", "form.text");
 
     echo "<CENTER>\n";
 
index 0004c21e80ccf362f968c90dadd87ab02a42ddf2..5ef9baa7a79796c3c3f2edf036047d9cff107378 100644 (file)
         $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
     }
 
-    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")) {
     $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");
     }
 
     }
 
     echo "<BR>";
+
     print_table($table);
 
     print_footer($course);
-
  
 ?>
 
index b48bd16858ffe25ed9e3dc713994b6ea2e3541a3..0606430120e31392b853efdeb810af25fe66fe6f 100644 (file)
@@ -1,14 +1,10 @@
 <?PHP // $Id$
 
-$RATING = array ("3" => "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 "<P><FONT SIZE=1>Last edited: ".userdate($entry->modified)."</FONT></P>";
+            echo "<P><FONT SIZE=1>".get_string("lastedited").": ".userdate($entry->modified)."</FONT></P>";
         }
         if ($entry->text) {
             echo text_to_html($entry->text);
@@ -144,7 +140,7 @@ function journal_print_user_entry($course, $user, $entry, $teachers, $ratings) {
     echo "</TD>";
     echo "<TD NOWRAP WIDTH=100% BGCOLOR=\"$THEME->cellheading\">$user->firstname $user->lastname";
     if ($entry) {
-        echo "&nbsp;&nbsp;<FONT SIZE=1>Last edited: ".userdate($entry->modified)."</FONT>";
+        echo "&nbsp;&nbsp;<FONT SIZE=1>".get_string("lastedited").": ".userdate($entry->modified)."</FONT>";
     }
     echo "</TR>";
 
@@ -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 "</TD></TR>";
 
@@ -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 "<TD BGCOLOR=\"$THEME->cellheading\">Teacher Feedback:";
-        choose_from_menu($ratings, "r$entry->id", $entry->rating, "Rate...");
+        echo "<TD BGCOLOR=\"$THEME->cellheading\">".get_string("feedback").":";
+        choose_from_menu($ratings, "r$entry->id", $entry->rating, get_string("rate", "journal")."...");
         if ($entry->timemarked) {
             echo "&nbsp;&nbsp;<FONT SIZE=1>".userdate($entry->timemarked)."</FONT>";
         }
@@ -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 "\n<TR><TD WIDTH=100% BGCOLOR=\"$THEME->cellcontent\">";
 
     echo "<P ALIGN=RIGHT><FONT SIZE=-1><I>";
-    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 "</I></FONT></P>";
 
index f55eadf123d2f081755413212fe61aac88b8da67..e3c118050eb582f5653b1da841a543666ecdc2f9 100644 (file)
@@ -1,31 +1,31 @@
 <form name="form" method="post" action="<?=$ME ?>">
 <table cellpadding=5>
 <tr valign=top>
-    <td align=right><P><B>Journal Name:</B></P></TD>
+    <td align=right><P><B><? print_string("journalname", "journal") ?>:</B></P></TD>
     <td>
         <input type="text" name="name" size=30 value="<? p($form->name) ?>">
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B>Journal Question:</B></P></TD>
+    <td align=right><P><B><? print_string("journalquestion", "journal") ?>:</B></P></TD>
     <td>
         <textarea name="intro" rows=15 cols=30 wrap="virtual"><? p($form->intro) ?></textarea>
     </td>
 </tr>
 <tr valign=top>
-    <TD align=right><P><B>Days available:</B></P></TD>
+    <TD align=right><P><B><? print_string("daysavailable", "journal") ?>:</B></P></TD>
     <TD>
     <?
         $options = array();
-        $options[0] = "Always open";
+        $options[0] = get_string("alwaysopen", "journal");
         for ($i=1;$i<=13;$i++) {
-            $options[$i] = "$i days";
+            $options[$i] = get_string("numdays", "", $i);
         }
         for ($i=2;$i<=16;$i++) {
             $days = $i * 7;
-            $options[$days] = "$i weeks";
+            $options[$days] = get_string("numweeks", "", $i);
         }
-        $options[365] = "1 year";
+        $options[365] = get_string("numweeks", "", 52);
         if ($form->days == "") {
             $form->days == "14";
         }
index ebd4e176b4fd83aca1713eb1af5b114570e366c5..8ddf4a0e07cc59692ff5e22e8b227478dedf8d9b 100644 (file)
         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 "<CENTER>";
index c303532230f7f53531a399d3e815cde254b2ddf8..e28201208f336897e61fedc78d022a7b8e7ddc39 100644 (file)
     if ($course->category) {
         $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
     }
+
+    $strjournal = get_string("modulename", "journal");
+    $strjournals = get_string("modulenameplural", "journal");
+
     print_header("$course->shortname: $journal->name", "$course->fullname",
-                 "$navigation <A HREF=index.php?id=$course->id>Journals</A> -> $journal->name", "", "", true,
+                 "$navigation <A HREF=index.php?id=$course->id>$strjournals</A> -> $journal->name", "", "", true,
                   update_module_icon($cm->id, $course->id));
 
     if (isteacher($course->id)) {
-        echo "<P align=right><A HREF=\"report.php?id=$cm->id\">View all responses</A></P>";
+        echo "<P align=right><A HREF=\"report.php?id=$cm->id\">".get_string("viewallentries","journal")."</A></P>";
     }
 
     echo "<CENTER>\n";
@@ -65,7 +69,7 @@
         if ($timenow < $timefinish) {
             $options = array ("id" => "$cm->id");
             echo "<CENTER>";
-            print_single_button("edit.php", $options, "Start or edit my journal entry");
+            print_single_button("edit.php", $options, get_string("startoredit","journal"));
             echo "</CENTER>";
         }
 
                                      WHERE user='$USER->id' AND journal='$journal->id'")) {
 
             if (empty($entry->text)) {
-                echo "<P ALIGN=center><B>Blank entry</B></P>";
+                echo "<P ALIGN=center><B>".get_string("blankentry","journal")."</B></P>";
             } else {
                 echo text_to_html($entry->text);
             }
             
         } else {
-            echo "<B><I>You have not started this journal yet.</I></B>";
+            echo "<B><I>".get_string("notstarted","journal")."</I></B>";
         }
 
         print_simple_box_end();
 
         if ($timenow < $timefinish) {
             if ($entry->modified) {
-                echo "<P><FONT SIZE=-2><B>Last edited:</B> ";
+                echo "<P><FONT SIZE=-2><B>".get_string("lastedited").":</B> ";
                 echo userdate($entry->modified);
-                echo " (".count_words($entry->text)." words)";
+                echo " (".get_string("numwords", "", count_words($entry->text)).")";
                 echo "</FONT></P>";
             }
             if ($journal->days) {
-                echo "<P><FONT SIZE=-2><B>Editing period ends:</B> ";
+                echo "<P><FONT SIZE=-2><B>".get_string("editingends", "journal").":</B> ";
                 echo userdate($timefinish)."</FONT></P>";
             }
         } else {
-            echo "<P><FONT SIZE=-2><B>Editing period has ended:</B> ";
+            echo "<P><FONT SIZE=-2><B>".get_string("editingended", "journal").":</B> ";
             echo userdate($timefinish)."</P>";
         }
 
         if ($entry->comment || $entry->rating) {
-            print_heading("Feedback");
+            print_heading(get_string("feedback"));
             journal_print_feedback($course, $entry);
         }
 
 
     } else {
-        echo "<P><B>This journal won't be open until: ";
+        echo "<P><B>".get_string("notopenuntil", "journal").": ";
         echo userdate($timestart)."</B></P>";
     }