-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/emails template improvement #1823
Feature/emails template improvement #1823
Conversation
714adf0
to
8b41e41
Compare
msgstr "" | ||
|
||
# html/captive-portal/templates/emails/emails-guest_local_account_creation.html | ||
msgid "User Account" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User account already exists, please use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been addressed
msgid "Hostname" | ||
msgstr "" | ||
|
||
msgid "MAC address" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MAC Address already exists, please use it.
5c86d63
to
67fa6f0
Compare
3b8c08e
to
021f08c
Compare
Rebased |
Bump |
my $logger = get_logger(); | ||
|
||
use POSIX; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to define it on the top
use POSIX; | ||
my $user_locale = clean_locale(setlocale(POSIX::LC_MESSAGES)); | ||
if ($type eq $SPONSOR_ACTIVATION) { | ||
$logger->info('We are doing sponsor activation', $user_locale); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug
$options{INCLUDE_PATH} = "$conf_dir/templates/"; | ||
$options{ENCODING} = "utf8"; | ||
|
||
use POSIX; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
define on top
my ($locale) = @_; | ||
if( $locale =~ /^([A-Za-z_]+)\./ ) { | ||
$locale = $1; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else default locale ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine, we just want to get rid of any extra dot-delimited part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but if there is no dot ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there's no dot, $locale
doesn't change :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure ? my $lang = clean_locale($self->app->session->{locale});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i prefer to have something more explicit like:
sub clean_locale {
my ($locale) = @;
if( $locale =~ /^([A-Za-z]+)./ ) {
return $1;
}
return $locale;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! Just adding return $locale;
would fix it.
Agree to merge |
Description
Allow the possibility to use translation for the emails template, also allow customizable emails template per portal profile.
Impacts
every flow that include eamil, billing, email source, sponsor, pre-registraiton, etc.
Issue
Fixes #1322
Delete branch after merge
NO
NEWS file entries
New Features
UPGRADE file entries