[LON-CAPA-cvs] cvs: loncom(trans_test) /interface lonmsgdisplay.pm

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 23 Dec 2006 06:22:37 -0000


albertel		Sat Dec 23 01:22:37 2006 EDT

  Modified files:              (Branch: trans_test)
    /loncom/interface	lonmsgdisplay.pm 
  Log:
  - some test ideas about tranlating
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.56 loncom/interface/lonmsgdisplay.pm:1.56.2.1
--- loncom/interface/lonmsgdisplay.pm:1.56	Sat Dec 23 01:19:10 2006
+++ loncom/interface/lonmsgdisplay.pm	Sat Dec 23 01:22:36 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.56 2006/12/23 06:19:10 albertel Exp $
+# $Id: lonmsgdisplay.pm,v 1.56.2.1 2006/12/23 06:22:36 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -301,20 +301,16 @@
     $start++; $maxdis++;$first++;$finish++;
 
     my %statushash = &get_msgstatus_types();
-    my $status;
-    if ($msgstatus eq '') {
-        $status = &mt('All');
-    } else {
-        $status = $statushash{$msgstatus};
-    }
+
     return
-   '<b>'.&mt('Page').'</b>: '. 
-   '<input type="submit" name="firstview" value="'.&mt('First').'" />'.
-   '<input type="submit" name="prevview" value="'.&mt('Previous').'" />'.
-   '<input type="text" size="5" name="startdis" value="'.$start.'" onChange="this.form.submit()" /> of '.$maxdis.
-   '<input type="submit" name="nextview" value="'.&mt('Next').'" />'.
-   '<input type="submit" name="lastview" value="'.&mt('Last').'" /><br />'.
-   &mt('<b>[_1] messages</b>: showing messages [_2] through [_3] of [_4].',$status,$first,$finish,$total).'</form>';
+	'<b>'.&mt('Page').'</b>: '. 
+	'<input type="submit" name="firstview" value="'.&mt('First').'" />'.
+	'<input type="submit" name="prevview" value="'.&mt('Previous').'" />'.
+	'<input type="text" size="5" name="startdis" value="'.$start.'" onChange="this.form.submit()" /> of '.$maxdis.
+	'<input type="submit" name="nextview" value="'.&mt('Next').'" />'.
+	'<input type="submit" name="lastview" value="'.&mt('Last').'" /><br />'.
+	&mt('_location_in_mail_folder',$msgstatus,$statushash{$msgstatus},
+	    $first,$finish,$total).'</form>';
 }
 # =============================================================== Status Change
 
@@ -393,8 +389,8 @@
     my @messages = &Apache::lonnet::getkeys('nohist_email'.$suffix);
     if (@messages > 0) {
         return &mt('The folder "[_1]" contains messages so it may not be deleted.',$folder).
-               '<br />'.
-               &mt('Delete or move the messages to a different folder first.');
+		'<br />'.
+		&mt('Delete or move the messages to a different folder first.');
     }
     my $delresult = &Apache::lonnet::del('email_folders',[$folder]);
     return $delresult;
@@ -965,13 +961,9 @@
     my @temp=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus);
     my $totalnumber=$#temp+1;
     if ($totalnumber < 1) {
-        if ($msgstatus eq '') {
-	    $r->print('<h2>'.&mt('Empty Folder').'</h2>');
-        } elsif ($msgstatus eq 'replied') {
-            $r->print('<h2>'.&mt('You have not replied to any messages in this folder.').'</h2>');
-        } else { 
-            $r->print('<h2>'.&mt('There are no '.lc($statushash{$msgstatus}).' messages in this folder.').'</h2>');
-        }
+	$r->print('<h2>'.&mt('_empty_mail_folder',
+			     $msgstatus,
+			     $statushash{$msgstatus}).'</h2>');
 	return;
     }
     unless ($interdis) {