r40917 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40916‎ | r40917 | r40918 >
Date:16:06, 16 September 2008
Author:ialex
Status:old
Tags:
Comment:
* Fix XHTML errors
* moved some hardcoded strings to i18n
* Added new rights to $wgAvailableRights
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.i18n.php (modified) (history)
  • /trunk/extensions/CodeReview/CodeReview.php (modified) (history)
  • /trunk/extensions/CodeReview/CodeRevisionView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeReview.php
@@ -54,6 +54,10 @@
5555 $wgExtensionAliasesFiles['CodeReview'] = $dir . 'CodeReview.alias.php';
5656
5757 $wgAvailableRights[] = 'repoadmin';
 58+$wgAvailableRights[] = 'codereview-add-tag';
 59+$wgAvailableRights[] = 'codereview-remove-tag';
 60+$wgAvailableRights[] = 'codereview-post-comment';
 61+
5862 $wgGroupPermissions['*']['codereview-add-tag'] = true;
5963 $wgGroupPermissions['*']['codereview-remove-tag'] = true;
6064 $wgGroupPermissions['*']['codereview-post-comment'] = true;
Index: trunk/extensions/CodeReview/CodeReview.i18n.php
@@ -10,6 +10,7 @@
1111
1212 $messages['en'] = array(
1313 'code' => 'Code Review',
 14+ 'code-comments' => 'Comments',
1415 'code-desc' => 'This tells you what I do on Special:Version. Provide links to special page(s) if possible',
1516 'code-no-repo' => 'No repository configured!',
1617 'code-field-id' => 'Revision',
@@ -27,6 +28,7 @@
2829 'code-rev-modified-d' => 'deleted',
2930 'code-rev-modified-m' => 'modified',
3031 'code-rev-tags' => 'Tags:',
 32+ 'code-rev-tag-add' => 'Add tag',
3133 'code-rev-comment-by' => 'Comment by $1',
3234 'code-rev-comment-submit' => 'Submit comment',
3335 'code-rev-comment-preview' => 'Preview',
@@ -48,12 +50,17 @@
4951
5052 $messages['fr'] = array(
5153 'code' => 'Vérification du code',
 54+ 'code-comments' => 'Commentaires',
5255 'code-no-repo' => 'Pas de dépôt configuré !',
5356 'code-field-id' => 'Révision',
5457 'code-field-author' => 'Auteur',
5558 'code-field-message' => 'Commentaire',
5659 'code-field-timestamp' => 'Date',
5760 'code-rev-author' => 'Auteur :',
 61+ 'code-rev-comment-by' => 'Commentaire par $1',
 62+ 'code-rev-comment-submit' => 'Ajouter le commentaire',
 63+ 'code-rev-comment-preview' => 'Prévisualisation',
 64+ 'code-rev-diff' => 'Différence',
5865 'code-rev-message' => 'Commentaire :',
5966 'code-rev-repo' => 'Dépôt :',
6067 'code-rev-rev' => 'Révision :',
@@ -63,6 +70,8 @@
6471 'code-rev-modified-c' => 'copié',
6572 'code-rev-modified-d' => 'supprimé',
6673 'code-rev-modified-m' => 'modifié',
 74+ 'code-rev-tag-add' => 'Ajouter l\'attribut',
 75+ 'code-rev-tags' => 'Attributs :',
6776
6877 'repoadmin' => 'Administration des dépôts',
6978 'repoadmin-new-legend' => 'Créer un nouveau dépôt',
Index: trunk/extensions/CodeReview/CodeRevisionView.php
@@ -63,12 +63,13 @@
6464 "</div>";
6565
6666 $html .=
67 - "<h2>Comments</h2>" .
 67+ '<h2>'. wfMsgHtml( 'code-comments' ) .'</h2>' .
6868 $this->formatComments();
6969
7070 if( $this->mReplyTarget ) {
 71+ global $wgJsMimeType;
7172 $id = intval( $this->mReplyTarget );
72 - $html .= "<script>addOnloadHook(function(){" .
 73+ $html .= "<script type=\"$wgJsMimeType\">addOnloadHook(function(){" .
7374 "document.getElementById('wpReplyTo$id').focus();" .
7475 "});</script>";
7576 }
@@ -84,7 +85,7 @@
8586 $text = $wgRequest->getText( 'wpReply' );
8687 $parent = $wgRequest->getIntOrNull( 'wpParent' );
8788 $review = $wgRequest->getInt( 'wpReview' );
88 - $isPreview = $wgRequest->getCheck( 'wpCommentPreview' );
 89+ $isPreview = $wgRequest->getCheck( 'wpPreview' );
8990 if( $isPreview ) {
9091 // NYI
9192 } else {
@@ -144,7 +145,7 @@
145146 Xml::input( 'wpTag', '' ) .
146147 Xml::hidden( 'wpEditToken', $wgUser->editToken() ) .
147148 '&nbsp;' .
148 - Xml::submitButton( 'Add tag' ) .
 149+ Xml::submitButton( wfMsg( 'code-rev-tag-add' ) ) .
149150 '</form>';
150151 }
151152
@@ -253,7 +254,7 @@
254255 ' ' .
255256 Xml::submitButton( wfMsg( 'code-rev-comment-preview' ), array( 'name' => 'wpPreview' ) ) .
256257 '</div>' .
257 - '</div>' .
258 - '</form>';
 258+ '</form>' .
 259+ '</div>';
259260 }
260261 }

Status & tagging log