mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
ve.dm.MWImageNode#describeChanges: Ignore borderImage noise from the model
Also follow-up 335b56728a
by adding the visualeditor-changedesc-align
i18n which was missed.
Change-Id: I801f66c0028f71cf2cdbcb8f1675ba1f5a3cde31
This commit is contained in:
parent
048aaa7fb4
commit
c70526f0a2
|
@ -1789,6 +1789,7 @@
|
|||
"diffMatchPatch"
|
||||
],
|
||||
"messages": [
|
||||
"visualeditor-changedesc-align",
|
||||
"visualeditor-changedesc-changed",
|
||||
"visualeditor-changedesc-image-size",
|
||||
"visualeditor-changedesc-language",
|
||||
|
|
|
@ -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 )
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue