diff options
author | mkanat%bugzilla.org <> | 2009-08-07 19:12:25 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-08-07 19:12:25 +0200 |
commit | db79da1e677e492afeadb9c7af89633fde1e2cfe (patch) | |
tree | 4f034eec1f02f458671f4935f7b16d18ddfe30fa | |
parent | 6b309a04c2e57d0ba79dc15829ce7839efd3e72f (diff) | |
download | bugzilla-db79da1e677e492afeadb9c7af89633fde1e2cfe.tar.gz bugzilla-db79da1e677e492afeadb9c7af89633fde1e2cfe.tar.xz |
Bug 509054: Internationalize feature descriptions in checksetup.pl
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=mkanat
-rw-r--r-- | Bugzilla/Install/Requirements.pm | 56 | ||||
-rw-r--r-- | template/en/default/setup/strings.txt.pl | 18 |
2 files changed, 51 insertions, 23 deletions
diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm index 8dc4164ad..2b496fc2c 100644 --- a/Bugzilla/Install/Requirements.pm +++ b/Bugzilla/Install/Requirements.pm @@ -149,13 +149,13 @@ sub OPTIONAL_MODULES { package => 'GD', module => 'GD', version => '1.20', - feature => 'Graphical Reports, New Charts, Old Charts' + feature => [qw(graphical_reports new_charts old_charts)], }, { package => 'Chart', module => 'Chart::Base', version => '1.0', - feature => 'New Charts, Old Charts' + feature => [qw(new_charts old_charts)], }, { package => 'Template-GD', @@ -163,68 +163,68 @@ sub OPTIONAL_MODULES { # on Template-Toolkits after 2.14, and still works with 2.14 and lower. module => 'Template::Plugin::GD::Image', version => 0, - feature => 'Graphical Reports' + feature => ['graphical_reports'], }, { package => 'GDTextUtil', module => 'GD::Text', version => 0, - feature => 'Graphical Reports' + feature => ['graphical_reports'], }, { package => 'GDGraph', module => 'GD::Graph', version => 0, - feature => 'Graphical Reports' + feature => ['graphical_reports'], }, { package => 'XML-Twig', module => 'XML::Twig', version => 0, - feature => 'Move Bugs Between Installations' + feature => ['moving'], }, { package => 'MIME-tools', # MIME::Parser is packaged as MIME::Tools on ActiveState Perl module => ON_WINDOWS ? 'MIME::Tools' : 'MIME::Parser', version => '5.406', - feature => 'Move Bugs Between Installations' + feature => ['moving'], }, { package => 'libwww-perl', module => 'LWP::UserAgent', version => 0, - feature => 'Automatic Update Notifications' + feature => ['updates'], }, { package => 'PatchReader', module => 'PatchReader', version => '0.9.4', - feature => 'Patch Viewer' + feature => ['patch_viewer'], }, { package => 'PerlMagick', module => 'Image::Magick', version => 0, - feature => 'Optionally Convert BMP Attachments to PNGs' + feature => ['compress_bmps'], }, { package => 'perl-ldap', module => 'Net::LDAP', version => 0, - feature => 'LDAP Authentication' + feature => ['auth_ldap'], }, { package => 'Authen-SASL', module => 'Authen::SASL', version => 0, - feature => 'SMTP Authentication' + feature => ['smtp_auth'], }, { package => 'RadiusPerl', module => 'Authen::Radius', version => 0, - feature => 'RADIUS Authentication' + feature => ['auth_radius'], }, { package => 'SOAP-Lite', @@ -232,26 +232,26 @@ sub OPTIONAL_MODULES { version => 0, # These versions (0.70 -> 0.710.05) are affected by bug 468009 blacklist => ['^0\.70', '^0\.710?\.0[1-5]$'], - feature => 'XML-RPC Interface' + feature => ['xmlrpc'], }, { package => 'JSON-RPC', module => 'JSON::RPC', version => 0, - feature => 'JSON-RPC Interface' + feature => ['jsonrpc'], }, { # We need the 'utf8_mode' method of HTML::Parser, for HTML::Scrubber. package => 'HTML-Parser', module => 'HTML::Parser', version => '3.40', - feature => 'More HTML in Product/Group Descriptions' + feature => ['html_desc'], }, { package => 'HTML-Scrubber', module => 'HTML::Scrubber', version => 0, - feature => 'More HTML in Product/Group Descriptions' + feature => ['html_desc'], }, # Inbound Email @@ -259,13 +259,13 @@ sub OPTIONAL_MODULES { package => 'Email-MIME-Attachment-Stripper', module => 'Email::MIME::Attachment::Stripper', version => 0, - feature => 'Inbound Email' + feature => ['inbound_email'], }, { package => 'Email-Reply', module => 'Email::Reply', version => 0, - feature => 'Inbound Email' + feature => ['inbound_email'], }, # Mail Queueing @@ -273,13 +273,13 @@ sub OPTIONAL_MODULES { package => 'TheSchwartz', module => 'TheSchwartz', version => 0, - feature => 'Mail Queueing', + feature => ['jobqueue'], }, { package => 'Daemon-Generic', module => 'Daemon::Generic', version => 0, - feature => 'Mail Queueing', + feature => ['jobqueue'], }, # mod_perl @@ -287,7 +287,7 @@ sub OPTIONAL_MODULES { package => 'mod_perl', module => 'mod_perl2', version => '1.999022', - feature => 'mod_perl' + feature => ['mod_perl'], }, ); @@ -411,7 +411,8 @@ sub print_module_instructions { print '*' x TABLE_WIDTH . "\n"; foreach my $package (@missing) { 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 { } } +sub _translate_feature { + my $features = shift; + my @strings; + foreach my $feature (@$features) { + push(@strings, install_string("feature_$feature")); + } + return join(', ', @strings); +} + sub check_graphviz { my ($output) = @_; diff --git a/template/en/default/setup/strings.txt.pl b/template/en/default/setup/strings.txt.pl index fdbde4e77..3b75b73b3 100644 --- a/template/en/default/setup/strings.txt.pl +++ b/template/en/default/setup/strings.txt.pl @@ -43,6 +43,24 @@ COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands and then re-run checksetup.pl): EOT 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" . "* Running on ##os_name## ##os_ver##", install_all => <<EOT, |