Replace html paragraph tags in i18n

Removed the HTML in the tutorial message and used linebreaks(\n\n) in i18n/en.json file,
replaced .html( mw.message( '…' ).…() ) with .text( mw.msg( '…' ) ) in modules/ext.RevisionSlider.HelpDialog.js
and added 'white-space: pre-wrap' in class '.mw-revslider-column-text' in file modules/ext.RevisionSlider.less
without affecting the front end of the page.

Bug: T267128
Change-Id: Iaf8b1819ca3139c18fb65cfca1c0b2120abb10f4
This commit is contained in:
Mortal303 2022-03-17 12:30:39 +05:30
parent 00d9f42d5e
commit 9dc6fa7fb2
3 changed files with 3 additions and 2 deletions

View file

@ -26,7 +26,7 @@
"revisionslider-show-help-tooltip": "Show help text",
"revisionslider-help-dialog-slide1": "The revision slider helps you to navigate and compare revisions on the diff page. It is based on a [//meta.wikimedia.org/wiki/WMDE_Technical_Wishes/RevisionSlider community wish] from the German-speaking community technical wishlist. Feedback is very much appreciated [//www.mediawiki.org/wiki/Extension_talk:RevisionSlider here].",
"revisionslider-help-dialog-slide2": "Each bar represents a page revision. Bars on the top show growth in size of the page, bars on the bottom show a reduction. In the image, revision 1 represents added content, while revision 2 represents removal of content.",
"revisionslider-help-dialog-slide3a": "<p>To compare certain revisions, select the revisions using the two colored knobs.</p><p>The upper knob controls the newer revision, the lower knob maps to the older revision.</p><p>Move the knobs by drag and drop or clicking on the slider line.</p>",
"revisionslider-help-dialog-slide3a": "To compare certain revisions, select the revisions using the two colored knobs.\n\nThe upper knob controls the newer revision, the lower knob maps to the older revision.\n\nMove the knobs by drag and drop or clicking on the slider line.",
"revisionslider-help-dialog-slide4": "Use the backward and forward arrows to move through revision history and show older and newer revisions.",
"revisionslider-tutorial": "Revision slider tutorial",
"revisionslider-previous-dialog": "Previous",

View file

@ -111,7 +111,7 @@ $.extend( HelpDialog.prototype, {
.append( $( '<div>' ).addClass( 'mw-revslider-help-dialog-image-portrait mw-revslider-help-dialog-slide-3a mw-revslider-column-image' ) )
.append(
$( '<div>' ).addClass( 'mw-revslider-column-text mw-revslider-help-dialog-text' )
.html( mw.message( 'revisionslider-help-dialog-slide3a' ).parse() )
.text( mw.msg( 'revisionslider-help-dialog-slide3a' ) )
)
.append( $( '<div>' ).css( 'clear', 'both' ) );

View file

@ -338,6 +338,7 @@ of the frameless one (to fit the size of the toggle button */
.mw-revslider-column-text {
width: 50%;
float: right;
white-space: pre-wrap;
}
.mw-revslider-help-dialog-text {