The assumption of an array in the eval'd code was causing the forced
en_us tag to fail. Here we push the default en_us into the list of
locales in a more structured way to ensure that failure doesn't happen.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Ben Shum <ben@evergreener.net>
sub load_locale_handlers {
my $ctx = shift;
my @raw = @_;
- my %locales;
+ my %locales = (en_us => []);
while (@raw) {
my ($l,$file) = (shift(@raw),shift(@raw));
$locales{$l} ||= [];
my $editor = new_editor();
my @locale_tags = sort { length($a) <=> length($b) } keys %locales;
- # always fall back to en_us, the assumed template language
- push(@locale_tags, 'en_us');
-
for my $idx (0..$#locale_tags) {
my $tag = $locale_tags[$idx];