Index: trunk/extensions/CodeReview/CodeReview.php |
— | — | @@ -54,6 +54,10 @@ |
55 | 55 | $wgExtensionAliasesFiles['CodeReview'] = $dir . 'CodeReview.alias.php'; |
56 | 56 | |
57 | 57 | $wgAvailableRights[] = 'repoadmin'; |
| 58 | +$wgAvailableRights[] = 'codereview-add-tag'; |
| 59 | +$wgAvailableRights[] = 'codereview-remove-tag'; |
| 60 | +$wgAvailableRights[] = 'codereview-post-comment'; |
| 61 | + |
58 | 62 | $wgGroupPermissions['*']['codereview-add-tag'] = true; |
59 | 63 | $wgGroupPermissions['*']['codereview-remove-tag'] = true; |
60 | 64 | $wgGroupPermissions['*']['codereview-post-comment'] = true; |
Index: trunk/extensions/CodeReview/CodeReview.i18n.php |
— | — | @@ -10,6 +10,7 @@ |
11 | 11 | |
12 | 12 | $messages['en'] = array( |
13 | 13 | 'code' => 'Code Review', |
| 14 | + 'code-comments' => 'Comments', |
14 | 15 | 'code-desc' => 'This tells you what I do on Special:Version. Provide links to special page(s) if possible', |
15 | 16 | 'code-no-repo' => 'No repository configured!', |
16 | 17 | 'code-field-id' => 'Revision', |
— | — | @@ -27,6 +28,7 @@ |
28 | 29 | 'code-rev-modified-d' => 'deleted', |
29 | 30 | 'code-rev-modified-m' => 'modified', |
30 | 31 | 'code-rev-tags' => 'Tags:', |
| 32 | + 'code-rev-tag-add' => 'Add tag', |
31 | 33 | 'code-rev-comment-by' => 'Comment by $1', |
32 | 34 | 'code-rev-comment-submit' => 'Submit comment', |
33 | 35 | 'code-rev-comment-preview' => 'Preview', |
— | — | @@ -48,12 +50,17 @@ |
49 | 51 | |
50 | 52 | $messages['fr'] = array( |
51 | 53 | 'code' => 'Vérification du code', |
| 54 | + 'code-comments' => 'Commentaires', |
52 | 55 | 'code-no-repo' => 'Pas de dépôt configuré !', |
53 | 56 | 'code-field-id' => 'Révision', |
54 | 57 | 'code-field-author' => 'Auteur', |
55 | 58 | 'code-field-message' => 'Commentaire', |
56 | 59 | 'code-field-timestamp' => 'Date', |
57 | 60 | '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', |
58 | 65 | 'code-rev-message' => 'Commentaire :', |
59 | 66 | 'code-rev-repo' => 'Dépôt :', |
60 | 67 | 'code-rev-rev' => 'Révision :', |
— | — | @@ -63,6 +70,8 @@ |
64 | 71 | 'code-rev-modified-c' => 'copié', |
65 | 72 | 'code-rev-modified-d' => 'supprimé', |
66 | 73 | 'code-rev-modified-m' => 'modifié', |
| 74 | + 'code-rev-tag-add' => 'Ajouter l\'attribut', |
| 75 | + 'code-rev-tags' => 'Attributs :', |
67 | 76 | |
68 | 77 | 'repoadmin' => 'Administration des dépôts', |
69 | 78 | 'repoadmin-new-legend' => 'Créer un nouveau dépôt', |
Index: trunk/extensions/CodeReview/CodeRevisionView.php |
— | — | @@ -63,12 +63,13 @@ |
64 | 64 | "</div>"; |
65 | 65 | |
66 | 66 | $html .= |
67 | | - "<h2>Comments</h2>" . |
| 67 | + '<h2>'. wfMsgHtml( 'code-comments' ) .'</h2>' . |
68 | 68 | $this->formatComments(); |
69 | 69 | |
70 | 70 | if( $this->mReplyTarget ) { |
| 71 | + global $wgJsMimeType; |
71 | 72 | $id = intval( $this->mReplyTarget ); |
72 | | - $html .= "<script>addOnloadHook(function(){" . |
| 73 | + $html .= "<script type=\"$wgJsMimeType\">addOnloadHook(function(){" . |
73 | 74 | "document.getElementById('wpReplyTo$id').focus();" . |
74 | 75 | "});</script>"; |
75 | 76 | } |
— | — | @@ -84,7 +85,7 @@ |
85 | 86 | $text = $wgRequest->getText( 'wpReply' ); |
86 | 87 | $parent = $wgRequest->getIntOrNull( 'wpParent' ); |
87 | 88 | $review = $wgRequest->getInt( 'wpReview' ); |
88 | | - $isPreview = $wgRequest->getCheck( 'wpCommentPreview' ); |
| 89 | + $isPreview = $wgRequest->getCheck( 'wpPreview' ); |
89 | 90 | if( $isPreview ) { |
90 | 91 | // NYI |
91 | 92 | } else { |
— | — | @@ -144,7 +145,7 @@ |
145 | 146 | Xml::input( 'wpTag', '' ) . |
146 | 147 | Xml::hidden( 'wpEditToken', $wgUser->editToken() ) . |
147 | 148 | ' ' . |
148 | | - Xml::submitButton( 'Add tag' ) . |
| 149 | + Xml::submitButton( wfMsg( 'code-rev-tag-add' ) ) . |
149 | 150 | '</form>'; |
150 | 151 | } |
151 | 152 | |
— | — | @@ -253,7 +254,7 @@ |
254 | 255 | ' ' . |
255 | 256 | Xml::submitButton( wfMsg( 'code-rev-comment-preview' ), array( 'name' => 'wpPreview' ) ) . |
256 | 257 | '</div>' . |
257 | | - '</div>' . |
258 | | - '</form>'; |
| 258 | + '</form>' . |
| 259 | + '</div>'; |
259 | 260 | } |
260 | 261 | } |