[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonhelper.pm lonprintout.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Wed, 25 Jul 2007 23:20:41 -0000


albertel		Wed Jul 25 19:20:41 2007 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonprintout.pm lonhelper.pm 
  Log:
  - some ttranslation improvements 
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.553 loncom/interface/loncommon.pm:1.554
--- loncom/interface/loncommon.pm:1.553	Tue Jul 17 21:46:07 2007
+++ loncom/interface/loncommon.pm	Wed Jul 25 19:20:38 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.553 2007/07/18 01:46:07 banghart Exp $
+# $Id: loncommon.pm,v 1.554 2007/07/25 23:20:38 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2242,7 +2242,8 @@
         $target = '';
     }
     if ($start) { $link.='&start='.$start; }
-    
+    $title = &mt($title);
+    $linktext = &mt($linktext);
     return qq{<a href="$link" title="$title" $target>$linktext</a>}.
 	&help_open_topic('View_recent_activity');
 }
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.505 loncom/interface/lonprintout.pm:1.506
--- loncom/interface/lonprintout.pm:1.505	Wed Jul 25 16:39:57 2007
+++ loncom/interface/lonprintout.pm	Wed Jul 25 19:20:38 2007
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.505 2007/07/25 20:39:57 albertel Exp $
+# $Id: lonprintout.pm,v 1.506 2007/07/25 23:20:38 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2885,7 +2885,7 @@
         Apache::lonhelper::dropdown->new();
  
 	addMessage("</td></tr><tr><td align='right'>".
-                   '<label="TABLE_CONTENTS_forminput">'.
+                   '<label for="TABLE_CONTENTS_forminput">'.
                    &mt('Print Table of Contents').
                    "</label>: </td><td>");
         $paramHash = Apache::lonhelper::getParamHash();
@@ -2937,6 +2937,7 @@
 	    my $stylevalue='$Apache::lonnet::env{"construct.style"}';
             my $randseedtext=&mt("Use random seed");
             my $stylefiletext=&mt("Use style file");
+            my $selectfiletext=&mt("Select style file");
 
 	    my $xmlfrag .= <<"RNDSEED";
 	    <message><tr><td align='right'>
@@ -2954,9 +2955,9 @@
 		<defaultvalue>
 	            return $stylevalue;
 	        </defaultvalue>
-             </string><message>&nbsp; <a href="javascript:openbrowser('helpform','style_file_forminput','sty')">Select style file</a> </td><tr><td></message>
+             </string><message>&nbsp; <a href="javascript:openbrowser('helpform','style_file_forminput','sty')">$selectfiletext</a> </td></tr><tr><td></td><td align="left"></message>
 	     <choices allowempty="1" multichoice="true" variable="showallfoils">
-                <choice computer="1">Show all foils?</choice>
+                <choice computer="1">Show all foils</choice>
              </choices>
 	     <message></td></tr></message>
 RNDSEED
@@ -3065,6 +3066,8 @@
     my $PageLayout=&mt('Page layout');
     my $NumberOfColumns=&mt('Number of columns');
     my $PaperType=&mt('Paper type');
+    my $landscape=&mt('Landscape');
+    my $portrait=&mt('Portrait');
     $result .= <<STATEHTML;
 
 <hr width="33%" />
@@ -3076,8 +3079,8 @@
   </tr>
   <tr>
     <td>
-      <label><input type="radio" name="${var}.layout" value="L" /> Landscape </label><br />
-      <label><input type="radio" name="${var}.layout" value="P" checked='1'  /> Portrait </label>
+      <label><input type="radio" name="${var}.layout" value="L" /> $landscape </label><br />
+      <label><input type="radio" name="${var}.layout" value="P" checked='1'  /> $portrait </label>
     </td>
     <td align="center">
       <select name="${var}.cols">
@@ -3233,15 +3236,19 @@
     }  else {
 	$size{'margin'} += 2.54;
     }
-    $result .= <<ELEMENTHTML;
+    my %text = ('format' => 'How should each column be formatted?',
+		'width'  => 'Width:',
+		'height' => 'Height:',
+		'margin' => 'Left Margin:',);
+    %text = &Apache::lonlocal::texthash(%text);
 
-  
+    $result .= <<ELEMENTHTML;
 
-<p>How should each column be formatted?</p>
+<p>$text{'format'}</p>
 
 <table cellpadding='3'>
   <tr>
-    <td align='right'><b>Width</b>:</td>
+    <td align='right'><b>$text{'width'}</b></td>
     <td align='left'><input type='text' name='$var.width' value="$size{'width'}" size='4' /></td>
     <td align='left'>
       <select name='$var.widthunit'>
@@ -3250,7 +3257,7 @@
     </td>
   </tr>
   <tr>
-    <td align='right'><b>Height</b>:</td>
+    <td align='right'><b>$text{'height'}</b></td>
     <td align='left'><input type='text' name="$var.height" value="$size{'height'}" size='4' /></td>
     <td align='left'>
       <select name='$var.heightunit'>
@@ -3259,7 +3266,7 @@
     </td>
   </tr>
   <tr>
-    <td align='right'><b>Left margin</b>:</td>
+    <td align='right'><b>$text{'margin'}</b></td>
     <td align='left'><input type='text' name='$var.lmargin' value="$size{'margin'}" size='4' /></td>
     <td align='left'>
       <select name='$var.lmarginunit'>
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.160 loncom/interface/lonhelper.pm:1.161
--- loncom/interface/lonhelper.pm:1.160	Mon Dec 18 16:48:47 2006
+++ loncom/interface/lonhelper.pm	Wed Jul 25 19:20:38 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # .helper XML handler to implement the LON-CAPA helper
 #
-# $Id: lonhelper.pm,v 1.160 2006/12/18 21:48:47 albertel Exp $
+# $Id: lonhelper.pm,v 1.161 2007/07/25 23:20:38 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1024,7 +1024,7 @@
 sub render {
     my $self = shift;
 
-    return &mtn($self->{MESSAGE_TEXT});
+    return $self->{MESSAGE_TEXT};
 }
 # If a NEXTSTATE was given, switch to it
 sub postprocess {
@@ -1477,7 +1477,7 @@
             $choiceLabel = &$choiceLabel($helper, $self);
         }
         $result .= "/></td><td> ".qq{<label for="id$id">}.
-            $choiceLabel. "</label></td>";
+            &mtn($choiceLabel). "</label></td>";
 	if ($choice->[4]) {
 	    $result .='<td><input type="text" size="5" name="'
 		.$choice->[4].'_forminput" value="'