From 30577b05ca6957abef1df593de43cd33fdfd3ea0 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Wed, 20 Oct 2010 23:03:45 +0000 Subject: [PATCH] Bug 605425: Non-english templates are no longer precompiled by checksetup r/a=mkanat git-svn-id: svn://10.0.0.236/trunk@261435 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- mozilla/webtools/bugzilla/Bugzilla/Install/Util.pm | 7 +++++-- mozilla/webtools/bugzilla/Bugzilla/Template.pm | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index 491dde17566..7f265e87cea 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -7552 \ No newline at end of file +7553 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/Bugzilla/Install/Util.pm b/mozilla/webtools/bugzilla/Bugzilla/Install/Util.pm index 14744ef8ce3..ef71f5b75be 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Install/Util.pm +++ b/mozilla/webtools/bugzilla/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/mozilla/webtools/bugzilla/Bugzilla/Template.pm b/mozilla/webtools/bugzilla/Bugzilla/Template.pm index 46a4b6b72c6..e2d5280e874 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Template.pm +++ b/mozilla/webtools/bugzilla/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]);