Template talk:Annotated link

Page contents not supported in other languages.
Source: Wikipedia, the free encyclopedia.
the discussion
and see a list of open tasks.

"None" not working correctly

The description includes this: "If a Short description template exists in the targeted article, but is empty, or contains a space, non-breaking space, the word blank, none, null, or other indication that a short description is not appropriate or needed, the output should be an un-annotated link. If it is not, list such cases on the talk page for attention, or fix it if you can." Well, "List of red dwarfs" shows the word "None", when it shouldn't. Eric Kvaalen (talk) 17:56, 9 March 2022 (UTC)[reply]

The parameter is case sensitive (why that is so I cannot say). olderwiser 19:22, 9 March 2022 (UTC)[reply]
Can someone please modify this template so that the comparison with keywords such as "none" is case-insensitive? This could be achieved via the magic word {{lc: }}. -- Dr Greg  talk  00:04, 10 March 2022 (UTC)[reply]
I have detected the same thing at veggie burger. Had to change None -> none at 4 lists AdrianHObradors (talk) 19:26, 21 March 2022 (UTC)[reply]
I came across the same thing at List of cognitive biases#See also. I'll get to work on a solution. Cheers, {{u|Sdkb}}talk 06:00, 22 March 2022 (UTC)[reply]
@Eric Kvaalen, Bkonrad, Dr Greg, and AdrianHObradors: This edit should fix the issue; let me know if there are any concerns. For future bugs like this, feel free to make a template-protected edit request and that'll draw attention. Cheers, {{u|Sdkb}}talk 06:14, 22 March 2022 (UTC)[reply]
Thanks for fixing! Will learn how to do that next time :) --AdrianHObradors (talk) 09:53, 23 March 2022 (UTC)[reply]

annotated links & redirections

So, {{

John Kennedy – President of the United States from 1961 to 1963). Is there a way to fix this? — Fourthords | =Λ= | 21:46, 17 April 2022 (UTC)[reply
]

When an article is moved, two things are supposed to happen. (a) Whoever does the move should go round all the "what links here" and update the links to point at the new target or targets. (b) Make sure the old name, which is now a redirect, has its own SD. The reality of course is that (a) is often not done and (b) is hardly ever done. If (b) is not done, then there is nothing to transclude and the article with the {{
anli
}} will display with no description – which hopefully will alert someone to ask why not and fix it.
It is not perfect, but we mustn't let the perfect be the enemy of the good: it is better than nothing at all. I assume that you are referring to a See also list of articles? Most seem to have no appended explanation anyway, giving the visitor no clue as to what they are about. This template provides visitors with a brief summary of the content of target articles and provides editors with a quick and easy baseline so that the wheel doesn't have to be reinvented for every article that lists it.
For articles with See also lists that have a local brief description, if the target article is moved, the same problem exists here too. The local brief description may no longer be valid unless the mover does (a) above and also updates the local brief description.
So to answer your question, not as far as I know: it is just another aspect of step (a). Anyone got a better idea? --
talk) 00:13, 18 April 2022 (UTC)[reply
]
I think it is best practice to avoid most redirects in See also. If an article is moved, we probably want to update the See also entries that link to it. Maybe someone can write a bot to do this. Maybe it is something that needs to be done manually. ~Kvng (talk) 01:38, 21 April 2022 (UTC)[reply]

Capital letters

Is it possible to use this template in a way that doesn't violate

MOS:CAPS, i.e. doesn't introduce unnecessary capital letters in words that aren't proper nouns, sentence starts, or acronyms? – Arms & Hearts (talk) 18:45, 15 July 2022 (UTC)[reply
]

Can you give an example? AFIK, it just repeats the article name as given, then appends the short description from that article. I have discovered rather too many horrible SDs when using this template. --
talk) 19:30, 15 July 2022 (UTC)[reply
]
The example that I noticed was Great Filter#See also. The issue is that the short description is appended with a leading capital letter, when there's no MOS or common sense reason for there to be one. – Arms & Hearts (talk) 20:23, 15 July 2022 (UTC)[reply]
Not possible because the good folks over at
WP:SDESC have decided that short descriptions on the English Wikipedia should all start with a capital. The template could force the first letter to lower case but that doesn't work because the first word in a significant number of short descriptions is a proper noun. ~Kvng (talk) 13:53, 19 July 2022 (UTC)[reply
]
Thanks Kvng. Your last point hadn't occurred to me. That would put me in the "let's not use this in articles ever" camp, for what it's worth. – Arms & Hearts (talk) 18:32, 25 July 2022 (UTC)[reply]
A possible solution is to create short descriptions with a lowercase first word unless it's a proper noun. This is the Wikidata convention. It is easier to create a capital versions from this. There are still some confounding examples like, "iPhone accessory". ~Kvng (talk) 14:18, 26 July 2022 (UTC)[reply]
@
talk) 18:55, 26 July 2022 (UTC)[reply
]
The MoS is there because it reflects the consensus of the community; while there are times when we might want to make exceptions to it, hardcoding them into templates that can't be context-sensitive is, if not exactly the end of the world, not quite "completely inoffensive" either, in my view. I'm not saying that I'm going to remove it from every article I see it in, but I'd probably object to it in any article I've worked closely on and certainly won't be adding it anywhere myself. – Arms & Hearts (talk) 19:42, 27 July 2022 (UTC)[reply]
Just noticed extsiance of this template. Text shouldn't be automatically capitalised. Eurohunter (talk) 17:13, 11 August 2022 (UTC)[reply]

The caps look stupid on the Relish artilce. 2404:4404:27B3:6500:C480:79C0:6BBA:1 (talk) 08:01, 22 August 2022 (UTC)[reply]

Since I'm apparently not the only one irritated by this, I wonder if anyone with appropriate levels of template clue could look into a fix? From what others have said, it looks as though the best option would be to add a case-determining parameter to this template, such that, for example, {{Annotated link|lc=y}} would change the case. That way the MoS issue could be averted without breaking things elsewhere or needing widespread changes to short descriptions. (I appreciate it's probably no one's top priority, but worth a shot.) – Arms & Hearts (talk) 20:31, 24 August 2022 (UTC)[reply]
Good idea! {{as of}} has an |lc= parameter. Not sure I have the chops for this but could learn. ~Kvng (talk) 16:11, 27 August 2022 (UTC)[reply]
But this is a bit of a sticking-plaster solution. Suppose you use the lc option to convert a description of "Television show" to "television show". Then six months later someone rewrites the description as "TV show" and that will be converted to "tV show".  Dr Greg  talk  16:34, 27 August 2022 (UTC)[reply]
That's definitely an issue, but isn't it in some sense an issue with the template itself rather than the proposed fix? It's already the case that someone could change a short description in ways that negatively impact the description used in a "see also" section or similar elsewhere. That could be via subtle vandalism on an unwatched article or just a case of a description that's suitable for transclusion elsewhere being changed to one less suitable. This would be just another case of that broader problem, which would be a reason to avoid using the template rather than to avoid making a change which would otherwise be an improvement. – Arms & Hearts (talk) 19:43, 1 September 2022 (UTC)[reply]
"The perfect is the enemy of the good". There are a huge number of articles with a See Also list of terse article names that are meaningless except to cognoscenti. Yes it would be great if all these were annotated by hand but it doesn't happen. {{
talk) 00:07, 2 September 2022 (UTC)[reply
]
Yeah, but liet's not shut down discussion of possible improvements. I think adding a |lc= to the template would be an improvement. A bigger improvement would be starting descriptions with lower case as is done as WikiData. Making that change at this point will produce pain. ~Kvng (talk) 17:02, 4 September 2022 (UTC)[reply]
If I gave that impression, it was entirely unintended. My objection is to those who seek to deprecate the whole template because of this less than perfect side effect. Clearly a change to the way that the template works (so as to remove the source of friction) would be the best outcome. --
talk) 19:09, 4 September 2022 (UTC)[reply
]
@Kvng: I don't suppose you got any further with thinking about this? There seems to be a consensus in favour of a change but I'm afraid it's beyond my know-how. – Arms & Hearts (talk) 19:49, 15 January 2023 (UTC)[reply]
@Arms & Hearts, It does look like we potentially have consensus to add an |lc= parameter. I don't have a lot of template experience but am interested in learning. I have just looked and have not found an example for how to lowercase the first letter of a string. Closest I found is how to lowercase the whole string. ~Kvng (talk) 21:33, 15 January 2023 (UTC)[reply]
@Kvng: If you were able to look into it that would be terrific. If not, I'm sure there are others who've posted on this talk page, and who've worked on this and similar templates, who'd be able to lend a hand (and who are welcome to weigh in here). No huge urgency of course. – Arms & Hearts (talk) 19:43, 20 January 2023 (UTC)[reply]
I will admit to scanning the discussion, but looking at the Great Filter#See also example given at the start and picking out the important part that short descs should start with a lowercase letter; this template is not at fault and shouldn't be responsible for tidying up other people's mess i.e. the short descs need fixing at the source. Fred Gandt · talk · contribs 06:41, 21 January 2023 (UTC)[reply]
Might I suggest a tracking/maintenance category so interested editors can find and fix the problems instead of hiding them? Yes, I think I might. Fred Gandt · talk · contribs 08:08, 21 January 2023 (UTC)[reply]
Per
WP:SDFORMAT, short descriptions should begin with a capital letter. This makes sense in the context of the search (which is where I assume readers most often see them), but not in the context of this template. This is why the template, not the SDs themselves, is the issue. – Arms & Hearts (talk) 10:27, 21 January 2023 (UTC)[reply
]
Ah ha! I had it the wrong way around and sit corrected; thank you. Yes, so, the concern would be the incorrect application of lowercasing. An initial uppercase letter is rarely going to be wrong, in terms other than those defined by the MOS; but incorrect application of lowercasing for the MOS might often create a mess (demonstrably the Preview step is frequently skipped). Perhaps a tracking category for cases where the |lc= has been applied? Fred Gandt · talk · contribs 16:31, 21 January 2023 (UTC)[reply]
Someone has documented a |desc_first_letter_case= parameter. Does this work? Should we use it? ~Kvng (talk) 20:48, 7 June 2023 (UTC)[reply]

Is this template very expensive, or am I doing it wrong?

I'm coming here from List of numeral systems#See also, where this template is used a few times and where the Lua script running time is exceeded. I copied that section to my sandbox, and got the same problem: "The time allocated for running scripts has expired", despite the whole page being just eight transclusions of this template. When I view source on that sandbox page, I see:

Transclusion expansion time report (%,ms,calls,template)
100.00% 10073.844      1 -total
 99.71% 10044.426      8 Template:Annotated_link
 99.59% 10032.270     22 Template:Template_parameter_value

Something appears to be wrong here, but I don't know what it might be. – Jonesey95 (talk) 04:54, 18 November 2022 (UTC)[reply]

It appears to be something to do with
talk) 16:14, 18 November 2022 (UTC)[reply
]
One occurrence of {{Template parameter value|Table of bases|Short description|1|1|1}} works. "Parser profiling data" at the bottom of a preview says "Lua time usage 5.500/10.000 seconds". It fails if there are two identical occurrences (expected since 2×5.5 > 10). I don't know why it's so expensive on Table of bases. PrimeHunter (talk) 00:34, 19 November 2022 (UTC)[reply]
I have posted to Template talk:Template parameter value#Expensive call. PrimeHunter (talk) 13:04, 19 November 2022 (UTC)[reply]

Should this template be removed?

I find this template horrible.

Unfortunately, it is has started to become used on many See also sections of pages. But the annotation supplied is often not very suitable for all the different contexts that the See also links are used in. This means that the annotation is not very relevant much of the time, and it is hard to make quick edits of the text in the relevant context. I mean this goes against the principle of a wiki, where text can be continuously improved on in various contexts. Many people probably don't think of this when they use the "Annotated link" template, but in reality it creates a lot of more work for those who come afterwards and want to contribute to improve the text for the given context. Therefore, I propose that this template should be abandoned. It creates more headache than it is good. Sauer202 (talk) 07:36, 26 November 2022 (UTC)[reply]

Oppose. This template has has resolved the issue in so many articles of a cryptic list of "See also" topics. Article names are terse by design which means that they can be meaningless to readers who are not already familiar with their topics. A key attribute of Wikipedia is that it provides access to new information and broader perspectives. This template provides a quick way to address that problem, by exposing the WP:short descriptions. Of course it is true that the ridiculous 40 character limit means that the default SD is going to be inadequate in some cases – but it is better than no explanation at all, which is what would happen if your proposal were to be accepted.
As for your specific complaint, you are entirely at liberty to provide an explanation of a related topic that is more tailored to the the container article. You aren't obliged to use the template, nor are you obliged to retain it where it is already used provided that you supply a description that is better in the context than the default SD. --
talk) 09:18, 26 November 2022 (UTC)[reply
]
Oppose I generally find that SA entries using this template are an improvement over the bare wikilinks they replace. Not perfect but better. Better is better. Let us know if you have an even better suggestion. If you install
WP:SDHELPER, the ability to update a description is two clicks away. When you update a description you get two birds with one stone. ~Kvng (talk) 14:44, 29 November 2022 (UTC)[reply
]
Oppose per better is better (chuckle) Fred Gandt · talk · contribs 19:00, 18 January 2023 (UTC)[reply]

Correctly quoting e.g. song titles per
MOS:NAT

I have added |quote= to the sandbox and as can be seen in the testcases it works just fine. Any objections to pushing this change to the template? Fred Gandt · talk · contribs 18:54, 18 January 2023 (UTC)[reply]

Good but better is better as album/book/movie/artwork titles should be in italics. e.g.,
Which was quick and easy ({{anli|Mona Lisa|''Mona Lisa''}} is short) but there are some quite long titles. So your next task is add the function |italic=.
And if you are feeling really keen, add |lang= to automate the fairly long-winded process of adding a {{
talk) 20:46, 18 January 2023 (UTC)[reply
]
I started out adding |emphasize= (yes; "italic" might actually have been better) too, but realised that {{annotated link|The Man with Two Brains|''The Man with Two Brains''}} already does it (handling DABs while it's there): The Man with Two Brains – 1983 film by Carl Reiner
|lang= would require all the {{lang}} params as well to pull off correctly, right? Well I just started reading the {{lang}} docs and that's a big "nope" (right now).
I appreciate the support, but I'll still give it a day to see if anyone watching has any concerns. Fred Gandt · talk · contribs 00:05, 19 January 2023 (UTC)[reply]
Why would the length of a title to be italicized make a difference; am I missing something?Fred Gandt · talk · contribs 00:07, 19 January 2023 (UTC)[reply]
On reflection, most people with copy/paste a long name rather than retype it, so file that one under "failure to put brain in gear" and ignore. --
talk) 17:23, 19 January 2023 (UTC)[reply
]
Brains (I say responding in part to your edit summary) are basically electrified sponges, so I get it 😜 Fred Gandt · talk · contribs 17:26, 19 January 2023 (UTC)[reply]
So, instead of typing this:
{{Annotated link|Jump (Every Little Thing song)|"Jump"}}
your proposal means that we could, instead, type this?
{{Annotated link|Jump (Every Little Thing song)|Jump|quote=yes}}
Archer1234 (t·c) 00:40, 19 January 2023 (UTC)[reply]
Yes because {{Annotated link|Jump (Every Little Thing song)|"Jump"}} creates:
"Jump" – 2001 single by Every Little Thing
instead of:
"Jump" – 2001 single by Every Little Thing
using the |quote= param Fred Gandt · talk · contribs 00:50, 19 January 2023 (UTC)[reply]
You say "instead of", but to my eye those results look identical. Am I missing a difference (maybe I've got some script changing the result I see versus what you see). What do others see? — Archer1234 (t·c) 01:02, 19 January 2023 (UTC)[reply]
Ah, I think I see the difference. In the first case the double quotation marks are part of the link and in the second case they are not. Have I got that right? — Archer1234 (t·c) 01:12, 19 January 2023 (UTC)[reply]
Correct 🙂 Fred Gandt · talk · contribs 01:46, 19 January 2023 (UTC)[reply]

 Done let me know if I fudged up somehow. Fred Gandt · talk · contribs 23:00, 19 January 2023 (UTC)[reply]

What to do with the apparently redundant SDlink?

{{SDlink}} claims to fix a problem with {{annotated link}} that doesn't appear to exist, so I have started a discussion at Template talk:SDlink § Redundant? regarding its apparent uselessness, suggesting it should be deleted. Please chime in there. Fred Gandt · talk · contribs 05:35, 19 January 2023 (UTC)[reply]

I completely misread and misunderstood that template's purpose; although there is indeed a problem, it should be fixed in this template instead of making and maintaining another. Fred Gandt · talk · contribs 23:39, 19 January 2023 (UTC)[reply]

The bug is in {{Template parameter value}} rather than in {{annotated link}} itself — GhostInTheMachine talk to me 12:47, 29 January 2023 (UTC)[reply]
Yes I understand that. I initially misunderstood the intention of your template. Fred Gandt · talk · contribs 14:58, 29 January 2023 (UTC)[reply]

Allow editors to append the link/prepend the annotation?

While I was updating the syntax of the few quoted titles I found, I found (who needs Grammarly?) that editors are trying various ways to manipulate the results which itself might need looking at, but on Author, Author (Star Trek: Voyager) there's a case for a simple (ish) insertion (appending the link/prepending the annotation) of a qualification. They've done:

{{annotated link|The Measure of a Man (Star Trek: The Next Generation)|"The Measure of a Man" (''Star Trek: The Next Generation'')}}

and made:

"The Measure of a Man" (Star Trek: The Next Generation) – 9th episode of the second season of Star Trek: The Next Generation

I ran a quick and dirty test with and without an |abbreviation= and it seemed okay; here's a simple example (sadly there's no short desc (bloody typical)):

{{Annotated link/sandbox|The Measure of a Man (Star Trek: The Next Generation)|The Measure of a Man|quote=yes|insert=(''Star Trek: The Next Generation'')}}

makes:

"The Measure of a Man", (Star Trek: The Next Generation) – 9th episode of the second season of Star Trek: The Next Generation

I'd like other people's thoughts on this. Sorry for the vague; I think my brain just ran out of caffeine. Fred Gandt · talk · contribs 23:26, 19 January 2023 (UTC)[reply]

Is it worth the effort? What is wrong with
  • {{Annotated link/sandbox|The Measure of a Man (Star Trek: The Next Generation)|The Measure of a Man|quote=yes}} (''Star Trek: The Next Generation'')
the output is the same? --
talk) 13:53, 20 January 2023 (UTC)[reply
]
(Have you, as I was, gotten distracted by {{AnnotatedListOfLinks}}, which just gives up on converting a qualified existing link like
?) --
talk) 13:53, 20 January 2023 (UTC)[reply
]
Since The Measure of a Man (Star Trek: The Next Generation) doesn't (currently; I am working on a solution) spew a short description, I'll show the same effect with another:
this:
{{Annotated link|The Partisan|quote=yes}} (the cover version by [[Electrelane]] is brilliant)
makes:
"The Partisan" – 1943 song by Anna Marly and Emmanuel d'Astier, popularised by Leonard Cohen in 1969 (the cover version by Electrelane is brilliant)
whereas
{{Annotated link/sandbox|The Partisan|quote=yes|insert=(the cover version by [[Electrelane]] is brilliant)}}
makes:
"The Partisan", (the cover version by Electrelane is brilliant) – 1943 song by Anna Marly and Emmanuel d'Astier, popularised by Leonard Cohen in 1969
And no; I haven't looked at {{AnnotatedListOfLinks}} at all, but will. Fred Gandt · talk · contribs 17:35, 20 January 2023 (UTC)[reply]
Frankly; I think that's horrible. Something more along the lines of:
{{Annotated links|
* [[Thing]]
* [[Other thing]]
* [[Stuff]]
* [[Other stuff]]
}}
seems better to me, possibly even being extended functionality of this'n. But I'm veering hazardously away from my todo list right now. Fred Gandt · talk · contribs 17:51, 20 January 2023 (UTC)[reply]

Module

I made a module: Module:GetShortDescription which appears to be working. I tried some more fancy stuff but I couldn't get it to work, so this will grab an explicitly set (by {{short description}} on the article) short desc, but can't get an implicitly set short desc set by the likes of {{infobox television episode}}. It will however grab the wikidata desc if asked and allows for fallback. There's a bunch of test setups in the code at the bottom if you feel like testing it.

I'll be dotting the tease and crossing my eyes after some anime and sleep, but it seems like it'll do. It is not for formatting the result; it just gets the result.

Here's an example trying to get the short desc of Author, Author (Star Trek: Voyager), which has an implicit short desc from {{infobox television episode}}. It asks for the preferred explicit short desc but will settle for the wikidata desc and to fallback to a provided string if that's not available:

Code: {{Annotated link|Author, Author (Star Trek: Voyager)}}

Result: Author, Author (Star Trek: Voyager) – episode of Star Trek: Voyager (S7 E20)

Code: {{#invoke:GetShortDescription|main|name=Author, Author (Star Trek: Voyager)|prefer=explicit|fallback=a TV episode}}

Result: table

Any comments welcome, as long as you're singing my praises and throwing confetti 😉 Fred Gandt · talk · contribs 07:01, 21 January 2023 (UTC)[reply]

First draft of Module:Annotated link is done (many more tinkerings required):

Code: {{#invoke:Annotated link|main |name=Confédération Mondiale des Activités Subaquatiques |display=World Underwater Federation |wedge= |quote= |dash= |abbr=CMAS |case=lower |aka=''Confédération Mondiale des Activités Subaquatiques''}}

Result: World Underwater Federation (CMAS), also known as Confédération Mondiale des Activités Subaquatiques – International organisation for underwater activities

Note the inclusion and effect of |case= @Arms & Hearts: 🙂

Okay? Fred Gandt · talk · contribs 20:19, 21 January 2023 (UTC)[reply]

𝕁𝕄𝔽 kindly pointed out on my talk that {{lang}} handling is not implemented yet in Module:Annotated link, and they're correct. I have added it to Module:GetShortDescription so that if wikidata returns a non-English description, it will be formatted with {{lang}} markup. Work in progress; please give more feedback. Fred Gandt · talk · contribs 00:23, 22 January 2023 (UTC)[reply
]

Also note; while I'm still working on them, they could do odd things from time to time, e.g. I am about to live test something that will cause all wikidata descriptions to be treated as if French. Fred Gandt · talk · contribs 01:47, 22 January 2023 (UTC)[reply]

Just to keep you in the loop; some folks at Project:Good Article proposal drive 2023 somehow found my GetShortDescription module (I hadn't even written the docs!) and it appears they might need to get implicit descriptions, so I've revisited the issue, and think it might work, but will definitely be undesirable. It will be an option, but will require explicit request, and have a level of interest setting to limit its negative effects where apparently beyond reasonable i.e. it will search in stages, and the invocation will require the stage to which it should search explicitly set. I realise this may seem a little dramatic, but the process of grabbing an implicit description is potentially crippling. I'll be finishing the Annotated link module shortly too, then we can replace the current template code with a nice module invocation. Fred Gandt · talk · contribs 02:38, 23 January 2023 (UTC)[reply]

Update on implicit descriptions: looking at the transclusion counts of templates using modules in Category:Modules that create a short description and a calculator; there are about 650,000 articles potentially affected. That's about 10% of Wikipedia articles. Someone should probably be paying attention to this. Any number of those could have the implicit description overridden by an explicit description. I am continuing development of the module to include the most efficient search for implicit descriptions I can figure out, but it will not be at all useful for {{annotated link}}, as it will only work if the module is invoked on the article it's searching, so I will put the search for implicit descriptions on the back burner and focus on getting it ready to replace the template code. Fred Gandt · talk · contribs 11:19, 24 January 2023 (UTC)[reply]

The User:SD0001/shortdescs-in-category (doc, script) capability displays SDs of articles in a category, including implicit SDs. Is there anything in it that might help with what you are trying to accomplish? — Archer1234 (t·c) 12:14, 24 January 2023 (UTC)[reply]
I dunno right now; my brian is broked 😉 I'll get back to you. Fred Gandt · talk · contribs 20:51, 24 January 2023 (UTC)[reply]
No Archer; no use for the module development, but good for humans interested in doing that kind of maintenance. Thanks for giving it your thoughts though 😊 Fred Gandt · talk · contribs 00:31, 25 January 2023 (UTC)[reply]

Current state of Module:Annotated link:

Code: {{#invoke:Annotated link|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 }}

Result: "The Partisan", also known as La Complainte du partisan, from the album Songs from a Room – Song composed by Anna Marly with lyrics by Emmanuel d'Astier de La Vigerie performed by Leonard Cohen

Fred Gandt · talk · contribs

First draft personal sandboxed cobbled together proof of concept template ignore the title:

Code: {{User:Fred Gandt/sandbox/Get short description|The Partisan|quote=yes|only=wikidata|case=upper|wedge=from the album ''[[Songs from a Room]]''|aka=La Complainte du partisan|al=fr}}

Result: "The Partisan", also known as La Complainte du partisan, from the album Songs from a Room – Song composed by Anna Marly with lyrics by Emmanuel d'Astier de La Vigerie performed by Leonard Cohen

Fred Gandt · talk · contribs 23:05, 24 January 2023 (UTC)[reply]

Adoption

With the additional features and functionality, the

foreign language markup functionality. I've not added the module version of the code to this template's sandbox yet (I figured I'd wait for feedback first), but you can see the full extent of the proposed template markup at User:Fred Gandt/sandbox/Get short description
There's a lot of parameters and aliases to control all the features, but the overall layout will be significantly easier to maintain, and in its most basic form, requires no expensive parser functions. Also; don't worry; I'll happily write all the extra documentation 😉

As a direct swap, the results should be only different insofar that previously where this template didn't show a short description, it will show a wikidata description (with the first character case transformed to uppercase by default) if there's one available:

{{annotated link|Author, Author (Star Trek: Voyager)|Author, Author}}Author, Author – episode of Star Trek: Voyager (S7 E20)
{{User:Fred Gandt/sandbox/Get short description|Author, Author (Star Trek: Voyager)|Author, Author}}Author, Author – episode of Star Trek: Voyager (S7 E20)

So, what do we think? Fred Gandt · talk · contribs 00:58, 26 January 2023 (UTC)[reply]

I am already in the process of fixing my derp regarding the first character case; lowercase should be the default. I am deeply ashamed and humbly request not be burned at the stake. Fred Gandt · talk · contribs 01:42, 26 January 2023 (UTC)[reply]

You can see by the scale of the unit tests for Module:GetShortDescription, which has only three tested params with limited options, that thorough tests for Module:Annotated link, with twelve test-worthy params (the lang params need only be tested as working or not, since Module:Lang is responsible, and the params for Module:GetShortDescription are already tested) will be somewhat epic. Fred Gandt · talk · contribs 16:36, 26 January 2023 (UTC)[reply]

Module:Annotated link now has 59 test cases and Module:GetShortDescription has 66 test cases (all passed). Let me know if I missed anything? Fred Gandt · talk · contribs 21:09, 27 January 2023 (UTC)[reply]

I've added the invocation of Module:Annotated link to the sandbox, and all the current template test cases are good, although a few more wouldn't hurt. Fred Gandt · talk · contribs 21:26, 27 January 2023 (UTC)[reply]

As you may like to see by the template testcases I have just started to expand; the improvement in accuracy is vastly superior. I have a day of work creating the full suite of tests ahead, so please bare with me. Fred Gandt · talk · contribs 07:34, 28 January 2023 (UTC)[reply]

Currently working on filtering even more edge cases so the test cases are showing a few known errors i.e. noreplace is falling through. I will have it fixed shortly. It is however time for lunch and a walk. Fred Gandt · talk · contribs 11:29, 28 January 2023 (UTC)[reply]

Pretty certain Module:GetShortDescription can handle just about anything thrown at it now. I'll carry on updating the template tests in a bit, but I'm knackered. Fred Gandt · talk · contribs 11:32, 29 January 2023 (UTC)[reply]

Post adoption

 Done and it went rather well. A number of (mostly list) pages are using this template for redlinks which required a quick fix; I will be making a minor adjustment to apply another

WP:REDLINKs should not be placed), but currently no known errors or alarmingMessages. I will be monitoring the situation all this waking day and ongoing while I have breath and an internet connection. Fred Gandt · talk · contribs 11:10, 2 February 2023 (UTC)[reply
]

Source of short description

Thanks for the fixes! A bug (?): when the shortdesc is intentionally set to none, it displays the wikidata version instead: {{annotated link|List of missions to the Moon}}List of missions to the Moon Olivaw-Daneel (talk) 19:02, 2 February 2023 (UTC)[reply]
The default setup is currently to try for an explicit then fallback to wikidata then a |fallback=. If the end result of examining the potentially multiple explicit short descriptions is none. the current setup considers it nil and goes for the next. Technically this is accurate behavior, so no, not a bug. While a Wikipedia page may desire no short description; this is all about annotating links to those pages, so any applicable description we can get our hands on seems fair game, and any editor can kill any inappropriate descriptions with fire by adding |only=explicit. It's all adjustable individually (I mean literally everything the module can do can be controlled at the template call) and of course the module can be altered or the default behavior changed if desired.
List of missions to the Moon – I couldn't be bothered to write my own annotation 😜
There's an issue though; |desc_case= is needed to fix even a |fallback=; I shall fix that tomorrow; it's been quite the day. Fred Gandt · talk · contribs 19:49, 2 February 2023 (UTC)[reply]
If the SD reads {{Short description|None}}, then you already know that "no short description" was an active choice so you shouldn't ignore it and choose your own. "List of ... " article names are self explanatory, they don't need elaboration. So that's one less task on your to-do list  – unless of course it means you have to undo work already done . --
talk) 12:18, 3 February 2023 (UTC)[reply
]
I'm not choosing anything (I'm not being pedantic); if the explicit short description is none the module understands that (accurately) and will return no description unless it is instructed by omission of a counter instruction to look for a wikidata alternative and finds one. If e.g. some list articles do have an active explicit short desc, screening against them across the board would block those instances. The requirement to annotate links in lists under some circumstances is why ths template exists, and it's a brilliant idea to grab the short desc to fulfill a part of that need, but it's not the only option. The article may not want a short desc, but the annotation might be served well by another. Fred Gandt · talk · contribs 14:11, 3 February 2023 (UTC)[reply]
So did I misunderstand? When you wrote "none", did you mean "none" (as in the SD says none) or did you mean "none" (as in the article has no SD)? Because I support using the Wikidata in the latter case. --
talk) 16:11, 3 February 2023 (UTC)[reply
]
If the module Module:GetShortDescription finds {{short description|none}} and determines that no other template (other than implicit) is overruling it, it concludes that there is no explicit short description and moves on to whatever is next on its todo list in its feverish effort to create an annotation. If the template tells it Module:Annotated link to tell Module:GetShortDescription to look no further; it won't. I'm having lunch now. Fred Gandt · talk · contribs 16:23, 3 February 2023 (UTC)[reply]

I am adding a filter to express when links should not fallback to a wikidata description (probably |not_wikidata=) so link titles we know are already likely to explain themselves will need to be manually/explicitly marked as wanting a wikidata description at the translusion i.e. opt-in. Fred Gandt · talk · contribs 09:36, 4 February 2023 (UTC)[reply]

 Done see Education § See also for example; all links using this template include an index, glossary and several lists with no wikidata fallback. An outline has an explicit SD. Fred Gandt · talk · contribs 11:25, 4 February 2023 (UTC)[reply]

The article may not want a short desc, but the annotation might be served well by another. I'd be curious to see an example of this? I've only been able to find the opposite, i.e. if editors have marked a short description as none, the wikidata annotation seems redundant: Architecture of New York City; Regional variations of barbecue. Olivaw-Daneel (talk) 07:54, 7 February 2023 (UTC)[reply]

I agree completely. If anything, that understates the case. If the the article has an explicit SD of none, it is imperative to recognise that choice. Not to do so will reawaken the opponents to the very existence of this template and IMO they would have a very strong argument.
talk) 11:46, 7 February 2023 (UTC)[reply
]
Rather than single examples which may be dealt with individually (it should be born in mind that this template is a convenience, not a requirement, and should probably not be sprayed over everything in drive-bys); here's the current state of things: Category:Pages displaying wikidata descriptions as a fallback via Module:Annotated link. That's every page showing an annotation using a wikidata description that was neither explicitly requested nor prefered. As you can see; it's a fair number but not proportionally overbearing. It's also the kind of concern that can be addressed by interested editors (I'm already working at it in spurts; even finding inappropriate, promotional wikidata descriptions in need of fixing). I have to update the documentation again today, but you may also see that the options to filter certain eventualities is being woven in bit by bit. I don't think anything completely terrible is currently happening out there, and rather than pulling the plug and throwing in the towel; we can tweak and adjust until satisfied. Fred Gandt · talk · contribs 12:23, 7 February 2023 (UTC)[reply]
Oh absolutely don't give up, please. We are just logging items on your 'to do' list and now we are getting to the edge cases. When we have our fangs into someone who knows how to write modules, you don't get to escape that easily! --
talk) 16:34, 7 February 2023 (UTC)[reply
]
Yeah I agree, and no rush! Implementation is up to you of course but I’m not sure why we need to filter out individual cases - that seems complicated. Just treat explicit none as different from the absence of an SD (that’d probably need changes to Module:GetShortDescription, in line 98 from what I can see), as it’s essentially an instruction that no annotation is needed. Olivaw-Daneel (talk) 17:56, 7 February 2023 (UTC)[reply]
I've made a simple change to Module:GetShortDescription/sandbox to show how I would implement it - I think it resolves the issue but needs testing. Olivaw-Daneel (talk) 22:02, 7 February 2023 (UTC)[reply]
And caused an edit conflict; I am going to replace that change and carry on with the implementation I was planning and hopefully still have in my clipboard. Fred Gandt · talk · contribs 22:20, 7 February 2023 (UTC)[reply]
I am working on your concerns; with some simple filtering; these are sandboxed: Architecture of New York City; Regional variations of barbecue Fred Gandt · talk · contribs 15:26, 7 February 2023 (UTC)[reply]
By filtering out wikidata descriptions with some choice words e.g. "wikimedia"; currently showing a small but appreciable drop in categorised instances. Be aware that I'm not making multiple changes at a time so I can monitor the effect of each change carefully before moving on to the next. All seems well with this change so far; having lunch while it settles. Fred Gandt · talk · contribs 17:07, 7 February 2023 (UTC)[reply]

Currently watching the new Category:Pages displaying wikidata descriptions as a fallback to none via Module:Annotated link and Category:Pages displaying short descriptions matching their page name via Module:Annotated link to see what's actually happening before making any decisions. Good time to put the kettle on I reckon. Fred Gandt · talk · contribs 00:09, 8 February 2023 (UTC)[reply]

Overall the addition of filtering, to be revised ongoing, has rendered the quantity of useless fallbacks to very few. I was in the process of working through them but encountered a mean spirited editor and got tired. I'll be plugging away at it again in as many hours as refreshment takes. Why work through them? The more of these we look at, the more we can understand how to improve the results. I've seen plenty of evidence that tamed Wikidata descriptions can be usefall as fallbacks, but the taming will take a little more work and monitoring – which I am doing. Fred Gandt · talk · contribs 06:43, 8 February 2023 (UTC)[reply]

Is there a single explicit-none to wikidata fallback that is actually useful? Olivaw-Daneel (talk) 07:19, 8 February 2023 (UTC)[reply]
As I understand it, Fred has recognised the need to respect explicit SD=None and will not override it. What he is looking at now are those many articles that have no SD of any type. The question now is can we just co-opt the Wikidata description? Probably yes but not if it just duplicates the article name. Other reasons to say no? (Main one IMO is that most are longer, much longer, than the silly 40 character limit set in
talk) 13:26, 8 February 2023 (UTC)[reply
]
As I understand it, Fred has recognised the need to respect explicit SD None and will not override it. This is not true: some special cases have been filtered out, but the default is that explicit SD=none is overriden by Wikidata, despite the two of us expressing opposition to this. FWIW, the code change required to implement this is rather simple - it'd take me a few seconds (delete lines 178–183 here and we're done). For articles with no SD, I don't have a strong opinion and am fine with the current behavior; perhaps it'll entice editors to add more SDs. Olivaw-Daneel (talk) 21:43, 8 February 2023 (UTC)[reply]
Perhaps try to remember that the module may be used by other templates for other reasons. If the falling back is to be removed, we can do it by instruction rather than destruction. Fred Gandt · talk · contribs 22:20, 8 February 2023 (UTC)[reply]
I see it as a useful enhancement, not “destruction” If you wish to add another option (“prefer explicit, including explicit none”?) I suppose that’d work too, as long as it’s the default setting for this template. Olivaw-Daneel (talk) 23:28, 8 February 2023 (UTC)[reply]

I'm not invested in any camp; Wikidata is a potential source of description I'm studying for usefulness and it does come up wanting on occasion. Right now I'm looking at the possibility of filtering out the crappy ones; I'm interested by how relatively few Wikidata descriptions are being displayed and how even fewer there are because of an explicit none. I'm focussed on trying to find patterns to filter that have reliable and desirable effects, but will kill it with fire if it's not working. On the whole, at this early stage, I'd say Wikidata descriptions are occasionally helpful, but predominantly weak. I also realise that the wealth of categories may seem scary or silly (YMMV) but real use cases are the only decent yardstick we have; I've found more often than not that the reason for a page landing in the categories is something that needs fixing at the source, and actually finding these issues is being facilitated by the categorisation, and am considering the possibility of keeping the cats alive in the event that the results are killed.

Specifically Olivaw; one example as requested: Constantine the Great and Christianity

I wouldn't have know who Constantine the Great was without navigation. I admit it's not fabulous, but more importantly than its quality, is that it's just one of thousands of use cases and alone doesn't really tell us anything. The greatest problem we have is not being able to read the implicit short descriptions, and to that end I have exhausted my search for and trials of possible solutions out-of-the-box, but there is still the possibility of recreating the SD that is being dynamically created by e.g. an infobox, by reading the infobox params and doing with them what that infoxbox does; probably a lot of coding but it could work. One example I rather like of Wikidata filling the gap when this happens is for: Author, Author – episode of Star Trek: Voyager (S7 E20)

This description is the same information that the implicit SD applies, just in a different format. There are useful Wikidata descriptions, just maybe not proportionally enough to warrant handling or putting up with the crud. Fred Gandt · talk · contribs 15:13, 8 February 2023 (UTC)[reply]

No longer falling back to wikidata if an explicit is none. Fred Gandt · talk · contribs 03:54, 12 February 2023 (UTC)[reply]

Red links

A quick look at one on that list,
talk) 17:19, 2 February 2023 (UTC)[reply
]
I've been updating that handling but wasn't rushing and just finished; see the recent changes to the documentation. tl;dr: add |red_cat=no if it's a legit use case. Fred Gandt · talk · contribs 17:24, 2 February 2023 (UTC)[reply]

One of the things the module does is potentially categorise pages attempting to annotate links to nonexistent pages; just as a head's up; it seems most List of... and Outline of... pages are using the template appropriately (mostly outside See also sections) so am adding the ability to specify when to automatically act as if |red_cat=no is set explicitly. The module can then be instructed by this template, by providing a list of prefixes e.g |auto_red_cat_no=List of,Outline of (haven't decided the syntax yet), that for its use cases, on those pages, the categorisation is unlikely useful. So there's a thing. Fred Gandt · talk · contribs 11:29, 3 February 2023 (UTC)[reply]

I'm concerned that all these extra parameters won't get used by most of the editors most of the time. So if the redlink is not in a See Also section, it doesn't need to be categorised. Is your |auto_red_cat_no=List of,Outline of embedded in your module or do you expect editors to specify it? --
talk) 12:18, 3 February 2023 (UTC)[reply
]
Most use cases will never need most of the params, but they still need to exist. Foreign language handling accounts for the bulk of the new params, and there's no right way to avoid their need, without removing the ability to properly format foreign language text. The template documentation walks through from most basic to more complex configurations carefully, such that it should neither intimidate nor confuse any wiki editor. The red link category is hidden and creates no alarm in preview or directly at the transclusion. It is a maintenance category and only interested parties will ever know it exists. I am currently working on the implementation so cannot say exactly how it will work, but it looks like the template will tell the module to not categorise lists or outlines (for starters) automatically. These will then disappear from the category and those remaining can be evaluated by anyone who cares (I've already dealt with a load of redlinks in See also sections). For perspective it should be noted that there are currently only 90 pages categorised and most are lists and outlines; there are nearly 7,000 transclusions. I'll get back to you about it, but don't hold your breath; any change requires a lot of testing before pressing "go". Fred Gandt · talk · contribs 14:11, 3 February 2023 (UTC)[reply]
Ok, don't let me get in your way. I just wanted to identify a potential issue early to avoid wasted work. --
talk) 16:11, 3 February 2023 (UTC)[reply
]

 Done Pages starting with List of and Outline of are now being decategorised and won't be added while the instruction remains in the template code. Fred Gandt · talk · contribs 19:01, 3 February 2023 (UTC)[reply]

The list is now "List of#Index of#Outline of#User:#User talk:" and can be adjusted as needed. I think knowing if Drafts contain red link annotations might be useful in-case any passer-by thinks to add it. Fred Gandt · talk · contribs 13:19, 4 February 2023 (UTC)[reply]

Case of first character

Short descriptions in biographies typically start with the nationality of the person, which is capitalized as it is a proper noun (see examples at

WP:SDEXAMPLES). {{Annotated link}} is sometimes used in lists of notable people, like in alumni lists (e.g., Norco High School). Given that and given the direction at {{Short description}} that "Each short description should: ... start with a capital letter", I question whether it is appropriate for this template to change its default behavior to lowercase short descriptions. Capitalized proper nouns that are already properly capitalized should not require extra steps to maintain that capitalization. Maybe the direction at {{Short description}} should be changed not to require uppercase or lowercase, but until that happens, I do not think this template should contradict the capitalization already provided except by explicit designation by the editor adding a use of this template. — Archer1234 (t·c) 00:35, 4 February 2023 (UTC)[reply
]

I'm inclined to agree; I have applied |desc_case=upper to several transclusions already and woke with the thought to examine for SDs starting with all upper words (probably abbreviations) but maybe case alteration needs to be opt-in. The result will be that most SDs used as annotations will be improperly starting with an uppercase letter, but at least the ones that should won't be wrong; one of the ones I adjusted started with "islamic".
I'll do this now; I have other work to do on it already; adding a filter to |not_wikidata=. Fred Gandt · talk · contribs 09:36, 4 February 2023 (UTC)[reply]
 Done I just need to update all the documentation now. Fred Gandt · talk · contribs 12:56, 4 February 2023 (UTC)[reply]

Short description of redirects no longer displays correctly

The short description of redirects is not displaying correctly like it used to. A couple of examples:

  • In Over Our Heads
     – Book on psychological development by Robert Kegan
    (correct short description: Book on psychological development by Robert Kegan)
  • Ladder of inference
     – Metaphorical model of cognition and action by Chris Argyris
    (correct short description: Metaphorical model of cognition and action by Chris Argyris)

These examples are especially nonsensical since the redirects point to a section in an article on the author of the redirect topic, and the annotated link displays the description of the author instead of the description of the redirect topic.

Biogeographist (talk) 21:33, 11 February 2023 (UTC)[reply
]

These redirects should have their own SDs. That is the root of the problem, not this template.
talk) 22:02, 11 February 2023 (UTC)[reply
]
Those redirects do have their own SDs. The problem is that this template is ignoring them (possibly because, uniquely, redirects cannot have the SD template at the very top?).  Dr Greg  talk  22:16, 11 February 2023 (UTC)[reply]
Dr Greg is right that the redirects have their own SDs. There is definitely a problem here that I hope someone with the requisite technical skill can fix. Thanks,
Biogeographist (talk) 22:42, 11 February 2023 (UTC)[reply
]
How odd! The SDs don't (or didn't) show on mobile. I didn't just make it up. --
talk) 09:48, 12 February 2023 (UTC)[reply
]
And they still don't... Yet another reason to be ultra-cautious about editing on a smart phone. (As this edit is .) --
talk) 09:54, 12 February 2023 (UTC)[reply
]
I will add a check for short descriptions on redirect pages before moving to resolve the redirect to the end target. Fred Gandt · talk · contribs 00:14, 12 February 2023 (UTC)[reply]
Sandboxed version in testing:
  • In Over Our Heads
     – Book on psychological development by Robert Kegan
    (correct short description: Book on psychological development by Robert Kegan)
  • Ladder of inference – Metaphorical model of cognition and action by Chris Argyris
    (correct short description: Metaphorical model of cognition and action by Chris Argyris) Fred Gandt · talk · contribs 01:46, 12 February 2023 (UTC)[reply
    ]

 Done Fred Gandt · talk · contribs 03:56, 12 February 2023 (UTC)[reply]

To resolve or not to resolve

I am not convinced that the behavior should be to pull the SD from a target when a redirect does not have an explicit SD. My guess is that redirects that target a section or an anchor are rarely appropriate for using the target's SD. Same for redirects for members of a group where the target is the group. Here's an example of the former (target is a section in an article):

Here's an example of the latter (redirect is a member of the target):

I think it is better for {{Annotated link}} to show nothing than to rely on the target's SD being appropriate. If someone is adding {{Annotated link}} to an article for a redirect and no SD is displayed, then they can add an SD to the redirect. — Archer1234 (t·c) 10:38, 12 February 2023 (UTC)[reply]

From what I've seen of its general usage; its being slapped on everything in swathes and seemingly without any concerted effort to do anything useful about the results. With several categories being populated with cases in need of attention for a week, only I apparently had to time or inclination to follow them up. Large list articles with everything from external links and sister project links, redlinks and redirects are being wrapped, and I strongly doubt most editors care if the links they're wrapping are redirects or not; it's very likely most editors don't even know if links are redirects (I've used CSS to color all redirect links differently for some time). It's also worth bearing in mind that most redirects are not especially clever, being alternative names, misspellings and the like. There is certainly room for throwing another maintenance category at it and seeing what sticks. As with the other issues; our opinions are worth a lot less than real numbers. I will add said category and we can take it from there. "Another category?" Yep! I had two deleted last night since they served their purpose, informed choices and were thus rendered obsolete. Fred Gandt · talk · contribs 14:54, 12 February 2023 (UTC)[reply]
I fixed both the examples by adding what I consider to be suitable short descriptions. This is the sort of maintenance that's needed. Rather than sweeping the issues under the rug, we have an opportunity to bring them to light. I am working on the category now. Fred Gandt · talk · contribs 16:02, 12 February 2023 (UTC)[reply]
See Category:Pages displaying short descriptions of redirect targets via Module:Annotated link (will take a while to stabilise); we can see what's going on and make informed decisions. Fred Gandt · talk · contribs 17:57, 12 February 2023 (UTC)[reply]
One option might be to see whether a redirect's target is an entire article or a subsection. It might be appropriate to use the target's SD when the target is the whole article, but not when the target is a subsection.
Another option to consider might be to examine the redirect's
WP:RCAT categories (if it has any) and make a decision based on that, though that might not be easy, as there seem to be a large number of categories and they don't seem to be hierarchically structured. See also Wikipedia:Template index/Redirect pages.  Dr Greg  talk  19:03, 12 February 2023 (UTC)[reply
]
Yes; looking at the target for a "#section" could help and yes; redirect categories are unreliable. I see the numbers are rising but not alarming yet; 1,163 pages (with at least one link) as of now. Definitely needs closer examination. Fred Gandt · talk · contribs 19:30, 12 February 2023 (UTC)[reply]

The category seems to have settled at 1,477 pages; the evaluation begins... (I'm watching House (TV series) right now though and need the break) Fred Gandt · talk · contribs 22:22, 12 February 2023 (UTC)[reply]

Book titles and major artworks per
MOS:NAT

@Fred Gandt: I wonder if it might be easy to add an option disp=it[alic]? Or something similar? (combine with current quote=yes ?). Meanwhile I've added a simple example to the template doc. (Mona Lisa – Painting by Leonardo da Vinci). Not a show stopper, just a nice to have.

talk) 10:48, 3 April 2023 (UTC)[reply
]

See also sorting

If this template is used to annotated some links and others are annotated manually, manual sorting of these lists is required. This situation could be improved by adding a manual description override parameter for use in cases where the the

WP:SD is deemed not good for the context. See Network_address_translation#See_also for an example of these issues. Using {{Annotated link}} for all entries with override parameter supplied where needed would make it easy to sort these lists again. ~Kvng (talk) 20:54, 7 June 2023 (UTC)[reply
]

Can you elaborate? How does the use (or non-use) of this template affect the sort order? In the NAT example, the list is sorted: some have {{
talk) 23:09, 7 June 2023 (UTC)[reply
]
I sorted it manually. If you use a line-oriented text sorter in an external editor or in WikiEd, it turns into a mess. ~Kvng (talk) 13:25, 8 June 2023 (UTC)[reply]

italics

{{annotated link|Tuvix|"Tuvix"}}

If I used that code, the resulting description is 24th episode of the second season of Star Trek: Voyager. Anywhere else in the wiki,

WP:SDFORMAT), so there is no way to italicize their content properly within the short description. They were never intended to be displayed in articles, as far as I know. Your question may be best asked at Template talk:Annotated link. So here I am! — Fourthords | =Λ= | 18:48, 9 January 2024 (UTC)[reply
]

Jonesey95 is indeed correct in pointing you to
WP:SDFORMAT. Short descriptions are intended to be plain text without wiki mark-up or HTML mark-up. Where do you want to use this {{annotated link}}? — GhostInTheMachine talk to me 19:57, 9 January 2024 (UTC)[reply
]
The "Tuvix" example was just because I knew it had a supposed-to-be-italicized term in its SD; I don't want to use it anywhere. As an actual example, at Viking program#See also, this template is used to invoke the short description at Mars Science Laboratory, which says Robotic mission that deployed the Curiosity rover to Mars in 2012 and should be—but isn't—italicizing Curiosity. — Fourthords | =Λ= | 23:47, 9 January 2024 (UTC)[reply]
The template, or more specifically the modules the template is invoking, grabs the plain text short descriptions, and have no data about the content of them i.e. the short desc doesn't come with a note about which words should be presented how. There's no practical way to allow arbitrary wikitext markup to affect the short desc. Sure, we could create a bunch of params for every kind of markup we might want to apply, which all carry data to describe which part of the description, which is subject to change, should be affected and how, but it would be an epic waste of resources. In cases like these, the editor adding the template should make the decision to not use it, and instead write the annotation themselves. Fred Gandt · talk · contribs 21:20, 9 January 2024 (UTC)[reply]
So if this template cannot be used for articles whose descriptions should use italicization, should this template have instructions detailing such a prohibition IAW the MOS? — Fourthords | =Λ= | 23:47, 9 January 2024 (UTC)[reply]
Also {{annotated link|Tuvix|quote=y}} is preferable (the quotes are not part of the link this way) and it should be noted that the description for that episode is being grabbed from Wikidata at this time, because the explicit short desc is added to the article by the infobox which makes it unreadable by the module (it's quite complicated). Fred Gandt · talk · contribs 21:31, 9 January 2024 (UTC)[reply]
The purpose of {{annotated link}} is to provide a "canned" summary of an article in a See Also list. Usually the SD is good enough, certainly a lot better than a raw article title that is sometimes meaningless unless you already know about the topic. However there are many cases where the 40 character limit of SDs is not useful or is too generic given the context and that is when it is time to append your own description and tailor it to the circumstances. This is such a case.--𝕁𝕄𝔽 (talk) 23:35, 9 January 2024 (UTC)[reply]
So, should this template's documentation clearly state that it shouldn't be used when the output requires incompatible formatting (e.g. italicization)? — Fourthords | =Λ= | 23:47, 9 January 2024 (UTC)[reply]
If it's not considered worthwhile to add this additional functionality, than yes, probably good to let folks know the limitations of the template. -- Cl3phact0 (talk) 10:03, 29 January 2024 (UTC)[reply]
A work-around for handling italics in situations like
Connections – Word game"), would be useful – if not too cumbersome to code (i.e., "epic waste of resources"). It's a great little template. Cheers, Cl3phact0 (talk) 09:58, 29 January 2024 (UTC)[reply
]
It would be far more sensible to fix the problem at source: update
WP:SDFORMAT to support markup. No doubt Jonesey95 is correct to say that [in the original concept], SDs were not intended to be displayed. But that was then, this is now. Wikipedia has evolved: there are many old practices that have become deprecated over the years and others that have only the echo of their original concept. SDs need to evolve too. (Increasing the silly 40 character limit is another obvious and long-overdue enhancement.) It makes no sense to have this template jump through hoops to get past its limitations.--𝕁𝕄𝔽 (talk) 11:41, 29 January 2024 (UTC)[reply
]
File a bug with a proposal on how to do that, I guess. The first place to start is the display of search suggestions: How would markup be stripped from, or translated so that text would display properly in, those suggestions? As for the 40-character recommendation, one of the reasons for it is that SDs are truncated in search suggestions. I filed T311277 almost two years ago, and it has gone nowhere. – Jonesey95 (talk) 13:16, 29 January 2024 (UTC)[reply]

Annotated link vs. Section link

The use of the Section link aka slink template results in the '#' character that separates the page name from a section name (i.e. 'Albert Einstein#Life and career') being rendered as the ' § ' characters ('Albert Einstein § Life and career'). The Annotated link template does not do this; I would propose that it be modified to function the same way the Section link template functions. Tfdavisatsnetnet (talk) 07:01, 16 January 2024 (UTC)[reply]

Good point. I'll have a look later today. Anyone else wanting to go right ahead in the meantime: 99% certain the # char cannot be present in an article title so simple to replace if there's not a preferable method. Fred Gandt · talk · contribs 10:43, 16 January 2024 (UTC)[reply]
But sections don't come with short descriptions? How would this work? The closest I've come across is a redirect article with {{r to section}} (or {{r to anchor}}) and most commonly the only issue is that the redirect article doesn't have its own SD, which is easily rectified. Does that not better deliver the intent of of Tfdavisatsnetnet's request? --𝕁𝕄𝔽 (talk) 10:51, 16 January 2024 (UTC)[reply]
Yeah; simply using the second parameter solves the section link style concern, and as long as the section is well titled (unique, descriptive etc.), should make plenty of sense in most cases:
e.g. {{annotated link|Albert Einstein#Life and career|Albert Einstein § Life and career}} --> Albert Einstein § Life and career – German-born physicist (1879–1955)
JMF is quite right; using a redirect to the section or its anchor and ensuring the redirect has a suitable SD, solves for what should be only edge cases where the section needs a more specific SD than is provided by the article SD.
Nothing to do \o/ Fred Gandt · talk · contribs 11:20, 16 January 2024 (UTC)[reply]
Example of redirect to anchor:
Riposte – 2010 album by American musical duo Buke and Gase Fred Gandt · talk · contribs 11:28, 16 January 2024 (UTC)[reply
]
Although this needs thorough testing, it should solve cases where raw section links are used:
{{annotated link/sandbox|Albert Einstein#Life and career}} --> Albert Einstein § Life and career – German-born physicist (1879–1955)
I'm not feeling particularly brilliant right now and don't trust myself to test it, so won't personally be pushing live any time soon. Fred Gandt · talk · contribs 12:55, 17 January 2024 (UTC)[reply]