diff --git a/extension.json b/extension.json index e06eae5e23..13aa9744d4 100644 --- a/extension.json +++ b/extension.json @@ -985,6 +985,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", diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js index 7fc0c4b416..d8ef51ee26 100644 --- a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js +++ b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js @@ -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 );