r105837 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105836‎ | r105837 | r105838 >
Date:23:28, 11 December 2011
Author:erik
Status:ok
Tags:
Comment:
* Add title attributes for the mode switch toolbar buttons.
* Add message documentation.
Modified paths:
  • /trunk/extensions/VisualEditor/SpecialVisualEditorSandbox.php (modified) (history)
  • /trunk/extensions/VisualEditor/VisualEditor.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/SpecialVisualEditorSandbox.php
@@ -20,7 +20,11 @@
2121 $wgOut->addModules( 'ext.visualEditor.sandbox' );
2222 $this->setHeaders();
2323 $wgOut->setPageTitle( wfMsg( 'visualeditor-sandbox-title' ) );
24 -
 24+ $modeWikitext = wfMsgHtml( 'visualeditor-tooltip-wikitext' );
 25+ $modeJson = wfMsgHtml( 'visualeditor-tooltip-json' );
 26+ $modeHtml = wfMsgHtml( 'visualeditor-tooltip-html' );
 27+ $modeRender = wfMsgHtml( 'visualeditor-tooltip-render' );
 28+ $modeHistory = wfMsgHtml( 'visualeditor-tooltip-history' );
2529 $out = <<<HTML
2630 <!-- VisualEditor Sandbox -->
2731 <div id="es-docs">
@@ -30,11 +34,11 @@
3135 <div id="es-base">
3236 <div id="es-toolbar" class="es-toolbar">
3337 <div id="es-modes" class="es-modes">
34 - <div id="es-mode-wikitext" class="es-modes-button"></div>
35 - <div id="es-mode-json" class="es-modes-button"></div>
36 - <div id="es-mode-html" class="es-modes-button"></div>
37 - <div id="es-mode-render" class="es-modes-button"></div>
38 - <div id="es-mode-history" class="es-modes-button"></div>
 38+ <div id="es-mode-wikitext" class="es-modes-button" title="$modeWikitext"></div>
 39+ <div id="es-mode-json" class="es-modes-button" title="$modeJson"></div>
 40+ <div id="es-mode-html" class="es-modes-button" title="$modeHtml"></div>
 41+ <div id="es-mode-render" class="es-modes-button" title="$modeRender"></div>
 42+ <div id="es-mode-history" class="es-modes-button" title="$modeHistory"></div>
3943 </div>
4044 <div style="clear:both"></div>
4145 <div id="es-toolbar-shadow"></div>
Index: trunk/extensions/VisualEditor/VisualEditor.i18n.php
@@ -8,8 +8,25 @@
99 'visualeditor' => 'VisualEditor',
1010 'visualeditor-desc' => 'Visual editor for MediaWiki',
1111 'visualeditor-sandbox-title' => 'VisualEditor Sandbox',
 12+ 'visualeditor-tooltip-wikitext' => 'Toggle wikitext view',
 13+ 'visualeditor-tooltip-json' => 'Toggle JSON view',
 14+ 'visualeditor-tooltip-html' => 'Toggle HTML view',
 15+ 'visualeditor-tooltip-render' => 'Toggle preview',
 16+ 'visualeditor-tooltip-history' => 'Toggle transaction history view',
1217 );
1318
 19+/** Message documentation
 20+ * @author Trevor Parscal
 21+ * @author Erik Moeller
 22+ */
 23+$messages['qqq'] = array(
 24+ 'visualeditor-mode-wikitext' => 'Tooltip for a toolbar button which activates or deactivates a split view, with the visual editor on the left-hand side, and a dynamically updating but read-only wikitext view on the right-hand side.',
 25+ 'visualeditor-tooltip-json' => 'Tooltip for a toolbar button which activates or deactivates a split view, with the visual editor on the left-hand side, and a dynamically updating but read-only JSON representation of the document on the right-hand side. This view is primarily useful for debugging purposes.',
 26+ 'visualeditor-tooltip-html' => 'Tooltip for a toolbar button which activates or deactivates a split view, with the visual editor on the left-hand side, and a dyanmically updating but read-only raw HTML view on the right-hand side. This view is primarily useful for debugging purposes.',
 27+ 'visualeditor-tooltip-render' => 'Tooltip for a toolbar button which activates or deactivates a split view, with the visual editor on the left-hand side, and a dynamically updating preview on the right-hand side. This view is primarily useful for debugging purposes.',
 28+ 'visualeditor-tooltip-history' => 'Tooltip for a toolbar button which activates or deactivates a split view, with the visual editor on the left-hand side, and a history of the user\'s edit transactions on the right-hand side. This view is primarily useful for debugging purposes.',
 29+);
 30+
1431 /** Breton (Brezhoneg)
1532 * @author Y-M D
1633 */

Status & tagging log