[Jifty-commit] jifty branch, setupwizard-refactor, updated. 74a60ebf2843656bc02818f4675ed1887c749558
Jifty commits
jifty-commit at lists.jifty.org
Tue Jul 20 13:13:55 EDT 2010
The branch, setupwizard-refactor has been updated
via 74a60ebf2843656bc02818f4675ed1887c749558 (commit)
from bcdf36d9ed994d68477a8dcb7cc0545bf23eb225 (commit)
Summary of changes:
lib/Jifty/Plugin/SetupWizard/View/Helpers.pm | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 74a60ebf2843656bc02818f4675ed1887c749558
Author: Thomas Sibley <trs at bestpractical.com>
Date: Tue Jul 20 13:15:11 2010 -0400
Fix pluralizing in unavailable drivers template
diff --git a/lib/Jifty/Plugin/SetupWizard/View/Helpers.pm b/lib/Jifty/Plugin/SetupWizard/View/Helpers.pm
index f732a36..62f7f27 100644
--- a/lib/Jifty/Plugin/SetupWizard/View/Helpers.pm
+++ b/lib/Jifty/Plugin/SetupWizard/View/Helpers.pm
@@ -42,7 +42,7 @@ private template 'database_widget' => sub {
{ display => 'SQLite', value => 'SQLite' },
{ display => 'MySQL', value => 'mysql' },
{ display => 'PostgreSQL', value => 'Pg' },
- #{ display => 'Oracle', value => 'Oracle' },
+ { display => 'Oracle', value => 'Oracle' },
);
for (@all_drivers) {
if (Jifty->handle->is_available_driver($_->{value})) {
@@ -95,13 +95,20 @@ private template 'database_widget' => sub {
private template 'database_widget/unavailable_drivers' => sub {
my $self = shift;
+ my $count = scalar @_;
my $databases = join ', ', map { $_->{display} } @_;
my $drivers = join ', ', map { "DBD::$_->{value}" } @_;
$databases =~ s/, (?!.*,)/ and /;
$drivers =~ s/, (?!.*,)/ or /;
- p { _("%quant(%1,%2 is,%2 are) also supported, but we couldn't find the database %quant(%1,driver,drivers). You may be able to remedy this by installing %3 from CPAN.", scalar @_, $databases, $drivers) };
+ my $helpingverb = $count == 1 ? _("is") : _("are");
+ my $object = $count == 1 ? _("driver") : _("drivers");
+
+ p {{ class is 'test-db-connectivity-drivers' };
+ _("%1 %2 also supported, but we couldn't find the database %3. You may be able to remedy this by installing %4 from CPAN.",
+ $databases, $helpingverb, $object, $drivers )
+ };
};
private template 'database_widget/configure_connectivity' => sub {
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list