$ctx->{template_paths} = [ reverse @template_paths ];
my %locales = $r->dir_config->get('OILSWebLocale');
- load_locale_handlers($ctx, %locales);
+ load_locale_handlers($r, $ctx, %locales);
$ctx->{locales} = \%registered_locales;
# Create an I18N sub-module for each supported locale
# Each module creates its own MakeText lexicon by parsing .po/.mo files
sub load_locale_handlers {
+ my $r = shift;
my $ctx = shift;
my %locales = @_;
eval $eval;
if ($@) {
- warn "$@\n" if $@;
+ $r->log->error("egweb: error loading .po file for $tag / $locale_name: $@");
} else {
+ $r->log->debug("egweb: successfully loaded .po file for $tag / $locale_name");
$registered_locales{"$tag"} = $locale_name;
}
}