make list of 'Languages that support variant conversion' dynamic
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 19 Jul 2012 18:49:55 +0000 (20:49 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Thu, 19 Jul 2012 18:49:55 +0000 (20:49 +0200)
see bug 33223. Placing this list in LanguageConverter,
so people see the list, when adding new Converters

Change-Id: I088bc1f0ea01d7d6e02c736261311919a0956a57

includes/api/ApiQuery.php
languages/LanguageConverter.php

index 99e22d5..d7c341d 100644 (file)
@@ -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',
index 18d1dbc..455c64e 100644 (file)
  * @maintainers fdcn <fdcn64@gmail.com>, shinjiman <shinjiman@gmail.com>, PhiLiP <philip.npc@gmail.com>
  */
 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;