Commit 15081765 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

When fallback language "en" is used, use "en_US" translation catalog.

parent 4059f73e
......@@ -577,14 +577,18 @@ sub dgettext {
return '8bit';
}
return $msgid unless $self->{lang} and $self->{lang} ne 'en';
my $gettext_locale;
unless ($self->{lang} and $self->{lang} ne 'en') {
$gettext_locale = 'en_US';
} else {
$gettext_locale = $self->{locale};
## Workaround for nb/nn.
my $locale = $self->{locale};
$locale =~ s/^(nb|nn)\b/${1}_NO/;
# Workaround for nb/nn.
$gettext_locale =~ s/^(nb|nn)\b/${1}_NO/;
}
local %ENV;
$ENV{'LANGUAGE'} = $locale;
$ENV{'LANGUAGE'} = $gettext_locale;
return Locale::Messages::dgettext($textdomain, $msgid);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment