[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm /localize/localize de.pm

www lon-capa-cvs@mail.lon-capa.org
Wed, 17 Sep 2003 20:51:15 -0000


This is a MIME encoded message

--www1063831875
Content-Type: text/plain

www		Wed Sep 17 16:51:15 2003 EDT

  Modified files:              
    /loncom/homework	inputtags.pm 
    /loncom/localize/localize	de.pm 
  Log:
  Internationalize problem messages, localize to German
  
  
--www1063831875
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20030917165115.txt"

Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.114 loncom/homework/inputtags.pm:1.115
--- loncom/homework/inputtags.pm:1.114	Thu Aug 28 08:54:27 2003
+++ loncom/homework/inputtags.pm	Wed Sep 17 16:51:15 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # input  definitons
 #
-# $Id: inputtags.pm,v 1.114 2003/08/28 12:54:27 sakharuk Exp $
+# $Id: inputtags.pm,v 1.115 2003/09/17 20:51:15 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -31,6 +31,7 @@
 use HTML::Entities();
 use strict;
 use Apache::loncommon;
+use Apache::lonlocal;
 
 BEGIN {
   &Apache::lonxml::register('Apache::inputtags',('hiddenline','textfield','textline'));
@@ -332,22 +333,22 @@
 	'not_charged_try' => '#ffffaa',
 	'no_message' => '#fffff',
       );
-  if ($previous) { $previousmsg='You have entered that answer before'; }
+  if ($previous) { $previousmsg=&mt('You have entered that answer before'); }
 
   if      ($solved =~ /^correct/) {
       if ($award eq 'ASSIGNED_SCORE') {
-	  $message = "A score has been assigned.";
+	  $message = &mt("A score has been assigned.");
       } else {
 	  if ($target eq 'tex') {
-	      $message = '\textbf{You are correct}.';
+	      $message = '\textbf{'.&mt('You are correct.').'}';
 	  } else {
-	      $message = "<b>You are correct.</b>";
+	      $message = "<b>".&mt('You are correct.')."</b>";
 	  }
           unless ($ENV{'course.'.
 			   $ENV{'request.course.id'}.
 			   '.disable_receipt_display'} eq 'yes') { 
 	      $message.=(($target eq 'web')?'<br />':' ').
-		  'Your receipt is '.&Apache::lonnet::receipt().
+		  &mt('Your receipt is').' '.&Apache::lonnet::receipt().
        (($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):'');
 	  }
       }
@@ -356,20 +357,20 @@
       $previousmsg='';
   } elsif ($solved =~ /^excused/) {
       if ($target eq 'tex') {
-	  $message = ' \textbf{You are excused from the problem.} ';
+	  $message = ' \textbf{'.&mt('You are excused from the problem.').'} ';
       } else {
-	  $message = "<b>You are excused from the problem.</b>";
+	  $message = "<b>".&mt('You are excused from the problem.')."</b>";
       }
       $bgcolor=$possiblecolors{'charged_try'};
       $button=0;
       $previousmsg='';
   } elsif ($award eq 'EXACT_ANS' || $award eq 'APPROX_ANS' ) {
       if ($solved =~ /^incorrect/ || $solved eq '') {
-	  $message = "Incorrect";
+	  $message = &mt("Incorrect");
 	  $bgcolor=$possiblecolors{'charged_try'};
 	  $button=1;
       } else {
-	  $message = "<b>You are correct.</b>";
+	  $message = "<b>".&mt('You are correct.')."</b>";
           unless ($ENV{'course.'.
 			   $ENV{'request.course.id'}.
 			   '.disable_receipt_display'} eq 'yes') { 
@@ -386,60 +387,60 @@
       $bgcolor=$possiblecolors{'no_feedback'};
       $button=1;
   } elsif ($award eq 'MISSING_ANSWER') {
-      $message = 'Some parts were not submitted';
+      $message = &mt('Some parts were not submitted.');
       $bgcolor=$possiblecolors{'not_charged_try'};
       $button = 1;
   } elsif ($award eq 'ERROR') {
-      $message = 'An error occured while grading your answer.';
+      $message = &mt('An error occured while grading your answer.');
       $bgcolor=$possiblecolors{'not_charged_try'};
       $button = 1;
   } elsif ($award eq 'TOO_LONG') {
-      $message = "The submitted answer was too long.";
+      $message = &mt("The submitted answer was too long.");
       $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;
   } elsif ($award eq 'WANTED_NUMERIC') {
-      $message = "This question expects a numeric answer";
+      $message = &mt("This question expects a numeric answer.");
       $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;
   } elsif ($award eq 'MISORDERED_RANK') {
-      $message = 'You have provided an invalid ranking';
+      $message = &mt('You have provided an invalid ranking');
       if ($target ne 'tex') {
-	  $message.=', please refer to '.&Apache::loncommon::help_open_topic('Ranking_Problems','help on ranking problems').'.';
+	  $message.=', '.&mt('please refer to').' '.&Apache::loncommon::help_open_topic('Ranking_Problems','help on ranking problems').'.';
       }
       $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;
   } elsif ($award eq 'INVALID_FILETYPE') {
-      $message = 'The filetype extension of the file you uploaded is not allowed.';
+      $message = &mt('The filetype extension of the file you uploaded is not allowed.');
       $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;
   } elsif ($award eq 'SIG_FAIL') {
-      $message = "Please adjust significant figures.";# you provided %s significant figures";
+      $message = &mt("Please adjust significant figures.");# you provided %s significant figures";
       $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;
   } elsif ($award eq 'UNIT_FAIL') {
-      $message = "Units incorrect. ";
+      $message = &mt("Units incorrect.");
       if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Physical_Units');} #Computer reads units as %s";
       $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;
   } elsif ($award eq 'UNIT_NOTNEEDED') {
-      $message = "Only a number required.";# Computer reads units of %s";
+      $message = &mt("Only a number required.");# Computer reads units of %s";
       $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;
   } elsif ($award eq 'NO_UNIT') {
-      $message = "Units required";
+      $message = &mt("Units required");
       if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Physical_Units')};
       $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;
   } elsif ($award eq 'BAD_FORMULA') {
-      $message = "Unable to understand formula";
+      $message = &mt("Unable to understand formula");
       $bgcolor=$possiblecolors{'not_charged_try'};
       $button=1;
   } elsif ($award eq 'INCORRECT') {
-      $message = "Incorrect";
+      $message = &mt("Incorrect");
       $bgcolor=$possiblecolors{'charged_try'};
       $button=1;
   } elsif ($award eq 'SUBMITTED') {
-      $message = "Your submission has been recorded.";
+      $message = &mt("Your submission has been recorded.");
       $bgcolor=$possiblecolors{'correct'};
       $button=1;
   } elsif ($award eq 'DRAFT') {
@@ -451,11 +452,11 @@
       $bgcolor=$possiblecolors{'correct'};
       $button=0;
   } else {
-      $message = "Unknown message: $award";
+      $message = &mt("Unknown message").": $award";
       $button=1;
   }
   if (lc($Apache::lonhomework::problemstatus) eq 'no') {
-      $message = "Answer Submitted";
+      $message = &mt("Answer Submitted");
       $bgcolor=$possiblecolors{'correct'};
       $button=1;
   }
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.8 loncom/localize/localize/de.pm:1.9
--- loncom/localize/localize/de.pm:1.8	Wed Sep 17 16:01:12 2003
+++ loncom/localize/localize/de.pm	Wed Sep 17 16:51:15 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.8 2003/09/17 20:01:12 www Exp $
+# $Id: de.pm,v 1.9 2003/09/17 20:51:15 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -308,6 +308,69 @@
 
    'Drop/Add students in this course'
 => 'Einschreibungsliste verwalten',
+
+   'You have entered that answer before'
+=> 'Sie hatten diese Antwort bereits eingegeben',
+
+   'A score has been assigned.'
+=> 'Eine Note ist vergeben worden',
+
+   'You are correct.'
+=> 'Korrekt!',
+
+   'Your receipt is'
+=> 'Ihr Nachweis ist',
+
+   'You are excused from the problem.'
+=> 'Die Aufgabe ist Ihnen erlassen worden.',
+
+   'Incorrect'
+=> 'Inkorrekt.',
+
+   'Some parts were not submitted.'
+=> 'Einige Aufgabenteile sind nicht bearbeitet worden.',
+
+   'An error occured while grading your answer.'
+=> 'In der Benotung Ihrer Antwort trat ein Fehler auf.',
+
+   'The submitted answer was too long.'
+=> 'Ihre Antwort war zu lang.',
+
+   'This question expects a numeric answer.'
+=> 'Eine numerische Antwort ist gefragt.',
+
+   'You have provided an invalid ranking'
+=> 'Die Rankordnung ist falsch eingeben worden',
+
+   'please refer to'
+=> 'schauen Sie nach unter',
+
+   'The filetype extension of the file you uploaded is not allowed.'
+=> 'Die Endung des der von Ihnen eingereichten Datei ist nicht erlaubt.',
+
+   'Please adjust significant figures.'
+=> 'Bitte korrigieren Sie die signifikanten Stellen.',
+
+   'Units incorrect.'
+=> 'Einheit inkorrekt.',
+
+   'Only a number required.'
+=> 'Nur eine Nummer erwartet.',
+
+   'Units required'
+=> 'Einheiten erwartet',
+
+   'Unable to understand formula'
+=> 'Die eingebene Formel kann nicht ausgewertet werden',
+
+   'Your submission has been recorded.'
+=> 'Ihre Antwort ist gespeichert wordern.',
+
+   'Unknown message'
+=> 'Unbekannte Nachricht',
+
+   'Answer Submitted'
+=> 'Antwort eingereicht',
 
 );
 

--www1063831875--