r67118 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67117‎ | r67118 | r67119 >
Date:22:00, 30 May 2010
Author:siebrand
Status:deferred
Tags:
Comment:
* add nice title for translation links
* add i18n and title for history link on Special:Translations
Modified paths:
  • /trunk/extensions/Translate/SpecialTranslations.php (modified) (history)
  • /trunk/extensions/Translate/Translate.i18n.php (modified) (history)
  • /trunk/extensions/Translate/utils/TranslationEditPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/TranslationEditPage.php
@@ -139,9 +139,13 @@
140140 return array();
141141 }
142142
143 - $jsTitle = Xml::escapeJsString( $title->getPrefixedDbKey() );
 143+ $dbKey = $title->getPrefixedDbKey();
 144+ $jsTitle = Xml::escapeJsString( $dbKey );
144145 $jsGroup = Xml::escapeJsString( $group );
145146
146 - return array( 'onclick' => "return trlOpenJsEdit( \"$jsTitle\", \"$jsGroup\" );" );
 147+ return array(
 148+ 'onclick' => "return trlOpenJsEdit( \"$jsTitle\", \"$jsGroup\" );",
 149+ 'title' => wfMsg( 'translate-edit-title', $dbKey )
 150+ );
147151 }
148152 }
Index: trunk/extensions/Translate/Translate.i18n.php
@@ -64,6 +64,7 @@
6565 'translate-optional' => '(optional)',
6666 'translate-ignored' => '(ignored)',
6767
 68+ 'translate-edit-title' => 'Edit "$1"',
6869 'translate-edit-definition' => 'Message definition',
6970 'translate-edit-contribute' => 'contribute',
7071 'translate-edit-no-information' => "''This message has no documentation.
@@ -197,6 +198,7 @@
198199 'translate-translations-messagename' => 'Name:',
199200 'translate-translations-project' => 'Project:',
200201 'translate-translations-including-no-param' => 'Please specify a valid message key in the subpage parameter',
 202+ 'translate-translations-history-short' => 'h',
201203
202204 # Special:LanguageStats
203205 'languagestats' => 'Language statistics',
Index: trunk/extensions/Translate/SpecialTranslations.php
@@ -42,7 +42,6 @@
4343 return;
4444 }
4545
46 -
4746 # GET values
4847 $message = $wgRequest->getText( 'message' );
4948 $namespace = $wgRequest->getInt( 'namespace', NS_MAIN );
@@ -168,6 +167,7 @@
169168 $canTranslate = $wgUser->isAllowed( 'translate' );
170169
171170 $ajaxPageList = array();
 171+ $historyText = "&#160;<sup>" . wfMsg( 'translate-translations-history-short' ) . "</sup>&#160;";
172172
173173 foreach ( $res as $s ) {
174174 $key = $s->page_title;
@@ -187,8 +187,11 @@
188188
189189 $tools['history'] = $sk->link(
190190 $tTitle,
191 - "&#160;<sup>h</sup>&#160;",
192 - array( 'action' ),
 191+ $historyText,
 192+ array(
 193+ 'action',
 194+ 'title' => wfMsg( 'history-title', $tTitle->getPrefixedDbKey() )
 195+ ),
193196 array( 'action' => 'history' )
194197 );
195198
@@ -204,6 +207,7 @@
205208 Xml::tags( 'td', null, TranslateUtils::convertWhiteSpaceToHTML( $pageInfo[$key][0] ) )
206209 );
207210 }
 211+
208212 TranslateUtils::injectCSS();
209213
210214 $out .= Xml::closeElement( 'table' );

Status & tagging log