From 73df992b1e61761a9ab13835d14f10ed9c67a5ce Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sat, 20 Jun 2009 01:45:55 +0000 Subject: [PATCH] Add missing Tax i18n. --- lib/WebGUI/Shop/Tax.pm | 17 ++++++++--------- lib/WebGUI/i18n/English/Tax.pm | 29 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/lib/WebGUI/Shop/Tax.pm b/lib/WebGUI/Shop/Tax.pm index f18189b13..165f3fc4b 100644 --- a/lib/WebGUI/Shop/Tax.pm +++ b/lib/WebGUI/Shop/Tax.pm @@ -239,13 +239,13 @@ sub www_manage { my %options = map { $_ => $_ } @{ $plugins }; my $pluginSwitcher = - '
Active tax plugin' + '
'.$i18n->get('Active tax plugin') . '' . WebGUI::Form::formHeader( $session ) . WebGUI::Form::hidden( $session, { name => 'shop', value => 'tax' } ) . WebGUI::Form::hidden( $session, { name => 'method', value => 'setActivePlugin' } ) - . 'Active Tax Plugin ' + . $i18n->get('Active tax plugin') . ' ' . WebGUI::Form::selectBox( $session, { name => 'className', value => $activePlugin, options => \%options } ) - . WebGUI::Form::submit( $session, { value => 'Switch' } ) + . WebGUI::Form::submit( $session, { value => $i18n->get('Switch') } ) . WebGUI::Form::formFooter( $session ) . '
' ; @@ -282,27 +282,26 @@ sub www_setActivePlugin { return $session->privilege->insufficient unless $admin->canManage; - my $message = - 'Changing the active tax plugin will change the way tax is calulated on all products you sell. ' - . 'Are you really sure you want to switch?'; + my $i18n = WebGUI::International->new( $session, 'Tax' ); + my $message = $i18n->get('Stern tax warning'); my $proceedForm = WebGUI::Form::formHeader( $session ) . WebGUI::Form::hidden( $session, { name => 'shop', value => 'tax' } ) . WebGUI::Form::hidden( $session, { name => 'method', value => 'setActivePluginConfirm' } ) . WebGUI::Form::hidden( $session, { name => 'className', value => $session->form->process('className') } ) - . WebGUI::Form::submit( $session, { value => 'Proceed' } ) + . WebGUI::Form::submit( $session, { value => $i18n->get('Proceed') } ) . WebGUI::Form::formFooter( $session ); my $cancelForm = WebGUI::Form::formHeader( $session ) . WebGUI::Form::hidden( $session, { name => 'shop', value => 'tax' } ) . WebGUI::Form::hidden( $session, { name => 'method', value => 'manage' } ) - . WebGUI::Form::submit( $session, { value => 'Cancel', extras => 'class="backwardButton"' } ) + . WebGUI::Form::submit( $session, { value => $i18n->get('cancel','WebGUI'), extras => 'class="backwardButton"' } ) . WebGUI::Form::formFooter( $session ); my $output = $message . $proceedForm . $cancelForm; - return $admin->getAdminConsole->render( $output, 'Switch tax plugin' ); + return $admin->getAdminConsole->render( $output, $i18n->get('Switch tax plugin') ); } #------------------------------------------------------------------- diff --git a/lib/WebGUI/i18n/English/Tax.pm b/lib/WebGUI/i18n/English/Tax.pm index 4975700fa..78695fa83 100644 --- a/lib/WebGUI/i18n/English/Tax.pm +++ b/lib/WebGUI/i18n/English/Tax.pm @@ -97,6 +97,35 @@ our $I18N = { context => q|help for tax rate override field| }, + 'Switch tax plugin' => { + message => q|Switch tax plugin|, + lastUpdated => 0, + context => q||, + }, + + 'Switch' => { + message => q|Switch|, + lastUpdated => 0, + context => q|Switch, as in to exchange one for another.|, + }, + + 'Active tax plugin' => { + message => q|Active tax plugin|, + lastUpdated => 0, + context => q||, + }, + + 'Stern tax warning' => { + message => q|Changing the active tax plugin will change the way tax is calulated on all products you sell. Are you really sure you want to switch?|, + lastUpdated => 0, + context => q||, + }, + + 'Proceed' => { + message => q|Proceed|, + lastUpdated => 0, + context => q|to continue|, + }, };