Internationalize MailingSubscribe reg plugin

This commit is contained in:
Martin Kamerbeek 2010-11-04 14:27:52 +01:00
parent 87afa361f4
commit 837123de93
3 changed files with 34 additions and 6 deletions

View file

@ -71,6 +71,7 @@ sub getSummaryTemplateVars {
my $self = shift;
my $includeAdminControls = shift;
my $session = $self->session;
my $i18n = WebGUI::International->new( $session, 'RegistrationStep_MailingSubscribe' );
my @fields;
# Fetch preferred homepage url
@ -82,12 +83,8 @@ sub getSummaryTemplateVars {
@{ $mailings };
push @fields, {
field_label => 'Subscribe to mailings',
field_label => $i18n->get( 'Subscribe to mailings' ),
field_value => join( ', ', map { $_->getTitle } @assets ),
# field_formElement => WebGUI::Form::text( $session, {
# name => 'preferredHomepageUrl',
# value => $preferredHomepageUrl,
# }),
};
# Setup tmpl_var
@ -106,6 +103,7 @@ sub getViewVars {
my $session = $self->session;
my $form = $session->form;
my $user = $self->registration->instance->user;
my $i18n = WebGUI::International->new( $session, 'RegistrationStep_MailingSubscribe' );
my $availableMailings = $self->getAvailableMailings;
@ -141,7 +139,7 @@ sub getViewVars {
name => 'subscribeMailings',
value => $id,
checked => $isSubscribed{ $id },
label => 'Subscribe to this mailing',
label => $i18n->get( 'Subscribe to this mailing' ),
}),
}
);

View file

@ -0,0 +1,15 @@
package WebGUI::i18n::Dutch::RegistrationStep_MailingSubscribe;
use strict;
our $I18N = {
'Subscribe to mailings' => {
message => 'Abonneren op nieuwsbrieven',
},
'Subscribe to this mailing' => {
message => 'Abonneer op deze nieuwsbrief',
},
};
1;

View file

@ -0,0 +1,15 @@
package WebGUI::i18n::English::RegistrationStep_MailingSubscribe;
use strict;
our $I18N = {
'Subscribe to mailings' => {
message => 'Subscribe to mailings',
},
'Subscribe to this mailing' => {
message => 'Subscribe to this mailing',
},
};
1;