Commit db79da1e authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 509054: Internationalize feature descriptions in checksetup.pl

Patch by Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=mkanat
parent 6b309a04
...@@ -149,13 +149,13 @@ sub OPTIONAL_MODULES { ...@@ -149,13 +149,13 @@ sub OPTIONAL_MODULES {
package => 'GD', package => 'GD',
module => 'GD', module => 'GD',
version => '1.20', version => '1.20',
feature => 'Graphical Reports, New Charts, Old Charts' feature => [qw(graphical_reports new_charts old_charts)],
}, },
{ {
package => 'Chart', package => 'Chart',
module => 'Chart::Base', module => 'Chart::Base',
version => '1.0', version => '1.0',
feature => 'New Charts, Old Charts' feature => [qw(new_charts old_charts)],
}, },
{ {
package => 'Template-GD', package => 'Template-GD',
...@@ -163,68 +163,68 @@ sub OPTIONAL_MODULES { ...@@ -163,68 +163,68 @@ sub OPTIONAL_MODULES {
# on Template-Toolkits after 2.14, and still works with 2.14 and lower. # on Template-Toolkits after 2.14, and still works with 2.14 and lower.
module => 'Template::Plugin::GD::Image', module => 'Template::Plugin::GD::Image',
version => 0, version => 0,
feature => 'Graphical Reports' feature => ['graphical_reports'],
}, },
{ {
package => 'GDTextUtil', package => 'GDTextUtil',
module => 'GD::Text', module => 'GD::Text',
version => 0, version => 0,
feature => 'Graphical Reports' feature => ['graphical_reports'],
}, },
{ {
package => 'GDGraph', package => 'GDGraph',
module => 'GD::Graph', module => 'GD::Graph',
version => 0, version => 0,
feature => 'Graphical Reports' feature => ['graphical_reports'],
}, },
{ {
package => 'XML-Twig', package => 'XML-Twig',
module => 'XML::Twig', module => 'XML::Twig',
version => 0, version => 0,
feature => 'Move Bugs Between Installations' feature => ['moving'],
}, },
{ {
package => 'MIME-tools', package => 'MIME-tools',
# MIME::Parser is packaged as MIME::Tools on ActiveState Perl # MIME::Parser is packaged as MIME::Tools on ActiveState Perl
module => ON_WINDOWS ? 'MIME::Tools' : 'MIME::Parser', module => ON_WINDOWS ? 'MIME::Tools' : 'MIME::Parser',
version => '5.406', version => '5.406',
feature => 'Move Bugs Between Installations' feature => ['moving'],
}, },
{ {
package => 'libwww-perl', package => 'libwww-perl',
module => 'LWP::UserAgent', module => 'LWP::UserAgent',
version => 0, version => 0,
feature => 'Automatic Update Notifications' feature => ['updates'],
}, },
{ {
package => 'PatchReader', package => 'PatchReader',
module => 'PatchReader', module => 'PatchReader',
version => '0.9.4', version => '0.9.4',
feature => 'Patch Viewer' feature => ['patch_viewer'],
}, },
{ {
package => 'PerlMagick', package => 'PerlMagick',
module => 'Image::Magick', module => 'Image::Magick',
version => 0, version => 0,
feature => 'Optionally Convert BMP Attachments to PNGs' feature => ['compress_bmps'],
}, },
{ {
package => 'perl-ldap', package => 'perl-ldap',
module => 'Net::LDAP', module => 'Net::LDAP',
version => 0, version => 0,
feature => 'LDAP Authentication' feature => ['auth_ldap'],
}, },
{ {
package => 'Authen-SASL', package => 'Authen-SASL',
module => 'Authen::SASL', module => 'Authen::SASL',
version => 0, version => 0,
feature => 'SMTP Authentication' feature => ['smtp_auth'],
}, },
{ {
package => 'RadiusPerl', package => 'RadiusPerl',
module => 'Authen::Radius', module => 'Authen::Radius',
version => 0, version => 0,
feature => 'RADIUS Authentication' feature => ['auth_radius'],
}, },
{ {
package => 'SOAP-Lite', package => 'SOAP-Lite',
...@@ -232,26 +232,26 @@ sub OPTIONAL_MODULES { ...@@ -232,26 +232,26 @@ sub OPTIONAL_MODULES {
version => 0, version => 0,
# These versions (0.70 -> 0.710.05) are affected by bug 468009 # These versions (0.70 -> 0.710.05) are affected by bug 468009
blacklist => ['^0\.70', '^0\.710?\.0[1-5]$'], blacklist => ['^0\.70', '^0\.710?\.0[1-5]$'],
feature => 'XML-RPC Interface' feature => ['xmlrpc'],
}, },
{ {
package => 'JSON-RPC', package => 'JSON-RPC',
module => 'JSON::RPC', module => 'JSON::RPC',
version => 0, version => 0,
feature => 'JSON-RPC Interface' feature => ['jsonrpc'],
}, },
{ {
# We need the 'utf8_mode' method of HTML::Parser, for HTML::Scrubber. # We need the 'utf8_mode' method of HTML::Parser, for HTML::Scrubber.
package => 'HTML-Parser', package => 'HTML-Parser',
module => 'HTML::Parser', module => 'HTML::Parser',
version => '3.40', version => '3.40',
feature => 'More HTML in Product/Group Descriptions' feature => ['html_desc'],
}, },
{ {
package => 'HTML-Scrubber', package => 'HTML-Scrubber',
module => 'HTML::Scrubber', module => 'HTML::Scrubber',
version => 0, version => 0,
feature => 'More HTML in Product/Group Descriptions' feature => ['html_desc'],
}, },
# Inbound Email # Inbound Email
...@@ -259,13 +259,13 @@ sub OPTIONAL_MODULES { ...@@ -259,13 +259,13 @@ sub OPTIONAL_MODULES {
package => 'Email-MIME-Attachment-Stripper', package => 'Email-MIME-Attachment-Stripper',
module => 'Email::MIME::Attachment::Stripper', module => 'Email::MIME::Attachment::Stripper',
version => 0, version => 0,
feature => 'Inbound Email' feature => ['inbound_email'],
}, },
{ {
package => 'Email-Reply', package => 'Email-Reply',
module => 'Email::Reply', module => 'Email::Reply',
version => 0, version => 0,
feature => 'Inbound Email' feature => ['inbound_email'],
}, },
# Mail Queueing # Mail Queueing
...@@ -273,13 +273,13 @@ sub OPTIONAL_MODULES { ...@@ -273,13 +273,13 @@ sub OPTIONAL_MODULES {
package => 'TheSchwartz', package => 'TheSchwartz',
module => 'TheSchwartz', module => 'TheSchwartz',
version => 0, version => 0,
feature => 'Mail Queueing', feature => ['jobqueue'],
}, },
{ {
package => 'Daemon-Generic', package => 'Daemon-Generic',
module => 'Daemon::Generic', module => 'Daemon::Generic',
version => 0, version => 0,
feature => 'Mail Queueing', feature => ['jobqueue'],
}, },
# mod_perl # mod_perl
...@@ -287,7 +287,7 @@ sub OPTIONAL_MODULES { ...@@ -287,7 +287,7 @@ sub OPTIONAL_MODULES {
package => 'mod_perl', package => 'mod_perl',
module => 'mod_perl2', module => 'mod_perl2',
version => '1.999022', version => '1.999022',
feature => 'mod_perl' feature => ['mod_perl'],
}, },
); );
...@@ -411,7 +411,8 @@ sub print_module_instructions { ...@@ -411,7 +411,8 @@ sub print_module_instructions {
print '*' x TABLE_WIDTH . "\n"; print '*' x TABLE_WIDTH . "\n";
foreach my $package (@missing) { foreach my $package (@missing) {
printf "* \%${longest_name}s * %-${remaining_space}s *\n", printf "* \%${longest_name}s * %-${remaining_space}s *\n",
$package->{package}, $package->{feature}; $package->{package},
_translate_feature($package->{feature});
} }
} }
...@@ -474,6 +475,15 @@ sub print_module_instructions { ...@@ -474,6 +475,15 @@ sub print_module_instructions {
} }
} }
sub _translate_feature {
my $features = shift;
my @strings;
foreach my $feature (@$features) {
push(@strings, install_string("feature_$feature"));
}
return join(', ', @strings);
}
sub check_graphviz { sub check_graphviz {
my ($output) = @_; my ($output) = @_;
......
...@@ -43,6 +43,24 @@ COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands ...@@ -43,6 +43,24 @@ COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands
and then re-run checksetup.pl): and then re-run checksetup.pl):
EOT EOT
done => 'done.', done => 'done.',
feature_auth_ldap => 'LDAP Authentication',
feature_auth_radius => 'RADIUS Authentication',
feature_compress_bmps => 'Convert BMP Attachments to PNG',
feature_graphical_reports => 'Graphical Reports',
feature_html_desc => 'More HTML in Product/Group Descriptions',
feature_inbound_email => 'Inbound Email',
feature_jobqueue => 'Mail Queueing',
feature_jsonrpc => 'JSON-RPC Interface',
feature_new_charts => 'New Charts',
feature_old_charts => 'Old Charts',
feature_mod_perl => 'mod_perl',
feature_moving => 'Move Bugs Between Installations',
feature_patch_viewer => 'Patch Viewer',
feature_smtp_auth => 'SMTP Authentication',
feature_updates => 'Automatic Update Notifications',
feature_xmlrpc => 'XML-RPC Interface',
header => "* This is Bugzilla ##bz_ver## on perl ##perl_ver##\n" header => "* This is Bugzilla ##bz_ver## on perl ##perl_ver##\n"
. "* Running on ##os_name## ##os_ver##", . "* Running on ##os_name## ##os_ver##",
install_all => <<EOT, install_all => <<EOT,
......
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