i18n the download type choices in the SQL Report.

This commit is contained in:
Colin Kuskie 2009-11-16 16:31:24 -08:00
parent 67c66c87b3
commit 01e873eec7
2 changed files with 25 additions and 11 deletions

View file

@ -270,9 +270,9 @@ sub getEditForm {
# Download Type # Download Type
my %downloadTypes; my %downloadTypes;
tie %downloadTypes, 'Tie::IxHash', tie %downloadTypes, 'Tie::IxHash',
"none" => "No Download", "none" => $i18n->get("No Download"),
"csv" => "CSV", "csv" => $i18n->get("CSV"),
"template" => "Template", "template" => $i18n->get("Template"),
; ;
$tabform->getTab("properties")->radioList( $tabform->getTab("properties")->radioList(
@ -798,12 +798,10 @@ sub www_download {
unless $self->session->user->isInGroup($self->getValue("downloadUserGroup")); unless $self->session->user->isInGroup($self->getValue("downloadUserGroup"));
# Set filename and mimetype # Set filename and mimetype
if ($self->getValue("downloadType") eq "csv") if ($self->getValue("downloadType") eq "csv") {
{
$self->session->http->setFilename($self->getValue("downloadFilename"),"application/octet-stream"); $self->session->http->setFilename($self->getValue("downloadFilename"),"application/octet-stream");
} }
else else {
{
$self->session->http->setFilename($self->getValue("downloadFilename"),$self->getValue("downloadMimeType")); $self->session->http->setFilename($self->getValue("downloadFilename"),$self->getValue("downloadMimeType"));
} }

View file

@ -301,8 +301,24 @@ will always be false for query5.|,
}, },
'download type description' => { 'download type description' => {
message => "The type of download to create.", message => "The type of download to create. No download will prevent a download from being created. CSV will cause a CSV file to be returned. Template will use the Download Template to generate the file to download.",
lastUpdated => 0, lastUpdated => 1258417417,
},
'No Download' => {
message => "No Download",
lastUpdated => 1258417417,
},
'CSV' => {
message => "CSV",
lastUpdated => 1258417417,
context => q|Short for Comma Separated Variables|,
},
'Template' => {
message => "Template",
lastUpdated => 1258417417,
}, },
'download filename' => { 'download filename' => {
@ -311,8 +327,8 @@ will always be false for query5.|,
}, },
'download filename description' => { 'download filename description' => {
message => "The filename of the file to download. If left blank, will autogenerate.", message => "The filename of the file to download. If left blank, a name will be created.",
lastUpdated => 0, lastUpdated => 1258417288,
}, },
'download template' => { 'download template' => {