From e913e285a8312b2c4ec715fc374fbef8526f7ebe Mon Sep 17 00:00:00 2001 From: umherirrender Date: Thu, 19 Jul 2012 20:49:55 +0200 Subject: [PATCH] make list of 'Languages that support variant conversion' dynamic see bug 33223. Placing this list in LanguageConverter, so people see the list, when adding new Converters Change-Id: I088bc1f0ea01d7d6e02c736261311919a0956a57 --- includes/api/ApiQuery.php | 2 +- languages/LanguageConverter.php | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index 99e22d584d..d7c341d528 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -690,7 +690,7 @@ class ApiQuery extends ApiBase { 'NOTE: generator parameter names must be prefixed with a \'g\', see examples' ), 'redirects' => 'Automatically resolve redirects', 'converttitles' => array( "Convert titles to other variants if necessary. Only works if the wiki's content language supports variant conversion.", - 'Languages that support variant conversion include gan, iu, kk, ku, shi, sr, tg, zh' ), + 'Languages that support variant conversion include ' . implode( ', ', LanguageConverter::$languagesWithVariants ) ), 'indexpageids' => 'Include an additional pageids section listing all returned page IDs', 'export' => 'Export the current revisions of all given or generated pages', 'exportnowrap' => 'Return the export XML without wrapping it in an XML result (same format as Special:Export). Can only be used with export', diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php index 18d1dbc0be..455c64e54c 100644 --- a/languages/LanguageConverter.php +++ b/languages/LanguageConverter.php @@ -29,6 +29,23 @@ * @maintainers fdcn , shinjiman , PhiLiP */ class LanguageConverter { + + /** + * languages supporting variants + * @since 1.20 + * @var array + */ + static public $languagesWithVariants = array( + 'gan', + 'iu', + 'kk', + 'ku', + 'shi', + 'sr', + 'tg', + 'zh', + ); + var $mMainLanguageCode; var $mVariants, $mVariantFallbacks, $mVariantNames; var $mTablesLoaded = false; -- 2.20.1