[LON-CAPA-cvs] cvs: loncom /interface lonannounce.pm lonbulletin.pm lonsimplepage.pm lonsyllabus.pm
www
lon-capa-cvs@mail.lon-capa.org
Wed, 17 Sep 2003 19:45:39 -0000
www Wed Sep 17 15:45:39 2003 EDT
Modified files:
/loncom/interface lonannounce.pm lonbulletin.pm lonsimplepage.pm
lonsyllabus.pm
Log:
Internationalize
Index: loncom/interface/lonannounce.pm
diff -u loncom/interface/lonannounce.pm:1.19 loncom/interface/lonannounce.pm:1.20
--- loncom/interface/lonannounce.pm:1.19 Tue Sep 2 21:53:46 2003
+++ loncom/interface/lonannounce.pm Wed Sep 17 15:45:39 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Announce
#
-# $Id: lonannounce.pm,v 1.19 2003/09/03 01:53:46 www Exp $
+# $Id: lonannounce.pm,v 1.20 2003/09/17 19:45:39 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -32,6 +32,7 @@
use Apache::Constants qw(:common);
use Apache::loncommon;
use Apache::lonhtmlcommon();
+use Apache::lonlocal;
use HTML::Entities();
my %todayhash;
@@ -367,9 +368,12 @@
if ($pm<1) { ($pm,$py)=(12,$year-1); }
if ($fm>12){ ($fm,$fy)=(1,$year+1); }
- $r->print('<h1>'.('','January','February','March','April','May',
- 'June','July','August','September','October',
- 'November','December')[$month].' '.$year.'</h1>');
+ $r->print('<h1>'.('',&mt('January'),&mt('February'),&mt('March'),
+ &mt('April'),&mt('May'),
+ &mt('June'),&mt('July'),&mt('August'),
+ &mt('September'),&mt('October'),
+ &mt('November'),&mt('December'))[$month].' '.
+ $year.'</h1>');
# Reached the end of times, give up
if (($year<1970) || ($year>2037)) {
$r->print('<h3>No calendar available for this date.</h3>'.
@@ -379,26 +383,26 @@
}
$r->print(
'<a href="/adm/announcements?month='.$pm.'&year='.$py.
- ($pickdatemode?$pickinfo:'').'">Previous Month</a> '.
+ ($pickdatemode?$pickinfo:'').'">'.&mt('Previous Month').'</a> '.
'<a href="/adm/announcements?month='.$fm.'&year='.$fy.
- ($pickdatemode?$pickinfo:'').'">Next Month</a>'.
+ ($pickdatemode?$pickinfo:'').'">'.&mt('Next Month').'</a>'.
' <a href="/adm/announcements?month='.$todayhash{'month'}.
'&year='.$todayhash{'year'}.
- ($pickdatemode?$pickinfo:'').'">Current Month</a><p>'.
+ ($pickdatemode?$pickinfo:'').'">'.&mt('Current Month').'</a><p>'.
'<table border="2" cols="7" rows="5"><tr><th>'.
-&tfont('Sun')
+&tfont(&mt('Sun'))
.'</th><th>'.
-&tfont('Mon')
+&tfont(&mt('Mon'))
.'</th><th>'.
-&tfont('Tue')
+&tfont(&mt('Tue'))
.'</th><th>'.
-&tfont('Wed')
+&tfont(&mt('Wed'))
.'</th><th>'.
-&tfont('Thu')
+&tfont(&mt('Thu'))
.'</th><th>'.
-&tfont('Fri')
+&tfont(&mt('Fri'))
.'</th><th>'.
-&tfont('Sat')
+&tfont(&mt('Sat'))
.'</th></tr>');
my $tk=&Apache::loncommon::maketime(%firstday);
@@ -432,12 +436,12 @@
if ($allowed) { $r->print('<input type="button" onClick="removesub()" value="Remove Checked Entries"></form>'); }
$r->print('<p>'.
'<a href="/adm/announcements?month='.$pm.'&year='.$py.
- ($pickdatemode?$pickinfo:'').'">Previous Month</a> '.
+ ($pickdatemode?$pickinfo:'').'">'.&mt('Previous Month').'</a> '.
'<a href="/adm/announcements?month='.$fm.'&year='.$fy.
- ($pickdatemode?$pickinfo:'').'">Next Month</a>'.
+ ($pickdatemode?$pickinfo:'').'">'.&mt('Next Month').'</a>'.
' <a href="/adm/announcements?month='.$todayhash{'month'}.
'&year='.$todayhash{'year'}.
- ($pickdatemode?$pickinfo:'').'">Current Month</a></p>'.
+ ($pickdatemode?$pickinfo:'').'">'.&mt('Current Month').'</a></p>'.
($pickdatemode?'</font>':'').
'</body></html>');
return OK;
Index: loncom/interface/lonbulletin.pm
diff -u loncom/interface/lonbulletin.pm:1.14 loncom/interface/lonbulletin.pm:1.15
--- loncom/interface/lonbulletin.pm:1.14 Mon Sep 15 15:56:44 2003
+++ loncom/interface/lonbulletin.pm Wed Sep 17 15:45:39 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Bulletin Board Handler
#
-# $Id: lonbulletin.pm,v 1.14 2003/09/15 19:56:44 www Exp $
+# $Id: lonbulletin.pm,v 1.15 2003/09/17 19:45:39 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -34,6 +34,7 @@
use Apache::lonnet;
use Apache::lontexconvert;
use Apache::lonfeedback;
+use Apache::lonlocal;
sub handler {
my $r = shift;
@@ -65,7 +66,7 @@
my $crs = $ENV{'course.'.$ENV{'request.course.id'}.'.num'};
# --------------------------------------------------------- The syllabus fields
- my %syllabusfields=(
+ my %syllabusfields=&Apache::lonnet::texthash(
'aaa_title' => 'Topic',
'bbb_content' => 'Task',
'ccc_webreferences' => 'Web References');
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.12 loncom/interface/lonsimplepage.pm:1.13
--- loncom/interface/lonsimplepage.pm:1.12 Tue Sep 9 15:39:04 2003
+++ loncom/interface/lonsimplepage.pm Wed Sep 17 15:45:39 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Simple Page Editor
#
-# $Id: lonsimplepage.pm,v 1.12 2003/09/09 19:39:04 www Exp $
+# $Id: lonsimplepage.pm,v 1.13 2003/09/17 19:45:39 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -34,6 +34,7 @@
use Apache::lonnet;
use Apache::lontexconvert;
use Apache::lonfeedback;
+use Apache::lonlocal;
sub handler {
my $r = shift;
@@ -65,7 +66,7 @@
my $crs = $ENV{'course.'.$ENV{'request.course.id'}.'.num'};
# --------------------------------------------------------- The syllabus fields
- my %syllabusfields=(
+ my %syllabusfields=&Apache::lonlocal::texthash(
'aaa_title' => 'Page Title',
'bbb_content' => 'Content',
'ccc_webreferences' => 'Web References');
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.22 loncom/interface/lonsyllabus.pm:1.23
--- loncom/interface/lonsyllabus.pm:1.22 Tue Sep 9 15:39:04 2003
+++ loncom/interface/lonsyllabus.pm Wed Sep 17 15:45:39 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Syllabus
#
-# $Id: lonsyllabus.pm,v 1.22 2003/09/09 19:39:04 www Exp $
+# $Id: lonsyllabus.pm,v 1.23 2003/09/17 19:45:39 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -35,6 +35,7 @@
use Apache::lontexconvert;
use Apache::lonfeedback;
use Apache::lonannounce;
+use Apache::lonlocal;
sub handler {
my $r = shift;
@@ -52,11 +53,11 @@
# Is this even a course?
my $homeserver=&Apache::lonnet::homeserver($cnum,$cdom);
if ($homeserver eq 'no_host') {
- $r->print('</head><body>No syllabus available</body></html>');
+ $r->print('</head><body>'.&mt('No syllabus available').'</body></html>');
return OK;
}
# --------------------------------------------------------- The syllabus fields
- my %syllabusfields=(
+ my %syllabusfields=&Apache::lonlocal::texthash(
'aaa_instructorinfo' => 'Instructor Information',
'bbb_description' => 'Course Description',
'ccc_prereq' => 'Prerequisites',
@@ -124,7 +125,8 @@
}
if ($allowed) {
$r->print('<p>'.
-&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'</p><p>This syllabus can be publicly viewed at <tt>http://'.
+&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'</p><p>'.&mt('This syllabus can be publicly viewed at')
+ .' <tt>http://'.
$Apache::lonnet::hostname{$homeserver}.$r->uri.'</tt>'.
&Apache::loncommon::help_open_topic('Syllabus_ExtLink').'</p>'.
'<p><a href="'.$r->uri.'?forcestudent=1"><font size="+1">Show Public View</font></a>'.
@@ -176,7 +178,7 @@
my $lastmod=$syllabus{'uploaded.lastmodified'};
$lastmod=($lastmod?localtime($lastmod):'never');
- $r->print('<table><tr><td>Uploaded:</td><td>'.
+ $r->print('<table><tr><td>'.&mt('Uploaded').':</td><td>'.
&Apache::loncommon::aboutmewrapper(
&Apache::loncommon::plainname($syllabus{'uploaded.name'},
$syllabus{'uploaded.domain'}),$syllabus{'uploaded.name'},