From 40b86e3dfdefaca693b16300aa51de1bbbc96264 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 2 Jan 2009 21:08:43 +0000 Subject: [PATCH] i18n the Attachments Form control --- lib/WebGUI/Form/Attachments.pm | 11 +++++++---- lib/WebGUI/i18n/English/WebGUI.pm | 12 ++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/lib/WebGUI/Form/Attachments.pm b/lib/WebGUI/Form/Attachments.pm index 01411cd33..aec722f87 100644 --- a/lib/WebGUI/Form/Attachments.pm +++ b/lib/WebGUI/Form/Attachments.pm @@ -219,12 +219,14 @@ sub www_show { $style->setLink($url->extras("/AttachmentsControl/AttachmentsControl.css"), {type=>"text/css", rel=>"stylesheet"}); my $uploadControl = ''; - my $i18n = WebGUI::International->new($session, "Control_Attachments"); + my $i18n = WebGUI::International->new($session); my $maxFiles = $form->param('maxAttachments') - scalar(@assetIds) ; my $attachmentForms = ''; foreach my $assetId (@assetIds) { $attachmentForms .= ''; } + my $upload = $i18n->get('Upload','Operation_FormHelpers'); + my $uploadAttachment = $i18n->get('Upload an attachment','WebGUI'); if ($maxFiles > 0) { $uploadControl = '
X @@ -237,8 +239,8 @@ sub www_show { '. $attachmentForms .' -
- Upload an attachment. + + '.$uploadAttachment. ' '; } my $attachments = ''; @@ -265,12 +267,13 @@ sub www_show { $attachments .= ''; } } + my $instructions = $i18n->get('Upload attachments here. Copy and paste attachments into the editor.','WebGUI'); my $output = ' '.$style->generateAdditionalHeadTags.' - '.$uploadControl.'
Upload attachments here. Copy and paste attachments into the editor.
+ '.$uploadControl.'
'.$instructions.'
'.$attachments.'
'; return $output; } diff --git a/lib/WebGUI/i18n/English/WebGUI.pm b/lib/WebGUI/i18n/English/WebGUI.pm index a504c4a1d..d25dbf04b 100644 --- a/lib/WebGUI/i18n/English/WebGUI.pm +++ b/lib/WebGUI/i18n/English/WebGUI.pm @@ -4313,6 +4313,18 @@ Users may override this setting in their profile. context => q|Abbreviation for Really Simple Syndication, and other similar terms.|, }, + 'Upload an attachment' => { + message => q|Upload an attachment|, + context => q|Label in the Attachments form control.|, + lastUpdated => 1230930518, + }, + + 'Upload attachments here. Copy and paste attachments into the editor.' => { + message => q|Upload attachments here. Copy and paste attachments into the editor.|, + context => q|Label in the Attachments form control.|, + lastUpdated => 1230930518, + }, + }; 1;