* Add title attributes for the mode switch toolbar buttons.

* Add message documentation.
This commit is contained in:
Erik Moeller 2011-12-11 23:28:29 +00:00
parent f75fd98fe4
commit 1890daf773
2 changed files with 27 additions and 6 deletions

View file

@ -20,7 +20,11 @@ class SpecialVisualEditorSandbox extends SpecialPage {
$wgOut->addModules( 'ext.visualEditor.sandbox' );
$this->setHeaders();
$wgOut->setPageTitle( wfMsg( 'visualeditor-sandbox-title' ) );
$modeWikitext = wfMsgHtml( 'visualeditor-tooltip-wikitext' );
$modeJson = wfMsgHtml( 'visualeditor-tooltip-json' );
$modeHtml = wfMsgHtml( 'visualeditor-tooltip-html' );
$modeRender = wfMsgHtml( 'visualeditor-tooltip-render' );
$modeHistory = wfMsgHtml( 'visualeditor-tooltip-history' );
$out = <<<HTML
<!-- VisualEditor Sandbox -->
<div id="es-docs">
@ -30,11 +34,11 @@ class SpecialVisualEditorSandbox extends SpecialPage {
<div id="es-base">
<div id="es-toolbar" class="es-toolbar">
<div id="es-modes" class="es-modes">
<div id="es-mode-wikitext" class="es-modes-button"></div>
<div id="es-mode-json" class="es-modes-button"></div>
<div id="es-mode-html" class="es-modes-button"></div>
<div id="es-mode-render" class="es-modes-button"></div>
<div id="es-mode-history" class="es-modes-button"></div>
<div id="es-mode-wikitext" class="es-modes-button" title="$modeWikitext"></div>
<div id="es-mode-json" class="es-modes-button" title="$modeJson"></div>
<div id="es-mode-html" class="es-modes-button" title="$modeHtml"></div>
<div id="es-mode-render" class="es-modes-button" title="$modeRender"></div>
<div id="es-mode-history" class="es-modes-button" title="$modeHistory"></div>
</div>
<div style="clear:both"></div>
<div id="es-toolbar-shadow"></div>

View file

@ -8,6 +8,23 @@ $messages['en'] = array(
'visualeditor' => 'VisualEditor',
'visualeditor-desc' => 'Visual editor for MediaWiki',
'visualeditor-sandbox-title' => 'VisualEditor Sandbox',
'visualeditor-tooltip-wikitext' => 'Toggle wikitext view',
'visualeditor-tooltip-json' => 'Toggle JSON view',
'visualeditor-tooltip-html' => 'Toggle HTML view',
'visualeditor-tooltip-render' => 'Toggle preview',
'visualeditor-tooltip-history' => 'Toggle transaction history view',
);
/** Message documentation
* @author Trevor Parscal
* @author Erik Moeller
*/
$messages['qqq'] = array(
'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.',
'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.',
'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.',
'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.',
'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.',
);
/** Breton (Brezhoneg)