r111871 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111870‎ | r111871 | r111872 >
Date:16:54, 19 February 2012
Author:siebrand
Status:resolved
Tags:i18nreview 
Comment:
Group description of translatable pages can be extended by adding content to [[MediaWiki:Tp-custom-<group id>]].
Modified paths:
  • /trunk/extensions/Translate/MessageGroups.php (modified) (history)
  • /trunk/extensions/Translate/README (modified) (history)
  • /trunk/extensions/Translate/Translate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/MessageGroups.php
@@ -5,7 +5,8 @@
66 *
77 * @file
88 * @author Niklas Laxström
9 - * @copyright Copyright © 2008-2012, Niklas Laxström
 9+ * @author Siebrand Mazeland
 10+ * @copyright Copyright © 2008-2012, Niklas Laxström, Siebrand Mazeland
1011 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1112 */
1213
@@ -892,7 +893,16 @@
893894 public function getDescription() {
894895 $title = $this->title;
895896 $target = SpecialPage::getTitleFor( 'MyLanguage', $title )->getPrefixedText();
896 - return wfMsgNoTrans( 'translate-tag-page-desc', $title, $target );
 897+
 898+ // Allow for adding a custom group description by using
 899+ // "MediaWiki:Tp-custom-<group ID>".
 900+ if( wfMessage( 'tp-custom-' . $this->id )->inContentLanguage()->exists() ) {
 901+ $customText = ' ' . wfMessage( 'tp-custom-' . $this->id )->getText();
 902+ } else {
 903+ $customText = '';
 904+ }
 905+
 906+ return wfMsgNoTrans( 'translate-tag-page-desc', $title, $target ) . $customText;
897907 }
898908 }
899909
Index: trunk/extensions/Translate/Translate.php
@@ -15,7 +15,7 @@
1616 /**
1717 * Version number used in extension credits and in other placed where needed.
1818 */
19 -define( 'TRANSLATE_VERSION', '2012-02-12' );
 19+define( 'TRANSLATE_VERSION', '2012-02-19' );
2020
2121 /**
2222 * Extension credits properties.
Index: trunk/extensions/Translate/README
@@ -32,6 +32,8 @@
3333 == Change log ==
3434 * 2012-02-19
3535 - MediaWiki 1.18 or later is now required.
 36+- Group description of translatable pages can be extended by adding content to
 37+ [[MediaWiki:Tp-custom-<group id>]].
3638 * 2012-02-13
3739 - Updated some deprecated function calls
3840 - New translation memory called TTMServer comes with the extension and is enabled

Follow-up revisions

RevisionCommit summaryAuthorDate
r111873Fix incorrect call.siebrand17:17, 19 February 2012
r111890Fix some more stupidity in r111871. Thanks for the help, Niklas.siebrand21:07, 19 February 2012

Status & tagging log