mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 19:09:29 +00:00
9b1bc14779
Per bug 51330, cs (Czech), he (Hebrew) and pl (Polish) should use the same icons as English (B for bold, I for italics), rather than the generic As; da (Danish), no (Norwegian Bokmål), nn (Norwegian Nynorsk) and sv (Swedish) should use those that German (F for bold, K for italics). Bug: 51330 Change-Id: I1d5937bed658d45ba6a18d8eb77e9e20d55a16cc
56 lines
1.3 KiB
JavaScript
56 lines
1.3 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',
|
|
'he': 'bold-b',
|
|
'nn': 'bold-f',
|
|
'no': 'bold-f',
|
|
'pl': 'bold-b',
|
|
'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' ) }
|
|
);
|