r51527 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51526‎ | r51527 | r51528 >
Date:23:49, 5 June 2009
Author:tparscal
Status:deferred
Tags:
Comment:
Tweaked some of the messages a bit. Prevented unneeded processing if the user has opted out of using the toolbar.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.i18n.php
@@ -33,8 +33,9 @@
3434 'edittoolbar-insert-file' => 'Embedded file',
3535 'edittoolbar-insert-file-pre' => '$1File:',
3636 'edittoolbar-insert-file-example' => 'Example.jpg',
37 - 'edittoolbar-insert-reference' => 'Insert a reference',
 37+ 'edittoolbar-insert-reference' => 'Reference',
3838 'edittoolbar-insert-reference-example' => 'Insert footnote text here',
 39+ 'edittoolbar-insert-signature' => 'Signature and timestamp',
3940 /* Formatting Section */
4041 'edittoolbar-format-ulist' => 'Bulleted list',
4142 'edittoolbar-format-ulist-example' => 'Bulleted list item',
Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.hooks.php
@@ -19,12 +19,13 @@
2020
2121 // Internationalization
2222 wfLoadExtensionMessages( 'EditToolbar' );
23 -
24 - // Replaces toolbar with new toolbar container
25 - if ( $wgUser->getOption( 'usebetatoolbar' ) ) {
26 - $toolbar = '<div id="edittoolbar"></div>';
 23+ // Checks if the user has not opted to use this toolbar
 24+ if ( !$wgUser->getOption( 'usebetatoolbar' ) ) {
 25+ // Exists the function without doing anything
 26+ return true;
2727 }
28 -
 28+ // Adds toolbar container
 29+ $toolbar = '<div id="edittoolbar"></div>';
2930 // List of messages to be sent to the client for use in the toolbar
3031 $messages = array(
3132 /* Sections */
@@ -46,6 +47,7 @@
4748 'edittoolbar-insert-file-example',
4849 'edittoolbar-insert-reference',
4950 'edittoolbar-insert-reference-example',
 51+ 'edittoolbar-insert-signature',
5052 /* Formatting Section */
5153 'edittoolbar-format-ulist',
5254 'edittoolbar-format-ulist-example',

Status & tagging log