Skip to content

Commit

Permalink
Default to the configured locale in the config
Browse files Browse the repository at this point in the history
  • Loading branch information
fdurand committed May 15, 2024
1 parent 18f2509 commit cbcfc66
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/pf/config/util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,11 @@ sub build_email {
);
my $locale = delete $TmplOptions{__locale};
my $old_locale;
if (defined $locale && length($locale)) {
$old_locale = POSIX::setlocale(POSIX::LC_MESSAGES);
POSIX::setlocale(POSIX::LC_MESSAGES, $locale);
if (!(defined $locale && length($locale))) {
$locale = $Config{advanced}{language};
}
$old_locale = POSIX::setlocale(POSIX::LC_MESSAGES);
POSIX::setlocale(POSIX::LC_MESSAGES, $locale);

while (my ($k, $v) = each %$data) {
if (!ref $v && !looks_like_number($v)) {
Expand Down

0 comments on commit cbcfc66

Please sign in to comment.