[LON-CAPA-cvs] cvs: loncom / loncapa_apache.conf /localize lonlocal.pm /localize/localize newphrases.txt /publisher lonconstruct.pm publisher.html

www lon-capa-cvs@mail.lon-capa.org
Wed, 10 Dec 2003 00:32:56 -0000


This is a MIME encoded message

--www1071016376
Content-Type: text/plain

www		Tue Dec  9 19:32:56 2003 EDT

  Modified files:              
    /loncom	loncapa_apache.conf 
    /loncom/localize	lonlocal.pm 
    /loncom/localize/localize	newphrases.txt 
    /loncom/publisher	lonconstruct.pm publisher.html 
  Log:
  Internationalize publisher.html
  
  
--www1071016376
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20031209193256.txt"

Index: loncom/loncapa_apache.conf
diff -u loncom/loncapa_apache.conf:1.65 loncom/loncapa_apache.conf:1.66
--- loncom/loncapa_apache.conf:1.65	Mon Dec  8 11:31:59 2003
+++ loncom/loncapa_apache.conf	Tue Dec  9 19:32:55 2003
@@ -1,7 +1,7 @@
 ##
 ## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
 ##
-## $Id: loncapa_apache.conf,v 1.65 2003/12/08 16:31:59 raeburn Exp $
+## $Id: loncapa_apache.conf,v 1.66 2003/12/10 00:32:55 www Exp $
 ##
 
 #
@@ -224,6 +224,14 @@
 PerlAccessHandler       Apache::lonacc
 SetHandler perl-script
 PerlHandler Apache::lonwrapper
+ErrorDocument     403 /adm/login
+ErrorDocument	  500 /adm/errorhandler
+</LocationMatch>
+
+<LocationMatch "^/adm/localize/">
+PerlAccessHandler       Apache::lonacc
+SetHandler perl-script
+PerlHandler Apache::lonlocal
 ErrorDocument     403 /adm/login
 ErrorDocument	  500 /adm/errorhandler
 </LocationMatch>
Index: loncom/localize/lonlocal.pm
diff -u loncom/localize/lonlocal.pm:1.26 loncom/localize/lonlocal.pm:1.27
--- loncom/localize/lonlocal.pm:1.26	Fri Nov  7 18:22:22 2003
+++ loncom/localize/lonlocal.pm	Tue Dec  9 19:32:56 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Localization routines
 #
-# $Id: lonlocal.pm,v 1.26 2003/11/07 23:22:22 www Exp $
+# $Id: lonlocal.pm,v 1.27 2003/12/10 00:32:56 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -161,6 +161,7 @@
 package Apache::lonlocal;
 
 use strict;
+use Apache::Constants qw(:common);
 use Apache::localize;
 use Apache::File;
 use locale;
@@ -315,6 +316,31 @@
     } else {
 	return $_[0];
     }
+}
+
+# ---------------------------------------------------- Replace MT{...} in files
+
+sub transstatic {
+    my $strptr=shift;
+    $$strptr=~s/MT\{([^\}]*)\}/&mt($1)/gse;
+}
+
+# ----------------------------------------------- Handler Routine /adm/localize
+sub handler {
+    my $r=shift;
+    &Apache::lonlocal::get_language_handle($r);
+    &Apache::loncommon::content_type($r,'text/html');
+    $r->send_http_header;
+    return OK if $r->header_only;
+
+    my $uri=$r->uri;
+    $uri=~s/^\/adm\/localize//;
+    my $fn=$Apache::lonnet::perlvar{'lonDocRoot'}.$uri;
+
+    my $file=&Apache::lonnet::getfile($fn);
+    &transstatic(\$file);
+    $r->print($file);
+    return OK;
 }
 
 1;
Index: loncom/localize/localize/newphrases.txt
diff -u loncom/localize/localize/newphrases.txt:1.25 loncom/localize/localize/newphrases.txt:1.26
--- loncom/localize/localize/newphrases.txt:1.25	Thu Nov 27 18:08:44 2003
+++ loncom/localize/localize/newphrases.txt	Tue Dec  9 19:32:56 2003
@@ -1,580 +1,27 @@
 You need to specify the username field.
-userauthentication.gif
-Load
-Domain
-User Load
-Server
-Log in
-percent
-Server Administration
-Help
-System Administration
-aboutlon.gif
-accessbutton.gif
-Password
-Username
-Unsuccessful Login
-
-userauthentication.gif
-Load
-Domain
-User Load
-Server
-Log in
-percent
-Server Administration
-Help
-System Administration
-aboutlon.gif
-accessbutton.gif
-Password
-Username
-Unsuccessful Login
-
-userauthentication.gif
-Load
-Domain
-User Load
-Server
-Log in
-percent
-Server Administration
-Help
-System Administration
-aboutlon.gif
-accessbutton.gif
-Password
-Username
-Successful Login
-No Role, Cumulative Privileges
-Main Menu
-Launch Remote Control
-Navigate Contents
-Return to Last Location
-loginproblems.html
-Welcome
-Problems
-Welcome to the Learning<i>Online</i> Network with CAPA. Please wait while your session is being set up
-User Roles
-No Role, Cumulative Privileges
-Main Menu
-Launch Remote Control
-Navigate Contents
-Return to Last Location
-Your home server is 
-Author and Co-Author roles may not be available on servers other than your home server.
-Show all roles
-Display
-User Role
-Extent
-Start
-End
-Remark
-Author
-Construction Space
-Domain
-Server
-Select
-Co-Author
-Construction Space
-User
-Domain
-Server
-Select
-Co-Author
-Construction Space
-User
-Domain
-Server
-Select
-Co-Author
-Construction Space
-User
-Domain
-Server
-Select
-Co-Author
-Construction Space
-User
-Domain
-Server
-Select
-Co-Author
-Construction Space
-User
-Domain
-Server
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Domain
-Select
-Domain Coordinator
-Domain
-Select
-Domain Coordinator
-Domain
-Select
-Exam Proctor
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Exam Proctor
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Instructor
-Course
-Section/Group
-Currently not available
-Syllabus
-Domain
-Select
-Instructor
-Course
-Section/Group
-Currently not available
-Syllabus
-Domain
-Select
-Instructor
-Course
-Syllabus
-Domain
-Select
-Student
-Course
-Currently not available
-Syllabus
-Select
-Student
-Course
-Currently not available
-Syllabus
-Select
-Student
-Course
-Currently not available
-Syllabus
-Select
-Student
-Course
-Currently not available
-Syllabus
-Select
-Teaching Assistant
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Teaching Assistant
-Course
-Section/Group
-Currently not available
-Syllabus
-Domain
-Select
-Construction Space
-Course
-Domain
-System
-Construction Space
-Course
-Domain
-System
-Currently selected. 
-No role specified
-Main Menu
-No Role, Cumulative Privileges
-Main Menu
-Launch Remote Control
-Navigate Contents
-Return to Last Location
-switch
-role
-Switch to another user role
-choose
-role
-Choose the user role
-enter
-grades
-Enter grades from check-out assessment resources
-view
-bookmark
-Use or edit my bookmark collection
-calendar
-announce
-Course announcements and my calendar
-commu-
-nication
-Send and receive messages
-prefer-
-ences
-Set my user preferences
-exit
-
-Exit LON-CAPA
-Change Your Preferences
-No Role, Cumulative Privileges
-Main Menu
-Launch Remote Control
-Navigate Contents
-Return to Last Location
-Change Your Language Preferences
-No Role, Cumulative Privileges
-Main Menu
-Launch Remote Control
-Navigate Contents
-Return to Last Location
-Preferred language
-No language preference
-German - ISO
-English - ISO
-Japanese - UTF
-Portuguese - ISO
-Russian - KOI
-Turkish - ISO
-Change
-Change Your Language Preferences
-No Role, Cumulative Privileges
-Main Menu
-Launch Remote Control
-Navigate Contents
-Return to Last Location
-Main Menu
-No Role, Cumulative Privileges
-Main Menu
-Launch Remote Control
-Navigate Contents
-Return to Last Location
-switch
-role
-Switch to another user role
-choose
-role
-Choose the user role
-enter
-grades
-Enter grades from check-out assessment resources
-view
-bookmark
-Use or edit my bookmark collection
-calendar
-announce
-Course announcements and my calendar
-commu-
-nication
-Send and receive messages
-prefer-
-ences
-Set my user preferences
-exit
-
-Exit LON-CAPA
-User Roles
-No Role, Cumulative Privileges
-Launch Remote Control
-Main Menu
-Navigate Contents
-Return to Last Location
-Your home server is 
-Author and Co-Author roles may not be available on servers other than your home server.
-Show all roles
-Display
-User Role
-Extent
-Start
-End
-Remark
-Author
-Construction Space
-Domain
-Server
-Select
-Co-Author
-Construction Space
-User
-Domain
-Server
-Select
-Co-Author
-Construction Space
-User
-Domain
-Server
-Select
-Co-Author
-Construction Space
-User
-Domain
-Server
-Select
-Co-Author
-Construction Space
-User
-Domain
-Server
-Select
-Co-Author
-Construction Space
-User
-Domain
-Server
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Course Coordinator
-Course
-Currently not available
-Domain
-Select
-Domain Coordinator
-Domain
-Select
-Domain Coordinator
-Domain
-Select
-Exam Proctor
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Exam Proctor
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Instructor
-Course
-Section/Group
-Currently not available
-Syllabus
-Domain
-Select
-Instructor
-Course
-Section/Group
-Currently not available
-Syllabus
-Domain
-Select
-Instructor
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Student
-Course
-Currently not available
-Syllabus
-Select
-Student
-Course
-Currently not available
-Syllabus
-Select
-Student
-Course
-Currently not available
-Syllabus
-Select
-Student
-Course
-Currently not available
-Syllabus
-Select
-Teaching Assistant
-Course
-Currently not available
-Syllabus
-Domain
-Select
-Teaching Assistant
-Course
-Section/Group
-Currently not available
-Syllabus
-Domain
-Select
-Construction Space
-Course
-Domain
-System
-Construction Space
-Course
-Domain
-System
 Currently selected. 
 No role specified
+Cannot publish directory
+Cannot retrieve directory
+Must create new subdirectory inside a directory
+Publish this Resource
+List Directory
+Upload file
+Print
+Retrieve Old Version
+Delete
+Select Action
+New file
+New HTML file
+New problem
+New assembled page
+New assembled sequence
+New custom rights file
+New style file
+New subdirectory
+Rename current file to
+Move current file to
+Copy current file to
+Type Name Here
+Type Name Here
+Go
Index: loncom/publisher/lonconstruct.pm
diff -u loncom/publisher/lonconstruct.pm:1.20 loncom/publisher/lonconstruct.pm:1.21
--- loncom/publisher/lonconstruct.pm:1.20	Wed Nov 19 09:57:32 2003
+++ loncom/publisher/lonconstruct.pm	Tue Dec  9 19:32:56 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Page Wrapper for Construction
 #
-# $Id: lonconstruct.pm,v 1.20 2003/11/19 14:57:32 taceyjo1 Exp $
+# $Id: lonconstruct.pm,v 1.21 2003/12/10 00:32:56 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -127,7 +127,7 @@
 </script>
 </head>
 <frameset rows="110,*" border="0">
-<frame src='/adm/publisher.html'>
+<frame src='/adm/localize/adm/publisher.html'>
 <frame src="$lowerframe" name="LONCAPAToBePublished">
 </frameset>
 </html>
Index: loncom/publisher/publisher.html
diff -u loncom/publisher/publisher.html:1.34 loncom/publisher/publisher.html:1.35
--- loncom/publisher/publisher.html:1.34	Fri Nov 21 16:07:38 2003
+++ loncom/publisher/publisher.html	Tue Dec  9 19:32:56 2003
@@ -18,7 +18,7 @@
        (document.publisher.filename.value.indexOf('/adm/pubdir')==-1)) {
         document.publisher.submit();
    } else {
-      alert('Cannot publish directory');
+      alert('MT{Cannot publish directory}');
    }
 }
 
@@ -44,7 +44,7 @@
        (document.rpublisher.filename.value.indexOf('/adm/pubdir')==-1)) {
         document.rpublisher.submit();
    } else {
-      alert('Cannot retrieve directory');
+      alert('MT{Cannot retrieve directory}');
    }
 }
 
@@ -58,7 +58,7 @@
       if ((document.fileaction.filename.value.charAt(
            document.fileaction.filename.value.length-1)!='/') &&
            (document.fileaction.filename.value.indexOf('/adm/pubdir')==-1)) {
-          alert('Must create new subdirectory inside a directory');
+          alert('MT{Must create new subdirectory inside a directory}');
           return;
       }
    }
@@ -95,13 +95,13 @@
 		  <form name="publisher" action="/adm/publish" target="_parent" method="post">
 		    <td bgcolor="#ccddaa" align="center">
 		      <input type="hidden" name="filename" value="" />
-	              <input type="button" value="Publish this Resource" onClick="getfilename();" />
+	              <input type="button" value="MT{Publish this Resource}" onClick="getfilename();" />
 		    </td>
 		  </form>
 		  <form name="dpublisher" action="/adm/pubdir" target="LONCAPAToBePublished" method="post">
 		    <td bgcolor="#ccddaa" align="center">
 		      <input type="hidden" name="filename" value="" />
-		      <input type="button" value="List Directory" onClick="getdfilename();" />
+		      <input type="button" value="MT{List Directory}" onClick="getdfilename();" />
 		    </td>
 		  </form>
 		  <form name="upublisher" action="/adm/upload" target="_parent"
@@ -109,14 +109,14 @@
 		    <td bgcolor="#ccddaa" valign="top" align="center">
 		      <input type="hidden" name="filename" value="" />
 		      <input type="file" name="upfile" size="20" />
-		      <input type="button" value="Upload file"  onClick="getufilename();" />
+		      <input type="button" value="MT{Upload file}"  onClick="getufilename();" />
 		    </td>
 		  </form>
 		  <form name="printout" target="_parent" action="/adm/printout" target="LONCAPAToBePublished" method="post" onSubmit="getpostdata();">
 		    <td rowspan="2" bgcolor="#ccddaa" align="center">
 		      <input type="hidden" name="postdata" value="" />
 		      <input type="hidden" name="curseed" value="" />
-		      <input type="button" value="Print" onClick="getpostdata();" />
+		      <input type="button" value="MT{Print}" onClick="getpostdata();" />
 		    </td>
 		  </form>
 
@@ -125,14 +125,14 @@
 		  <form name="rpublisher" action="/adm/retrieve" target="_parent" method="post">
 		    <td bgcolor="#ccddaa" align="center">
 		      <input type="hidden" name="filename" value="" />
-		      <input type="button" value="Retrieve Old Version" onClick="getrfilename();" />
+		      <input type="button" value="MT{Retrieve Old Version}" onClick="getrfilename();" />
 		    </td>
 		  </form>
 		  <form name="del" action="/adm/cfile" target="_parent" method="post">
 		    <td bgcolor="#ccddaa">
 		      <input type="hidden" name="filename" value="" />
 		      <input type="hidden" name="action" value="delete" />
-	              <input type="button" value="Delete" onClick="getdelfilename();" />
+	              <input type="button" value="MT{Delete}" onClick="getdelfilename();" />
 		    </td>
 		  </form>
 		  <form name="fileaction" action="/adm/cfile" target="_parent" method="post" onSubmit="getactionfilename();">
@@ -140,19 +140,19 @@
 		      <nobr>
 			<input type="hidden" name="filename" value="" />
 			  <select name="action">
-			    <option>Select Action</option>
-			    <option value="newfile">New file:</option>
-			    <option value="newhtmlfile">New HTML file:</option>
-			    <option value="newproblemfile">New problem:</option>
-                            <option value="newpagefile">New assembled page:</option>
-                            <option value="newsequencefile">New assembled sequence:</option>
-                            <option value="newrightsfile">New custom rights file:</option>
-                            <option value="newstyfile">New style file:</option>
-			    <option value="newdir">New subdirectory:</option>
-			    <option value="rename">Rename current file to:</option>
-			    <option value="rename">Move current file to:</option>
-			    <option value="copy">Copy current file to:</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="getactionfilename();" />
+			    <option>MT{Select Action}</option>
+			    <option value="newfile">MT{New file}:</option>
+			    <option value="newhtmlfile">MT{New HTML file}:</option>
+			    <option value="newproblemfile">MT{New problem}:</option>
+                            <option value="newpagefile">MT{New assembled page}:</option>
+                            <option value="newsequencefile">MT{New assembled sequence}:</option>
+                            <option value="newrightsfile">MT{New custom rights file}:</option>
+                            <option value="newstyfile">MT{New style file}:</option>
+			    <option value="newdir">MT{New subdirectory}:</option>
+			    <option value="rename">MT{Rename current file to}:</option>
+			    <option value="rename">MT{Move current file to}:</option>
+			    <option value="copy">MT{Copy current file to}:</option>
+			  </select>&nbsp;<input type="text" name="newfilename" value="MT{Type Name Here}" onFocus="if (this.value == 'MT{Type Name Here}') this.value=''" />&nbsp;<input type="button" value="MT{Go}" onClick="getactionfilename();" />
 		      </nobr>
 		    </td>
 		  </form>

--www1071016376--