r51794 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51793‎ | r51794 | r51795 >
Date:17:55, 12 June 2009
Author:tparscal
Status:deferred
Tags:
Comment:
Switched language of tabs from generic and monobook specific stuff to vector specific messages where possible
Modified paths:
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)
  • /trunk/phase3/skins/Vector.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -164,6 +164,30 @@
165165 'sitetitle',
166166 'sitesubtitle',
167167 ),
 168+ 'vector' => array(
 169+ 'vector-action-addsection',
 170+ 'vector-action-delete',
 171+ 'vector-action-move',
 172+ 'vector-action-protect',
 173+ 'vector-action-undelete',
 174+ 'vector-action-unprotect',
 175+ 'vector-namespace-category',
 176+ 'vector-namespace-help',
 177+ 'vector-namespace-image',
 178+ 'vector-namespace-main',
 179+ 'vector-namespace-media',
 180+ 'vector-namespace-mediawiki',
 181+ 'vector-namespace-project',
 182+ 'vector-namespace-special',
 183+ 'vector-namespace-talk',
 184+ 'vector-namespace-template',
 185+ 'vector-namespace-user',
 186+ 'vector-view-create',
 187+ 'vector-view-edit',
 188+ 'vector-view-history',
 189+ 'vector-view-view',
 190+ 'vector-view-viewsource',
 191+ ),
168192 'metadata_help' => array(
169193 'metadata_help',
170194 ),
Index: trunk/phase3/skins/Vector.php
@@ -83,20 +83,20 @@
8484
8585 // Adds namespace links
8686 $links['namespaces'][$subjectId] = $this->tabAction(
87 - $subjectPage, 'nstab-' . $subjectId, !$isTalk, '', true
 87+ $subjectPage, 'vector-namespace-' . $subjectId, !$isTalk, '', true
8888 );
8989 $links['namespaces'][$talkId] = $this->tabAction(
90 - $talkPage, 'talk', $isTalk, '', true
 90+ $talkPage, 'vector-namespace-talk', $isTalk, '', true
9191 );
9292
9393 // Adds view view link
9494 if ( $this->mTitle->exists() ) {
9595 $links['views']['view'] = $this->tabAction(
9696 $isTalk ? $talkPage : $subjectPage,
97 - 'view', ( $action == 'view' ), '', true
 97+ 'vector-view-view', ( $action == 'view' ), '', true
9898 );
9999 }
100 -
 100+
101101 wfProfileIn( __METHOD__ . '-edit' );
102102
103103 // Checks if user can...
@@ -121,8 +121,8 @@
122122 $links['views']['edit'] = array(
123123 'class' => ( $selected ? 'selected' : '' ) . $isTalkClass,
124124 'text' => $this->mTitle->exists()
125 - ? wfMsg( 'edit' )
126 - : wfMsg( 'create' ),
 125+ ? wfMsg( 'vector-view-edit' )
 126+ : wfMsg( 'vector-view-create' ),
127127 'href' =>
128128 $this->mTitle->getLocalUrl( $this->editUrlOptions() )
129129 );
@@ -134,7 +134,7 @@
135135 // Adds new section link
136136 $links['actions']['addsection'] = array(
137137 'class' => $section == 'new' ? 'selected' : false,
138 - 'text' => wfMsg( 'addsection' ),
 138+ 'text' => wfMsg( 'vector-action-addsection' ),
139139 'href' => $this->mTitle->getLocalUrl(
140140 'action=edit&section=new'
141141 )
@@ -146,7 +146,7 @@
147147 // Adds view source view link
148148 $links['views']['viewsource'] = array(
149149 'class' => ( $action == 'edit' ) ? 'selected' : false,
150 - 'text' => wfMsg( 'viewsource' ),
 150+ 'text' => wfMsg( 'vector-view-viewsource' ),
151151 'href' =>
152152 $this->mTitle->getLocalUrl( $this->editUrlOptions() )
153153 );
@@ -160,7 +160,7 @@
161161 // Adds history view link
162162 $links['views']['history'] = array(
163163 'class' => ($action == 'history') ? 'selected' : false,
164 - 'text' => wfMsg( 'history_short' ),
 164+ 'text' => wfMsg( 'vector-view-history' ),
165165 'href' => $this->mTitle->getLocalUrl( 'action=history' ),
166166 'rel' => 'archives',
167167 );
@@ -168,7 +168,7 @@
169169 if( $wgUser->isAllowed( 'delete' ) ) {
170170 $links['actions']['delete'] = array(
171171 'class' => ($action == 'delete') ? 'selected' : false,
172 - 'text' => wfMsg( 'delete' ),
 172+ 'text' => wfMsg( 'vector-action-delete' ),
173173 'href' => $this->mTitle->getLocalUrl( 'action=delete' )
174174 );
175175 }
@@ -179,7 +179,7 @@
180180 $links['actions']['move'] = array(
181181 'class' => $this->mTitle->isSpecial( 'Movepage' ) ?
182182 'selected' : false,
183 - 'text' => wfMsg( 'move' ),
 183+ 'text' => wfMsg( 'vector-action-move' ),
184184 'href' => $moveTitle->getLocalUrl()
185185 );
186186 }
@@ -192,7 +192,7 @@
193193 $links['actions']['protect'] = array(
194194 'class' => ($action == 'protect') ?
195195 'selected' : false,
196 - 'text' => wfMsg( 'protect' ),
 196+ 'text' => wfMsg( 'vector-action-protect' ),
197197 'href' =>
198198 $this->mTitle->getLocalUrl( 'action=protect' )
199199 );
@@ -201,7 +201,7 @@
202202 $links['actions']['unprotect'] = array(
203203 'class' => ($action == 'unprotect') ?
204204 'selected' : false,
205 - 'text' => wfMsg( 'unprotect' ),
 205+ 'text' => wfMsg( 'vector-action-unprotect' ),
206206 'href' =>
207207 $this->mTitle->getLocalUrl( 'action=unprotect' )
208208 );
@@ -218,7 +218,7 @@
219219 $links['actions']['undelete'] = array(
220220 'class' => false,
221221 'text' => wfMsgExt(
222 - 'undelete_short',
 222+ 'vector-action-undelete',
223223 array( 'parsemag' ),
224224 $wgLang->formatNum( $n )
225225 ),
@@ -237,7 +237,7 @@
238238 $links['actions']['protect'] = array(
239239 'class' => ($action == 'protect') ?
240240 'selected' : false,
241 - 'text' => wfMsg( 'protect' ),
 241+ 'text' => wfMsg( 'vector-action-protect' ),
242242 'href' =>
243243 $this->mTitle->getLocalUrl( 'action=protect' )
244244 );
@@ -246,7 +246,7 @@
247247 $links['actions']['unprotect'] = array(
248248 'class' => ($action == 'unprotect') ?
249249 'selected' : false,
250 - 'text' => wfMsg( 'unprotect' ),
 250+ 'text' => wfMsg( 'vector-action-unprotect' ),
251251 'href' =>
252252 $this->mTitle->getLocalUrl( 'action=unprotect' )
253253 );
@@ -254,7 +254,16 @@
255255 }
256256 }
257257 wfProfileOut( __METHOD__ . '-live' );
258 -
 258+
 259+ /**
 260+ * The following actions use messages which, if made particular to
 261+ * the Vector skin, would break the Ajax code which makes this
 262+ * action happen entirely inline. Skin::makeGlobalVariablesScript
 263+ * defines a set of messages in a javascript object - and these
 264+ * messages are assumed to be global for all skins. Without making
 265+ * a change to that procedure these messages will have to remain as
 266+ * the global versions.
 267+ */
259268 // Checks if the user is logged in
260269 if( $this->loggedin ) {
261270 // Checks if the user is watching this page
@@ -283,7 +292,7 @@
284293 } else {
285294 $links['namespaces']['special'] = array(
286295 'class' => 'selected',
287 - 'text' => wfMsg( 'nstab-special' ),
 296+ 'text' => wfMsg( 'vector-namespace-special' ),
288297 'href' => $wgRequest->getRequestURL()
289298 );
290299 }
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -650,6 +650,29 @@
651651 'sitetitle' => '{{SITENAME}}', # do not translate or duplicate this message to other languages
652652 'sitesubtitle' => '', # do not translate or duplicate this message to other languages
653653
 654+'vector-action-addsection' => 'Add Topic',
 655+'vector-action-delete' => 'Delete',
 656+'vector-action-move' => 'Move',
 657+'vector-action-protect' => 'Protect',
 658+'vector-action-undelete' => 'Undelete',
 659+'vector-action-unprotect' => 'Unprotect',
 660+'vector-namespace-category' => 'Category',
 661+'vector-namespace-help' => 'Help page',
 662+'vector-namespace-image' => 'File',
 663+'vector-namespace-main' => 'Page',
 664+'vector-namespace-media' => 'Media page',
 665+'vector-namespace-mediawiki' => 'Message',
 666+'vector-namespace-project' => 'Project page',
 667+'vector-namespace-special' => 'Special page',
 668+'vector-namespace-talk' => 'Discussion',
 669+'vector-namespace-template' => 'Template',
 670+'vector-namespace-user' => 'User page',
 671+'vector-view-create' => 'Create',
 672+'vector-view-edit' => 'Edit',
 673+'vector-view-history' => 'View History',
 674+'vector-view-view' => 'Read',
 675+'vector-view-viewsource' => 'View Source',
 676+
654677 # Metadata in edit box
655678 'metadata_help' => 'Metadata:',
656679
@@ -669,7 +692,6 @@
670693 'permalink' => 'Permanent link',
671694 'print' => 'Print',
672695 'edit' => 'Edit',
673 -'view' => 'Read',
674696 'create' => 'Create',
675697 'editthispage' => 'Edit this page',
676698 'create-this-page' => 'Create this page',

Status & tagging log