[LON-CAPA-cvs] cvs: loncom /interface printout.pl
bisitz
bisitz at source.lon-capa.org
Thu Jan 31 10:09:23 EST 2013
bisitz Thu Jan 31 15:09:23 2013 EDT
Modified files:
/loncom/interface printout.pl
Log:
Download Links:
- Improved and consistent wording and layout
- Internationalization
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.152 loncom/interface/printout.pl:1.153
--- loncom/interface/printout.pl:1.152 Wed Apr 11 11:40:14 2012
+++ loncom/interface/printout.pl Thu Jan 31 15:09:23 2013
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
#
-# $Id: printout.pl,v 1.152 2012/04/11 11:40:14 goltermann Exp $
+# $Id: printout.pl,v 1.153 2013/01/31 15:09:23 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -553,14 +553,21 @@
my @garb = ($texlog,$texaux,$texdvi,$texps);
# unlink @garb;
unlink($duefile);
- print "<a href=\"/prtspool/$pdf_file\">$link_text - click here to download pdf</a>";
- print "\n";
+ print
+ '<p>'
+ .&mt('[_1] - [_2]Your PDF file[_3] is ready for download.',
+ $link_text,'<a href="/prtspool/'.$pdf_file.'">','</a>')
+ .'</p>'."\n";
}
unlink($missfonts_file);
}
} else {
- print "LaTeX file $texfile was not created successfully";
+ print
+ '<p class="LC_error">'
+ .&mt('The LaTeX file [_1] was not created successfully.',
+ '<span class="LC_filename">'.$texfile.'</span>')
+ .'</p>';
}
}
print "<br />";
@@ -572,11 +579,15 @@
$file=~s/\.tex/.\pdf/;
$statement.=' '.$file;
}
- print("<pre>Zip Output:\n");
+ print('<p>'.&mt('Zip Output:')."\n<pre>\n");
system($statement);
- print("</pre>");
+ print("</pre></p>\n");
$zipfile=~s{^\Q$perlvar{'lonPrtDir'}\E}{/prtspool};
- print "<br /> A <a href=\"$zipfile\">ZIP file</a> of all the PDFs.";
+ print
+ '<p>'
+ .&mt('A [_1]ZIP file[_2] of all the PDF files is ready for download.',
+ '<a href="'.$zipfile.'">','</a>')
+ .'</p>';
}
if ($advanced_role) { &Apache::lonhtmlcommon::Close_PrgWin('',\%prog_state); }
print(&Apache::loncommon::end_page());
More information about the LON-CAPA-cvs
mailing list