Bug 7026 Web installer does not switch language

Language installer should switch to template files of language selected in
first step. It used to do that, but the feature seems to be broken now. Web
installer remains English after selecting a different language.

To reproduce:

- make sure your database is empty
- run 'perl translate install <some language>
- access web installer
- select language other then en on the first page

=> templates should change to translated templates

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

Test plan provided works, correct language and sample files are selected.

In a second test I deleted the staff templates for de-DE and repeated
the steps. de-DE is not offered in the language selection of the web installer
now, but does appear in the opaclanguages list after running the web installer.
(Bug 5660)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Frédéric Demians 2011-10-17 08:03:29 +02:00 committed by Chris Cormack
parent 7631bae2b2
commit 1bf7550a82

View file

@ -163,13 +163,7 @@ sub _get_template_language {
my ($opaclang)= @_;
return 'en' unless $opaclang;
my $path= C4::Context->config('intrahtdocs')."/prog/$opaclang";
my $pref= ','.C4::Context->preference('language').',';
if(-d $path) {
if($pref =~ /,$opaclang,/ ) {
return $opaclang;
}
}
return 'en';
-d $path ? $opaclang : 'en';
}
=item checkauth