diff --git a/lib/WebGUI/AssetAspect/Subscriber.pm b/lib/WebGUI/AssetAspect/Subscriber.pm
index 4d685d2..5406ea3 100644
--- a/lib/WebGUI/AssetAspect/Subscriber.pm
+++ b/lib/WebGUI/AssetAspect/Subscriber.pm
@@ -424,7 +424,9 @@ sub unsubscribe {
#----------------------------------------------------------------------------
sub www_confirmMutation {
my $self = shift;
- my ($form, $db) = $self->session->quick( 'form', 'db' );
+ my $session = $self->session;
+ my $i18n = WebGUI::International->new( $session, 'AssetAspect_Subscriber' );
+ my ($form, $db) = $session->quick( 'form', 'db' );
my $code = $form->get('code');
return unless $code;
@@ -438,20 +440,20 @@ sub www_confirmMutation {
);
if ( $userId ) {
+ $self->logConfirmation( $code );
+
if ( $type eq 'subscribe' ) {
$self->getSubscriptionGroup->addUsers( [ $userId ] );
+ return $self->processStyle( sprintf $i18n->get( 'subscription successful'), $self->getUrl );
}
elsif ( $type eq 'unsubscribe' ) {
$self->getSubscriptionGroup->deleteUsers( [ $userId ] );
+ return $self->processStyle( sprintf $i18n->get( 'unsubscription successful' ), $self->getUrl );
}
-
- $self->logConfirmation( $code );
- }
- else {
- return $self->processStyle( 'Verkeerde code' );
}
- return $self->processStyle( 'U bent aangemeld voor deze nieuwsbrief' );
+ return $self->processStyle( $i18n->get( 'wrong code' ) );
+
}
#----------------------------------------------------------------------------
diff --git a/lib/WebGUI/i18n/Dutch/AssetAspect_Subscriber.pm b/lib/WebGUI/i18n/Dutch/AssetAspect_Subscriber.pm
index e98d0d4..38eff77 100644
--- a/lib/WebGUI/i18n/Dutch/AssetAspect_Subscriber.pm
+++ b/lib/WebGUI/i18n/Dutch/AssetAspect_Subscriber.pm
@@ -53,6 +53,15 @@ our $I18N = {
message => 'Anonieme inschrijvingen zijn niet toegestaan. Log in om in- of uit te schrijven.',
},
+ 'subscription succesful' => {
+ message => 'Uw inschrijving is geslaagd. Terug naar de site',
+ },
+ 'unsubscription succesful' => {
+ message => 'Uw uitschrijving is geslaagd. Terug naar de site',
+ },
+ 'wrong code' => {
+ message => 'De verificatiecode in de link is onbekend, al gebruikt of verlopen. Als u zich wilt in- of uitschrijven probeer dit dan opnieuw of neem contact op met de websitebeheerders.',
+ },
};
1;
diff --git a/lib/WebGUI/i18n/English/AssetAspect_Subscriber.pm b/lib/WebGUI/i18n/English/AssetAspect_Subscriber.pm
index b71782e..cb71474 100644
--- a/lib/WebGUI/i18n/English/AssetAspect_Subscriber.pm
+++ b/lib/WebGUI/i18n/English/AssetAspect_Subscriber.pm
@@ -52,7 +52,17 @@ our $I18N = {
'anonnymous not allowed' => {
message => 'Anonymous subscription is not allowed. Please log in to (un)subscribe',
},
-
+
+ 'subscription succesful' => {
+ message => 'You are succesfully subscribed. Back to site',
+ },
+ 'unsubscription succesful' => {
+ message => 'You are succesfully unsubscribed. Back to site',
+ },
+ 'wrong code' => {
+ message => 'The verification code you supplied is either unknown, already used or expired. Please try again to (un)subscribe or contact the site administrators.',
+ },
+
};
1;