[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Fri, 08 Feb 2008 18:01:31 -0000


bisitz		Fri Feb  8 13:01:31 2008 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  Localization:
  Added missing &mt() for Time-Limit functionality
  (Display of remaining time needs still to be translated)
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.417 loncom/homework/structuretags.pm:1.418
--- loncom/homework/structuretags.pm:1.417	Mon Jan 28 16:42:28 2008
+++ loncom/homework/structuretags.pm	Fri Feb  8 13:01:30 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.417 2008/01/28 21:42:28 www Exp $
+# $Id: structuretags.pm,v 1.418 2008/02/08 18:01:30 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -645,26 +645,27 @@
 	my $foldertitle=&Apache::lonnet::gettitle($map);
     
 	&Apache::lonxml::debug("map is $map title is $foldertitle");
-	$result .= (<<ENDCHECKOUT);
-<h2>The resources in "$foldertitle" are open for a limited time. Once you click the 'Show Resource' button below you have $time to complete all resources "$foldertitle".</h2>
-ENDCHECKOUT
+	$result .= "<h2>".&mt('The resources in "[_1]" are open for a limited time.'
+                             .' Once you click the "Show Resource" button below you have [_2] to complete all resources "[_1]".'
+                             ,$foldertitle,$time)."</h2>";
     } elsif ($interval[1] eq 'course') {
 	my $course = $env{'course.'.$env{'request.course.id'}.'.description'};
-	$result .= (<<ENDCHECKOUT);
-<h2>The resources in "$course" are open for a limited time. Once you click the 'Show Resource' button below you have $time to complete all resources in "$course".</h2>
-ENDCHECKOUT
+        $result .= "<h2>".&mt('The resources in "[_1]" are open for a limited time.'
+                             .' Once you click the "Show Resource" button below you have [_2] to complete all resources "[_1]".'
+                             ,$course,$time)."</h2>";
     } else {
 	my $title=&Apache::lonnet::gettitle($symb);
-	$result .= (<<ENDCHECKOUT);
-<h2>This resource "$title" is open for a limited time. Once you click the 'Show Resource' button below you have $time to complete this resource "$title".</h2>
-ENDCHECKOUT
-
+        $result .= "<h2>".&mt('This resource "[_1]" is open for a limited time.'
+                             .' Once you click the "Show Resource" button below you have [_2] to complete this resource "[_1]".'
+                             ,$title,$time)."</h2>";
     }
     my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'});
+    my $buttontext = &mt('Show Resource');
+    my $timertext = &mt('Start Timer?');
     $result .= (<<ENDCHECKOUT);
 <form name="markaccess" method="POST" action="$uri">
 <input type="hidden" name="markaccess" value="yes" />
-<input type="button" name="accessbutton" value="Show Resource" onClick="javascript:if (confirm('Start Timer?')) { document.markaccess.submit(); }" />
+<input type="button" name="accessbutton" value="$buttontext" onClick="javascript:if (confirm('$timertext')) { document.markaccess.submit(); }" />
 </form>
 ENDCHECKOUT
     return $result;