r71264 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71263‎ | r71264 | r71265 >
Date:19:28, 18 August 2010
Author:maxsem
Status:ok (Comments)
Tags:
Comment:
Installer: use human-friendly list of databases, pass count of drivers for {{PLURAL}}
Modified paths:
  • /trunk/phase3/includes/installer/Installer.i18n.php (modified) (history)
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/Installer.php
@@ -437,7 +437,7 @@
438438 return false;
439439 }
440440
441 - $this->showMessage( 'config-have-db', $wgLang->commaList( $goodNames ) );
 441+ $this->showMessage( 'config-have-db', $wgLang->listToText( $goodNames ), count( $goodNames ) );
442442 }
443443
444444 /**
Index: trunk/phase3/includes/installer/Installer.i18n.php
@@ -95,7 +95,7 @@
9696 If you are on shared hosting, ask your hosting provider to install a suitable database driver.
9797 If you compiled PHP yourself, reconfigure it with a database client enabled, for example using <code>./configure --with-mysql</code>.
9898 If you installed PHP from a Debian or Ubuntu package, then you also need install the php5-mysql module.',
99 - 'config-have-db' => 'Found database drivers: $1.',
 99+ 'config-have-db' => 'Found database {{PLURAL:$2|driver|drivers}}: $1.',
100100 'config-register-globals' => "'''Warning: PHP's <code>[http://php.net/register_globals register_globals]</code> option is enabled.'''
101101 '''Disable it if you can.'''
102102 MediaWiki will work, but your server is exposed to potential security vulnerabilities.",
@@ -504,7 +504,8 @@
505505 'config-no-db-help' => 'Parameters:
506506 * $1 is comma separated list of supported database types by MediaWiki.',
507507 'config-have-db' => 'Parameters:
508 -* $1 is comma separated list of database drivers found in the application environment.',
 508+* $1 is comma separated list of database drivers found in the application environment.
 509+* $2 is the number of aforementioned drivers',
509510 'config-memory-ok' => 'Parameters:
510511 * $1 is the configured <code>memory_limit</code>.',
511512 'config-memory-raised' => 'Parameters:

Comments

#Comment by Nikerabbit (talk | contribs)   20:56, 18 August 2010

Should it be a driver?

#Comment by 😂 (talk | contribs)   21:05, 18 August 2010

How about: "Found the following $2 database drivers: $1."

#Comment by 😂 (talk | contribs)   21:07, 18 August 2010

Stupid thing, forgot to escape it. I meant:

"Found the following {{PLURAL:$2|database driver|$2 database drivers}}: $1."

Status & tagging log