diff --git a/i18n/en.json b/i18n/en.json index a5f656eab..11a269286 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -41,13 +41,13 @@ "cite-tracking-category-cite-error-desc": "Pages in this category have errors in the usage of references tags.", "cite-tracking-category-ref-extends": "Pages that use extended references", "cite-tracking-category-ref-extends-desc": "Pages in this category use the \"extends\" attribute of the <ref> tag.", - "popups-refpreview-reference": "Reference", - "popups-refpreview-book": "Book reference", - "popups-refpreview-journal": "Journal reference", - "popups-refpreview-news": "News reference", - "popups-refpreview-note": "Note", - "popups-refpreview-web": "Web reference", - "popups-refpreview-collapsible-placeholder": "This reference includes a figure which does not fit in the preview.", + "cite-reference-previews-reference": "Reference", + "cite-reference-previews-book": "Book reference", + "cite-reference-previews-journal": "Journal reference", + "cite-reference-previews-news": "News reference", + "cite-reference-previews-note": "Note", + "cite-reference-previews-web": "Web reference", + "cite-reference-previews-collapsible-placeholder": "This reference includes a figure which does not fit in the preview.", "cite_reference_backlink_symbol": "↑", "cite_reference_link": "[[#$2|[$3]]]", "cite_references_link_one": "
  • [[#$2|↑]] $3
  • ", diff --git a/i18n/qqq.json b/i18n/qqq.json index 0e314f4dd..7cc88ecd7 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -46,13 +46,13 @@ "cite-tracking-category-cite-error-desc": "Tracking category description.", "cite-tracking-category-ref-extends": "{{tracking category name}}\nThe [[:mw:Special:MyLanguage/Help:Tracking categories|tracking category]] to add to the article if it uses <ref> tags with an extends attribute.", "cite-tracking-category-ref-extends-desc": "Description of the extends feature tracking category.", - "popups-refpreview-reference": "Default heading for popups that show previews of references as provided by the Cite extension's tags (also known as footnotes).\n{{Identical|Reference}}", - "popups-refpreview-book": "Heading for a popup previewing a citation from a book.\n{{Identical|Book}}", - "popups-refpreview-journal": "Heading for a popup previewing a citation from a journal.\n{{Identical|Journal}}", - "popups-refpreview-news": "Heading for a popup previewing a citation from the news.\n{{Identical|News}}", - "popups-refpreview-note": "Heading for a popup previewing a footnote.\n{{Identical|Note}}", - "popups-refpreview-web": "Heading for a popup previewing a citation from a website.\n{{Identical|Website}}", - "popups-refpreview-collapsible-placeholder": "Placeholder text for collapsible tables, templates, or other large elements inside of a reference.", + "cite-reference-previews-reference": "Default heading for popups that show previews of references as provided by the Cite extension's tags (also known as footnotes).\n{{Identical|Reference}}", + "cite-reference-previews-book": "Heading for a popup previewing a citation from a book.\n{{Identical|Book}}", + "cite-reference-previews-journal": "Heading for a popup previewing a citation from a journal.\n{{Identical|Journal}}", + "cite-reference-previews-news": "Heading for a popup previewing a citation from the news.\n{{Identical|News}}", + "cite-reference-previews-note": "Heading for a popup previewing a footnote.\n{{Identical|Note}}", + "cite-reference-previews-web": "Heading for a popup previewing a citation from a website.\n{{Identical|Website}}", + "cite-reference-previews-collapsible-placeholder": "Placeholder text for collapsible tables, templates, or other large elements inside of a reference.", "cite_reference_backlink_symbol": "{{optional}}\nSymbol used for the reference section, used to link back to where the reference is used.", "cite_reference_link": "{{notranslate}}\n\nParameters:\n* $1 - ref key\n* $2 - references key\n* $3 - link label", "cite_references_link_one": "{{notranslate}}\n\nParameters:\n* $1 - references key\n* $2 - ref key\n* $3 - reference text\n* $4 - optional CSS class for direction", diff --git a/modules/ext.cite.referencePreviews/createReferencePreview.js b/modules/ext.cite.referencePreviews/createReferencePreview.js index 17505d54d..9d3b67680 100644 --- a/modules/ext.cite.referencePreviews/createReferencePreview.js +++ b/modules/ext.cite.referencePreviews/createReferencePreview.js @@ -45,14 +45,14 @@ function renderReferencePreview( ) { const type = model.referenceType || 'generic'; // The following messages are used here: - // * popups-refpreview-book - // * popups-refpreview-journal - // * popups-refpreview-news - // * popups-refpreview-note - // * popups-refpreview-web - let titleMsg = mw.message( `popups-refpreview-${ type }` ); + // * cite-reference-previews-book + // * cite-reference-previews-journal + // * cite-reference-previews-news + // * cite-reference-previews-note + // * cite-reference-previews-web + let titleMsg = mw.message( `cite-reference-previews-${ type }` ); if ( !titleMsg.exists() ) { - titleMsg = mw.message( 'popups-refpreview-reference' ); + titleMsg = mw.message( 'cite-reference-previews-reference' ); } const el = TEMPLATE.content.cloneNode( true ).children[ 0 ]; @@ -91,7 +91,7 @@ function renderReferencePreview( icon.classList.add( 'popups-icon', 'popups-icon--infoFilled' ); const label = document.createElement( 'span' ); label.classList.add( 'mwe-collapsible-placeholder-label' ); - label.textContent = mw.msg( 'popups-refpreview-collapsible-placeholder' ); + label.textContent = mw.msg( 'cite-reference-previews-collapsible-placeholder' ); otherNode.appendChild( icon ); otherNode.appendChild( label ); replaceWith( node, otherNode ); diff --git a/src/Hooks/CiteHooks.php b/src/Hooks/CiteHooks.php index e2056f9c0..9cc705d34 100644 --- a/src/Hooks/CiteHooks.php +++ b/src/Hooks/CiteHooks.php @@ -109,13 +109,13 @@ class CiteHooks implements 'referencePreview.less', ], 'messages' => [ - 'popups-refpreview-reference', - 'popups-refpreview-book', - 'popups-refpreview-journal', - 'popups-refpreview-news', - 'popups-refpreview-note', - 'popups-refpreview-web', - 'popups-refpreview-collapsible-placeholder', + 'cite-reference-previews-reference', + 'cite-reference-previews-book', + 'cite-reference-previews-journal', + 'cite-reference-previews-news', + 'cite-reference-previews-note', + 'cite-reference-previews-web', + 'cite-reference-previews-collapsible-placeholder', ], 'packageFiles' => [ 'index.js', diff --git a/tests/qunit/ext.cite.referencePreviews/renderer.test.js b/tests/qunit/ext.cite.referencePreviews/renderer.test.js index 411cdf60b..9375c9ea7 100644 --- a/tests/qunit/ext.cite.referencePreviews/renderer.test.js +++ b/tests/qunit/ext.cite.referencePreviews/renderer.test.js @@ -36,7 +36,7 @@ QUnit.test( 'createReferencePreview(model)', ( assert ) => { assert.strictEqual( $( preview.el ).find( '.mwe-popups-title' ).text().trim(), - '' + '' ); assert.strictEqual( $( preview.el ).find( '.mw-parser-output' ).text().trim(), @@ -59,7 +59,7 @@ QUnit.test( 'createReferencePreview default title', ( assert ) => { assert.strictEqual( $( preview.el ).find( '.mwe-popups-title' ).text().trim(), - '' + '' ); } ); @@ -92,6 +92,6 @@ QUnit.test( 'createReferencePreview collapsible/sortable handling', ( assert ) = assert.strictEqual( $( preview.el ).find( 'th' ).attr( 'title' ), undefined ); assert.strictEqual( $( preview.el ).find( '.mwe-collapsible-placeholder' ).text(), - '' + '' ); } );