[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm lonnavmaps.pm lonpickcourse.pm lonpickstudent.pm lonquickgrades.pm lonremote.pm lonsearchcat.pm /localize/localize de.pm /publisher lonpublisher.pm
www
lon-capa-cvs@mail.lon-capa.org
Mon, 22 Sep 2003 00:48:32 -0000
This is a MIME encoded message
--www1064191712
Content-Type: text/plain
www Sun Sep 21 20:48:32 2003 EDT
Modified files:
/loncom/interface lonmeta.pm lonnavmaps.pm lonpickcourse.pm
lonpickstudent.pm lonquickgrades.pm lonremote.pm
lonsearchcat.pm
/loncom/localize/localize de.pm
/loncom/publisher lonpublisher.pm
Log:
Internationalization, German Localization
--www1064191712
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20030921204832.txt"
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.34 loncom/interface/lonmeta.pm:1.35
--- loncom/interface/lonmeta.pm:1.34 Tue Sep 9 14:46:28 2003
+++ loncom/interface/lonmeta.pm Sun Sep 21 20:48:32 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.34 2003/09/09 18:46:28 www Exp $
+# $Id: lonmeta.pm,v 1.35 2003/09/22 00:48:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -39,6 +39,7 @@
use Apache::loncommon();
use Apache::lonmsg;
use Apache::lonpublisher;
+use Apache::lonlocal;
# ----------------------------------------- Fetch and evaluate dynamic metadata
@@ -199,7 +200,7 @@
# ----------------------------------------------------------- Set document type
- $r->content_type('text/html');
+ &Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
return OK if $r->header_only;
@@ -212,7 +213,7 @@
unless ($ENV{'user.adv'}) {
foreach ('keywords','notes','abstract','subject') {
- $content{$_}='<i>- not displayed -</i>';
+ $content{$_}='<i>- '.&mt('not displayed').' -</i>';
}
}
@@ -243,6 +244,18 @@
$customdistributionfile='<a href="'.$content{'customdistributionfile'}.
'"><tt>'.$content{'customdistributionfile'}.'</tt></a>';
}
+my %lt=&Apache::lonlocal::texthash(
+ 'au' =>'Author(s)',
+ 'sb' => 'Subject',
+ 'kw' => 'Keyword(s)',
+ 'no' => 'Notes',
+ 'ab' => 'Abstract',
+ 'mi' => 'MIME Type',
+ 'la' => 'Language',
+ 'cd' => 'Creation Date',
+ 'pu' => 'Publisher/Owner',
+ 'co' => 'Copyright/Distribution',
+ 'cf' => 'Custom Distribution File');
my $bodytag=&Apache::loncommon::bodytag
('Catalog Information','','','',$resdomain);
$r->print(<<ENDHEAD);
@@ -252,29 +265,29 @@
<h3><tt>$disuri</tt></h3>
$versiondisplay<br />
<table cellspacing=2 border=0>
-<tr><td bgcolor='#AAAAAA'>Author(s)</td>
+<tr><td bgcolor='#AAAAAA'>$lt{'au'}</td>
<td bgcolor="#CCCCCC">$author </td></tr>
-<tr><td bgcolor='#AAAAAA'>Subject</td>
+<tr><td bgcolor='#AAAAAA'>$lt{'sb'}</td>
<td bgcolor="#CCCCCC">$content{'subject'} </td></tr>
-<tr><td bgcolor='#AAAAAA'>Keyword(s)</td>
+<tr><td bgcolor='#AAAAAA'>$lt{'kw'}</td>
<td bgcolor="#CCCCCC">$content{'keywords'} </td></tr>
-<tr><td bgcolor='#AAAAAA'>Notes</td>
+<tr><td bgcolor='#AAAAAA'>$lt{'no'}</td>
<td bgcolor="#CCCCCC">$content{'notes'} </td></tr>
-<tr><td bgcolor='#AAAAAA'>Abstract</td>
+<tr><td bgcolor='#AAAAAA'>$lt{'ab'}</td>
<td bgcolor="#CCCCCC">$content{'abstract'} </td></tr>
-<tr><td bgcolor='#AAAAAA'>MIME Type</td>
+<tr><td bgcolor='#AAAAAA'>$lt{'mi'}</td>
<td bgcolor="#CCCCCC">$mime ($content{'mime'}) </td></tr>
-<tr><td bgcolor='#AAAAAA'>Language</td>
+<tr><td bgcolor='#AAAAAA'>$lt{'la'}</td>
<td bgcolor="#CCCCCC">$language </td></tr>
-<tr><td bgcolor='#AAAAAA'>Creation Date</td>
+<tr><td bgcolor='#AAAAAA'>$lt{'cd'}</td>
<td bgcolor="#CCCCCC">$creationdate </td></tr>
<tr><td bgcolor='#AAAAAA'>
Last Revision Date</td><td bgcolor="#CCCCCC">$lastrevisiondate </td></tr>
-<tr><td bgcolor='#AAAAAA'>Publisher/Owner</td>
+<tr><td bgcolor='#AAAAAA'>$lt{'pu'}</td>
<td bgcolor="#CCCCCC">$owner </td></tr>
-<tr><td bgcolor='#AAAAAA'>Copyright/Distribution</td>
+<tr><td bgcolor='#AAAAAA'>$lt{'co'}</td>
<td bgcolor="#CCCCCC">$content{'copyright'} </td></tr>
-<tr><td bgcolor='#AAAAAA'>Custom Distribution File</td>
+<tr><td bgcolor='#AAAAAA'>$lt{'cf'}</td>
<td bgcolor="#CCCCCC">$customdistributionfile </td></tr>
</table>
ENDHEAD
@@ -294,9 +307,11 @@
if ($ENV{'user.adv'}) {
# ------------------------------------------------------------ Dynamic Metadata
$r->print(
- '<h3>Dynamic Metadata (updated periodically)</h3>Processing ...<br>');
+ '<h3>'.&mt('Dynamic Metadata').' ('.
+ &mt('updated periodically').')</h3>'.&mt('Processing').
+ ' ...<br>');
$r->rflush();
- my %items=(
+ my %items=&Apache::lonlocal::texthash(
'count' => 'Network-wide number of accesses (hits)',
'course' => 'Network-wide number of courses using resource',
'usage' => 'Number of resources using or importing resource',
@@ -312,7 +327,7 @@
'difficulty' => 'Degree of difficulty');
my %dynmeta=&dynamicmeta($uri);
$r->print(
-'</table><h4>Access and Usage Statistics</h4><table cellspacing=2 border=0>');
+'</table><h4>'.&mt('Access and Usage Statistics').'</h4><table cellspacing=2 border=0>');
foreach ('count') {
$r->print(
'<tr><td bgcolor="#AAAAAA">'.$items{$_}.'</td><td bgcolor="#CCCCCC">'.
@@ -341,7 +356,7 @@
$r->print('</table>');
if ($uri=~/\.(problem|exam|quiz|assess|survey|form)\.meta$/) {
$r->print(
-'<h4>Assessment Statistical Data</h4><table cellspacing=2 border=0>');
+'<h4>'.&mt('Assessment Statistical Data').'</h4><table cellspacing=2 border=0>');
foreach ('stdno','avetries') {
$r->print(
'<tr><td bgcolor="#AAAAAA">'.$items{$_}.'</td><td bgcolor="#CCCCCC">'.
@@ -354,7 +369,7 @@
}
$r->print('</table>');
}
- $r->print('<h4>Evaluation Data</h4><table cellspacing=2 border=0>');
+ $r->print('<h4>'.&mt('Evaluation Data').'</h4><table cellspacing=2 border=0>');
foreach ('clear','depth','helpful','correct','technical') {
$r->print(
'<tr><td bgcolor="#AAAAAA">'.$items{$_}.'</td><td bgcolor="#CCCCCC">'.
@@ -365,7 +380,7 @@
if ((($ENV{'user.domain'} eq $1) && ($ENV{'user.name'} eq $2))
|| ($ENV{'user.role.ca./'.$1.'/'.$2})) {
$r->print(
- '<h4>Evaluation Comments (visible to author and co-authors only)</h4>'.
+ '<h4>'.&mt('Evaluation Comments').' ('.&mt('visible to author and co-authors only').')</h4>'.
'<blockquote>'.$dynmeta{'comments'}.'</blockquote>');
$r->print(
'<h4>Error Messages (visible to author and co-authors only)</h4>');
@@ -380,7 +395,7 @@
}
# ------------------------------------------------------------- All other stuff
$r->print(
- '<h3>Additional Metadata (non-standard, parameters, exports)</h3>');
+ '<h3>'.&mt('Additional Metadata (non-standard, parameters, exports)').'</h3>');
foreach (sort keys %content) {
my $name=$_;
unless ($name=~/\.display$/) {
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.231 loncom/interface/lonnavmaps.pm:1.232
--- loncom/interface/lonnavmaps.pm:1.231 Sat Sep 20 09:21:45 2003
+++ loncom/interface/lonnavmaps.pm Sun Sep 21 20:48:32 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.231 2003/09/20 13:21:45 www Exp $
+# $Id: lonnavmaps.pm,v 1.232 2003/09/22 00:48:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -107,9 +107,9 @@
# Handle header-only request
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;
@@ -117,9 +117,9 @@
# Send header, don't cache this page
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');
}
&Apache::loncommon::no_cache($r);
$r->send_http_header;
Index: loncom/interface/lonpickcourse.pm
diff -u loncom/interface/lonpickcourse.pm:1.7 loncom/interface/lonpickcourse.pm:1.8
--- loncom/interface/lonpickcourse.pm:1.7 Thu Mar 27 20:53:55 2003
+++ loncom/interface/lonpickcourse.pm Sun Sep 21 20:48:32 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Pick a course
#
-# $Id: lonpickcourse.pm,v 1.7 2003/03/28 01:53:55 www Exp $
+# $Id: lonpickcourse.pm,v 1.8 2003/09/22 00:48:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -33,10 +33,11 @@
use Apache::loncommon;
use Apache::loncoursedata;
use Apache::lonnet;
+use Apache::lonlocal;
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;
@@ -76,6 +77,10 @@
'31104000' => 'last year'));
$r->print(&Apache::loncommon::bodytag("Selecting a Course"));
+ my %lt=&Apache::lonlocal::texthash(
+ 'cac' => 'Course Activity',
+ 'cde' => 'Course Description',
+ 'cdo' => 'Course Domain');
$r->print(<<ENDSCRIPT);
<script>
function gochoose(cname,cdom) {
@@ -93,11 +98,11 @@
<input type="hidden" name="cdomelement" value="$ENV{'form.cdomelement'}" />
<input type="hidden" name="form" value="$ENV{'form.form'}" />
-Course Activity: $sincefilterform
+$lt{'cac'}: $sincefilterform
<br />
-Course Domain: $domainselectform
+$lt{'cdo'}: $domainselectform
<br />
-Course Description:
+$lt{'cde'}:
<input type="text" name="descriptfilter" size="40" value="$descriptfilter" />
<p><input type="submit" name="gosearch" value="Search" /></p>
</form>
@@ -105,7 +110,7 @@
ENDSCRIPT
# ---------------------------------------------------------------- Get the data
if ($ENV{'form.gosearch'}) {
- $r->print('Searching ...<br /> <br />');
+ $r->print(&mt('Searching').' ...<br /> <br />');
$r->rflush();
unless ($descriptfilter) { $descriptfilter='.'; }
my $timefilter=($sincefilter==-1?1:time-$sincefilter);
Index: loncom/interface/lonpickstudent.pm
diff -u loncom/interface/lonpickstudent.pm:1.6 loncom/interface/lonpickstudent.pm:1.7
--- loncom/interface/lonpickstudent.pm:1.6 Wed Aug 13 16:40:31 2003
+++ loncom/interface/lonpickstudent.pm Sun Sep 21 20:48:32 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Pick a student from the classlist
#
-# $Id: lonpickstudent.pm,v 1.6 2003/08/13 20:40:31 www Exp $
+# $Id: lonpickstudent.pm,v 1.7 2003/09/22 00:48:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -33,10 +33,11 @@
use Apache::loncommon;
use Apache::loncoursedata;
use Apache::lonnet;
+use Apache::lonlocal;
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;
@@ -110,7 +111,7 @@
}
$r->print('</table><p> ');
if ($filter ne '.') {
- $r->print('<br/ >Name starting with "'.$filter.'"<br />');
+ $r->print('<br/ >'.&mt('Name starting with').' "'.$filter.'"<br />');
}
$r->print('</p><p><table>');
# ------------------------------------------------------------------ Students
@@ -123,7 +124,7 @@
if (($uname=~/^$filter/) ||
($fullname=~/^$filter/i)) {
$r->print('<tr><td>'.
- '<input type="button" value="Select" onClick="gochoose('.
+ '<input type="button" value="'.&mt('Select').'" onClick="gochoose('.
"'".$uname."','".$udom."')".'" /></td>'.
'<td><tt>'.$uname.'</tt></td><td> <tt>'.$udom.
'</tt></td><td>'.
@@ -137,11 +138,11 @@
$r->print('</table></p>');
} else {
- $r->print('<h3>Users with Roles Assigned by '.
+ $r->print('<h3>'.&mt('Users with Roles Assigned by').' '.
&Apache::loncommon::plainname($ENV{'user.name'},
$ENV{'user.domain'}).'</h3>');
if ($filter ne '.') {
- $r->print('<br/ >Name starting with "'.$filter.'"<br />');
+ $r->print('<br/ >'.&mt('Name starting with').' "'.$filter.'"<br />');
}
$r->print('<p><table>');
my %users=&Apache::lonnet::get_my_roles();
Index: loncom/interface/lonquickgrades.pm
diff -u loncom/interface/lonquickgrades.pm:1.24 loncom/interface/lonquickgrades.pm:1.25
--- loncom/interface/lonquickgrades.pm:1.24 Thu Aug 7 13:26:45 2003
+++ loncom/interface/lonquickgrades.pm Sun Sep 21 20:48:32 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Quick Student Grades Display
#
-# $Id:
+# $Id: lonquickgrades.pm,v 1.25 2003/09/22 00:48:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -32,6 +32,8 @@
use strict;
use Apache::Constants qw(:common :http);
use POSIX;
+use Apache::loncommon;
+use Apache::lonlocal;
sub handler {
my $r = shift;
@@ -46,9 +48,9 @@
# Handle header-only request
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;
@@ -56,9 +58,9 @@
# Send header, don't cache this page
if ($ENV{'browser.mathml'}) {
- $r->content_type('text/xml');
+ &Apache::loncommon::content_type('text/xml');
} else {
- $r->content_type('text/html');
+ &Apache::loncommon::content_type('text/html');
}
&Apache::loncommon::no_cache($r);
$r->send_http_header;
@@ -198,7 +200,7 @@
# Second pass: Print the maps.
$r->print('<table cellspacing="3" border="2"><tr><td align="center"><b>Folder</b></td>');
- $title = $showPoints ? "Points Scored" : "Done";
+ $title =&mt($showPoints ? "Points Scored" : "Done");
$r->print("<td align='center'>$title / Total</td><tr>" . "\n\n");
while ($depth > 0) {
if ($curRes == $iterator->BEGIN_MAP()) {$depth++;}
@@ -232,7 +234,7 @@
my $ratio = $topLevelRight / $topLevelParts;
my $color = mixColors(\@start, \@end, $ratio);
$r->print("<tr><td bgcolor='$color'>");
- $r->print("Problems Not Contained In A Folder</td><td>");
+ $r->print(&mt("Problems Not Contained In A Folder")."</td><td>");
$r->print("$topLevelRight / $topLevelParts</td></tr>");
}
@@ -241,9 +243,9 @@
$title = $showPoints ? "Points" : "Parts Done";
$r->print("<tr><td colspan='2' align='right'>Total $title: <b>$totalRight</b><br>");
- $r->print("Max Possible To Date $maxHelpLink: <b>$totalPossible</b><br>");
+ $r->print(&mt("Max Possible To Date")." $maxHelpLink: <b>$totalPossible</b><br>");
$title = $showPoints ? "Points" : "Parts";
- $r->print("Total $title In Course: <b>$totalParts</b></td></tr>\n\n");
+ $r->print(&mt("Total $title In Course").": <b>$totalParts</b></td></tr>\n\n");
$r->print("</table></body></html>");
Index: loncom/interface/lonremote.pm
diff -u loncom/interface/lonremote.pm:1.9 loncom/interface/lonremote.pm:1.10
--- loncom/interface/lonremote.pm:1.9 Sat Aug 23 04:29:01 2003
+++ loncom/interface/lonremote.pm Sun Sep 21 20:48:32 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# User Authentication Module
#
-# $Id: lonremote.pm,v 1.9 2003/08/23 08:29:01 albertel Exp $
+# $Id: lonremote.pm,v 1.10 2003/09/22 00:48:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -102,7 +102,7 @@
my $lowerurl=$ENV{'form.url'};
unless ($lowerurl) { $lowerurl='/adm/menu'; }
- $r->content_type('text/html');
+ &Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
return OK if $r->header_only;
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.185 loncom/interface/lonsearchcat.pm:1.186
--- loncom/interface/lonsearchcat.pm:1.185 Mon Jul 14 15:26:24 2003
+++ loncom/interface/lonsearchcat.pm Sun Sep 21 20:48:32 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.185 2003/07/14 19:26:24 matthew Exp $
+# $Id: lonsearchcat.pm,v 1.186 2003/09/22 00:48:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -82,6 +82,7 @@
use GDBM_File;
use Apache::loncommon();
use Apache::lonmysql();
+use Apache::lonlocal;
# ---------------------------------------- variables used throughout the module
@@ -186,7 +187,7 @@
# This button is different for the RAT compared to
# normal invocation.
#
- $r->content_type('text/html');
+ &Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
return OK if $r->header_only;
##
@@ -1229,6 +1230,7 @@
my ($title,$name,$default,$anyvalue,$anytag,$functionref,@idlist)=@_;
if (! defined($functionref)) { $functionref = sub { $_[0]}; }
my $selout='';
+ $title=&mt($title);
if (defined($title)) {
my $uctitle=uc($title);
$selout="\n".'<p><font color="#800000" face="helvetica">'.
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.17 loncom/localize/localize/de.pm:1.18
--- loncom/localize/localize/de.pm:1.17 Sun Sep 21 16:06:36 2003
+++ loncom/localize/localize/de.pm Sun Sep 21 20:48:32 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# German Localization Lexicon
#
-# $Id: de.pm,v 1.17 2003/09/21 20:06:36 www Exp $
+# $Id: de.pm,v 1.18 2003/09/22 00:48:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -90,6 +90,45 @@
'Section/Group'
=> 'Gruppe',
+ 'today'
+=> 'heute',
+
+ 'last week'
+=> 'letzte Woche',
+
+ 'last month'
+=> 'letzten Monat',
+
+ 'last three months'
+=> 'letzte drei Monate',
+
+ 'last six months'
+=> 'letzte sechs Monate',
+
+ 'last year'
+=> 'letztes Jahr',
+
+ 'Submit'
+=> 'Speichern',
+
+ 'Part is not open to be viewed. It'
+=> 'Aufgabenteil nicht verfügbar. Er',
+
+'Unable to determine if this resource is open due to network problems. Please try again later.'
+=> 'Aufgrund von Netzwerkproblemen kann nicht festgestellt werden, ob dieses Dokument verfügbar ist. Bitte versuchen Sie es später noch einmal.',
+
+'Note: it can take up to 10 minutes for changes to take effect for all users.'
+=> 'Es kann bis zu 10 Minuten dauern, bis die Änderungen für alle Benutzer Effekt haben',
+
+ 'Language'
+=> 'Sprache',
+
+ 'Notes'
+=> 'Notizen',
+
+ 'Abstract'
+=> 'Beschreibung',
+
'Create a user or modify the roles and privileges of a user'
=> 'Benutzeraccounts erzeugen und Ändern von Benutzerprivilegien',
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.133 loncom/publisher/lonpublisher.pm:1.134
--- loncom/publisher/lonpublisher.pm:1.133 Tue Sep 16 18:00:25 2003
+++ loncom/publisher/lonpublisher.pm Sun Sep 21 20:48:32 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.133 2003/09/16 22:00:25 albertel Exp $
+# $Id: lonpublisher.pm,v 1.134 2003/09/22 00:48:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -142,6 +142,7 @@
use Apache::lonnet();
use Apache::loncommon();
use Apache::lonmysql;
+use Apache::lonlocal;
use vars qw(%metadatafields %metadatakeys);
my %addid;
@@ -324,6 +325,7 @@
#########################################
sub textfield {
my ($title,$name,$value)=@_;
+ $title=&mt($title);
my $uctitle=uc($title);
return "\n<p><font color=\"#800000\" face=\"helvetica\"><b>$uctitle:".
"</b></font></p><br />".
@@ -337,6 +339,7 @@
sub selectbox {
my ($title,$name,$value,$functionref,@idlist)=@_;
+ $title=&mt($title);
my $uctitle=uc($title);
$value=(split(/\s*,\s*/,$value))[-1];
my $selout="\n<p><font color=\"#800000\" face=\"helvetica\"><b>$uctitle:".
--www1064191712--