--- loncom/publisher/londiff.pm 2002/10/18 13:48:57 1.10
+++ loncom/publisher/londiff.pm 2003/12/10 16:05:43 1.14
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to show differences between file versions
#
-# $Id: londiff.pm,v 1.10 2002/10/18 13:48:57 www Exp $
+# $Id: londiff.pm,v 1.14 2003/12/10 16:05:43 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -41,7 +41,6 @@
# 03/31,04/03 Gerd Kortemeyer)
#
# 05/02/01,05/09 Gerd Kortemeyer
-# 12/13 Scott Harrison
#
###
@@ -55,6 +54,7 @@ use Apache::Constants qw(:common :http :
use Apache::loncacc;
use Apache::lonnet();
use Apache::loncommon();
+use Apache::lonlocal;
sub handler {
@@ -91,7 +91,7 @@ sub handler {
my @f1=();
my @f2=();
- $r->content_type('text/html');
+ &Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
$r->print('
LON-CAPA Construction Diffs');
@@ -99,7 +99,7 @@ sub handler {
$r->print(&Apache::loncommon::bodytag('Resource Differences'));
- $r->print('Compare versions of '.$efn.'
');
+ $r->print(''.&mt('Compare versions of').' '.$efn.'
');
if (($cuname ne $ENV{'user.name'}) || ($cudom ne $ENV{'user.domain'})) {
$r->print('Co-Author: '.$cuname.' at '.$cudom.
@@ -120,22 +120,22 @@ sub handler {
$f1[$#f1+1]=$line;
}
}
- $r->print('Construction Space Version');
+ $r->print(''.&mt('Construction Space Version').'');
} else {
my $fn=
'/home/httpd/html//res/'.$cudom.'/'.$cuname.'/';
if ($ENV{'form.versionone'}) {
my ($main,$suffix)=($efn=~/^(.+)\.(\w+)$/);
$fn.=$main.'.'.$ENV{'form.versionone'}.'.'.$suffix;
- $r->print('Version '.$ENV{'form.versionone'}.'');
+ $r->print(''.&mt('Version').' '.$ENV{'form.versionone'}.'');
} else {
$fn.=$efn;
- $r->print('Current Version');
+ $r->print(''.&mt('Current Version').'');
}
@f1=split(/\n/,&Apache::lonnet::getfile($fn));
}
- $r->print('
versus
');
+ $r->print('
'.&mt('versus').'
');
if ($ENV{'form.versiontwo'} eq 'priv') {
my $fn='/home/'.$cuname.'/public_html/'.$efn;
@@ -147,17 +147,17 @@ sub handler {
$f2[$#f2+1]=$line;
}
}
- $r->print('Construction Space Version');
+ $r->print(''.&mt('Construction Space Version').'');
} else {
my $fn=
'/home/httpd/html/res/'.$cudom.'/'.$cuname.'/';
if ($ENV{'form.versiontwo'}) {
my ($main,$suffix)=($efn=~/^(.+)\.(\w+)$/);
$fn.=$main.'.'.$ENV{'form.versiontwo'}.'.'.$suffix;
- $r->print('Version '.$ENV{'form.versiontwo'}.'');
+ $r->print(''.&mt('Version').' '.$ENV{'form.versiontwo'}.'');
} else {
$fn.=$efn;
- $r->print('Current Version');
+ $r->print(''.&mt('Current Version').'');
}
@f2=split(/\n/,&Apache::lonnet::getfile($fn));
}
@@ -188,9 +188,9 @@ sub handler {
$r->print('');
} else {
- $r->print('Binary File
');
+ $r->print(''.&mt('Binary File').'
');
}
- $r->print('