Content deleted Content added
Fred Gandt (talk | contribs) link fixes; a lot more actual work needs to be done when things settle down |
Rm references to Wikidata per RFC. Discussed many times on the template talk page. |
||
(8 intermediate revisions by 7 users not shown) | |||
Line 1:
{{Module rating|protected}}
{{High-use}}
{{Lua|Module:GetShortDescription|Module:Arguments|Module:Lang}}
<includeonly>{{#ifeq:{{FULLBASEPAGENAME}}|Module:AnnotatedLink|{{important|This module is redundant to [[Module:Annotated link]] which should be used and referred to instead.}}}}</includeonly>
Line 8 ⟶ 9:
<pre><nowiki>{{#invoke:Annotated link|main
|name= |display= |quote= |abbr= |abbr_title= |template_link= |aka= |wedge= |dash= |desc_first_letter_case= |space_cat= |
|link_lang= |link_lang_italic= |link_lang_nocat= |link_lang_size= |link_lang_cat= |link_lang_rtl=
Line 23 ⟶ 24:
=== name ===
By providing only the '''required''' page name (including namespace), the module will use [[Module:GetShortDescription]] to look for an explicit {{tlx|short description}} in that page,
Any foreign
As this module is responsible for the use of all features of Module:GetShortDescription; all the parameters for that module are available through this module; see [[#Module:GetShortDescription parameters]] (below).
Line 86 ⟶ 87:
=== desc_first_letter_case ===
Short descriptions on en Wikipedia [[WP:SDFORMAT|should be formatted]] with an uppercase first letter, but the typical application of this module will require the first character to be lowercase. By default; this module will ensure all the short descriptions retrieved by Module:GetShortDescription are transformed to start with a lowercase first letter, but this may be overridden if required using {{para|desc_first_letter_case|upper}} or {{para|desc_first_letter_case|lower}}.
=== prefix_parentheses ===
Sometimes date ranges in short descriptions are included in a suffixed parenthetical, per [[WP:SDDATES]] e.g. for [[Jimmy Wales]]: "Co-founder of Wikipedia (born 1966)".
However when listing people in disambiguation pages per [[MOS:DABPEOPLE]], birth and death dates in parentheticals should precede the comma, as in "[[Jimmy Wales]] (born 1966), co-founder of Wikipedia".
If the optional parameter {{para|prefix_parentheses|y}} is provided, this behavior will be performed, so any suffixed parenthetical text will be moved to before the dash (or comma) separator.
Note that current consensus is to not use {{tl|annotated link}} for disambiguation pages; see [[Template:Annotated link/doc#Usage]].
=== space_cat ===
In the event that a short description with no spaces is retrieved and displayed; pages transcluding the annotation will be added to [[:Category:Pages displaying short descriptions with no spaces via Module:Annotated link]] for interested editors to monitor for potential issues. Potential issues might include: garbage keyboard mashings, a typo of "none" while attempting to disable an explicit {{tlc|short description}} or some misunderstanding on the part of an editor placing one.
If the transclusion on a page in this category is checked and it is determined to be okay; stating a value for {{para|space_cat}} in
=== Module:GetShortDescription parameters ===
Line 105 ⟶ 110:
Providing a value for {{para|only}} will limit the search to being only for the stated description. If no description is found, the result will be an empty string, unless a fallback is provided; see [[#fallback]] (below).
:Stating {{para|only|explicit}} will limit the search to only short descriptions set by use of {{tlc|short description}} on the searched page.
==== prefer ====
Providing a value for {{para|prefer}} will initiate the search for the stated description, but try for the alternative if none is found. If no description is found, the result will be an empty string, unless a fallback is provided; see [[#fallback]] (below).
:State {{para|prefer|explicit}} to use the explicit short description if available
==== fallback ====
If a {{para|fallback}} value is provided, and no description is found by the expressed route, the appended description will be the stated fallback value.
==== link_lang ====
Line 133 ⟶ 129:
<includeonly>{{Sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->
[[Category:Short description related modules]]
[[Category:
}}</includeonly>
<noinclude>
[[Category:Module documentation pages]]
</noinclude>
|