mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-28 20:56:44 +00:00
1b5d950904
es, eu, fr, gl, hu, it, nl, pt(-br) all covered now. Bug: 51702 Bug: 51703 Bug: 51704 Bug: 51705 Bug: 51706 Bug: 51707 Bug: 51709 Bug: 51710 Change-Id: Ie75cc0941245dffabf64f09d649982ba48fae340
66 lines
1.5 KiB
JavaScript
66 lines
1.5 KiB
JavaScript
/*!
|
|
* VisualEditor UserInterface BoldButtonTool class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* UserInterface bold button tool.
|
|
*
|
|
* @class
|
|
* @extends ve.ui.AnnotationButtonTool
|
|
* @constructor
|
|
* @param {ve.ui.Toolbar} toolbar
|
|
* @param {Object} [config] Config options
|
|
*/
|
|
ve.ui.BoldButtonTool = function VeUiBoldButtonTool( toolbar, config ) {
|
|
// Parent constructor
|
|
ve.ui.AnnotationButtonTool.call( this, toolbar, config );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.inheritClass( ve.ui.BoldButtonTool, ve.ui.AnnotationButtonTool );
|
|
|
|
/* Static Properties */
|
|
|
|
ve.ui.BoldButtonTool.static.name = 'bold';
|
|
|
|
ve.ui.BoldButtonTool.static.icon = {
|
|
'default': 'bold-a',
|
|
'en': 'bold-b',
|
|
'cs': 'bold-b',
|
|
'da': 'bold-f',
|
|
'de': 'bold-f',
|
|
'es': 'bold-n',
|
|
'eu': 'bold-l',
|
|
'fr': 'bold-g',
|
|
'gl': 'bold-n',
|
|
'he': 'bold-b',
|
|
'hu': 'bold-f',
|
|
'it': 'bold-g',
|
|
'ml': 'bold-b',
|
|
'nl': 'bold-v',
|
|
'nn': 'bold-f',
|
|
'no': 'bold-f',
|
|
'pl': 'bold-b',
|
|
'pt': 'bold-n',
|
|
'pt-br': 'bold-n',
|
|
'sv': 'bold-f'
|
|
};
|
|
|
|
ve.ui.BoldButtonTool.static.titleMessage = 'visualeditor-annotationbutton-bold-tooltip';
|
|
|
|
ve.ui.BoldButtonTool.static.annotation = { 'name': 'textStyle/bold' };
|
|
|
|
/* Registration */
|
|
|
|
ve.ui.toolFactory.register( 'bold', ve.ui.BoldButtonTool );
|
|
|
|
ve.ui.commandRegistry.register( 'bold', 'annotation', 'toggle', 'textStyle/bold' );
|
|
|
|
ve.ui.triggerRegistry.register(
|
|
'bold', { 'mac': new ve.ui.Trigger( 'cmd+b' ), 'pc': new ve.ui.Trigger( 'ctrl+b' ) }
|
|
);
|