diff --git a/extension.json b/extension.json index d24230b6..139df767 100644 --- a/extension.json +++ b/extension.json @@ -121,8 +121,8 @@ ], "messages": [ "colon-separator", - "word-separator", - "revisionslider-bytes", + "revisionslider-page-size", + "revisionslider-change-size", "revisionslider-label-date", "revisionslider-label-page-size", "revisionslider-label-change-size", diff --git a/i18n/en.json b/i18n/en.json index 1df96391..f43cf67e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -8,7 +8,8 @@ "revisionslider-desc": "Shows a slider allowing selecting and comparing of revisions on a diff page", "revisionslider-beta-feature-message": "RevisionSlider", "revisionslider-beta-feature-description": "Show a revision slider when comparing two revisions of a page.", - "revisionslider-bytes": "{{PLURAL:$1|byte|bytes}}", + "revisionslider-page-size": "$1 {{PLURAL:$2|byte|bytes}}", + "revisionslider-change-size": "$1 {{PLURAL:$3|byte|bytes}}", "revisionslider-label-date": "Date", "revisionslider-label-page-size": "Page size", "revisionslider-label-change-size": "Change size", diff --git a/i18n/qqq.json b/i18n/qqq.json index bfd577a6..c96d1c75 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -10,7 +10,8 @@ "revisionslider-desc": "{{desc|name=RevisionSlider|url=https://www.mediawiki.org/wiki/Extension:RevisionSlider}}", "revisionslider-beta-feature-message": "Label for the RevisionSlider Beta Feature.", "revisionslider-beta-feature-description": "Description for the RevisionSlider Beta Feature, describing the feature that will be enabled.", - "revisionslider-bytes": "Unit (bytes) used along with revision/change size.\n\nParameters:\n$1 - number of bytes\n{{Identical|Byte}}", + "revisionslider-page-size": "Page size after the revision.\n\nParameters:\n$1 - number of bytes formatted for output (with mw.language.converNumber)\n$2 - number of bytes, could be used with PLURAL", + "revisionslider-change-size": "Change size, ie. number of bytes added or removed in the revision.\n\nParameters:\n$1 - change size formatted for output (colour-coded HTML element, including plus or minus sign)\n$2 - change size (in bytes), can be negative\n$3 - change size (in bytes) without a sign", "revisionslider-label-date": "Label for the creation date of the revision.\n{{Identical|Date}}", "revisionslider-label-page-size": "Label for the size of the revision.\n{{Identical|Page size}}", "revisionslider-label-change-size": "Label for the size of the change compared to the revision before.", diff --git a/modules/ext.RevisionSlider.RevisionListView.js b/modules/ext.RevisionSlider.RevisionListView.js index f44b44fb..299680ca 100644 --- a/modules/ext.RevisionSlider.RevisionListView.js +++ b/modules/ext.RevisionSlider.RevisionListView.js @@ -260,9 +260,7 @@ makePageSizeLine: function ( size ) { return $( '

' ).append( $( '' ).text( mw.msg( 'revisionslider-label-page-size' ) + mw.msg( 'colon-separator' ) ), - mw.language.convertNumber( size ), - mw.msg( 'word-separator' ), - mw.msg( 'revisionslider-bytes', size ) + mw.msg( 'revisionslider-page-size', mw.language.convertNumber( size ), size ) ); }, @@ -293,9 +291,7 @@ return $( '

' ).append( $( '' ).text( mw.msg( 'revisionslider-label-change-size' ) + mw.msg( 'colon-separator' ) ), - $changeNumber, - mw.msg( 'word-separator' ), - mw.msg( 'revisionslider-bytes', relativeSize ) + mw.message( 'revisionslider-change-size', $changeNumber, relativeSize, Math.abs( relativeSize ) ).parse() ); } } );