mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-12 00:58:44 +00:00
Use better align change descriptions
Adds support for align=none. Also don't show changes from class names. Change-Id: Ia00a51dd52af73183e98c8a87f4c60ee5380d81f Depends-On: Ic668454c4b4b069dab46a608530c85a5bb7e7ad8
This commit is contained in:
parent
1184f9acf1
commit
7254fbe2cf
|
@ -983,6 +983,11 @@
|
|||
"visualeditor",
|
||||
"visualeditor-aliencontextitem-title",
|
||||
"visualeditor-aliennode-tooltip",
|
||||
"visualeditor-align-desc-center",
|
||||
"visualeditor-align-desc-default",
|
||||
"visualeditor-align-desc-left",
|
||||
"visualeditor-align-desc-none",
|
||||
"visualeditor-align-desc-right",
|
||||
"visualeditor-align-widget-center",
|
||||
"visualeditor-align-widget-default",
|
||||
"visualeditor-align-widget-left",
|
||||
|
|
|
@ -147,14 +147,20 @@ ve.dm.MWImageNode.static.describeChanges = function ( attributeChanges, attribut
|
|||
};
|
||||
|
||||
ve.dm.MWImageNode.static.describeChange = function ( key, change ) {
|
||||
if ( key === 'align' ) {
|
||||
return ve.msg( 'visualeditor-changedesc-align',
|
||||
// Messages used:
|
||||
// visualeditor-align-widget-left, visualeditor-align-widget-right,
|
||||
// visualeditor-align-widget-center, visualeditor-align-widget-default
|
||||
ve.msg( 'visualeditor-align-widget-' + change.from ),
|
||||
ve.msg( 'visualeditor-align-widget-' + change.to )
|
||||
);
|
||||
switch ( key ) {
|
||||
case 'align':
|
||||
return ve.msg( 'visualeditor-changedesc-align',
|
||||
// Messages used:
|
||||
// visualeditor-align-desc-left, visualeditor-align-desc-right,
|
||||
// visualeditor-align-desc-center, visualeditor-align-desc-default,
|
||||
// visualeditor-align-desc-none
|
||||
ve.msg( 'visualeditor-align-desc-' + change.from ),
|
||||
ve.msg( 'visualeditor-align-desc-' + change.to )
|
||||
);
|
||||
case 'originalClasses':
|
||||
case 'unrecognizedClasses':
|
||||
return;
|
||||
// TODO: Handle valign
|
||||
}
|
||||
// Parent method
|
||||
return ve.dm.Node.static.describeChange.apply( this, arguments );
|
||||
|
|
Loading…
Reference in a new issue