Module:Annotated link/doc: Difference between revisions

Content deleted Content added
Rm references to Wikidata per RFC. Discussed many times on the template talk page.
 
(One intermediate revision by one other user not shown)
Line 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, butand if not found, will try to fetch the wikidata description. This is equivalent to stating {{para|prefer|explicit}}; see [[#prefer]]display (below)nothing. If a description is found, it will be appended to a link created for the named page in the style expected for the likes of [[MOS:SEEALSO]]. If no description is found, the link will be created but no extra information will be appended – unless the extensive following parameters are employed.
 
Any foreign -language (i.e. not ''en''English) text supplied to this module or retrieved by Module:GetShortDescription may be appropriately formatted, in accordance with [[MOS:OTHERLANG]], via the parameters for [[Module:Lang]]; see [[#Foreign language text]] (below).
 
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 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.
:Stating {{para|only|wikidata}} will limit the search to only wikidata descriptions.
 
==== 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, or try for the wikidata description if not.
:State {{para|prefer|wikidata}} to use the wikidata description if available, or try for an explicit short description if not.
 
==== 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.
 
=== Foreign language text ===
Module:GetShortDescription may return a foreign language (i.e. not ''en'') wikidata description; editor discretion determines if that should be displayed. If it is displayed; it will be in accordance with [[MOS:OTHERLANG]], by [[Module:Lang]] (the module powering {{tlx|lang}}). The appropriate language code will be set automatically, but all other parameters of {{tlc|lang}} are available to affect the formatting of the returned description:
 
Use {{para|lang_italic}}, {{para|lang_nocat}}, {{para|lang_size}}, {{para|lang_cat}} and {{para|lang_rtl}}; see [[Template:Lang/doc|lang's documentation]] for details.
 
If the editor determines that {{tlc|lang}} formatting is not appropriate; it may be disabled with {{para|lang_no|yes}}. The following {{tlc|lang}} formatting parameters are optional, so there is no off-switch required.
 
==== link_lang ====
Line 138 ⟶ 129:
<includeonly>{{Sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->
[[Category:WikiProject Short descriptionsdescription related modules]]
[[Category:Link modules]]
}}</includeonly>