Content deleted Content added
Fred Gandt (talk | contribs) I need more tea or I'll pass out before this is done... |
Fred Gandt (talk | contribs) something like that; I'm not in the best condition to proofread effectively, but it's not offensive |
||
Line 22:
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, but if not found, will try to fetch the wikidata description. 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 text supplied to or retrieved by this module can be appropriately formatted, in accordance with [[MOS:OTHERLANG]], via the parameters
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 85:
=== desc_first_letter_case ===
Since Module:GetShortDescription could return a description from wikidata, which are formatted with a lowercase first letter, whereas [[WP:SDFORMAT|short descriptions]] on en Wikipedia are formatted with an uppercase first letter, and simply to give control over that display to the editor; stating either {{para|desc_first_letter_case|upper}} or {{para|desc_first_letter_case|lower}} will set the first character accordingly:
Explicitly requesting the wikidata description for an entity (to be explained in [[#Module:GetShortDescription parameters]] (below)) will append an inappropriately formatted description:
'''Markup:''' <code><nowiki>{{#invoke:AnnotatedLink|main |name=The Partisan |quote=yes |only=wikidata
'''Result:''' {{#invoke:AnnotatedLink|main
By stating {{para|desc_first_letter_case|upper}} the module resolves that issue:
'''Markup:''' <code><nowiki>{{#invoke:AnnotatedLink|main |name=The Partisan |quote=yes |only=wikidata |desc_first_letter_case=upper }}</nowiki></code>
'''Result:''' {{#invoke:AnnotatedLink|main|name=The Partisan|quote=yes|only=wikidata|desc_first_letter_case=upper}}
=== Module:GetShortDescription parameters ===
{{main|Module:GetShortDescription/doc}}
value to find a {{tlx|short description}} in the named page, or various alternatives depending on parameter values.
▲This parameter is passed through this module to Module:GetShortDescription where it is also '''required'''; the expectations are described in [[#name]] (above).
==== only ====
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 ====
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
=== Foreign language text ===
Module:GetShortDescription may return a foreign language 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:
=== link_lang ===▼
{{para|link_lang}} ... {{para|link_lang_italic}}, {{para|link_lang_nocat}}, {{para|link_lang_size}}, {{para|link_lang_cat}}, {{para|link_lang_rtl}}▼
=== aka_lang ===▼
{{para|aka_lang_italic}}, {{para|aka_lang_nocat}}, {{para|aka_lang_size}}, {{para|aka_lang_cat}}, {{para|aka_lang_rtl}}▼
=== wedge_lang ===▼
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.
{{para|wedge_lang_italic}}, {{para|wedge_lang_nocat}}, {{para|wedge_lang_size}}, {{para|wedge_lang_cat}}, {{para|wedge_lang_rtl}}▼
▲==== link_lang ====
▲The parameters for {{tlc|lang}} may be provided via: {{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 link text is of a foreign language (again; editor discretion); control the formatting with: {{para|link_lang|<language code>}}
▲==== aka_lang ====
▲'''Markup:''' <code><nowiki>{{#invoke:AnnotatedLink|main |name=The Partisan |quote=yes |only=wikidata |desc_first_letter_case=upper |wedge=from the album ''[[Songs from a Room]]'' |aka=La Complainte du partisan |aka_lang=fr }}</nowiki></code>
▲If the {{para|aka}} text is of a foreign language (again; editor discretion); control the formatting with: {{para|aka_lang|<language code>}}, {{para|aka_lang_italic}}, {{para|aka_lang_nocat}}, {{para|aka_lang_size}}, {{para|aka_lang_cat}}, {{para|aka_lang_rtl}}
▲==== wedge_lang ====
▲'''Result:''' {{#invoke:AnnotatedLink|main |name=The Partisan |quote=yes |only=wikidata |desc_first_letter_case=upper |wedge=from the album ''[[Songs from a Room]]'' |aka=La Complainte du partisan |aka_lang=fr }}
▲If the {{para|wedge}} text is of a foreign language (again; editor discretion); control the formatting with: {{para|wedge_lang|<language code>}}, {{para|wedge_lang_italic}}, {{para|wedge_lang_nocat}}, {{para|wedge_lang_size}}, {{para|wedge_lang_cat}}, {{para|wedge_lang_rtl}}
<includeonly>{{Sandbox other||
|