Commit bd8840d6 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 605425: Non-english templates are no longer precompiled by checksetup

r/a=mkanat
parent 7c94f7af
...@@ -364,7 +364,10 @@ sub include_languages { ...@@ -364,7 +364,10 @@ sub include_languages {
# supports. # supports.
my $wanted; my $wanted;
if ($params->{language}) { if ($params->{language}) {
$wanted = [$params->{language}]; # We can pass several languages at once as an arrayref
# or a single language.
$wanted = $params->{language};
$wanted = [$wanted] unless ref $wanted;
} }
else { else {
$wanted = _wanted_languages(); $wanted = _wanted_languages();
...@@ -441,7 +444,7 @@ sub _template_base_directories { ...@@ -441,7 +444,7 @@ sub _template_base_directories {
sub template_include_path { sub template_include_path {
my ($params) = @_; my ($params) = @_;
my @used_languages = include_languages(@_); my @used_languages = include_languages($params);
# Now, we add template directories in the order they will be searched: # Now, we add template directories in the order they will be searched:
my $template_dirs = _template_base_directories(); my $template_dirs = _template_base_directories();
......
...@@ -1017,7 +1017,8 @@ sub precompile_templates { ...@@ -1017,7 +1017,8 @@ sub precompile_templates {
print install_string('template_precompile') if $output; print install_string('template_precompile') if $output;
my $paths = template_include_path(); # Pre-compile all available languages.
my $paths = template_include_path({ language => Bugzilla->languages });
foreach my $dir (@$paths) { foreach my $dir (@$paths) {
my $template = Bugzilla::Template->create(include_path => [$dir]); my $template = Bugzilla::Template->create(include_path => [$dir]);
......
Markdown is supported
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