r109353 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109352‎ | r109353 | r109354 >
Date:10:23, 18 January 2012
Author:nikerabbit
Status:ok (Comments)
Tags:
Comment:
Doc header updates and consistency and few small fixes
Modified paths:
  • /trunk/extensions/Translate/specials/SpecialManageGroups.php (modified) (history)
  • /trunk/extensions/Translate/specials/SpecialSupportedLanguages.php (modified) (history)
  • /trunk/extensions/Translate/specials/SpecialTranslate.php (modified) (history)
  • /trunk/extensions/Translate/tag/PageTranslationHooks.php (modified) (history)
  • /trunk/extensions/Translate/tag/SpecialPageTranslationDeletePage.php (modified) (history)
  • /trunk/extensions/Translate/tag/SpecialPageTranslationMovePage.php (modified) (history)
  • /trunk/extensions/Translate/tag/TPException.php (modified) (history)
  • /trunk/extensions/Translate/tag/TPParse.php (modified) (history)
  • /trunk/extensions/Translate/tag/TPSection.php (modified) (history)
  • /trunk/extensions/Translate/tag/TranslatablePage.php (modified) (history)
  • /trunk/extensions/Translate/utils/FuzzyBot.php (modified) (history)
  • /trunk/extensions/Translate/utils/MessageGroupCache.php (modified) (history)
  • /trunk/extensions/Translate/utils/MessageGroupStats.php (modified) (history)
  • /trunk/extensions/Translate/utils/MessageHandle.php (modified) (history)
  • /trunk/extensions/Translate/utils/StatsTable.php (modified) (history)
  • /trunk/extensions/Translate/utils/TranslationEditPage.php (modified) (history)
  • /trunk/extensions/Translate/utils/TranslationHelpers.php (modified) (history)
  • /trunk/extensions/Translate/utils/TranslationStats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/tag/TranslatablePage.php
@@ -4,12 +4,13 @@
55 *
66 * @file
77 * @author Niklas Laxström
8 - * @copyright Copyright © 2009-2011 Niklas Laxström
 8+ * @copyright Copyright © 2009-2012 Niklas Laxström
99 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1010 */
1111
1212 /**
1313 * Class to parse translatable wiki pages.
 14+ *
1415 * @ingroup PageTranslation
1516 */
1617 class TranslatablePage {
Index: trunk/extensions/Translate/tag/SpecialPageTranslationDeletePage.php
@@ -4,15 +4,14 @@
55 *
66 * @file
77 * @author Niklas Laxström
8 - * @copyright Copyright © 2011, Niklas Laxström
 8+ * @copyright Copyright © 2012, Niklas Laxström
99 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1010 */
1111
1212 /**
1313 * Special page which enables deleting translations of translatable pages
1414 *
15 - * @ingroup SpecialPage
16 - * @ingroup PageTranslation
 15+ * @ingroup SpecialPage PageTranslation
1716 */
1817 class SpecialPageTranslationDeletePage extends UnlistedSpecialPage {
1918 // Basic form parameters both as text and as titles
Index: trunk/extensions/Translate/tag/TPParse.php
@@ -4,13 +4,14 @@
55 *
66 * @file
77 * @author Niklas Laxström
8 - * @copyright Copyright © 2009-2011 Niklas Laxström
 8+ * @copyright Copyright © 2009-2012 Niklas Laxström
99 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1010 */
1111
1212 /**
1313 * This class represents the results of parsed source page, that is, the
1414 * extracted sections and a template.
 15+ *
1516 * @ingroup PageTranslation
1617 */
1718 class TPParse {
Index: trunk/extensions/Translate/tag/PageTranslationHooks.php
@@ -4,12 +4,13 @@
55 *
66 * @file
77 * @author Niklas Laxström
8 - * @copyright Copyright © 2008-2011, Niklas Laxström
 8+ * @copyright Copyright © 2008-2012, Niklas Laxström
99 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1010 */
1111
1212 /**
1313 * Hooks for page translation.
 14+ *
1415 * @ingroup PageTranslation
1516 */
1617 class PageTranslationHooks {
Index: trunk/extensions/Translate/tag/SpecialPageTranslationMovePage.php
@@ -4,21 +4,15 @@
55 *
66 * @file
77 * @author Niklas Laxström
8 - * @copyright Copyright © 2010, Niklas Laxström
 8+ * @copyright Copyright © 2010-2012, Niklas Laxström
99 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1010 */
1111
12 -if ( !defined( 'GAID_FOR_UPDATE' ) ) {
13 - /* Backwards-compatible define for 1.17+ (see r75379) */
14 - define( 'GAID_FOR_UPDATE', Title::GAID_FOR_UPDATE );
15 -}
16 -
1712 /**
1813 * Overrides Special:Movepage to to allow renaming a page translation page and
1914 * all related translations and derivative pages.
2015 *
21 - * @ingroup SpecialPage
22 - * @ingroup PageTranslation
 16+ * @ingroup SpecialPage PageTranslation
2317 */
2418 class SpecialPageTranslationMovePage extends UnlistedSpecialPage {
2519 // Basic form parameters both as text and as titles
@@ -242,7 +236,7 @@
243237 $form[] = Html::hidden( 'wpEditToken', $this->user->editToken() );
244238 $this->addInputLabel( $form, wfMsg( 'pt-movepage-current' ), 'wpOldTitle', 30, $this->oldText, $readonly );
245239 $this->addInputLabel( $form, wfMsg( 'pt-movepage-new' ), 'wpNewTitle', 30, $this->newText );
246 - $this->addInputLabel( $form, wfMsg( 'pt-movepage-reason' ), 'reason', 60, $this->reason );
 240+ $this->addInputLabel( $form, wfMsg( 'pt-movepage-reason' ), 'reason', 45, $this->reason );
247241 $form[] = Xml::checkLabel( wfMsg( 'pt-movepage-subpages' ), 'subpages', 'mw-subpages', $this->moveSubpages ) . $br;
248242 $form[] = Xml::submitButton( wfMsg( 'pt-movepage-action-check' ), $subaction );
249243 $form[] = Xml::closeElement( 'form' );
@@ -396,10 +390,10 @@
397391 MoveJob::forceRedirects( true );
398392
399393 $newTpage = TranslatablePage::newFromTitle( $this->newTitle );
400 - $newTpage->addReadyTag( $this->newTitle->getLatestRevId( GAID_FOR_UPDATE ) );
 394+ $newTpage->addReadyTag( $this->newTitle->getLatestRevId( Title::GAID_FOR_UPDATE ) );
401395
402396 if ( $newTpage->getMarkedTag() === $oldLatest ) {
403 - $newTpage->addMarkedTag( $this->newTitle->getLatestRevId( GAID_FOR_UPDATE ) );
 397+ $newTpage->addMarkedTag( $this->newTitle->getLatestRevId( Title::GAID_FOR_UPDATE ) );
404398 }
405399
406400 MessageGroups::clearCache();
Index: trunk/extensions/Translate/tag/TPException.php
@@ -4,12 +4,13 @@
55 *
66 * @file
77 * @author Niklas Laxström
8 - * @copyright Copyright © 2009-2011 Niklas Laxström
 8+ * @copyright Copyright © 2009-2012 Niklas Laxström
99 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1010 */
1111
1212 /**
1313 * Class to signal syntax errors in translatable pages.
 14+ *
1415 * @ingroup PageTranslation
1516 */
1617 class TPException extends MWException {
Index: trunk/extensions/Translate/tag/TPSection.php
@@ -4,12 +4,13 @@
55 *
66 * @file
77 * @author Niklas Laxström
8 - * @copyright Copyright © 2009-2010 Niklas Laxström
 8+ * @copyright Copyright © 2009-2012 Niklas Laxström
99 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1010 */
1111
1212 /**
1313 * This class represents one individual section in translatable page.
 14+ *
1415 * @ingroup PageTranslation
1516 */
1617 class TPSection {
Index: trunk/extensions/Translate/utils/FuzzyBot.php
@@ -4,15 +4,14 @@
55 *
66 * @file
77 * @author Niklas Laxström
 8+ * @copyright Copyright © 2012, Niklas Laxström
89 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2 or later
9 - * @
1010 */
1111
1212 /**
1313 * FuzzyBot - the misunderstood workhorse.
1414 * @since 2012-01-02
1515 */
16 -
1716 class FuzzyBot {
1817 public static function getUser() {
1918 $bot = User::newFromName( self::getName() );
Index: trunk/extensions/Translate/utils/MessageHandle.php
@@ -1,4 +1,11 @@
22 <?php
 3+/**
 4+ * Class that enhances Title with stuff related to message groups
 5+ * @file
 6+ * @author Niklas Laxström
 7+ * @copyright Copyright © 2022-2012 Niklas Laxström
 8+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
 9+ */
310
411 /**
512 * Class for pointing to messages, like Title class is for titles.
Index: trunk/extensions/Translate/utils/TranslationEditPage.php
@@ -5,7 +5,7 @@
66 *
77 * @file
88 * @author Niklas Laxström
9 - * @copyright Copyright © 2009-2010 Niklas Laxström
 9+ * @copyright Copyright © 2009-2012 Niklas Laxström
1010 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1111 */
1212
Index: trunk/extensions/Translate/utils/StatsTable.php
@@ -5,7 +5,7 @@
66 * @file
77 * @author Siebrand Mazeland
88 * @author Niklas Laxström
9 - * @copyright Copyright © 2008-2011 Siebrand Mazeland, Niklas Laxström
 9+ * @copyright Copyright © 2008-2012 Siebrand Mazeland, Niklas Laxström
1010 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1111 */
1212
@@ -18,7 +18,7 @@
1919 * Use {{Special:LanguageStats/nl/1}} to show for 'nl' and suppres completely
2020 * translated groups.
2121 *
22 - * @ingroup SpecialPage TranslateSpecialPage Stats
 22+ * @ingroup Stats
2323 */
2424 class StatsTable {
2525 /// @var Language
Index: trunk/extensions/Translate/utils/TranslationStats.php
@@ -5,12 +5,13 @@
66 * @file
77 * @author Niklas Laxström
88 * @author Siebrand Mazeland
9 - * @copyright Copyright © 2010, Niklas Laxström, Siebrand Mazeland
 9+ * @copyright Copyright © 2010-2012, Niklas Laxström, Siebrand Mazeland
1010 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1111 */
1212
1313 /**
1414 * Contains methods that provide statistics for message groups.
 15+ *
1516 * @ingroup Stats
1617 */
1718 class TranslationStats {
Index: trunk/extensions/Translate/utils/MessageGroupStats.php
@@ -5,13 +5,15 @@
66 * @file
77 * @author Wikia http://trac.wikia-code.com/browser/wikia/trunk/extensions/wikia/TranslationStatistics
88 * @author Niklas Laxström
9 - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 3 or later
 9+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1010 */
1111
1212 /**
1313 * This class abstract MessageGroup statistics calculation and storing.
1414 * You can access stats easily per language or per group.
1515 * Stat array for each item is of format array( total, translate, fuzzy ).
 16+ *
 17+ * @ingroup Stats MessageGroups
1618 */
1719 class MessageGroupStats {
1820 /// Name of the database table
Index: trunk/extensions/Translate/utils/TranslationHelpers.php
@@ -5,7 +5,7 @@
66 *
77 * @file
88 * @author Niklas Laxström
9 - * @copyright Copyright © 2010 Niklas Laxström
 9+ * @copyright Copyright © 2010-2012 Niklas Laxström
1010 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1111 */
1212
Index: trunk/extensions/Translate/utils/MessageGroupCache.php
@@ -3,7 +3,7 @@
44 * Code for caching the messages of file based message groups.
55 * @file
66 * @author Niklas Laxström
7 - * @copyright Copyright © 2009-2010 Niklas Laxström
 7+ * @copyright Copyright © 2009-2012 Niklas Laxström
88 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
99 */
1010
@@ -12,6 +12,8 @@
1313 * that the cache is up to date. Parsing the source files can be slow, so
1414 * constructing CDB cache makes accessing that data constant speed regardless
1515 * of the actual format.
 16+ *
 17+ * @ingroup MessageGroups
1618 */
1719 class MessageGroupCache {
1820
Index: trunk/extensions/Translate/specials/SpecialManageGroups.php
@@ -3,11 +3,10 @@
44 * Implements special page for group management, where file based message
55 * groups are be managed.
66 *
7 - * @ingroup SpecialPage
87 * @file
98 * @author Niklas Laxström
109 * @author Siebrand Mazeland
11 - * @copyright Copyright © 2009-2010, Niklas Laxström, Siebrand Mazeland
 10+ * @copyright Copyright © 2009-2012, Niklas Laxström, Siebrand Mazeland
1211 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1312 */
1413
@@ -16,6 +15,8 @@
1716 * file based message groups can be managed (FileBasedMessageGroup). This page
1817 * allows updating of the file cache, import and fuzzy for source language
1918 * messages, as well as import/update of messages in other languages.
 19+ *
 20+ * @ingroup SpecialPage TranslateSpecialPage
2021 */
2122 class SpecialManageGroups extends SpecialPage {
2223 /**
Index: trunk/extensions/Translate/specials/SpecialSupportedLanguages.php
@@ -5,7 +5,7 @@
66 * @file
77 * @author Niklas Laxström
88 * @author Siebrand Mazeland
9 - * @copyright Copyright © 2011, Niklas Laxström, Siebrand Mazeland
 9+ * @copyright Copyright © 2012, Niklas Laxström, Siebrand Mazeland
1010 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1111 */
1212
@@ -17,7 +17,7 @@
1818 * "translators". The subpage "translators" must contain the template
1919 * [[:{{ns:template}}:User|User]], taking a user name as parameter.
2020 *
21 - * @ingroup SpecialPage TranslateSpecialPage
 21+ * @ingroup SpecialPage TranslateSpecialPage Stats
2222 */
2323 class SpecialSupportedLanguages extends SpecialPage {
2424 /// Whether to skip and regenerate caches
Index: trunk/extensions/Translate/specials/SpecialTranslate.php
@@ -82,7 +82,7 @@
8383 $this->options['group'] = $this->defaults['group'];
8484 }
8585
86 - TranslateUtils::addSpecialHelpLink( $wgOut, 'Help:Extension:Translate' );
 86+ TranslateUtils::addSpecialHelpLink( $wgOut, 'Help:Extension:Translate/Translation_example' );
8787 // Show errors nicely.
8888 $wgOut->addHTML( $this->settingsForm( $errors ) );
8989

Follow-up revisions

RevisionCommit summaryAuthorDate
r109355I really have to stop traveling to the future this often, ping r109353nikerabbit11:09, 18 January 2012

Comments

#Comment by Santhosh.thottingal (talk | contribs)   11:07, 18 January 2012

Almost ok, except "@copyright Copyright © 2022-2012 Niklas Laxström"

#Comment by Nikerabbit (talk | contribs)   11:10, 18 January 2012

Darn those typing errors...fixed.

Status & tagging log