--- loncom/interface/lonmsgdisplay.pm 2008/06/24 11:06:03 1.89
+++ loncom/interface/lonmsgdisplay.pm 2008/10/23 10:15:37 1.94
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.89 2008/06/24 11:06:03 bisitz Exp $
+# $Id: lonmsgdisplay.pm,v 1.94 2008/10/23 10:15:37 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1239,7 +1239,11 @@ sub compout {
my $dismsg='';
my $disbase='';
my $attachrow;
- my $func=&mt('Send New');
+ my $func1='Send'; # do not translate here!
+ my %func2=( # do not translate here!
+ 'ma' => 'Message',
+ 'msg' => 'Messages',
+ );
my %lt=&Apache::lonlocal::texthash('us' => 'Username',
'do' => 'Domain',
'ad' => 'Additional Recipients',
@@ -1247,8 +1251,6 @@ sub compout {
'ar' => 'Allow replies',
'sb' => 'Subject',
'ca' => 'Cancel',
- 'ma' => 'Mail',
- 'msg' => 'Messages',
'gen' => 'Generate messages from a file',
'gmt' => 'General message text',
'tff' => 'The file format for the uploaded portion of the message is',
@@ -1256,7 +1258,7 @@ sub compout {
'atta' => 'Attachment',
);
my %attachmax = (
- text => '(128 KB max size)',
+ text => &mt('(128 KB max size)'),
num => 131072,
);
if (!$forwarding && !$multiforward) {
@@ -1296,7 +1298,7 @@ sub compout {
%content=&Apache::lonmsg::unpackagemsg($message{$forwarding},$folder);
$dispcrit.='';
- $func=&mt('Forward');
+ $func1='Forward'; # do not translate here!
$dissub=&mt('Forwarding').': '.$content{'subject'};
$dismsg=&mt('Forwarded message from').' '.
@@ -1310,7 +1312,7 @@ sub compout {
%content=&Apache::lonmsg::unpackagemsg($message{$replying},$folder);
$dispcrit.='';
- $func=&mt('Send Reply to');
+ $func1='Send Reply to'; # do not translate here!
$dissub=&mt('Reply').': '.$content{'subject'};
$dismsg='> '.$content{'message'};
@@ -1421,7 +1423,7 @@ ENDREPSCRIPT
&mt('Unless you choose otherwise:').'
'.
&mt("The subject in each forwarded message will be 'Forwarding:' followed by the original subject.").'
'.
&mt("The message itself will begin with a first line: 'Forwarded message from' followed by the original sender's name.").'
');
- $func=&mt('Forward');
+ $func1='Forward'; # do not translate here!
$dissub = &mt('Forwarding').': ';
$subj_size = '10';
my $extra = '<'.&mt('original subject').'> '.
@@ -1440,7 +1442,7 @@ $latexHelp.
foreach my $msg (@to_forward) {
$r->print('');
}
- $r->print(&submit_button_row($folder,$dismode,$func.' '.$lt{'msg'},
+ $r->print(&submit_button_row($folder,$dismode,&mt($func1.' '.$func2{'msg'}),
\%lt));
} elsif ($broadcast ne 'upload') {
$subj_size = '50';
@@ -1462,7 +1464,7 @@ $attachrow
$dispcrit
$disbase
ENDCOMP
- $r->print(&submit_button_row($folder,$dismode,$func.' '.$lt{'ma'},
+ $r->print(&submit_button_row($folder,$dismode,&mt($func1.' '.$func2{'ma'}),
\%lt));
$r->print($citation);
if (exists($env{'form.ref'})) {
@@ -2096,7 +2098,6 @@ sub displaymessage {
my %message=&Apache::lonnet::get('nohist_email'.$suffix,[$msgid]);
my %content=&Apache::lonmsg::unpackagemsg($message{$msgid});
my $counter=0;
- $r->print('
');
my $escmsgid=&escape($msgid);
foreach (@messages) {
if ($_->[5] eq $escmsgid){
@@ -2104,7 +2105,6 @@ sub displaymessage {
}
$counter++;
}
- $r->print('
');
my $see_anonymous;
my $from_student = 0;
@@ -2155,18 +2155,33 @@ sub displaymessage {
$symb=&Apache::lonnet::symbread($content{'baseurl'});
}
if ($env{'user.adv'}) {
- my $adv_actions;
- $r->print('
'.&mt('Currently available actions (will open extra window)').':
');
+ my $actionlist='';
if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {
- $r->print('