diff --git a/extension.json b/extension.json index d00767f448..8cee265246 100644 --- a/extension.json +++ b/extension.json @@ -1789,6 +1789,7 @@ "diffMatchPatch" ], "messages": [ + "visualeditor-changedesc-align", "visualeditor-changedesc-changed", "visualeditor-changedesc-image-size", "visualeditor-changedesc-language", diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js index 1314bdeb63..7d1f081930 100644 --- a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js +++ b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js @@ -91,6 +91,10 @@ ve.dm.MWImageNode.static.describeChanges = function ( attributeChanges, attribut } for ( key in attributeChanges ) { if ( customKeys.indexOf( key ) === -1 ) { + if ( key === 'borderImage' && !attributeChanges.borderImage.from && !attributeChanges.borderImage.to ) { + // Skip noise from the data model + continue; + } change = this.describeChange( key, attributeChanges[ key ] ); descriptions.push( change ); } @@ -101,6 +105,9 @@ 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 ) );