[LON-CAPA-cvs] cvs: loncom /publisher londiff.pm

sakharuk lon-capa-cvs@mail.lon-capa.org
Wed, 10 Dec 2003 15:42:49 -0000


sakharuk		Wed Dec 10 10:42:49 2003 EDT

  Modified files:              
    /loncom/publisher	londiff.pm 
  Log:
  Localization is done.
  
  
Index: loncom/publisher/londiff.pm
diff -u loncom/publisher/londiff.pm:1.12 loncom/publisher/londiff.pm:1.13
--- loncom/publisher/londiff.pm:1.12	Wed Aug 13 11:20:11 2003
+++ loncom/publisher/londiff.pm	Wed Dec 10 10:42:49 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to show differences between file versions
 #
-# $Id: londiff.pm,v 1.12 2003/08/13 15:20:11 www Exp $
+# $Id: londiff.pm,v 1.13 2003/12/10 15:42:49 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -54,6 +54,7 @@
 use Apache::loncacc;
 use Apache::lonnet();
 use Apache::loncommon();
+use Apache::lonlocal;
 
 sub handler {
 
@@ -95,10 +96,10 @@
 
   $r->print('<html><head><title>LON-CAPA Construction Diffs</title></head>');
 
-  $r->print(&Apache::loncommon::bodytag('Resource Differences'));
+  $r->print(&Apache::loncommon::bodytag(&mt('Resource Differences')));
 
   
-  $r->print('<h1>Compare versions of <tt>'.$efn.'</tt></h1>');
+  $r->print('<h1>'.&mt('Compare versions of').' <tt>'.$efn.'</tt></h1>');
    
        if (($cuname ne $ENV{'user.name'}) || ($cudom ne $ENV{'user.domain'})) {
           $r->print('<h3><font color=red>Co-Author: '.$cuname.' at '.$cudom.
@@ -119,22 +120,22 @@
              $f1[$#f1+1]=$line;
 	 }
       }
-      $r->print('<b>Construction Space Version</b>');
+      $r->print('<b>'.&mt('Construction Space Version').'</b>');
   } else {
       my $fn=
        '/home/httpd/html//res/'.$cudom.'/'.$cuname.'/';
       if ($ENV{'form.versionone'}) {
          my ($main,$suffix)=($efn=~/^(.+)\.(\w+)$/);
          $fn.=$main.'.'.$ENV{'form.versionone'}.'.'.$suffix;
-	 $r->print('<b>Version '.$ENV{'form.versionone'}.'</b>');
+	 $r->print('<b>'.&mt('Version').' '.$ENV{'form.versionone'}.'</b>');
       } else {
          $fn.=$efn;
-	 $r->print('<b>Current Version</b>');
+	 $r->print('<b>'.&mt('Current Version').'</b>');
       }
       @f1=split(/\n/,&Apache::lonnet::getfile($fn));      
   }
 
-  $r->print('</font><br />versus<br /><font color="green">');
+  $r->print('</font><br />'.&mt('versus').'<br /><font color="green">');
 
   if ($ENV{'form.versiontwo'} eq 'priv') {
       my $fn='/home/'.$cuname.'/public_html/'.$efn;
@@ -146,17 +147,17 @@
              $f2[$#f2+1]=$line;
 	 }
       }
-      $r->print('<b>Construction Space Version</b>');
+      $r->print('<b>'.&mt('Construction Space Version').'</b>');
   } else {
       my $fn=
        '/home/httpd/html/res/'.$cudom.'/'.$cuname.'/';
       if ($ENV{'form.versiontwo'}) {
          my ($main,$suffix)=($efn=~/^(.+)\.(\w+)$/);
          $fn.=$main.'.'.$ENV{'form.versiontwo'}.'.'.$suffix;
-	 $r->print('<b>Version '.$ENV{'form.versiontwo'}.'</b>');
+	 $r->print('<b>'.&mt('Version').' '.$ENV{'form.versiontwo'}.'</b>');
       } else {
          $fn.=$efn;
-	 $r->print('<b>Current Version</b>');
+	 $r->print('<b>'.&mt('Current Version').'</b>');
       }
       @f2=split(/\n/,&Apache::lonnet::getfile($fn));      
   }
@@ -187,9 +188,9 @@
   $r->print('</pre>');
 
 } else {
-    $r->print('<h1><font color=red>Binary File</font></h1>');
+    $r->print('<h1><font color=red>'.&mt('Binary File').'</font></h1>');
 }
-  $r->print('<center><a href="javascript:window.close();">Close This Window</a></center></body></html>'); 
+  $r->print('<center><a href="javascript:window.close();">'.&mt('Close This Window').'</a></center></body></html>'); 
   return OK;  
 }