r71336 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71335‎ | r71336 | r71337 >
Date:08:34, 20 August 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
More documentation
Modified paths:
  • /trunk/extensions/Translate/Translate.php (modified) (history)
  • /trunk/extensions/Translate/_autoload.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/Translate.php
@@ -247,6 +247,11 @@
248248
249249 /**
250250 * Enable page translation feature.
 251+ *
 252+ * Page translation feature allows structured translation of wiki pages
 253+ * with simple markup and automatic tracking of changes.
 254+ *
 255+ * @defgroup PageTranslation Page translation
251256 * @see http://translatewiki.net/wiki/Translating:Page_translation_feature
252257 */
253258 $wgEnablePageTranslation = false;
Index: trunk/extensions/Translate/_autoload.php
@@ -1,5 +1,4 @@
22 <?php
3 -if ( !defined( 'MEDIAWIKI' ) ) die();
43 /**
54 * Autoload definitions.
65 *
@@ -9,8 +8,14 @@
109 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1110 */
1211
 12+/** @cond file_level_code */
1313 $dir = dirname( __FILE__ ) . '/';
 14+/** @endcond */
1415
 16+/**
 17+ * @name Core extension classes
 18+ * @{
 19+ */
1520 $wgAutoloadClasses['TranslateTasks'] = $dir . 'TranslateTasks.php';
1621 $wgAutoloadClasses['TaskOptions'] = $dir . 'TranslateTasks.php';
1722
@@ -36,11 +41,24 @@
3742 $wgAutoloadClasses['FatMessage'] = $dir . 'Message.php';
3843
3944 $wgAutoloadClasses['TranslateEditAddons'] = $dir . 'TranslateEditAddons.php';
 45+$wgAutoloadClasses['TranslateRcFilter'] = $dir . 'RcFilter.php';
 46+/**@}*/
 47+
 48+/**
 49+ * @name MediaWiki core classes
 50+ * These are not autoloaded by default in MediaWiki core.
 51+ * @{
 52+ */
 53+
4054 $wgAutoloadClasses['languages'] = $IP . '/maintenance/language/languages.inc';
4155 $wgAutoloadClasses['MessageWriter'] = $IP . '/maintenance/language/writeMessagesArray.inc';
 56+/**@}*/
4257
43 -$wgAutoloadClasses['TranslateRcFilter'] = $dir . 'RcFilter.php';
44 -
 58+/**
 59+ * @name Special pages
 60+ * There are few more special pages in page translation section.
 61+ * @{
 62+ */
4563 $wgAutoloadClasses['SpecialTranslate'] = $dir . 'TranslatePage.php';
4664 $wgAutoloadClasses['SpecialMagic'] = $dir . 'SpecialMagic.php';
4765 $wgAutoloadClasses['SpecialTranslationChanges'] = $dir . 'SpecialTranslationChanges.php';
@@ -50,12 +68,14 @@
5169 $wgAutoloadClasses['SpecialImportTranslations'] = $dir . 'SpecialImportTranslations.php';
5270 $wgAutoloadClasses['SpecialFirstSteps'] = $dir . 'SpecialFirstSteps.php';
5371 $wgAutoloadClasses['SpecialSupportedLanguages'] = $dir . 'SpecialSupportedLanguages.php';
 72+$wgAutoloadClasses['SpecialMyLanguage'] = $dir . 'SpecialMyLanguage.php';
 73+$wgAutoloadClasses['SpecialManageGroups'] = $dir . 'SpecialManageGroups.php';
 74+/**@}*/
5475
5576 /**
56 - * Register class for Special:MyLanguage
 77+ * @name Old-style file format support (FFS)
 78+ * @{
5779 */
58 -$wgAutoloadClasses['SpecialMyLanguage'] = $dir . 'SpecialMyLanguage.php';
59 -
6080 $wgAutoloadClasses['SimpleFormatReader'] = $dir . 'ffs/Simple.php';
6181 $wgAutoloadClasses['SimpleFormatWriter'] = $dir . 'ffs/Simple.php';
6282 $wgAutoloadClasses['WikiFormatReader'] = $dir . 'ffs/Wiki.php';
@@ -71,9 +91,11 @@
7292 $wgAutoloadClasses['OpenLayersFormatReader'] = $dir . 'ffs/OpenLayers.php';
7393 $wgAutoloadClasses['OpenLayersFormatWriter'] = $dir . 'ffs/OpenLayers.php';
7494 $wgAutoloadClasses['XliffFormatWriter'] = $dir . 'ffs/Xliff.php';
 95+/**@}*/
7596
7697 /**
77 - * utils
 98+ * @name Various utilities
 99+ * @{
78100 */
79101 $wgAutoloadClasses['ResourceLoader'] = $dir . 'utils/ResourceLoader.php';
80102 $wgAutoloadClasses['StringMangler'] = $dir . 'utils/StringMatcher.php';
@@ -97,25 +119,34 @@
98120
99121 $wgAutoloadClasses['TranslationMemoryUpdater'] = $dir . 'utils/TranslationMemoryUpdater.php';
100122
 123+$wgAutoloadClasses['TranslateYaml'] = $dir . 'utils/TranslateYaml.php';
 124+/**@}*/
 125+
101126 /**
102 - * predefined groups
 127+ * @name Classes for predefined old-style message groups
 128+ * @{
103129 */
104130 $wgAutoloadClasses['AllMediawikiExtensionsGroup'] = $dir . 'groups/MediaWikiExtensions.php';
105131 $wgAutoloadClasses['PremadeMediawikiExtensionGroups'] = $dir . 'groups/MediaWikiExtensions.php';
106132 $wgAutoloadClasses['PremadeWikiaExtensionGroups'] = $dir . 'groups/Wikia/WikiaExtensions.php';
107133 $wgAutoloadClasses['OpenLayersMessageGroup'] = $dir . 'groups/OpenLayers.php';
108134 $wgAutoloadClasses['MediaWikiMessageChecker'] = $dir . 'groups/MediaWiki/Checker.php';
 135+/**@}*/
109136
110137 /**
111 - * Complex messages
 138+ * @name Non-message translation item support
 139+ * @{
112140 */
113141 $wgAutoloadClasses['ComplexMessages'] = $dir . 'groups/ComplexMessages.php';
114142 $wgAutoloadClasses['SpecialPageAliasesCM'] = $dir . 'groups/ComplexMessages.php';
115143 $wgAutoloadClasses['MagicWordsCM'] = $dir . 'groups/ComplexMessages.php';
116144 $wgAutoloadClasses['NamespaceCM'] = $dir . 'groups/ComplexMessages.php';
 145+/**@}*/
117146
118147 /**
119 - * Page translation
 148+ * @name Classes for page translation feature
 149+ * @ingroup PageTranslation
 150+ * @{
120151 */
121152 $wgAutoloadClasses['PageTranslationHooks'] = $dir . 'tag/PageTranslationHooks.php';
122153 $wgAutoloadClasses['TranslatablePage'] = $dir . 'tag/TranslatablePage.php';
@@ -126,10 +157,12 @@
127158 $wgAutoloadClasses['SpecialPageTranslationMovePage'] = $dir . 'tag/SpecialPageTranslationMovePage.php';
128159 $wgAutoloadClasses['RenderJob'] = $dir . 'tag/RenderJob.php';
129160 $wgAutoloadClasses['MoveJob'] = $dir . 'tag/MoveJob.php';
 161+/**@}*/
130162
131 -$wgAutoloadClasses['TranslateYaml'] = $dir . 'utils/TranslateYaml.php';
132 -$wgAutoloadClasses['SpecialManageGroups'] = $dir . 'SpecialManageGroups.php';
133 -
 163+/**
 164+ * @name Classes for new-style file format support (FFS)
 165+ * @{
 166+ */
134167 $wgAutoloadClasses['FFS'] = $dir . 'FFS.php';
135168 $wgAutoloadClasses['SimpleFFS'] = $dir . 'FFS.php';
136169 $wgAutoloadClasses['JavaFFS'] = $dir . 'FFS.php';
@@ -140,7 +173,13 @@
141174 $wgAutoloadClasses['ShapadoJsFFS'] = $dir . 'FFS.php';
142175 $wgAutoloadClasses['GettextFFS'] = $dir . '/ffs/Gettext.php';
143176 $wgAutoloadClasses['FlatPhpFFS'] = $dir . 'ffs/PhpVariables.php';
 177+/**@}*/
144178
 179+/**
 180+ * @name Classes for different kind of html building
 181+ * @{
 182+ */
145183 $wgAutoloadClasses['HtmlTag'] = $dir . 'utils/Html.php';
146184 $wgAutoloadClasses['RawHtml'] = $dir . 'utils/Html.php';
147185 $wgAutoloadClasses['TagContainer'] = $dir . 'utils/Html.php';
 186+/**@}*/

Status & tagging log