From aa9e6597ca73b00e6f43637f35718febc8765805 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Wed, 14 Jan 2015 17:29:59 +0100 Subject: [PATCH] Add plural support for message config-no-db in the installer The message config-no-db contains a comma separated list of items. Adding the count of this list allows use of plural for better i18n. Change-Id: I07ccbd3f664709d1a6234cb1e268ff8d7ddfabd9 --- includes/installer/Installer.php | 2 +- includes/installer/i18n/en.json | 2 +- includes/installer/i18n/qqq.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index f2e417dda7..dc525549d4 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -727,7 +727,7 @@ abstract class Installer { } $databases = array_flip( $databases ); if ( !$databases ) { - $this->showError( 'config-no-db', $wgLang->commaList( $allNames ) ); + $this->showError( 'config-no-db', $wgLang->commaList( $allNames ), count( $allNames ) ); // @todo FIXME: This only works for the web installer! return false; diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json index 4857495b62..dfb6344354 100644 --- a/includes/installer/i18n/en.json +++ b/includes/installer/i18n/en.json @@ -49,7 +49,7 @@ "config-unicode-using-intl": "Using the [http://pecl.php.net/intl intl PECL extension] for Unicode normalization.", "config-unicode-pure-php-warning": "Warning: The [http://pecl.php.net/intl intl PECL extension] is not available to handle Unicode normalization, falling back to slow pure-PHP implementation.\nIf you run a high-traffic site, you should read a little on [//www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations Unicode normalization].", "config-unicode-update-warning": "Warning: The installed version of the Unicode normalization wrapper uses an older version of [http://site.icu-project.org/ the ICU project's] library.\nYou should [//www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations upgrade] if you are at all concerned about using Unicode.", - "config-no-db": "Could not find a suitable database driver! You need to install a database driver for PHP.\nThe following database types are supported: $1.\n\nIf you compiled PHP yourself, reconfigure it with a database client enabled, for example, using ./configure --with-mysqli.\nIf you installed PHP from a Debian or Ubuntu package, then you also need to install, for example, the php5-mysql package.", + "config-no-db": "Could not find a suitable database driver! You need to install a database driver for PHP.\nThe following database {{PLURAL:$2|type is|types are}} supported: $1.\n\nIf you compiled PHP yourself, reconfigure it with a database client enabled, for example, using ./configure --with-mysqli.\nIf you installed PHP from a Debian or Ubuntu package, then you also need to install, for example, the php5-mysql package.", "config-outdated-sqlite": "Warning: you have SQLite $1, which is lower than minimum required version $2. SQLite will be unavailable.", "config-no-fts3": "Warning: SQLite is compiled without the [//sqlite.org/fts3.html FTS3 module], search features will be unavailable on this backend.", "config-register-globals-error": "Error: PHP's [http://php.net/register_globals register_globals] option is enabled.\nIt must be disabled to continue with the installation.\nSee [https://www.mediawiki.org/wiki/register_globals https://www.mediawiki.org/wiki/register_globals] for help on how to do so.", diff --git a/includes/installer/i18n/qqq.json b/includes/installer/i18n/qqq.json index 772ce96916..3a9f267c5a 100644 --- a/includes/installer/i18n/qqq.json +++ b/includes/installer/i18n/qqq.json @@ -67,7 +67,7 @@ "config-unicode-using-intl": "Status message in the MediaWiki installer environment checks.", "config-unicode-pure-php-warning": "PECL is the name of a group producing standard pieces of software for PHP, and intl is the name of their library handling some aspects of internationalization.", "config-unicode-update-warning": "ICU is a body producing standard software tools for support of Unicode and other internationalization aspects. This message warns the system administrator installing MediaWiki that the server's software is not up-to-date and MediaWiki will have problems handling some characters.", - "config-no-db": "{{doc-important|Do not translate \"./configure --with-mysqli\" and \"php5-mysql\".}}\nParameters:\n* $1 is comma separated list of database types supported by MediaWiki.", + "config-no-db": "{{doc-important|Do not translate \"./configure --with-mysqli\" and \"php5-mysql\".}}\nParameters:\n* $1 is comma separated list of database types supported by MediaWiki.\n* $2 is the count of items in $1 - for use in plural.", "config-outdated-sqlite": "Used as warning. Parameters:\n* $1 - the version of SQLite that has been installed\n* $2 - minimum version", "config-no-fts3": "A \"[[:wikipedia:Front and back ends|backend]]\" is a system or component that ordinary users don't interact with directly and don't need to know about, and that is responsible for a distinct task or service - for example, a storage back-end is a generic system for storing data which other applications can use. Possible alternatives for back-end are \"system\" or \"service\", or (depending on context and language) even leave it untranslated.", "config-register-globals-error": "Error message in the MediaWiki installer environment checks.", -- 2.20.1