More i18n echo cleansing.
This commit is contained in:
parent
7e336171b7
commit
6bee83de68
3 changed files with 60 additions and 27 deletions
|
|
@ -756,7 +756,7 @@ sub www_edit {
|
||||||
my $form = $self->getEditForm;
|
my $form = $self->getEditForm;
|
||||||
$form->submit;
|
$form->submit;
|
||||||
|
|
||||||
return $admin->getAdminConsole->render($form->print, $i18n->echo("payment methods"));
|
return $admin->getAdminConsole->render($form->print, $i18n->get('payment methods'));
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -425,29 +425,29 @@ sub definition {
|
||||||
%fields = (
|
%fields = (
|
||||||
vendorId => {
|
vendorId => {
|
||||||
fieldType => 'text',
|
fieldType => 'text',
|
||||||
label => $i18n->echo('vendorId'),
|
label => $i18n->get('vendorId'),
|
||||||
hoverHelp => $i18n->echo('vendorId help'),
|
hoverHelp => $i18n->get('vendorId help'),
|
||||||
},
|
},
|
||||||
password => {
|
password => {
|
||||||
fieldType => 'password',
|
fieldType => 'password',
|
||||||
label => $i18n->echo('password'),
|
label => $i18n->get('password'),
|
||||||
hoverHelp => $i18n->echo('password help'),
|
hoverHelp => $i18n->get('password help'),
|
||||||
},
|
},
|
||||||
useCVV2 => {
|
useCVV2 => {
|
||||||
fieldType => 'yesNo',
|
fieldType => 'yesNo',
|
||||||
label => $i18n->echo('use cvv2'),
|
label => $i18n->get('use cvv2'),
|
||||||
hoverHelp => $i18n->echo('use cvv2 help'),
|
hoverHelp => $i18n->get('use cvv2 help'),
|
||||||
},
|
},
|
||||||
emailMessage => {
|
emailMessage => {
|
||||||
fieldType => 'textarea',
|
fieldType => 'textarea',
|
||||||
label => $i18n->echo('emailMessage'),
|
label => $i18n->get('emailMessage'),
|
||||||
hoverHelp => $i18n->echo('emailMessage help'),
|
hoverHelp => $i18n->get('emailMessage help'),
|
||||||
},
|
},
|
||||||
# readonly stuff from old plugin here?
|
# readonly stuff from old plugin here?
|
||||||
);
|
);
|
||||||
|
|
||||||
push @{ $definition }, {
|
push @{ $definition }, {
|
||||||
name => $i18n->echo('Itransact'),
|
name => $i18n->get('Itransact'),
|
||||||
properties => \%fields,
|
properties => \%fields,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -509,11 +509,11 @@ plugin.
|
||||||
sub getButton {
|
sub getButton {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $session = $self->session;
|
my $session = $self->session;
|
||||||
my $i18n = WebGUI::International->new($session, 'PayDriver_ITansact');
|
my $i18n = WebGUI::International->new($session, 'PayDriver_ITransact');
|
||||||
|
|
||||||
my $payForm = WebGUI::Form::formHeader($session)
|
my $payForm = WebGUI::Form::formHeader($session)
|
||||||
. $self->getDoFormTags('getCredentials')
|
. $self->getDoFormTags('getCredentials')
|
||||||
. WebGUI::Form::submit($session, {value => $i18n->echo('ITransact') })
|
. WebGUI::Form::submit($session, {value => $i18n->get('ITransact') })
|
||||||
. WebGUI::Form::formFooter($session);
|
. WebGUI::Form::formFooter($session);
|
||||||
|
|
||||||
return $payForm;
|
return $payForm;
|
||||||
|
|
@ -733,8 +733,7 @@ sub www_getCredentials {
|
||||||
|
|
||||||
# Process form errors
|
# Process form errors
|
||||||
if ( $errors ) {
|
if ( $errors ) {
|
||||||
#### TODO: i18n
|
$output .= $i18n->get('error occurred message')
|
||||||
$output .= $i18n->echo('The following errors occurred:')
|
|
||||||
. '<ul><li>' . join( '</li><li>', @{ $errors } ) . '</li></ul>';
|
. '<ul><li>' . join( '</li><li>', @{ $errors } ) . '</li></ul>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,21 +2,31 @@ package WebGUI::i18n::English::PayDriver_ITransact;
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
our $I18N = {
|
our $I18N = {
|
||||||
|
'error occurred message' => {
|
||||||
|
message => q|The following errors occurred:|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q|The message that tell the user that there were some errors in their submitted credentials.|,
|
||||||
|
},
|
||||||
|
'ITransact' => {
|
||||||
|
message => q|ITransact|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q|The name of the ITransact plugin|,
|
||||||
|
},
|
||||||
'label' => {
|
'label' => {
|
||||||
message => q|Credit Card|,
|
message => q|Credit Card|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
context => q|Default ITransact payment gateway label|
|
context => q|Default ITransact payment gateway label|
|
||||||
},
|
},
|
||||||
'phone' => {
|
'phone' => {
|
||||||
message => q|Telephone Number|,
|
message => q|Telephone Number|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
context => q|Form label in the checkout form of the iTransact module.|
|
context => q|Form label in the checkout form of the iTransact module.|
|
||||||
},
|
},
|
||||||
'country' => {
|
'country' => {
|
||||||
message => q|Country|,
|
message => q|Country|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
context => q|Form label in the checkout form of the iTransact module.|
|
context => q|Form label in the checkout form of the iTransact module.|
|
||||||
},
|
},
|
||||||
'firstName' => {
|
'firstName' => {
|
||||||
message => q|First name|,
|
message => q|First name|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
|
|
@ -73,21 +83,45 @@ our $I18N = {
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
context => q|Form label in the configuration form of the iTransact module.|
|
context => q|Form label in the configuration form of the iTransact module.|
|
||||||
},
|
},
|
||||||
|
'vendorId help' => {
|
||||||
|
message => q|Fill in the username or vendor id you got from ITransact.|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q|Hover help for vendor id in the configuration form of the iTransact module.|
|
||||||
|
},
|
||||||
|
|
||||||
'use cvv2' => {
|
'use cvv2' => {
|
||||||
message => q|Use CVV2|,
|
message => q|Use CVV2|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
context => q|Form label in the configuration form of the iTransact module.|
|
context => q|Form label in the configuration form of the iTransact module.|
|
||||||
},
|
},
|
||||||
|
'use cvv2 help' => {
|
||||||
|
message => q|Set this option to yes if you want to use CVV2.|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q|Form label in the configuration form of the iTransact module.|
|
||||||
|
},
|
||||||
|
|
||||||
'emailMessage' => {
|
'emailMessage' => {
|
||||||
message => q|Email message|,
|
message => q|Email message|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
context => q|Form label in the configuration form of the iTransact module.|
|
context => q|Form label in the configuration form of the iTransact module.|
|
||||||
},
|
},
|
||||||
|
'emailMessage help' => {
|
||||||
|
message => q|The message that will be appended to the email user will receive from ITransact.|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q|Hover help for the email message field in the configuration form of the iTransact module.|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
'password' => {
|
'password' => {
|
||||||
message => q|Password|,
|
message => q|Password|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
context => q|Form label in the configuration form of the iTransact module.|
|
context => q|Form label in the configuration form of the iTransact module.|
|
||||||
},
|
},
|
||||||
|
'password help' => {
|
||||||
|
message => q|The password for your ITransact account.|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q|Hover help for the password field in the configuration form of the iTransact module.|
|
||||||
|
},
|
||||||
|
|
||||||
'module name' => {
|
'module name' => {
|
||||||
message => q|iTransact|,
|
message => q|iTransact|,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue