[LON-CAPA-cvs] cvs: loncom /cgi clusterstatus.pl

bisitz bisitz at source.lon-capa.org
Wed May 28 14:16:09 EDT 2014


bisitz		Wed May 28 18:16:09 2014 EDT

  Modified files:              
    /loncom/cgi	clusterstatus.pl 
  Log:
  - Internationalization
      - Improve: do not translate individual machine id
      - Re-use existing phrases
  - Consistent punctuation and spacing
  
  
  
Index: loncom/cgi/clusterstatus.pl
diff -u loncom/cgi/clusterstatus.pl:1.27 loncom/cgi/clusterstatus.pl:1.28
--- loncom/cgi/clusterstatus.pl:1.27	Thu Jan 15 22:34:18 2009
+++ loncom/cgi/clusterstatus.pl	Wed May 28 18:16:09 2014
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 $|=1;
 # Generates a html page showing various status reports about the domain or cluster
-# $Id: clusterstatus.pl,v 1.27 2009/01/15 22:34:18 raeburn Exp $
+# $Id: clusterstatus.pl,v 1.28 2014/05/28 18:16:09 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -165,7 +165,7 @@
 #
 # Actually do the query
 #
-    &statuslist($local,'connecting '.$remote);
+    &statuslist($local,&mt('connecting [_1]',$remote),1);
     my $reply=&request($local,$url,3600);
     $reply=(split("\n",$reply))[0];
     $reply=~s/\W//g;
@@ -297,7 +297,7 @@
                                           vers => 'Version:',
                                           load => 'Load:',
                                           acti => 'Active Users:',
-                                          rpms => 'RPMs',
+                                          rpms => 'RPMs:',
                                           mysq => 'MySQL Database:',
                                           notc => 'Not connected',
                                           lonc => 'loncron errors',
@@ -654,13 +654,18 @@
 
 # ====================================================================== Status
 sub statuslist {
-    my ($local,$what)=@_;
+    my ($local,$what,$nomt)=@_;
     my $displaylocal;
     if (defined($local)) {
         $displaylocal = " $local ($hostname{$local})";
     }
-    print '<script>document.prgstat.progress.value="'. 
-          &Apache::lonlocal::mt("Testing[_1]: $what",$displaylocal).'";</script>'."\n";
+    my $output = &Apache::lonlocal::mt('Testing[_1]:',$displaylocal).' ';
+    if ($nomt) {
+        $output .= $what;
+    } else {
+        $output .= &Apache::lonlocal::mt($what);
+    }
+    print '<script>document.prgstat.progress.value="'.$output.'";</script>'."\n";
 }
 
 # =============================================================================
@@ -776,10 +781,10 @@
     if (!$FORM{'runonetime'}) {
         my $lcscope = lc($scope);
 	print '<h3>'.&Apache::lonlocal::mt("Gathering initial $lcscope data").'</h3>'.
-              &Apache::lonlocal::mt('This may take some time ..').'<br />';
+              &Apache::lonlocal::mt('This may take some time ...').'<br />';
 	$fromcache=0;
 	&mainloop();
-	&statuslist(undef,'Done initial run.');
+	&statuslist(undef,'Done initial run');
 	&reports();
     } else {
 	$fromcache=1;
@@ -792,7 +797,7 @@
     &hidden('runonetime',1);
     print '<tt><br />'.&Apache::lonlocal::mt('Total number of queries: [_1]',$stat_total);
     if ($stat_total != 0) {
-        print '<br />'.&Apache::lonlocal::mt('Percent complete:').''.
+        print '<br />'.&Apache::lonlocal::mt('Percent complete:').' '.
 	      int(($stat_total-$stat_notyet)/$stat_total*100.).
 	      '<br />'.&Apache::lonlocal::mt('Percent from cache:').' '.
               int($stat_fromcache/$stat_total*100.).'</tt>';




More information about the LON-CAPA-cvs mailing list