https://www.mediawiki.org/wiki/Special:Code/MediaWiki/111871

Revision: 111871
Author:   siebrand
Date:     2012-02-19 16:54:21 +0000 (Sun, 19 Feb 2012)
Log Message:
-----------
Group description of translatable pages can be extended by adding content to 
[[MediaWiki:Tp-custom-<group id>]].

Modified Paths:
--------------
    trunk/extensions/Translate/MessageGroups.php
    trunk/extensions/Translate/README
    trunk/extensions/Translate/Translate.php

Modified: trunk/extensions/Translate/MessageGroups.php
===================================================================
--- trunk/extensions/Translate/MessageGroups.php        2012-02-19 16:32:42 UTC 
(rev 111870)
+++ trunk/extensions/Translate/MessageGroups.php        2012-02-19 16:54:21 UTC 
(rev 111871)
@@ -5,7 +5,8 @@
  *
  * @file
  * @author Niklas Laxström
- * @copyright Copyright © 2008-2012, Niklas Laxström
+ * @author Siebrand Mazeland
+ * @copyright Copyright © 2008-2012, Niklas Laxström, Siebrand Mazeland
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
 
@@ -892,7 +893,16 @@
        public function getDescription() {
                $title = $this->title;
                $target = SpecialPage::getTitleFor( 'MyLanguage', $title 
)->getPrefixedText();
-               return wfMsgNoTrans( 'translate-tag-page-desc', $title, $target 
);
+
+               // Allow for adding a custom group description by using
+               // "MediaWiki:Tp-custom-<group ID>".
+               if( wfMessage( 'tp-custom-' . $this->id 
)->inContentLanguage()->exists() ) {
+                       $customText = ' ' . wfMessage( 'tp-custom-' . $this->id 
)->getText();
+               } else {
+                       $customText = '';
+               }
+
+               return wfMsgNoTrans( 'translate-tag-page-desc', $title, $target 
) . $customText;
        }
 }
 

Modified: trunk/extensions/Translate/README
===================================================================
--- trunk/extensions/Translate/README   2012-02-19 16:32:42 UTC (rev 111870)
+++ trunk/extensions/Translate/README   2012-02-19 16:54:21 UTC (rev 111871)
@@ -32,6 +32,8 @@
 == Change log ==
 * 2012-02-19
 - MediaWiki 1.18 or later is now required.
+- Group description of translatable pages can be extended by adding content to
+  [[MediaWiki:Tp-custom-<group id>]].
 * 2012-02-13
 - Updated some deprecated function calls
 - New translation memory called TTMServer comes with the extension and is 
enabled

Modified: trunk/extensions/Translate/Translate.php
===================================================================
--- trunk/extensions/Translate/Translate.php    2012-02-19 16:32:42 UTC (rev 
111870)
+++ trunk/extensions/Translate/Translate.php    2012-02-19 16:54:21 UTC (rev 
111871)
@@ -15,7 +15,7 @@
 /**
  * Version number used in extension credits and in other placed where needed.
  */
-define( 'TRANSLATE_VERSION', '2012-02-12' );
+define( 'TRANSLATE_VERSION', '2012-02-19' );
 
 /**
  * Extension credits properties.


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to