[LON-CAPA-cvs] cvs: rat / lonambiguous.pm lonpage.pm lonratedt.pm lonsequence.pm loncom/interface londocs.pm loncom/localize/localize de.pm loncom/publisher lonpubdir.pm

www lon-capa-cvs@mail.lon-capa.org
Mon, 22 Sep 2003 03:02:06 -0000


This is a MIME encoded message

--www1064199726
Content-Type: text/plain

www		Sun Sep 21 23:02:06 2003 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
    /loncom/localize/localize	de.pm 
    /loncom/publisher	lonpubdir.pm 
    /rat	lonambiguous.pm lonpage.pm lonratedt.pm lonsequence.pm 
  Log:
  Internationalizing.
  
  
--www1064199726
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20030921230206.txt"

Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.82 loncom/interface/londocs.pm:1.83
--- loncom/interface/londocs.pm:1.82	Sun Sep 21 17:40:06 2003
+++ loncom/interface/londocs.pm	Sun Sep 21 23:02:05 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.82 2003/09/21 21:40:06 www Exp $
+# $Id: londocs.pm,v 1.83 2003/09/22 03:02:05 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1097,7 +1097,7 @@
 <input type="text" size="20" name="importmap">
 <input type=button 
 onClick="javascript:openbrowser('simpleeditsupplement','importmap','sequence,page','')"
-value="Select Map"><input type="submit" name="loadmap" value="Load Map">
+value="$lt{'selm'}"><input type="submit" name="loadmap" value="$lt{'load'}">$help{'Load_Map'}
 </p>
 </form>
 </td><td bgcolor="#DDDDDD">
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.18 loncom/localize/localize/de.pm:1.19
--- loncom/localize/localize/de.pm:1.18	Sun Sep 21 20:48:32 2003
+++ loncom/localize/localize/de.pm	Sun Sep 21 23:02:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.18 2003/09/22 00:48:32 www Exp $
+# $Id: de.pm,v 1.19 2003/09/22 03:02:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -110,6 +110,36 @@
 
    'Submit'
 => 'Speichern',
+
+   'Rename'
+=> 'Umbenennen',
+
+   'Save'
+=> 'Speichern',
+
+   'Done'
+=> 'Fertig',
+
+   'Select User'
+=> 'Benutzer auswählen',
+
+   'Select Course'
+=> 'Kurs auswählen',
+
+   'Changes will become active for your current session after'
+=> 'Änderungen werden für Ihre derzeitige Sitzung aktiv nachdem Sie den Kurs',
+
+   're-initializing course'
+=> 'reinitialisiert',
+
+   ', or the next time you log in.'
+=> 'haben, oder wenn Sie das nächste Mal einloggen.',
+
+   'Uploaded Document'
+=> 'Hochgeladenes Dokument',
+
+   'No content modifications yet.'
+=> 'Noch keine Inhaltsänderungen.',
 
    'Part is not open to be viewed. It'
 => 'Aufgabenteil nicht verfügbar. Er',
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.38 loncom/publisher/lonpubdir.pm:1.39
--- loncom/publisher/lonpubdir.pm:1.38	Sat Sep 20 23:30:02 2003
+++ loncom/publisher/lonpubdir.pm	Sun Sep 21 23:02:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.38 2003/09/21 03:30:02 taceyjo1 Exp $
+# $Id: lonpubdir.pm,v 1.39 2003/09/22 03:02:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -48,6 +48,7 @@
 use Apache::Constants qw(:common :http :methods);
 use Apache::loncacc;
 use Apache::loncommon();
+use Apache::lonlocal;
 
 sub handler {
 
@@ -103,8 +104,10 @@
   # Start off the diretory table.
 
   $r->print('<table border=2>'.
-	    '<tr><th>Actions</th><th>Name</th><th>Title</th>'.
-	    '<th>Status</th><th>Last Modified</th></tr>');
+	    '<tr><th>'.&mt('Actions').'</th><th>'.&mt('Name').'</th><th>'.
+	    &mt('Title').'</th>'.
+	    '<th>'.&mt('Status').'</th><th>'.&mt('Last Modified').
+	    '</th></tr>');
 
   my $filename;
   my $dirptr=16384;		# Mask indicating a directory in stat.cmode.
@@ -182,7 +185,7 @@
 sub startpage {
     my ($r, $uname, $udom, $thisdisfn) = @_;
     
-    $r->content_type('text/html');
+    &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
     
     $r->print('<html><head><title>LON-CAPA Construction Space</title></head>');
@@ -210,7 +213,7 @@
 </script>
 ENDPUBDIRSCRIPT
 
-    $r->print('<h1>Construction Space Directory <tt>'.
+    $r->print('<h1>'.&mt('Construction Space Directory').' <tt>'.
 	      $thisdisfn.'/</tt></h1>'.
 	      '<script type="text/javascript">top.document.title = \''.
 	      $thisdisfn.'/ - LON-CAPA Construction Space\';</script>'.
@@ -225,7 +228,7 @@
                $uname.$thisdisfn."/default.meta'".'" value="Edit Directory Catalog Information" /></td></tr><tr><td><input type="checkbox" name="forcerepub" /> Force publication of unmodified files.</td><td>&nbsp;</td></tr></table></form>');
     
     if (($uname ne $ENV{'user.name'}) || ($udom ne $ENV{'user.domain'})) {
-	$r->print('<h3>Co-Author: '.$uname.' at '.$udom.
+	$r->print('<h3>'.&mt('Co-Author').': '.$uname.' at '.$udom.
 		  '</h3>');
     }
 }
@@ -266,7 +269,7 @@
     
     my $disfilename = $dirname;
     if ($dirname eq '..') {
-	$disfilename = '<i>Parent Directory</i>';
+	$disfilename = '<i>'.&mt('Parent Directory').'</i>';
     }
     unless (( ($dirname eq '..') && ($reqfile eq '')) ||
 	    ($dirname eq '.')) {
@@ -320,11 +323,11 @@
     my $editlink='';
     my $editlink2='';
     if ($filename=~/\.(xml|html|htm|xhtml|xhtm|sty)$/) {
-	$editlink=' (<a href="'.$linkdir.'/'.$filename.'?forceedit=1" target="_top">Edit</a>)';
+	$editlink=' (<a href="'.$linkdir.'/'.$filename.'?forceedit=1" target="_top">'.&mt('Edit').'</a>)';
     }
     if ($filename=~/\.(problem|exam|quiz|assess|survey|form|library)$/) {
-	$editlink=' (<a href="'.$linkdir.'/'.$filename.'?forceedit=1" target="_top">EditXML</a>)';
-	$editlink2=' (<a href="'.$linkdir.'/'.$filename.'?forceColoredit=1" target="_top">Edit</a>)';
+	$editlink=' (<a href="'.$linkdir.'/'.$filename.'?forceedit=1" target="_top">'.&mt('EditXML').'</a>)';
+	$editlink2=' (<a href="'.$linkdir.'/'.$filename.'?forceColoredit=1" target="_top">'.&mt('Edit').'</a>)';
     }
     $r->print('<tr bgcolor="'.$bgcolor.'">'.
 	      '<td><a target="_parent" href="/adm/publish?filename=/~'.
Index: rat/lonambiguous.pm
diff -u rat/lonambiguous.pm:1.9 rat/lonambiguous.pm:1.10
--- rat/lonambiguous.pm:1.9	Sat Apr 12 11:43:58 2003
+++ rat/lonambiguous.pm	Sun Sep 21 23:02:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to resolve ambiguous file locations
 #
-# $Id: lonambiguous.pm,v 1.9 2003/04/12 15:43:58 www Exp $
+# $Id: lonambiguous.pm,v 1.10 2003/09/22 03:02:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -38,6 +38,7 @@
 use Apache::Constants qw(:common REDIRECT);
 use GDBM_File;
 use Apache::loncommon;
+use Apache::lonlocal;
 
 my %bighash;
 
@@ -54,6 +55,7 @@
 
 sub getlost {
     my ($r,$errmsg)=@_;
+    $errmsg=&mt($errmsg);
     $r->content_type('text/html');
     $r->send_http_header;
     $r->print(
@@ -69,7 +71,7 @@
    my $r=shift;
 
    if ($r->header_only) {
-      $r->content_type('text/html');
+      &Apache::loncommon::content_type($r,'text/html');
       $r->send_http_header;
       return OK;
    }
Index: rat/lonpage.pm
diff -u rat/lonpage.pm:1.52 rat/lonpage.pm:1.53
--- rat/lonpage.pm:1.52	Sat Jul 19 09:11:41 2003
+++ rat/lonpage.pm	Sun Sep 21 23:02:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Page Handler
 #
-# $Id: lonpage.pm,v 1.52 2003/07/19 13:11:41 ng Exp $
+# $Id: lonpage.pm,v 1.53 2003/09/22 03:02:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -145,9 +145,9 @@
 
   if ($r->header_only) {
        if ($ENV{'browser.mathml'}) {
-           $r->content_type('text/xml');
+           &Apache::loncommon::content_type($r,'text/xml');
        } else {
-           $r->content_type('text/html'); 
+           &Apache::loncommon::content_type($r,'text/html'); 
        }
        $r->send_http_header;
        return OK;
@@ -331,20 +331,20 @@
                      } 
                   }
                   unless ($contents) {
-                      $r->content_type('text/html');
+                      &Apache::loncommon::content_type($r,'text/html');
                       $r->send_http_header;
-                      $r->print('<html><body>Empty page.</body></html>');
+                      $r->print('<html><body>'.&mt('Empty page').'.</body></html>');
                   } else {
 # ------------------------------------------------------------------ Build page
 
 # ---------------------------------------------------------------- Send headers
 		      unless ($target eq 'tex') {
 			  if ($isxml) {
-			      $r->content_type('text/xml');
+			      &Apache::loncommon::content_type($r,'text/xml');
 			      $r->send_http_header;
 			      $r->print($xmlheader);
 			  } else {
-			      $r->content_type('text/html');
+			      &Apache::loncommon::content_type($r,'text/html');
 			      $r->send_http_header;
 			      $r->print('<html>');
 			  }
Index: rat/lonratedt.pm
diff -u rat/lonratedt.pm:1.46 rat/lonratedt.pm:1.47
--- rat/lonratedt.pm:1.46	Fri Jul 25 00:14:32 2003
+++ rat/lonratedt.pm	Sun Sep 21 23:02:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Edit Handler for RAT Maps
 #
-# $Id: lonratedt.pm,v 1.46 2003/07/25 04:14:32 bowersj2 Exp $
+# $Id: lonratedt.pm,v 1.47 2003/09/22 03:02:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -173,6 +173,7 @@
 use Apache::lonratsrv;
 use Apache::lonsequence;
 use Apache::loncommon;
+use Apache::lonlocal;
 use File::Copy;
 
 use vars qw(@order @resources);
@@ -907,6 +908,22 @@
 # ----------------------------------------------------- Start simple RAT screen
    my $editscript=&editscript('simple');
    my $bodytag=&Apache::loncommon::bodytag(undef,undef,undef,1);
+   my %lt=&Apache::lonlocal::texthash(
+				      'sa' => 'Save',
+				      'nt' => 'New Title',
+				      'se' => 'Search',
+				      'im' => 'Import',
+				      'vi' => 'View',
+				      'lm' => 'Load Map',
+				      'ds' => 'Discard Selected',
+				      'ca' => 'Clear All',
+				      'ta' => 'Temporary Assembly Workspace',
+				      'rv' => 'Revert to Last Saved',
+                                      'sa' => 'Save',
+                                      'mu' => 'Move Up',
+                                      'md' => 'Move Down',
+                                      're' => 'Rename',
+				      );
    $r->print(<<ENDSMPHEAD);
 <html>
 <head>
@@ -943,7 +960,7 @@
        oldname=unescape(nameparts.join('"'));
        nameparts=oldname.split('&#39;');
        oldname=unescape(nameparts.join("'"));
-       newtitle=prompt('New Title',oldname);
+       newtitle=prompt('$lt{'nt'}',oldname);
        if (newtitle) {
            document.forms.simpleedit.renameres.value=1;
            document.forms.simpleedit.renameidx.value=selidx;
@@ -963,37 +980,37 @@
 <input type=hidden name=renametitle value=''>
 <input type=hidden name=renameidx value=0>
 <table>
-    <tr><th width="40%">Temporary Assembly Workspace</th>
+    <tr><th width="40%">$lt{'ta'}</th>
 <th>&nbsp;</th>
 <th width="40%">File: $url</th></tr>
 <tr><td bgcolor="#FFFFCC">
-<input type=button onClick="javascript:groupsearch()" value="Search">
-<input type=button onClick="javascript:groupimport();" value="Import">
+<input type=button onClick="javascript:groupsearch()" value="$lt{'se'}">
+<input type=button onClick="javascript:groupimport();" value="$lt{'im'}">
 after selected
 <hr>
 <input type=text size=20 name=importmap>
 <input type=button 
 onClick="javascript:openbrowser('simpleedit','importmap','sequence,page','')"
-value="Select Map"><input type=submit name=loadmap value="Load Map"><hr>
-<input type=submit name="discard" value="Discard Selected">
-<input type=submit name="clear" value="Clear All">
-<input type=button onClick="javascript:viewimport()" value="View">
+value="Select Map"><input type=submit name=loadmap value="$lt{'lm'}"><hr>
+<input type=submit name="discard" value="$lt{'ds'}">
+<input type=submit name="clear" value="$lt{'ca'}">
+<input type=button onClick="javascript:viewimport()" value="$lt{'vi'}">
 
     </td><td>&nbsp;</td><td bgcolor="#FFFFCC">
 
 <input type=button onClick=
-"javascript:impfortarget.value=1;groupsearch()" value="Search">
+"javascript:impfortarget.value=1;groupsearch()" value="$lt{'se'}">
 <input type=button onClick=
-"javascript:impfortarget.value=1;groupimport();" value="Import">
+"javascript:impfortarget.value=1;groupimport();" value="$lt{'im'}">
 after selected
 <hr>
-<input type=submit name="moveup" value="Move Up">
-<input type=submit name="movedown" value="Move Down">
-<input type=button onClick="javascript:renametarget()" value="Rename">
+<input type=submit name="moveup" value="$lt{'mu'}">
+<input type=submit name="movedown" value="$lt{'md'}">
+<input type=button onClick="javascript:renametarget()" value="$lt{'re'}">
 <hr>$targetmsg
-<input type=submit name="revert" value="Revert to Last Saved">
-<input type=submit name="save" value="Save">
-<input type=button onClick="javascript:viewtarget()" value="View">
+<input type=submit name="revert" value="$lt{'rv'}">
+<input type=submit name="save" value="$lt{'sa'}">
+<input type=button onClick="javascript:viewtarget()" value="$lt{'vi'}">
 </td></tr>
 
 <tr><td bgcolor="#FFFFCC"><select name="importsel" size=10 multiple>
@@ -1049,7 +1066,7 @@
     my $idx=0;
     $r->print('<h1>'.$url.'</h1>');
     if ($adv) {
-	$r->print('<p><b><font color="red">Map contents are not shown in order.</font></b></p><br />');
+	$r->print('<p><b><font color="red">'.&mt('Map contents are not shown in order.').'</font></b></p><br />');
     }
     foreach (&attemptread(&Apache::lonnet::filelocation('',$url))) {
 	if (defined($_)) {
@@ -1074,7 +1091,7 @@
 
 sub handler {
   my $r=shift;
-  $r->content_type('text/html');
+  &Apache::loncommon::content_type($r,'text/html');
   $r->send_http_header;
 
   return OK if $r->header_only;
Index: rat/lonsequence.pm
diff -u rat/lonsequence.pm:1.15 rat/lonsequence.pm:1.16
--- rat/lonsequence.pm:1.15	Mon Apr  7 16:47:06 2003
+++ rat/lonsequence.pm	Sun Sep 21 23:02:06 2003
@@ -2,7 +2,7 @@
 #
 # Sequence Handler
 #
-# $Id: lonsequence.pm,v 1.15 2003/04/07 20:47:06 www Exp $
+# $Id: lonsequence.pm,v 1.16 2003/09/22 03:02:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -46,6 +46,7 @@
 use Apache::lonratsrv;
 use Apache::lonpageflip;
 use Apache::loncommon;
+use Apache::lonlocal;
 
 my %selhash;
 my $successtied;
@@ -164,7 +165,7 @@
 # ----------------------------- successtied is now '1' if in working selectmode
     my ($errtext,$fatal)=&mapread(&Apache::lonnet::filelocation('',$url),'');
     if ($fatal==1) {
-       $r->print('<p><b><font color="red">Map contents are not shown in order.</font></b></p><br />');
+       $r->print('<p><b><font color="red">'.&mt('Map contents are not shown in order.').'</font></b></p><br />');
     }
     my $idx=0;
     foreach (&attemptread(&Apache::lonnet::filelocation('',$url))) {
@@ -177,7 +178,7 @@
             $title=~s/\&colon\;/\:/g;
             $url=~s/\&colon\;/\:/g;
             unless ($title) { $title=(split(/\//,$url))[-1] };
-            unless ($title) { $title='<i>Empty</i>'; }
+            unless ($title) { $title='<i>'.&mt('Empty').'</i>'; }
             if ($url) {
 		if ($successtied) {
 		    my $checked='';
@@ -229,7 +230,7 @@
    my $r=shift;
 
    if ($r->header_only) {
-      $r->content_type('text/html');
+      &Apache::loncommon::content_type($r,'text/html');
       $r->send_http_header;
       return OK;
    }
@@ -295,11 +296,11 @@
 # -------------------------------------------------- Has first or last resource
       &Apache::lonnet::symblist($requrl,$disurl => $dismapid,
                    'last_known' => &Apache::lonnet::declutter($disurl)); 
-      $r->content_type('text/html');
+      &Apache::loncommon::content_type($r,'text/html');
       $r->header_out(Location => 'http://'.$ENV{'HTTP_HOST'}.$disurl);
       return REDIRECT;
    } else {
-       $r->content_type('text/html');
+       &Apache::loncommon::content_type($r,'text/html');
        $r->send_http_header;
        &viewmap($r,$requrl);
        return OK;

--www1064199726--