[LON-CAPA-cvs] cvs: loncom /localize lonlocal.pm /xml languagetags.pm lonxml.pm doc/loncapafiles loncapafiles.lpml

www lon-capa-cvs@mail.lon-capa.org
Sat, 11 Oct 2003 21:06:11 -0000


www		Sat Oct 11 17:06:11 2003 EDT

  Added files:                 
    /loncom/xml	languagetags.pm 

  Modified files:              
    /doc/loncapafiles	loncapafiles.lpml 
    /loncom/localize	lonlocal.pm 
    /loncom/xml	lonxml.pm 
  Log:
  Move <mt>-tag into separate module to avoid module-dependency vicious cycle.
  
  
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.289 doc/loncapafiles/loncapafiles.lpml:1.290
--- doc/loncapafiles/loncapafiles.lpml:1.289	Thu Oct  9 18:06:38 2003
+++ doc/loncapafiles/loncapafiles.lpml	Sat Oct 11 17:06:10 2003
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.289 2003/10/09 22:06:38 matthew Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.290 2003/10/11 21:06:10 www Exp $ -->
 
 <!--
 
@@ -3261,6 +3261,15 @@
 <description>
 implements &lt;script&gt;, &lt;scriptlib&gt;, &lt;parserlib&gt;, and
 &lt;import&gt;
+</description>
+<status>works/unverified</status>
+</file>
+<file>
+<source>loncom/xml/languagetags.pm</source>
+<target dist='default'>home/httpd/lib/perl/Apache/languagetags.pm</target>
+<categoryname>handler</categoryname>
+<description>
+implements &lt;mt&gt;
 </description>
 <status>works/unverified</status>
 </file>
Index: loncom/localize/lonlocal.pm
diff -u loncom/localize/lonlocal.pm:1.24 loncom/localize/lonlocal.pm:1.25
--- loncom/localize/lonlocal.pm:1.24	Sat Oct 11 10:06:01 2003
+++ loncom/localize/lonlocal.pm	Sat Oct 11 17:06:11 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Localization routines
 #
-# $Id: lonlocal.pm,v 1.24 2003/10/11 14:06:01 www Exp $
+# $Id: lonlocal.pm,v 1.25 2003/10/11 21:06:11 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -210,20 +210,6 @@
     }
 }
 
-# ================================================================ The <mt> tag
-
-BEGIN {
-}
-
-sub start_mt {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
-    return &mt(&Apache::lonxml::get_all_text("/mt",$parser));
-}
-
-sub end_mt {
-    return '';
-}
-
 # ============================================================== What language?
 
 sub current_language {
@@ -297,7 +283,6 @@
     if (&Apache::lonnet::mod_perl_version == 1) {
 	$r->content_languages([&current_language()]);
     }
-    &Apache::lonxml::register('Apache::lonlocal',('mt'));
 ###    setlocale(LC_ALL,&current_locale);
 }
 
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.284 loncom/xml/lonxml.pm:1.285
--- loncom/xml/lonxml.pm:1.284	Sat Oct  4 16:49:40 2003
+++ loncom/xml/lonxml.pm	Sat Oct 11 17:06:11 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.284 2003/10/04 20:49:40 www Exp $
+# $Id: lonxml.pm,v 1.285 2003/10/11 21:06:11 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -96,6 +96,7 @@
 use Apache::run();
 use Apache::londefdef();
 use Apache::scripttag();
+use Apache::languagetags();
 use Apache::edit();
 use Apache::inputtags();
 use Apache::outputtags();

Index: loncom/xml/languagetags.pm
+++ loncom/xml/languagetags.pm
# The LearningOnline Network with CAPA
# Locale-related tags
#
# $Id: languagetags.pm,v 1.1 2003/10/11 21:06:11 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
#
# LON-CAPA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LON-CAPA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LON-CAPA; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# /home/httpd/html/adm/gpl.txt
#
# http://www.lon-capa.org/
#

package Apache::languagetags;

use strict;

BEGIN {
  &Apache::lonxml::register('Apache::languagetags',
			    ('mt'));
}

# ================================================================ The <mt> tag

sub start_mt {
    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
    return &Apache::lonlocal::mt(&Apache::lonxml::get_all_text("/mt",$parser));
}

sub end_mt {
    return '';
}


1;
__END__