Index: trunk/extensions/Translate/SpecialMyLanguage.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | * |
16 | 16 | * Usage: [[Special:MyLanguage/Page name|link text]] |
17 | 17 | * |
18 | | - * @ingroup SpecialPage |
| 18 | + * @ingroup SpecialPage TranslateSpecialPage |
19 | 19 | */ |
20 | 20 | class SpecialMyLanguage extends UnlistedSpecialPage { |
21 | 21 | /** |
Index: trunk/extensions/Translate/Doxyfile |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | # configuration options related to the input files |
59 | 59 | #--------------------------------------------------------------------------- |
60 | 60 | INPUT = |
61 | | -FILE_PATTERNS = *.php |
| 61 | +FILE_PATTERNS = *.php *.inc |
62 | 62 | RECURSIVE = YES |
63 | 63 | EXCLUDE = spyc |
64 | 64 | EXCLUDE_SYMLINKS = YES |
— | — | @@ -170,7 +170,7 @@ |
171 | 171 | #--------------------------------------------------------------------------- |
172 | 172 | # Configuration::additions related to external references |
173 | 173 | #--------------------------------------------------------------------------- |
174 | | -TAGFILES = |
| 174 | +TAGFILES = ../../docs/html/tagfile.xml=http://svn.wikimedia.org/doc |
175 | 175 | GENERATE_TAGFILE = |
176 | 176 | ALLEXTERNALS = NO |
177 | 177 | EXTERNAL_GROUPS = YES |
Index: trunk/extensions/Translate/scripts/cli.inc |
— | — | @@ -7,8 +7,11 @@ |
8 | 8 | * @copyright Copyright © 2008-2010, Niklas Laxström |
9 | 9 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
10 | 10 | * @file |
| 11 | + * @defgroup Script Command line scripts |
| 12 | + * @todo Migrate cli scripts to use the new Maintenance class. |
11 | 13 | */ |
12 | 14 | |
| 15 | +///@{ |
13 | 16 | // Standard boilerplate to define $IP |
14 | 17 | if ( getenv( 'MW_INSTALL_PATH' ) !== false ) { |
15 | 18 | $IP = getenv( 'MW_INSTALL_PATH' ); |
— | — | @@ -17,7 +20,16 @@ |
18 | 21 | } |
19 | 22 | define( 'TRANSLATE_CLI', 1 ); |
20 | 23 | require_once( "$IP/maintenance/commandLine.inc" ); |
| 24 | +///@} |
21 | 25 | |
| 26 | +/** |
| 27 | + * Output a message to command line (if available). |
| 28 | + * @param $str \string The message. |
| 29 | + * @param $channel \mixed Channel identifier. Consecutive messages to |
| 30 | + * the same channel do not get automatic newlines between then, |
| 31 | + * @param $force \bool Do not suppress output even if script was run |
| 32 | + * with --quiet |
| 33 | + */ |
22 | 34 | function STDOUT( $str, $channel = null, $force = false ) { |
23 | 35 | global $options; |
24 | 36 | |
— | — | @@ -54,16 +66,28 @@ |
55 | 67 | $lastChannel = $channel; |
56 | 68 | } |
57 | 69 | |
| 70 | +/** |
| 71 | + * Output a warning message to command line (if available). |
| 72 | + * @see STDOUT |
| 73 | + */ |
58 | 74 | function STDERR( $message, $channel = null ) { |
59 | 75 | STDOUT( $message, $channel, true ); |
60 | 76 | } |
61 | 77 | |
| 78 | +///@{ |
62 | 79 | register_shutdown_function('STDOUT', false); |
| 80 | +///@} |
63 | 81 | |
64 | 82 | /** |
65 | | - * @todo Needs documentation. |
| 83 | + * A general CLI utility class. |
| 84 | + * @todo Move elsewhere? |
66 | 85 | */ |
67 | 86 | class Cli { |
| 87 | + /** |
| 88 | + * Parses list of language codes to an array. |
| 89 | + * @param $codes \string Command line input. |
| 90 | + * @return \list{String} Language codes. |
| 91 | + */ |
68 | 92 | public static function parseLanguageCodes( /* string */ $codes ) { |
69 | 93 | $langs = array_map( 'trim', explode( ',', $codes ) ); |
70 | 94 | if ( $langs[0] === '*' ) { |
Index: trunk/extensions/Translate/scripts/groupStatistics.php |
— | — | @@ -7,6 +7,7 @@ |
8 | 8 | * @copyright Copyright © 2007-2010, Niklas Laxström, Siebrand Mazeland |
9 | 9 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
10 | 10 | * @file |
| 11 | + * @ingroup Script Stats |
11 | 12 | */ |
12 | 13 | |
13 | 14 | /** |
— | — | @@ -164,6 +165,7 @@ |
165 | 166 | |
166 | 167 | /** |
167 | 168 | * @todo Needs documentation. |
| 169 | + * @ingroup Stats |
168 | 170 | */ |
169 | 171 | class TranslateStatsOutput extends wikiStatsOutput { |
170 | 172 | function heading() { |
Index: trunk/extensions/Translate/scripts/languageeditstats.php |
— | — | @@ -4,9 +4,10 @@ |
5 | 5 | * |
6 | 6 | * @author Niklas Laxström |
7 | 7 | * @author Siebrand Mazeland |
8 | | - * @copyright Copyright © 2008 Niklas Laxström, Siebrand Mazeland |
| 8 | + * @copyright Copyright © 2008-2010 Niklas Laxström, Siebrand Mazeland |
9 | 9 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
10 | 10 | * @file |
| 11 | + * @ingroup Script Stats |
11 | 12 | */ |
12 | 13 | |
13 | 14 | $optionsWithArgs = array( 'top', 'days', 'bots', 'ns' ); |
Index: trunk/extensions/Translate/SpecialLanguageStats.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | * Use {{Special:LanguageStats/nl/1}} to show for 'nl' and suppres completely |
20 | 20 | * translated groups. |
21 | 21 | * |
22 | | - * @ingroup SpecialPage |
| 22 | + * @ingroup SpecialPage TranslateSpecialPage Stats |
23 | 23 | */ |
24 | 24 | class SpecialLanguageStats extends IncludableSpecialPage { |
25 | 25 | function __construct() { |
Index: trunk/extensions/Translate/SpecialFirstSteps.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | * Implements a special page which assists users to become translators. |
15 | 15 | * Currently it is tailored for the needs of translatewiki.net |
16 | 16 | * |
17 | | - * @ingroup SpecialPage |
| 17 | + * @ingroup SpecialPage TranslateSpecialPage |
18 | 18 | */ |
19 | 19 | class SpecialFirstSteps extends UnlistedSpecialPage { |
20 | 20 | protected $skin, $user, $out; |
Index: trunk/extensions/Translate/SpecialSupportedLanguages.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | * "translators". The subpage "translators" must contain the template |
19 | 19 | * [[:{{ns:template}}:User|User]], taking a user name as parameter. |
20 | 20 | * |
21 | | - * @ingroup SpecialPage |
| 21 | + * @ingroup SpecialPage TranslateSpecialPage |
22 | 22 | */ |
23 | 23 | class SpecialSupportedLanguages extends UnlistedSpecialPage { |
24 | 24 | public function __construct() { |
Index: trunk/extensions/Translate/SpecialImportTranslations.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | * Special page to import Gettext (.po) files exported using Translate extension. |
14 | 14 | * Does not support generic Gettext files. |
15 | 15 | * |
16 | | - * @ingroup SpecialPage |
| 16 | + * @ingroup SpecialPage TranslateSpecialPage |
17 | 17 | */ |
18 | 18 | class SpecialImportTranslations extends SpecialPage { |
19 | 19 | /** |
Index: trunk/extensions/Translate/SpecialTranslationStats.php |
— | — | @@ -1,6 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | 4 | * Contains logic for special page Special:TranslationStats. |
| 5 | + * @defgroup Stats Statistics |
5 | 6 | * |
6 | 7 | * @file |
7 | 8 | * @author Niklas Laxström |
— | — | @@ -11,7 +12,7 @@ |
12 | 13 | /** |
13 | 14 | * Includable special page for generating graphs on translations. |
14 | 15 | * |
15 | | - * @ingroup SpecialPage |
| 16 | + * @ingroup SpecialPage TranslateSpecialPage Stats |
16 | 17 | * @todo Needs documentation. |
17 | 18 | */ |
18 | 19 | class SpecialTranslationStats extends IncludableSpecialPage { |
Index: trunk/extensions/Translate/SpecialTranslationChanges.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | * Implementation of Special:TranslationChanges special page. Gives an overview |
15 | 15 | * per message group of translations in a given number of hours. |
16 | 16 | * |
17 | | - * @ingroup SpecialPage |
| 17 | + * @ingroup SpecialPage TranslateSpecialPage |
18 | 18 | */ |
19 | 19 | class SpecialTranslationChanges extends SpecialPage { |
20 | 20 | const MSG = 'translationchanges-'; |
Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -644,4 +644,4 @@ |
645 | 645 | $wgNamespacesToBeSearchedDefault[$id] = true; |
646 | 646 | } |
647 | 647 | |
648 | | -/** @defgroup SpecialPage Special pages */ |
| 648 | +/** @defgroup TranslateSpecialPage Special pages of Translate extension */ |
Index: trunk/extensions/Translate/utils/MemoryCache.php |
— | — | @@ -12,6 +12,7 @@ |
13 | 13 | * Class for caching translation completion percentages. |
14 | 14 | * @todo Figure out a better name. |
15 | 15 | * @todo Tries to be generic, but is not. |
| 16 | + * @ingroup Stats |
16 | 17 | */ |
17 | 18 | class ArrayMemoryCache { |
18 | 19 | /// Key for the data stored |
Index: trunk/extensions/Translate/utils/Font.php |
— | — | @@ -2,18 +2,24 @@ |
3 | 3 | /** |
4 | 4 | * Contains class with wrapper around font-config. |
5 | 5 | * |
| 6 | + * @author Niklas Laxström |
| 7 | + * @copyright Copyright © 2008-2010, Niklas Laxström |
| 8 | + * @license Public Domain |
6 | 9 | * @file |
7 | | - * @author Niklas Laxström, 2008 |
8 | | - * @license Public Domain |
9 | 10 | */ |
10 | 11 | |
11 | 12 | /** |
12 | 13 | * Wrapper around font-config to get useful ttf font given a language code. |
13 | | - * Uses wfShellExec, wfEscapeShellArg and wfDebugLog from MediaWiki. |
| 14 | + * Uses wfShellExec, wfEscapeShellArg and wfDebugLog, wfGetCache and |
| 15 | + * wfMemckey from %MediaWiki. |
14 | 16 | * |
15 | | - * @todo Needs documentation. |
| 17 | + * @ingroup Stats |
16 | 18 | */ |
17 | 19 | class FCFontFinder { |
| 20 | + /** |
| 21 | + * Searches for suitable font in the system. |
| 22 | + * @param $code \string Language code. |
| 23 | + */ |
18 | 24 | public static function find( $code ) { |
19 | 25 | if ( ini_get( 'open_basedir' ) ) { |
20 | 26 | wfDebugLog( 'fcfont', 'Disabled because of open_basedir is active' ); |
Index: trunk/extensions/Translate/utils/TranslationStats.php |
— | — | @@ -11,6 +11,7 @@ |
12 | 12 | |
13 | 13 | /** |
14 | 14 | * Contains methods that provide statistics for message groups. |
| 15 | + * @ingroup Stats |
15 | 16 | */ |
16 | 17 | class TranslationStats { |
17 | 18 | /** |
Index: trunk/extensions/Translate/SpecialMagic.php |
— | — | @@ -9,14 +9,15 @@ |
10 | 10 | */ |
11 | 11 | |
12 | 12 | /** |
13 | | - * This special page helps with the translations of MediaWiki features that are |
| 13 | + * This special page helps with the translations of %MediaWiki features that are |
14 | 14 | * not in the main messages array (special page aliases, magic words, namespace names). |
15 | 15 | * |
16 | | - * @ingroup SpecialPage |
| 16 | + * @ingroup SpecialPage TranslateSpecialPage |
17 | 17 | */ |
18 | 18 | class SpecialMagic extends SpecialPage { |
19 | 19 | /** |
20 | 20 | * Message prefix for translations |
| 21 | + * @todo Remove. |
21 | 22 | */ |
22 | 23 | const MSG = 'translate-magic-'; |
23 | 24 | |
Index: trunk/extensions/Translate/SpecialTranslations.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | * Implements a special page which shows all translations for a message. |
15 | 15 | * Bits taken from SpecialPrefixindex.php and TranslateTasks.php |
16 | 16 | * |
17 | | - * @ingroup SpecialPage |
| 17 | + * @ingroup SpecialPage TranslateSpecialPage |
18 | 18 | */ |
19 | 19 | class SpecialTranslations extends SpecialAllpages { |
20 | 20 | function __construct() { |