summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-09-14 15:57:29 +0200
committermkanat%bugzilla.org <>2006-09-14 15:57:29 +0200
commit761ae5de8e84ffd70489260364db5789ec135b55 (patch)
treea488a2e5b3605444791ba414dde70ee6292e1cab /Bugzilla/Install.pm
parent47ee48a70f9abe53bc5e934f6e83c997b350dc6b (diff)
downloadbugzilla-761ae5de8e84ffd70489260364db5789ec135b55.tar.gz
bugzilla-761ae5de8e84ffd70489260364db5789ec135b55.tar.xz
Bug 352608: Make checksetup more localizable
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=myk
Diffstat (limited to 'Bugzilla/Install.pm')
-rw-r--r--Bugzilla/Install.pm20
1 files changed, 5 insertions, 15 deletions
diff --git a/Bugzilla/Install.pm b/Bugzilla/Install.pm
index c50abea95..18f7473ae 100644
--- a/Bugzilla/Install.pm
+++ b/Bugzilla/Install.pm
@@ -32,6 +32,7 @@ use Bugzilla::Group;
use Bugzilla::Product;
use Bugzilla::User;
use Bugzilla::User::Setting;
+use Bugzilla::Util qw(get_text);
use Bugzilla::Version;
use constant SETTINGS => {
@@ -210,7 +211,8 @@ sub create_default_product {
# Make the default Classification if it doesn't already exist.
if (!$dbh->selectrow_array('SELECT 1 FROM classifications')) {
my $class = DEFAULT_CLASSIFICATION;
- print "Creating default classification '$class->{name}'...\n";
+ print get_text('install_default_classification',
+ { name => $class->{name} }) . "\n";
$dbh->do('INSERT INTO classifications (name, description)
VALUES (?, ?)',
undef, $class->{name}, $class->{description});
@@ -219,7 +221,8 @@ sub create_default_product {
# And same for the default product/component.
if (!$dbh->selectrow_array('SELECT 1 FROM products')) {
my $default_prod = DEFAULT_PRODUCT;
- print "Creating initial dummy product '$default_prod->{name}'...\n";
+ print get_text('install_default_product',
+ { name => $default_prod->{name} }) . "\n";
$dbh->do(q{INSERT INTO products (name, description)
VALUES (?,?)},
@@ -367,19 +370,6 @@ sub _create_admin_exit {
exit 1;
}
-sub get_text {
- my ($name, $vars) = @_;
- my $template = Bugzilla->template;
- $vars ||= {};
- $vars->{'message'} = $name;
- my $message;
- $template->process('global/message.txt.tmpl', $vars, \$message)
- || ThrowTemplateError($template->error());
- # Remove the indenting that exists in messages.html.tmpl.
- $message =~ s/^ //gm;
- return $message;
-}
-
1;
__END__