mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-15 19:10:15 +00:00
04c3ad0107
This is based on the popular 'count' parameter from Template:Reflist on English Wikipedia, which has also been adopted by many other wikis. That template's 'count' parameter allows maximum flexibility on a per- page basis. This was important because the template can't know how many references the list will contain. Users typically manually add (and later, increment) the 'count' parameter when the list exceeds a certain threshold. The template currently sets an exact column count (via the CSS3 property `column-count`). This patch improves on that by instead using the closely related CSS3 `column-width` property. This automatically derives the column count based on the available space in the browser window. It will thus create two or three columns on a typical desktop screen, and two or no columns on a mobile device. The specified width is the minimum width of a column. This ensures that the list is not split when rendered on a narrow screen or mobile device. It also hooks into the raw list before parsing and adds the class only when the list will contain more than a certain number of items. This prevents very short lists from being split into multiple columns. Templates like Template:Reflist on English Wikipedia currently are not able to set inline styles on the list element directly, which is why they set it on a `<div>` wrapping the `<references />` output. Because of this, the feature of the Cite extension must not be enabled at the same time, as that would result in both the template's wrapper and the references list being split. The end result would involve sitations with three columns split in four sub-columns, creating a complicated mess of nine intermixed columns. To provide a smooth migration for wikis, this feature can be disabled by default using `$wgCiteResponsiveReferences = false`. Each individual template createing reference list can then be migrated, by removing the wrapper column styles and instead settting the new "responsive" attribute, like so: `<references responsive />`. Once any conflicting templates have been migrated, the default for the wiki can be swapped by setting `$wgCiteResponsiveReferences = true`. If wikis wish for some templates to keep their custom column splitting behaviour, templates can also opt-out by setting `responsive="0"`, which will make sure that it will keep behaving the current way even after the feature becomes enabled by default for the wiki. In summary, when disabled by default, pages can opt into this system with `<references responsive />`. When enabled by default, pages can opt out of the system with `<references responsive=0 />`. * Deprecate cite_references_prefix/cite_references_suffix. This message is rarely used and opens up compatibility hazards. It was already removed by Parsoid, but the PHP implementation still had it. It's typically used to add inline styles to the wrapper which is more appropiately done in Common.css (or obsoleted as part of the skin or Cite extenion itself nowadays depending on what style in question). It was also a HTML-style message with separated open and close segments, which is an anti-pattern in itself. * Declare module target explicitly and include mobile. The absence of this stylesheet caused subtle BiDi/RTL bugs on mobile. Bug: T33597 Change-Id: Ia535f9b722e825e71e792b36356febc3bd444387
61 lines
7.5 KiB
JSON
61 lines
7.5 KiB
JSON
{
|
|
"@metadata": {
|
|
"authors": [
|
|
"Dani",
|
|
"LPfi",
|
|
"Lejonel",
|
|
"Mormegil",
|
|
"Nike",
|
|
"Purodha",
|
|
"Raimond Spekking",
|
|
"Raymond",
|
|
"Shirayuki",
|
|
"Siebrand",
|
|
"The Evil IP address",
|
|
"Umherirrender"
|
|
]
|
|
},
|
|
"apihelp-query+references-description": "{{doc-apihelp-description|query+references}}",
|
|
"apihelp-query+references-example-1": "{{doc-apihelp-example|query+references}}",
|
|
"apierror-citestoragedisabled": "{{doc-apierror}}",
|
|
"cite-desc": "{{desc|name=Cite|url=https://www.mediawiki.org/wiki/Extension:Cite}}",
|
|
"cite_error": "Cite extension.\n\nUsed when there are errors in ref or references tags.\n\nParameters:\n* $1 - an error message",
|
|
"cite_error_ref_numeric_key": "Cite extension. Error message shown if the name of a ref tag only contains digits. Examples that cause this error are <code><nowiki><ref name=\"123\" /></nowiki></code> or <code><nowiki><ref name=\"456\">input</ref></nowiki></code>",
|
|
"cite_error_ref_no_key": "Cite extension. Error message shown when ref tags without any content (that is <code><nowiki><ref /></nowiki></code>) are used without a name.",
|
|
"cite_error_ref_too_many_keys": "Cite extension. Error message shown when ref tags has parameters other than name and group. Examples that cause this error are <code><nowiki><ref name=\"name\" notname=\"value\" /></nowiki></code> or <code><nowiki><ref notname=\"value\" >input<ref></nowiki></code>",
|
|
"cite_error_ref_no_input": "Cite extension. Error message shown when ref tags without names have no content. An example that cause this error is <code><nowiki><ref></ref></nowiki></code>",
|
|
"cite_error_references_duplicate_key": "Cite extension. Error message shown when multiple refs with same name exist but with different content",
|
|
"cite_error_references_invalid_parameters": "Cite extension. Error message shown when parmeters are used in the references tag. An example that cause this error is <code><nowiki><references someparameter=\"value\" /></nowiki></code>",
|
|
"cite_error_references_invalid_parameters_group": "Cite extension. Error message shown when unknown parameters are used in the references tag. An example that cause this error is <samp><nowiki><references someparameter=\"value\" /></nowiki></samp>",
|
|
"cite_error_references_no_backlink_label": "Cite extension. Error message shown in the references tag when the same name is used for too many ref tags. Too many in this case is more than there are backlink labels defined in [[MediaWiki:Cite references link many format backlink labels]].\n\nIt is not possible to make a clickable link to this message. \"nowiki\" is mandatory around [[MediaWiki:Cite references link many format backlink labels]].",
|
|
"cite_error_no_link_label_group": "*'''$1''' is the name of a reference group.\n*'''$2''' is <code>cite_link_label_group-<i>groupname</i></code>.",
|
|
"cite_error_references_no_text": "Cite extension. This error occurs when the tag <code><nowiki><ref name=\"something\" /></nowiki></code> is used with the name-option specified and no other tag specifies a cite-text for this name.\n\nParameters:\n* $1 - key of the ref",
|
|
"cite_error_included_ref": "Error message shown if the <code><nowiki><ref></nowiki></code> tag is unbalanced, that means a <code><nowiki><ref></nowiki></code> is not followed by a <code><nowiki></ref></nowiki></code>",
|
|
"cite_error_group_refs_without_references": "Parameters:\n* $1 - the group name\n\nIf the group $1 is default group, instead of this message, the following message will be used:\n* {{msg-mw|Cite error refs without references}}",
|
|
"cite_error_references_group_mismatch": "Error message shown when doing something like\n<pre>\n<references group=\"foo\">\n<ref group=\"bar\">...</ref>\n</references>\n</pre>\nParameters:\n* $1 - the value of the <code>group</code> attribute on the inner <code><nowiki><ref></nowiki></code> (in the example above, “bar”)",
|
|
"cite_error_references_missing_group": "Error message shown when doing something like\n<pre>\n<references group=\"foo\">\n<ref>...</ref>\n</references>\n</pre>\nand there are no <code><nowiki><ref></nowiki></code> tags in the page text which would use <code>group=\"foo\"</code>.\n\nParameters:\n* $1 - the name of the unused <code>group</code> (in the example above, “foo”)",
|
|
"cite_error_references_missing_key": "Error message shown when using something like\n<pre>\n<references>\n<ref name=\"refname\">...</ref>\n</references>\n</pre>\nand the reference <code><nowiki><ref name=\"refname\" /></nowiki></code> is not used anywhere in the page text.\n\nParameters:\n* $1 - the name of the unused reference (in the example above, “refname”)",
|
|
"cite_error_references_no_key": "Error message shown when a <code><nowiki><ref></nowiki></code> inside <code><nowiki><references></nowiki></code> does not have a <code>name</code> attribute.",
|
|
"cite_error_empty_references_define": "Error message shown when there is a <code><nowiki><ref></nowiki></code> inside <code><nowiki><references></nowiki></code>, but it does not have any content, e.g.\n<pre>\n<references>\n<ref name=\"foo\" />\n</references>\n</pre>\n\nParameters:\n* $1 - the <code><nowiki>name</nowiki></code> of the erroneous <code><nowiki><ref></nowiki></code> (in the above example, “foo”)",
|
|
"cite-tracking-category-cite-error": "Tracking category name.",
|
|
"cite-tracking-category-cite-error-desc": "Tracking category description.",
|
|
"cite_reference_link_key_with_num": "{{optional}}\nParameters:\n* $1 - the key\n* $2 - the number of the key",
|
|
"cite_reference_link_prefix": "{{optional}}",
|
|
"cite_reference_link_suffix": "{{optional}}",
|
|
"cite_references_link_prefix": "{{optional}}",
|
|
"cite_references_link_suffix": "{{optional}}",
|
|
"cite_reference_link": "{{optional}}\nParameters:\n* $1 - ref key\n* $2 - references key\n* $3 - link label",
|
|
"cite_references_no_link": "{{notranslate}}\nParameters:\n* $1 - references key\n* $2 - reference text",
|
|
"cite_references_link_one": "{{optional}}\nParameters:\n* $1 - references key\n* $2 - ref key\n* $3 - reference text",
|
|
"cite_references_link_many": "{{optional}}\nParameters:\n* $1 - references key\n* $2 - list of links\n* $3 - reference text",
|
|
"cite_references_link_many_format": "{{optional}}\nParameters:\n* $1 - ref key\n* $2 - ...\n* $3 - (Unused)...",
|
|
"cite_references_link_many_format_backlink_labels": "{{Optional}}",
|
|
"cite_references_link_many_sep": "{{optional}}",
|
|
"cite_references_link_many_and": "{{optional}}",
|
|
"cite_references_link_accessibility_label": "Text for screen readers to describe the jump to citation link (\"↑\").\n\nSee also:\n* {{msg-mw|Cite references link many accessibility label}} - if the citation is used multiple times",
|
|
"cite_references_link_many_accessibility_label": "Text for screen readers to describe the jump to citation links (a b c ...) for citations which are used in multiple places.\n\nThis is going to be prepended to the first link, the following ones will just be read by screen readers as they are visible.\n\nSee also:\n* {{msg-mw|Cite references link accessibility label}} - if the citation is used one time",
|
|
"cite_section_preview_references": "Header for the section providing a preview of references in section preview",
|
|
"cite_warning": "Cite extension.\n\nUsed when there are warnings about ref or references tags (less severe than errors).\n\nParameters:\n* $1 - a warning message",
|
|
"cite_warning_sectionpreview_no_text": "Cite extension. This warning occurs when the tag <code><nowiki><ref name=\"something\" /></nowiki></code> is used with the name-option specified but the definition for this named ref is outside of the currently being previewed section, or not defined at all.\n\nParameters:\n* $1 - key of the ref"
|
|
}
|