From a9e4de8ffa02738f0d66d10d05150953458ab64e Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 25 Jan 2007 04:41:26 +0000 Subject: [PATCH] add missing i18n labels from ZipArchive template --- .../ZipArchiveTMPL00000001.tmpl | 23 +++++++++++++ lib/WebGUI/Asset/File/ZipArchive.pm | 3 ++ lib/WebGUI/Help/Asset_ZipArchive.pm | 6 ++++ lib/WebGUI/i18n/English/Asset_ZipArchive.pm | 34 ++++++++++++++++--- 4 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 docs/upgrades/templates-7.3.7/ZipArchiveTMPL00000001.tmpl diff --git a/docs/upgrades/templates-7.3.7/ZipArchiveTMPL00000001.tmpl b/docs/upgrades/templates-7.3.7/ZipArchiveTMPL00000001.tmpl new file mode 100644 index 000000000..228e197eb --- /dev/null +++ b/docs/upgrades/templates-7.3.7/ZipArchiveTMPL00000001.tmpl @@ -0,0 +1,23 @@ +#ZipArchiveTMPL00000001 + + + +

+
+
+ + + + + + + + + + + + + + diff --git a/lib/WebGUI/Asset/File/ZipArchive.pm b/lib/WebGUI/Asset/File/ZipArchive.pm index fce239756..26687dfb6 100644 --- a/lib/WebGUI/Asset/File/ZipArchive.pm +++ b/lib/WebGUI/Asset/File/ZipArchive.pm @@ -220,6 +220,9 @@ sub view { unless($self->get("showPage")) { $var{pageError} = "true"; } + my $i18n = WebGUI::International->new($self->session,"Asset_ZipArchive"); + $var{noInitialPage} = $i18n->get('noInitialPage'); + $var{noFileSpecified} = $i18n->get('noFileSpecified'); my $out = $self->processTemplate(\%var,undef,$self->{_viewTemplate}); if (!$self->session->var->isAdminOn && $self->get("cacheTimeout") > 10) { WebGUI::Cache->new($self->session,"view_".$self->getId)->set($out,$self->get("cacheTimeout")); diff --git a/lib/WebGUI/Help/Asset_ZipArchive.pm b/lib/WebGUI/Help/Asset_ZipArchive.pm index c856a45cd..558e8f2c6 100644 --- a/lib/WebGUI/Help/Asset_ZipArchive.pm +++ b/lib/WebGUI/Help/Asset_ZipArchive.pm @@ -63,6 +63,12 @@ our $HELP = { { 'name' => 'error' }, + { + 'name' => 'noInitialPage var' + }, + { + 'name' => 'noFileSpecified var' + }, { 'name' => 'fileUrl' }, diff --git a/lib/WebGUI/i18n/English/Asset_ZipArchive.pm b/lib/WebGUI/i18n/English/Asset_ZipArchive.pm index 6fffc33a3..9e2186a08 100644 --- a/lib/WebGUI/i18n/English/Asset_ZipArchive.pm +++ b/lib/WebGUI/i18n/English/Asset_ZipArchive.pm @@ -86,37 +86,63 @@ our $I18N = { }, - 'zip archive template body' => { + 'zip archive template body' => { message => q|

The following variables are available in Zip Archive Templates:

|, context => q|Describing the zip archive template variables|, lastUpdated => 1148953449, }, - 'zip archive asset variables title' => { + 'zip archive asset variables title' => { message => q|Zip Archive, Asset Template Variables|, lastUpdated => 1109287565, }, - 'zip archive asset variables body' => { + 'zip archive asset variables body' => { message => q|

The following variables are included by default in the Zip Archive Templates. They may or may not be particularly useful:

|, context => q|Describing the zip archive template asset variables|, lastUpdated => 1148953449, }, - 'showPage' => { + 'showPage' => { message => q|The name of the file from the Zip Archive that will be displayed when this Asset is viewed. |, lastUpdated => 1166823840, }, + 'templateId' => { + message => q|The ID of the template used to display the contents of the Zip Archive. + |, + lastUpdated => 1166823840, + }, + 'templateId' => { message => q|The ID of the template used to display the contents of the Zip Archive. |, lastUpdated => 1166823840, }, + 'noInitialPage' => { + message => q|Error: No initial page specified.|, + lastUpdated => 1169699552, + }, + + 'noInitialPage var' => { + message => q|An internationalized label for an error when no initial page was specified.|, + lastUpdated => 1169699552, + }, + + 'noFileSpecified' => { + message => q|Error: No file specified.|, + lastUpdated => 1169699552, + }, + + 'noFileSpecified var' => { + message => q|An internationalized label for an error when no file was specified.|, + lastUpdated => 1169699552, + }, + };