summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Install/Util.pm7
-rw-r--r--Bugzilla/Template.pm3
2 files changed, 7 insertions, 3 deletions
diff --git a/Bugzilla/Install/Util.pm b/Bugzilla/Install/Util.pm
index 14744ef8c..ef71f5b75 100644
--- a/Bugzilla/Install/Util.pm
+++ b/Bugzilla/Install/Util.pm
@@ -364,7 +364,10 @@ sub include_languages {
# supports.
my $wanted;
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 {
$wanted = _wanted_languages();
@@ -441,7 +444,7 @@ sub _template_base_directories {
sub template_include_path {
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:
my $template_dirs = _template_base_directories();
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 46a4b6b72..e2d5280e8 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -1017,7 +1017,8 @@ sub precompile_templates {
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) {
my $template = Bugzilla::Template->create(include_path => [$dir]);