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

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Wed, 16 Jan 2008 12:08:07 -0000


bisitz		Wed Jan 16 07:08:07 2008 EDT

  Modified files:              
    /loncom/publisher	lonpubdir.pm 
  Log:
  Localization: added missing $mt(...), $lt{...}
  
  
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.105 loncom/publisher/lonpubdir.pm:1.106
--- loncom/publisher/lonpubdir.pm:1.105	Fri Nov  2 15:24:44 2007
+++ loncom/publisher/lonpubdir.pm	Wed Jan 16 07:08:04 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.105 2007/11/02 19:24:44 albertel Exp $
+# $Id: lonpubdir.pm,v 1.106 2008/01/16 12:08:04 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -105,7 +105,7 @@
   my $numres = 0;
   
   # Start off the directory table.
-  $r->print('<h3>Directory Contents:</h3>');
+  $r->print('<h3>'.&mt('Directory Contents:').'</h3>');
   $r->print('<table id="LC_browser"><tr>'.
             '<th>'.&mt('Type').'</th>'.
             '<th>'.&mt('Actions').'</th>'.
@@ -197,7 +197,7 @@
     my $formaction='/priv/'.$uname.$thisdisfn.'/';
     $formaction=~s|/+|/|g;
     my $pagetitle .= &Apache::loncommon::help_open_menu('','',3,'Authoring').
-        '<font face="Arial, Helvetica, sans-serif" size="+1"><b>Construction Space</b>:</font>&nbsp;'.
+        '<font face="Arial, Helvetica, sans-serif" size="+1"><b>'.&mt('Construction Space').'</b>:</font>&nbsp;'.
         '<form name="dirs" method="post" action="'.$formaction.
         '" target="_parent"><tt><b>'.
         &Apache::lonhtmlcommon::crumbs($uname.$thisdisfn.'/','_top','/priv','','+1',1)."</b></tt><br />".
@@ -207,11 +207,11 @@
     &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction);
     if ($env{'environment.remote'} eq 'off') {
 	$env{'request.noversionuri'}=$currdir.'/';
-	$r->print(&Apache::loncommon::start_page('Construction Space',undef,
+	$r->print(&Apache::loncommon::start_page(&mt('Construction Space'),undef,
 						 {'body_title' =>
 						      $pagetitle,}));
     } else {
-	$r->print(&Apache::loncommon::start_page('Construction Space',undef,
+	$r->print(&Apache::loncommon::start_page(&mt('Construction Space'),undef,
 						 { 'only_body' => 1,}));
 	$r->print($pagetitle);
     }
@@ -219,7 +219,7 @@
     my $esc_thisdisfn = &Apache::loncommon::escape_single($thisdisfn);
     my $pubdirscript=(<<ENDPUBDIRSCRIPT);
 <script type="text/javascript">
-top.document.title = '$esc_thisdisfn/ - LON-CAPA Construction Space';
+top.document.title = '$esc_thisdisfn/ - '.&mt('LON-CAPA Construction Space');
 // Store directory location for menu bar to find
 
 parent.lastknownpriv='/~$uname$esc_thisdisfn/';
@@ -369,6 +369,7 @@
 				       updc => 'Upload a new document',
 				       pick => 'Please select an action to perform using the new filename',
                                       );
+    my $mytype = $lt{'type'}; # avoid conflict with " and ' in javascript
     $r->print(<<END);
         <table id="LC_cstr_controls">
          <tr>
@@ -429,7 +430,7 @@
                     <option value="newtaskfile">$lt{'nbt'}:</option>
                     <option value="newlibraryfile">$lt{'nlib'}:</option>
 	            <option value="newdir">$lt{'nsub'}:</option>
-		  </select>&nbsp;<input type="text" name="newfilename" value="Type Name Here" onfocus="if (this.value == 'Type Name Here') this.value=''" />&nbsp;<input type="button" value="Go" onclick="validate_go();" />
+		  </select>&nbsp;<input type="text" name="newfilename" value="$lt{'type'}" onfocus="if (this.value == '$mytype') this.value=''" />&nbsp;<input type="button" value="Go" onclick="validate_go();" />
 		 </span>
 		</form>
 	  </td>