# HG changeset patch # User cin # Date 1389881450 -14400 # Node ID a471e8b77544ee728a4221543afb6ee1d06a8445 # Parent 2eed076cb944b818f4270465dd4265f84d4d89eb sync diff -r 2eed076cb944 -r a471e8b77544 Lib/IMPL/Resources/StringLocaleMap.pm --- a/Lib/IMPL/Resources/StringLocaleMap.pm Wed Jan 15 17:20:54 2014 +0400 +++ b/Lib/IMPL/Resources/StringLocaleMap.pm Thu Jan 16 18:10:50 2014 +0400 @@ -58,9 +58,21 @@ sub LoadMap { my ($this,$locale,$default) = @_; + my @spec = split /_/, $locale; + + my @locales; + + do { + push @locales, join('_', @spec); + } while(pop @spec); + my $file = first { -f } map { - my $name = FS->catfile($_,$locale,$this->name); - ("$name.s", "$name.p"); + my $path = $_; + + map { + my $name = FS->catfile($path,$_,$this->name); + ("$name.s", "$name.p"); + } @locales; } $this->paths; if($file) {