From 5c18abff003bd9194d715aee0f32363b74f344a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Harald=20S=C3=B8by?= Date: Wed, 21 Jun 2023 00:33:34 +0200 Subject: [PATCH] Move reference-specific settings to the Cite extension These config settings were specific to the Cite extension, and are misleading on wikis that don't have that extension installed. Move the functionality to the Cite extension instead. Bug: T339973 Depends-On: Ib3fdc897dd3330f69c5832003d4c3cb1e6dba2f3 Change-Id: Ib619706ddfca724990e1db2d51f12a2eb05f6a72 --- extension.json | 33 ------------------- i18n/en.json | 19 ----------- i18n/qqq.json | 23 ++----------- modules/jquery.wikiEditor.dialogs.config.js | 13 -------- modules/jquery.wikiEditor.dialogs.config.less | 12 ------- modules/jquery.wikiEditor.toolbar.config.js | 31 ----------------- modules/templates/dialogInsertReference.html | 9 ----- 7 files changed, 2 insertions(+), 138 deletions(-) delete mode 100644 modules/templates/dialogInsertReference.html diff --git a/extension.json b/extension.json index 296714b6..e35e5518 100644 --- a/extension.json +++ b/extension.json @@ -84,7 +84,6 @@ }, "templates": { "dialogInsertFile.html": "templates/dialogInsertFile.html", - "dialogInsertReference.html": "templates/dialogInsertReference.html", "dialogInsertTable.html": "templates/dialogInsertTable.html", "dialogReplace.html": "templates/dialogReplace.html" }, @@ -121,12 +120,6 @@ "wikieditor-toolbar-tool-link-lookslikeinternal-ext", "wikieditor-toolbar-tool-file", "wikieditor-toolbar-tool-file-example", - "wikieditor-toolbar-tool-reference", - "wikieditor-toolbar-tool-reference-title", - "wikieditor-toolbar-tool-reference-cancel", - "wikieditor-toolbar-tool-reference-text", - "wikieditor-toolbar-tool-reference-insert", - "wikieditor-toolbar-tool-reference-example", "wikieditor-toolbar-tool-signature", "wikieditor-toolbar-section-advanced", "wikieditor-toolbar-tool-heading", @@ -200,7 +193,6 @@ "wikieditor-toolbar-help-page-heading", "wikieditor-toolbar-help-page-list", "wikieditor-toolbar-help-page-file", - "wikieditor-toolbar-help-page-reference", "wikieditor-toolbar-help-page-discussion", "wikieditor-toolbar-help-content-bold-description", "wikieditor-toolbar-help-content-bold-syntax", @@ -239,18 +231,6 @@ "wikieditor-toolbar-help-content-file-syntax", "wikieditor-toolbar-help-content-file-caption", "thumbnail-more", - "wikieditor-toolbar-help-content-reference-description", - "wikieditor-toolbar-help-content-reference-syntax", - "wikieditor-toolbar-help-content-reference-result", - "wikieditor-toolbar-help-content-named-reference-description", - "wikieditor-toolbar-help-content-named-reference-syntax", - "wikieditor-toolbar-help-content-named-reference-result", - "wikieditor-toolbar-help-content-rereference-description", - "wikieditor-toolbar-help-content-rereference-syntax", - "wikieditor-toolbar-help-content-rereference-result", - "wikieditor-toolbar-help-content-showreferences-description", - "wikieditor-toolbar-help-content-showreferences-syntax", - "wikieditor-toolbar-help-content-showreferences-result", "wikieditor-toolbar-help-content-signaturetimestamp-description", "wikieditor-toolbar-help-content-signaturetimestamp-syntax", "wikieditor-toolbar-help-content-signaturetimestamp-result", @@ -375,7 +355,6 @@ "wikieditor-toolbar-help-page-heading", "wikieditor-toolbar-help-page-list", "wikieditor-toolbar-help-page-file", - "wikieditor-toolbar-help-page-reference", "wikieditor-toolbar-help-page-discussion", "wikieditor-toolbar-help-content-italic-description", "wikieditor-toolbar-help-content-italic-syntax", @@ -413,18 +392,6 @@ "wikieditor-toolbar-help-content-file-description", "wikieditor-toolbar-help-content-file-syntax", "wikieditor-toolbar-help-content-file-caption", - "wikieditor-toolbar-help-content-reference-description", - "wikieditor-toolbar-help-content-reference-syntax", - "wikieditor-toolbar-help-content-reference-result", - "wikieditor-toolbar-help-content-named-reference-description", - "wikieditor-toolbar-help-content-named-reference-syntax", - "wikieditor-toolbar-help-content-named-reference-result", - "wikieditor-toolbar-help-content-rereference-description", - "wikieditor-toolbar-help-content-rereference-syntax", - "wikieditor-toolbar-help-content-rereference-result", - "wikieditor-toolbar-help-content-showreferences-description", - "wikieditor-toolbar-help-content-showreferences-syntax", - "wikieditor-toolbar-help-content-showreferences-result", "wikieditor-toolbar-help-content-signaturetimestamp-description", "wikieditor-toolbar-help-content-signaturetimestamp-syntax", "wikieditor-toolbar-help-content-signaturetimestamp-result", diff --git a/i18n/en.json b/i18n/en.json index 19c72554..cc8561b6 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -56,12 +56,6 @@ "wikieditor-toolbar-tool-file-insert": "Insert", "wikieditor-toolbar-tool-file-cancel": "Cancel", "wikieditor-toolbar-tool-file-upload": "Upload", - "wikieditor-toolbar-tool-reference": "Reference", - "wikieditor-toolbar-tool-reference-example": "Insert footnote text here", - "wikieditor-toolbar-tool-reference-cancel": "Cancel", - "wikieditor-toolbar-tool-reference-title": "Insert reference", - "wikieditor-toolbar-tool-reference-insert": "Insert", - "wikieditor-toolbar-tool-reference-text": "Reference text", "wikieditor-toolbar-tool-signature": "Signature and timestamp", "wikieditor-toolbar-section-advanced": "Advanced", "wikieditor-toolbar-tool-heading": "Heading", @@ -136,7 +130,6 @@ "wikieditor-toolbar-help-page-heading": "Headings", "wikieditor-toolbar-help-page-list": "Lists", "wikieditor-toolbar-help-page-file": "Files", - "wikieditor-toolbar-help-page-reference": "References", "wikieditor-toolbar-help-page-discussion": "Discussion", "wikieditor-toolbar-help-content-italic-description": "Italic", "wikieditor-toolbar-help-content-italic-syntax": "''Italic text''", @@ -174,18 +167,6 @@ "wikieditor-toolbar-help-content-file-description": "Embedded file", "wikieditor-toolbar-help-content-file-syntax": "[[$1:Example.png|$2|$3]]", "wikieditor-toolbar-help-content-file-caption": "Caption text", - "wikieditor-toolbar-help-content-reference-description": "Reference", - "wikieditor-toolbar-help-content-reference-syntax": "Page text.<ref>[http://www.example.org Link text], additional text.</ref>", - "wikieditor-toolbar-help-content-reference-result": "Page text.[1]", - "wikieditor-toolbar-help-content-named-reference-description": "Named reference", - "wikieditor-toolbar-help-content-named-reference-syntax": "Page text.<ref name=\"test\">[http://www.example.org Link text]</ref>", - "wikieditor-toolbar-help-content-named-reference-result": "Page text.[2]", - "wikieditor-toolbar-help-content-rereference-description": "Additional use of same reference", - "wikieditor-toolbar-help-content-rereference-syntax": "<ref name=\"test\" />", - "wikieditor-toolbar-help-content-rereference-result": "Page text.[2]", - "wikieditor-toolbar-help-content-showreferences-description": "Display references", - "wikieditor-toolbar-help-content-showreferences-syntax": "<references />", - "wikieditor-toolbar-help-content-showreferences-result": "
  1. ^ Link text, additional text.
  2. ^ Link text
", "wikieditor-toolbar-help-content-signaturetimestamp-description": "Signature with timestamp", "wikieditor-toolbar-help-content-signaturetimestamp-syntax": "--~~~~", "wikieditor-toolbar-help-content-signaturetimestamp-result": "--Username (talk) 15:54, 10 June 2009 (UTC)", diff --git a/i18n/qqq.json b/i18n/qqq.json index 696037e9..955c633b 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -50,7 +50,7 @@ "wikieditor-toolbar-tool-ilink-example": "Used as link title when inserting an example wikilink into the editbox from the toolbar", "wikieditor-toolbar-tool-xlink": "{{Identical|External link (remember http:// prefix)}}", "wikieditor-toolbar-tool-xlink-example": "www.example.com is not a real website, but it has been reserved for use in software documentation, and will never be sold or used for advertising. If you translate the word \"example\" and try to go to that web address, then you might get a message that it doesn't exist. But somebody may have created a commercial web page for that address, such as www.Beispiel.org, using the German word for example. It is therefore recommended that you do not translate http://www.example.com at all. If you do wish to translate it, you should first check where the translated link takes you, and bear in mind that anybody could purchase that name in the future.", - "wikieditor-toolbar-tool-link": "A tooltip on a toolbar button that adds a link (internal or external).\n\nAppears in the same section with the following:\n* {{msg-mw|wikieditor-toolbar-tool-file}}\n* {{msg-mw|wikieditor-toolbar-tool-reference}}\n* {{msg-mw|templatewizard-dialog-title}} (on wikis where the TemplateWizard extension is installed)\n\n{{Identical|Link}}", + "wikieditor-toolbar-tool-link": "A tooltip on a toolbar button that adds a link (internal or external).\n\nAppears in the same section with the following:\n* {{msg-mw|wikieditor-toolbar-tool-file}}\n* {{msg-mw|templatewizard-dialog-title}} (on wikis where the TemplateWizard extension is installed)\n\n{{Identical|Link}}", "wikieditor-toolbar-tool-link-title": "{{Identical|Insert link}}", "wikieditor-toolbar-tool-link-int": "Used in the link dialog of the toolbar as label for a checkbox", "wikieditor-toolbar-tool-link-int-target": "Used in the link dialog of the toolbar as label for an input field", @@ -71,7 +71,7 @@ "wikieditor-toolbar-tool-link-lookslikeinternal": "Used in the link dialog of the toolbar as hint when clicking the insert button", "wikieditor-toolbar-tool-link-lookslikeinternal-int": "{{Identical|Internal link}}", "wikieditor-toolbar-tool-link-lookslikeinternal-ext": "{{Identical|External link}}", - "wikieditor-toolbar-tool-file": "A tooltip on a toolbar button that adds a file (image, audio, or video).\n\nAppears in the same section with the following:\n* {{msg-mw|wikieditor-toolbar-tool-link}}\n* {{msg-mw|wikieditor-toolbar-tool-file}}\n* {{msg-mw|wikieditor-toolbar-tool-reference}}\n* {{msg-mw|templatewizard-dialog-title}} (on wikis where the TemplateWizard extension is installed)", + "wikieditor-toolbar-tool-file": "A tooltip on a toolbar button that adds a file (image, audio, or video).\n\nAppears in the same section with the following:\n* {{msg-mw|wikieditor-toolbar-tool-link}}\n* {{msg-mw|wikieditor-toolbar-tool-file}}\n* {{msg-mw|templatewizard-dialog-title}} (on wikis where the TemplateWizard extension is installed)", "wikieditor-toolbar-tool-file-example": "Translate Example, but don't translate .jpg\n{{Identical|Example}}", "wikieditor-toolbar-tool-file-title": "Title for insert file dialog", "wikieditor-toolbar-file-target": "Label for the input of filename on insert file dialog.\n{{Identical|Filename}}", @@ -87,12 +87,6 @@ "wikieditor-toolbar-tool-file-insert": "{{Identical|Insert}}", "wikieditor-toolbar-tool-file-cancel": "{{Identical|Cancel}}", "wikieditor-toolbar-tool-file-upload": "Label for button that opens the upload dialog\n{{Identical|Upload}}", - "wikieditor-toolbar-tool-reference": "A tooltip on a toolbar button that adds a reference.\n\nAppears in the same section with the following:\n* {{msg-mw|wikieditor-toolbar-tool-link}}\n* {{msg-mw|wikieditor-toolbar-tool-file}}\n* {{msg-mw|templatewizard-dialog-title}} (on wikis where the TemplateWizard extension is installed)\n\n{{Identical|Reference}}", - "wikieditor-toolbar-tool-reference-example": "Used as example text when inserting a reference into the editbox from the toolbar", - "wikieditor-toolbar-tool-reference-cancel": "{{Identical|Cancel}}", - "wikieditor-toolbar-tool-reference-title": "Title of insert reference dialog. This text is on the very top bar of the dialog.\n{{Identical|Insert reference}}", - "wikieditor-toolbar-tool-reference-insert": "Button text for the insert action of the insert reference dialog.\n{{Identical|Insert}}", - "wikieditor-toolbar-tool-reference-text": "Label for the input field on the insert reference dialog.", "wikieditor-toolbar-tool-signature": "{{Identical|Signature with timestamp}}", "wikieditor-toolbar-section-advanced": "{{Identical|Advanced}}", "wikieditor-toolbar-tool-heading": "{{Identical|Heading}}", @@ -167,7 +161,6 @@ "wikieditor-toolbar-help-page-heading": "{{RawHtml|phab=T294760}}\n\n{{Identical|Heading}}", "wikieditor-toolbar-help-page-list": "{{RawHtml|phab=T294760}}\n\n{{Identical|List}}", "wikieditor-toolbar-help-page-file": "{{RawHtml|phab=T294760}}\n\n{{Identical|File}}", - "wikieditor-toolbar-help-page-reference": "{{RawHtml|phab=T294760}}\n\n{{Identical|Reference}}", "wikieditor-toolbar-help-page-discussion": "{{RawHtml|phab=T294760}}\n\n{{Identical|Discussion}}", "wikieditor-toolbar-help-content-italic-description": "{{RawHtml|phab=T294760}}\n\n{{Identical|Italic}}", "wikieditor-toolbar-help-content-italic-syntax": "{{RawHtml|phab=T294760}}\n\n{{Identical|Italic text}}", @@ -205,18 +198,6 @@ "wikieditor-toolbar-help-content-file-description": "{{RawHtml|phab=T294760}}\n\n{{Identical|Embedded file}}", "wikieditor-toolbar-help-content-file-syntax": "{{RawHtml|phab=T294760}}\n\nParameters:\n* $1 - \"File\" namespace name\n* $2 - the image syntax parameter for the thumbnail\n* $3 - the caption for the thumbnail", "wikieditor-toolbar-help-content-file-caption": "{{RawHtml|phab=T294760}}\n\nPlaceholder text for file caption. Must match {{msg-mw|wikieditor-toolbar-help-content-file-syntax}}.", - "wikieditor-toolbar-help-content-reference-description": "{{RawHtml|phab=T294760}}\n\n{{Identical|Reference}}", - "wikieditor-toolbar-help-content-reference-syntax": "{{RawHtml|phab=T294760}}\n\nSyntax example used in the help section \"reference\" of the toolbar\n\nwww.example.org is not a real website, but it has been reserved for use in software documentation. If you translate the word example and try to go to that web address, then you might get a message that it doesn't exist. But somebody may have created a commercial web page for that address, such as www.Beispiel.org, using the German word for example. It is therefore recommended that you do not translate http://www.example.org at all. If you do wish to translate it, you should first check where the translated link takes you.", - "wikieditor-toolbar-help-content-reference-result": "{{RawHtml|phab=T294760}}\n\nHTML example used in the help section \"reference\" of the toolbar", - "wikieditor-toolbar-help-content-named-reference-description": "{{RawHtml|phab=T294760}}\n\nDescription used in the help section \"reference\" of the toolbar", - "wikieditor-toolbar-help-content-named-reference-syntax": "{{RawHtml|phab=T294760}}\n\nSyntax example used in the help section \"reference\" of the toolbar\n\nIt is suggested to leave the name=\"test\" string in English", - "wikieditor-toolbar-help-content-named-reference-result": "{{RawHtml|phab=T294760}}\n\nHTML example used in the help section \"reference\" of the toolbar. If your language uses different digits, use it instead of \"[2]\".", - "wikieditor-toolbar-help-content-rereference-description": "{{RawHtml|phab=T294760}}\n\nDescription used in the help section \"reference\" of the toolbar", - "wikieditor-toolbar-help-content-rereference-syntax": "{{Optional}}\nSyntax example used in the help section \"reference\" of the toolbar", - "wikieditor-toolbar-help-content-rereference-result": "{{RawHtml|phab=T294760}}\n\nHTML example used in the help section \"reference\" of the toolbar", - "wikieditor-toolbar-help-content-showreferences-description": "{{RawHtml|phab=T294760}}\n\nDescription used in the help section \"reference\" of the toolbar", - "wikieditor-toolbar-help-content-showreferences-syntax": "{{ignored}}", - "wikieditor-toolbar-help-content-showreferences-result": "{{RawHtml|phab=T294760}}\n\nFor the
  • tag's id attribute, non-ASCII characters are URL-encoded as follows: a period (.) followed by a capital hexadecimal code. For example, produces
  • .\n\nwww.example.org is not a real website, but it has been reserved for use in software documentation. If you translate the word example and try to go to that web address, then you might get a message that it doesn't exist. But somebody may have created a commercial web page for that address, such as www.Beispiel.org, using the German word for example. It is therefore recommended that you do not translate http://www.example.org at all.\n\nIf you do wish to translate it, you should first check where the translated link takes you.", "wikieditor-toolbar-help-content-signaturetimestamp-description": "{{RawHtml|phab=T294760}}\n\n{{Identical|Signature with timestamp}}", "wikieditor-toolbar-help-content-signaturetimestamp-syntax": "{{notranslate}}", "wikieditor-toolbar-help-content-signaturetimestamp-result": "{{RawHtml|phab=T294760}}\n\nHTML example used in the help section \"discussion\" of the toolbar.\n\nParameters:\n* $1 - The \"User\" namespace name\n* $2 - The \"User talk\" namespace name", diff --git a/modules/jquery.wikiEditor.dialogs.config.js b/modules/jquery.wikiEditor.dialogs.config.js index bab735ef..e48c96a1 100644 --- a/modules/jquery.wikiEditor.dialogs.config.js +++ b/modules/jquery.wikiEditor.dialogs.config.js @@ -49,19 +49,6 @@ type: 'dialog', module: 'insert-file' } - }, - reference: { - labelMsg: 'wikieditor-toolbar-tool-reference', - filters: [ 'body.ns-subject' ], - type: 'button', - oouiIcon: 'reference', - action: { - type: 'encapsulate', - options: { - pre: '', - post: '' - } - } } } } ) diff --git a/modules/jquery.wikiEditor.dialogs.config.less b/modules/jquery.wikiEditor.dialogs.config.less index d9dfb854..284f1e8c 100644 --- a/modules/jquery.wikiEditor.dialogs.config.less +++ b/modules/jquery.wikiEditor.dialogs.config.less @@ -104,18 +104,6 @@ } } -/* Reference Dialog */ -#wikieditor-toolbar-reference-dialog { - label { - float: left; - line-height: 1.7em; - } -} - -#wikieditor-toolbar-reference-text { - width: 100%; -} - /* RTL Changes */ body.rtl { diff --git a/modules/jquery.wikiEditor.toolbar.config.js b/modules/jquery.wikiEditor.toolbar.config.js index 238cfc19..31c5d9aa 100644 --- a/modules/jquery.wikiEditor.toolbar.config.js +++ b/modules/jquery.wikiEditor.toolbar.config.js @@ -561,37 +561,6 @@ } ] }, - reference: { - labelMsg: 'wikieditor-toolbar-help-page-reference', - layout: 'table', - headings: [ - { textMsg: 'wikieditor-toolbar-help-heading-description' }, - { textMsg: 'wikieditor-toolbar-help-heading-syntax' }, - { textMsg: 'wikieditor-toolbar-help-heading-result' } - ], - rows: [ - { - description: { htmlMsg: 'wikieditor-toolbar-help-content-reference-description' }, - syntax: { htmlMsg: 'wikieditor-toolbar-help-content-reference-syntax' }, - result: { htmlMsg: 'wikieditor-toolbar-help-content-reference-result' } - }, - { - description: { htmlMsg: 'wikieditor-toolbar-help-content-named-reference-description' }, - syntax: { htmlMsg: 'wikieditor-toolbar-help-content-named-reference-syntax' }, - result: { htmlMsg: 'wikieditor-toolbar-help-content-named-reference-result' } - }, - { - description: { htmlMsg: 'wikieditor-toolbar-help-content-rereference-description' }, - syntax: { htmlMsg: 'wikieditor-toolbar-help-content-rereference-syntax' }, - result: { htmlMsg: 'wikieditor-toolbar-help-content-rereference-result' } - }, - { - description: { htmlMsg: 'wikieditor-toolbar-help-content-showreferences-description' }, - syntax: { htmlMsg: 'wikieditor-toolbar-help-content-showreferences-syntax' }, - result: { htmlMsg: 'wikieditor-toolbar-help-content-showreferences-result' } - } - ] - }, discussion: { labelMsg: 'wikieditor-toolbar-help-page-discussion', layout: 'table', diff --git a/modules/templates/dialogInsertReference.html b/modules/templates/dialogInsertReference.html deleted file mode 100644 index 88424998..00000000 --- a/modules/templates/dialogInsertReference.html +++ /dev/null @@ -1,9 +0,0 @@ -
    -
    -
    - - -
    -
    -