[LON-CAPA-cvs] cvs: loncom /html/res/adm/pages/bookmarkmenu admbookmarks.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 11 Apr 2006 15:51:25 -0000


albertel		Tue Apr 11 11:51:25 2006 EDT

  Modified files:              
    /loncom/html/res/adm/pages/bookmarkmenu	admbookmarks.pm 
  Log:
   - internationalization
  
  
Index: loncom/html/res/adm/pages/bookmarkmenu/admbookmarks.pm
diff -u loncom/html/res/adm/pages/bookmarkmenu/admbookmarks.pm:1.34 loncom/html/res/adm/pages/bookmarkmenu/admbookmarks.pm:1.35
--- loncom/html/res/adm/pages/bookmarkmenu/admbookmarks.pm:1.34	Tue Apr 11 11:46:54 2006
+++ loncom/html/res/adm/pages/bookmarkmenu/admbookmarks.pm	Tue Apr 11 11:51:25 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The bookmarks handler
 #
-# $Id: admbookmarks.pm,v 1.34 2006/04/11 15:46:54 albertel Exp $
+# $Id: admbookmarks.pm,v 1.35 2006/04/11 15:51:25 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -37,6 +37,7 @@
 use Apache::Constants qw(:common);
 use Apache::lonnet;
 use Apache::loncommon();
+use Apache::lonlocal;
 
 # --------------------------------------------------------------Put bookmarks
 
@@ -125,8 +126,10 @@
 					'bgcolor'   => '#BBBBBB',});
 
     my $end_page =  &Apache::loncommon::end_page();
+    
+    my $close = $mt('Close Window');
 
- return(<<END_ERROR)
+    return(<<END_ERROR)
 $start_page
   <table bgcolor="#FFFFFF" width="100%" height="90%" align="center">
    <td>
@@ -137,7 +140,8 @@
   </table>
   <center>
    <form>
-    <input type="button" name="close" value="close window" onClick="javascript:window.close();" />
+    <input type="button" name="close" value="$close" 
+           onclick="javascript:window.close();" />
    </form>
   </center>
 $end_page
@@ -154,12 +158,15 @@
 
     my $end_page =  &Apache::loncommon::end_page();
 
+    my $msg = &mt('Bookmarks saved. ([_1]Continue[_2])',
+		  '<a href="/res/adm/pages/bookmarkmenu/bookmarkmenu_toolbar.html" target="_self">',
+		  '</a>');
+
     return(<<END_TOOLBAR)
 $start_page
 <div align="bottom">
 <center>
-Bookmarks saved. 
-[ <a href="/res/adm/pages/bookmarkmenu/bookmarkmenu_toolbar.html" target="_self">Continue</a> ]
+$msg
 </center>
 </div>
 $end_page
@@ -191,7 +198,7 @@
     my %marks;
     my $save_mark;
     my $page;
-    $r->content_type('text/html');
+    &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
     if (defined($env{'form.hiddenbookmarks'})) {
 	$marks{'bookmarks'}=$env{'form.hiddenbookmarks'};
@@ -202,7 +209,7 @@
 	if (exists($marks{"con_lost"})) {
 	    #$page = construct_editor($marks{'bookmarks'});  # Delete this line and uncomment next
 	    # in order to re-enable connection detection
-	    $page=&construct_error("Connection broken with home server. Please contact your system administrator");
+	    $page=&construct_error(&mt("Connection broken with home server. Please contact your system administrator."));
 	} else {
 	    if (defined($env{'form.address'})) {
 		$page=&add_bookmark($env{'form.address'},$env{'form.title'},$marks{'bookmarks'});