Module:Annotated link/doc: Difference between revisions

Content deleted Content added
currently working on this and the doc of Module:GetShortDescription to ensure consistency (since they're very closely related); this one has a long way to go yet
I need more tea or I'll pass out before this is done...
Line 21:
=== 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, 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 of [[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 56 ⟶ 58:
 
=== aka ===
Providing a value for {{para|aka}} will append the link (and the abbreviation{{para|abbr}} if provided) with a useful alternative name:
 
'''Markup:''' <code><nowiki>{{#invoke:AnnotatedLink|main |name=The Partisan |quote=yes |aka=La Complainte du partisan }}</nowiki></code>
Line 66 ⟶ 68:
'''Result:''' {{#invoke:AnnotatedLink|main|name=Confédération Mondiale des Activités Subaquatiques|display=World Underwater Federation|abbr=CMAS|aka=Confédération Mondiale des Activités Subaquatiques}}
 
These and some following examples contain foreign language text that, per [[MOS:OTHERLANG]], should be properlyappropriately displayed and declared via [[HTML]] markup as being of that language; this will be handled by various parameters; see [[#Foreign language text]] (below) for full details, but you will see the parameters in use where appropriate from now on.
 
=== wedge ===
Providing a value for {{para|wedge}} will append the link (and {{para|abbr}} and {{para|aka}} in that order if either or both is provided) with any extra details felt suitable:
 
'''Markup:''' <code><nowiki>{{#invoke:AnnotatedLink|main |name=The Partisan |quote=yes |wedge=from the album ''[[Songs from a Room]]'' |aka=La Complainte du partisan |aka_lang=fr }}</nowiki></code>
=== dash ===
 
'''Result:''' {{#invoke:AnnotatedLink|main|name=The Partisan|quote=yes|wedge=from the album ''[[Songs from a Room]]''|aka=La Complainte du partisan|aka_lang=fr}}
=== desc_first_letter_case ===
 
=== link_langdash ===
For list consistency, per [[MOS:LISTFORMAT]]; by providing a value for {{para|dash}}; the dash between the short description and the preceding text may be exchanged for a suitable alternative:
 
'''Markup:''' <code><nowiki>{{#invoke:AnnotatedLink|main |name=The Partisan |dash=, }}</nowiki></code>
{{para|link_lang}} ... {{para|link_lang_italic}}, {{para|link_lang_nocat}}, {{para|link_lang_size}}, {{para|link_lang_cat}}, {{para|link_lang_rtl}}
 
'''Result:''' {{#invoke:AnnotatedLink|main|name=The Partisan|dash=,}}
=== wedge_lang ===
 
=== desc_first_letter_case ===
{{para|wedge_lang_italic}}, {{para|wedge_lang_nocat}}, {{para|wedge_lang_size}}, {{para|wedge_lang_cat}}, {{para|wedge_lang_rtl}}
 
=== aka_lang ===
 
{{para|aka_lang_italic}}, {{para|aka_lang_nocat}}, {{para|aka_lang_size}}, {{para|aka_lang_cat}}, {{para|aka_lang_rtl}}
 
=== Module:GetShortDescription parameters ===
Line 114 ⟶ 115:
 
=== Foreign language text ===
 
=== aka_langlink_lang ===
 
{{para|link_lang}} ... {{para|link_lang_italic}}, {{para|link_lang_nocat}}, {{para|link_lang_size}}, {{para|link_lang_cat}}, {{para|link_lang_rtl}}
 
=== dashaka_lang ===
 
{{para|aka_lang_italic}}, {{para|aka_lang_nocat}}, {{para|aka_lang_size}}, {{para|aka_lang_cat}}, {{para|aka_lang_rtl}}
 
=== wedge_lang ===
 
{{para|wedge_lang_italic}}, {{para|wedge_lang_nocat}}, {{para|wedge_lang_size}}, {{para|wedge_lang_cat}}, {{para|wedge_lang_rtl}}
Should a wikidata description be retrieved, which is declared (at the source) as being of a foreign language (i.e. not ''en''), the return will be wrapped in {{tlx|lang}} by default; this may be disabled with {{para|lang_no|yes}}.