mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 08:10:35 +00:00
f48332d176
* Summary label is now placeholder text * Edit summary and options are visually connected * Added summary length count-down label * Removed check-mark icons from toolbar and dialog save buttons * Made toolbar and dialog save buttons the same size * Reduced line-height and margins of license information * Changed from X icon for close (which might be confused with cancel) to ^ icon for collapse Change-Id: Ib1711f49af8929be12796aecdea49467b726856e
42 lines
1 KiB
PHP
42 lines
1 KiB
PHP
<?php
|
|
/**
|
|
* Resource loader module for certain VisualEditor messages.
|
|
*
|
|
* @file
|
|
* @ingroup Extensions
|
|
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* Module for user preference customizations
|
|
*/
|
|
class VisualEditorMessagesModule extends ResourceLoaderModule {
|
|
|
|
/* Protected Members */
|
|
|
|
protected $modifiedTime = array();
|
|
|
|
protected $origin = self::ORIGIN_CORE_INDIVIDUAL;
|
|
|
|
/* Methods */
|
|
|
|
public function getScript( ResourceLoaderContext $context ) {
|
|
$messages = array(
|
|
'minoredit' => wfMessage( 'minoredit' )->parse(),
|
|
'watchthis' => wfMessage( 'watchthis' )->parse(),
|
|
);
|
|
return 've.init.platform.addMessages(' . FormatJson::encode( $messages ) . ');';
|
|
}
|
|
|
|
public function getMessages() {
|
|
// We don't actually use the i18n on the client-side, but registering the messages
|
|
// is needed to make cache invalidation work
|
|
return array( 'minoredit', 'watchthis' );
|
|
}
|
|
|
|
public function getDependencies() {
|
|
return array( 'ext.visualEditor.base' );
|
|
}
|
|
}
|