summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install/Util.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-04-04 02:05:36 +0200
committerlpsolit%gmail.com <>2008-04-04 02:05:36 +0200
commit8ab64629d3a091a0ccb6af52c48ee7bb9fd8834d (patch)
treeeb8bd3bdb7a2d3b520f18938364268c6ab4858ed /Bugzilla/Install/Util.pm
parent59d76227caa0d8304f243bd8d2d8534ed6d80e81 (diff)
downloadbugzilla-8ab64629d3a091a0ccb6af52c48ee7bb9fd8834d.tar.gz
bugzilla-8ab64629d3a091a0ccb6af52c48ee7bb9fd8834d.tar.xz
Bug 182975: Bugzilla directory structure to be adopted to l10n needs - Patch by A.A. Shimono (himorin) <shimono@mozilla.gr.jp> r=LpSolit r=mkanat a=LpSolit
Diffstat (limited to 'Bugzilla/Install/Util.pm')
-rw-r--r--Bugzilla/Install/Util.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/Bugzilla/Install/Util.pm b/Bugzilla/Install/Util.pm
index 9aeeca486..4c3754964 100644
--- a/Bugzilla/Install/Util.pm
+++ b/Bugzilla/Install/Util.pm
@@ -38,6 +38,7 @@ our @EXPORT_OK = qw(
get_version_and_os
indicate_progress
install_string
+ include_languages
template_include_path
vers_cmp
get_console_locale
@@ -123,7 +124,7 @@ sub install_string {
return $string_template;
}
-sub template_include_path {
+sub include_languages {
my ($params) = @_;
$params ||= {};
@@ -171,7 +172,12 @@ sub template_include_path {
if (!grep($_ eq 'en', @usedlanguages)) {
push(@usedlanguages, 'en');
}
+
+ return @usedlanguages;
+}
+sub template_include_path {
+ my @usedlanguages = include_languages(@_);
# Now, we add template directories in the order they will be searched:
# First, we add extension template directories, because extension templates
@@ -516,6 +522,12 @@ Each extension has its own directory.
Note that languages are sorted by the user's preference (as specified
in their browser, usually), and extensions are sorted alphabetically.
+=item C<include_languages>
+
+Used by L<Bugzilla::Template> to determine the languages' list which
+are compiled with the browser's I<Accept-Language> and the languages
+of installed templates.
+
=item C<vers_cmp>
=over