Template talk:Annotated link

Latest comment: 2 months ago by Pbsouthwood in topic Failure to return SD from infobox?

"None" not working correctly

edit

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
edit

So, {{annotated link}} creates a link to an article followed by a transclusion of that page's short description. Simple enough. However, if at a later date, that target article is moved, this template does not follow the ensuing redirection to find the new target (e.g. 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? --John Maynard Friedman (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

edit

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. --John Maynard Friedman (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
@Arms & Hearts: Are you questioning cases like Black swan theory – Theory of response to surprise events, that there is the second "theory" has a capital T? Since it is essentially a bullet point, surely that is a trivial technical breach that is completely inoffensive? --John Maynard Friedman (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. {{anli}} achieves a good enough result for the rest. Serendipitous information discovery is a key objective of the project and if a tiny number of articles get trivial collateral damage in the process, too bad. Vandalism is a fact of life, hacking SDs is among the least of our problems. You are entirely at liberty to annotate the See Also of your favourite articles manually if you prefer. --John Maynard Friedman (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. --John Maynard Friedman (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
I think the capital letters look fine. Not unlike how the first letter of an item in a bulleted list is capitalized. -- Beland (talk) 03:50, 6 July 2024 (UTC)Reply

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

edit

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 Table of bases, as it only happens when that and only that has an {{anli}}. Also, if I add that (to an totally irrelevant article), it blows up there too. Above my pay grade to work out why. --𝕁𝕄𝔽 (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?

edit

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

edit

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 {{lang}} expression and not forgetting to include the nocat=yes. --𝕁𝕄𝔽 (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?

edit

{{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?

edit

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

edit

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: User:Fred Gandt/sandbox/Get short description

Fred Gandt · talk · contribs 23:05, 24 January 2023 (UTC)Reply

Adoption

edit

With the additional features and functionality, the Module:Annotated link is ready for evaluation and testing; I'd appreciate assistance with that. It adds <abbr>...</abbr> semantic markup for |abbr=, and includes full 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}}User:Fred Gandt/sandbox/Get short description

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

edit

  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 Category:Pages displaying redlinks processed by Module:AnnotatedLink for finding inappropriate usage in MOS:SEEALSO sections (where 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

edit
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. A bridge too far, time for a "strategic withrawal". --𝕁𝕄𝔽 (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 WP:HOWTOSD.) --𝕁𝕄𝔽 (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 – Emperor Constantine's relationship, views, and laws regarding 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

edit
A quick look at one on that list, Z drive, shows that someone – quite reasonably, IMO – has used the template for a list of applications of the technology, separately from the article's See Also list (which also uses it). So not always an error. --𝕁𝕄𝔽 (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

edit

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

edit

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. GIGO. --𝕁𝕄𝔽 (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:

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

To resolve or not to resolve

edit

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

edit

@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

Adding parameters to do simple formatting changes seems more complicated than simply adding it to the second parameter in the manner you documented. Though one thing that would make things easier for editors would be to add automatic detection of {{DISPLAYTITLE}}, which would enable automatic application of not only italics but other special formatting. Though apparently many infoboxes like Template:Infobox book add this indirectly, so that might not be a straightforward programming task. -- Beland (talk) 04:02, 6 July 2024 (UTC)Reply

See also sorting

edit

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 {{anl}}, some don't but the displayed list is in alpha order. Evidently I'm missing your point? --𝕁𝕄𝔽 (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

edit

{{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, even in hatnotes, we'd italicize Star Trek: Voyager. Are short descriptions explicitly exempt from this? Why the incongruity? I previously asked this at Wikipedia talk:Short description, and Jonesey95 (talk · contribs) said, Short descriptions can't have markup in them (see 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 Wordle#See also, where the first link should display like this: "ConnectionsNew York Times word game" (rather than "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
edit

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

Template-protected edit request on 15 May 2024

edit

I suggest changing this sentence:

From: There are many possible configurations beyond this, be described below, and most parameters have aliases.

To: There are many possible configurations beyond this, as described below, and most parameters have aliases.

Note: changing the word "be" to "as". Jb45424 (talk) 12:33, 15 May 2024 (UTC)Reply

  Not done: According to the documentation page's protection level you should be able to edit the page yourself. If you seem to be unable to, please reopen the request with further details. – Jonesey95 (talk) 13:43, 15 May 2024 (UTC)Reply

Anomaly

edit

Hypothermia – Human body core temperature below 35 °C (95 °F) is not the expected result. Cheers, · · · Peter Southwood (talk): 11:39, 18 July 2024 (UTC)Reply

Again, the SD needed to be fixed to follow the guidelines. – Jonesey95 (talk) 13:37, 18 July 2024 (UTC)Reply
Jonesey95,:Which guideline was it not following? I see that you removed decimal parts, is that it? If so, why? Cheers, · · · Peter Southwood (talk): 16:07, 18 July 2024 (UTC)Reply
The SD was attempting to use a template. Wikimarkup of any kind is not allowed in short descriptions. See WP:SDFORMAT. – Jonesey95 (talk) 16:08, 18 July 2024 (UTC)Reply
Thanks, I managed to miss that somehow. Eyes not what they used to be, I'm afraid. Cheers, · · · Peter Southwood (talk): 09:34, 19 July 2024 (UTC)Reply

Failure to return SD from infobox?

edit

Annotated link for Broughton Island (New South Wales) returns – 'island in Australia' and notice "Pages displaying wikidata descriptions as a fallback", but there is a short description, 'Protected area in New South Wales, Australia' presumably via the infobox ({{Infobox Australian place}}), which the template apparently does not find. · · · Peter Southwood (talk): 07:09, 21 August 2024 (UTC)Reply

Not a bug (or a feature). Code to support falling back to Wikidata was added some time ago because there were so many articles without SDs, it was relatively easy to do [which is easy for me to say, as I didn't write it  ] and it was a good return on investment. So you would have to request an enhancement showing that there are a goodly number of such cases. Meanwhile, it would be easier to give the article a proper SD.
Does {{Infobox Australian place}} provide SDs? Are there other infoboxes that do that? 𝕁𝕄𝔽 (talk) 11:56, 21 August 2024 (UTC)Reply
There are a few such templates. A message box in this template's documentation states his template adds an automatically generated short description. If the automatic short description is not optimal, replace it by adding {{Short description}} at the top of the article.. olderwiser 12:08, 21 August 2024 (UTC)Reply
I do that, but the automatic short description is often good enough and in this case it is better than the Wikidata fallback. Cheers, · · · Peter Southwood (talk): 12:14, 21 August 2024 (UTC)Reply
It is not falling back when there is no short description, it is usurping the short description generated by the infobox. To me this is a bug, but I don't know if the bug is in the infobox or the annotated link template, and I have no idea how to find out. Yes, {{Infobox Australian place}} provides SDs, and as far as I know others do too. I think it is quite common. Most of the time it is not a problem and the generated SD gets passed back by annotated link. (actually I have no idea how often this happens) · · · Peter Southwood (talk): 12:10, 21 August 2024 (UTC)Reply
Are you aware that the whole purpose of short descriptions was originally to prevent the automated use of Wikidata descriptions in Wikipedia? I think that consensus probably still holds, as I have never seen an RFC to overturn it. Automatically generated short descriptions were also developed specifically to prevent automated use of Wikidata descriptions. It was quite a heated debate as WMF was forcing their use at the time and there was a lot of pushback. Not sure we want to reopen that can of worms, but you never know, consensus can change.· · · Peter Southwood (talk): 12:22, 21 August 2024 (UTC)Reply
This limitation is documented on the template's documentation page: Some pages are assigned short descriptions by automatic methods; templates that generate short descriptions include infoboxes that use the data provided to its parameters to create a suitable short description, which may overrule other short descriptions that exist for or on the page. The module responsible for fetching the description is currently not able to detect or determine this type of dynamically created short description.Jonesey95 (talk) 13:44, 21 August 2024 (UTC)Reply
Thanks again, Jonesey95, I was not expecting such a severe limitation. I would think that it should not revert to the Wikidata description for these cases, and should rather leave out the short description altogether until consensus has been reached to overrule the decisions made when short descriptions were first applied, as that was a very widely discussed RFC. Overriding Wikipedia content with Wikidata content by an automated process seems contrary to accepted guidance. Cheers, · · · Peter Southwood (talk): 16:34, 21 August 2024 (UTC)Reply
I think that whether other templates have started using code to automatically generate dynamic SDs does not have any direct relevance in how this template works. If those dynamic SDs are a violation of the RFC, it seems discussion about that should take place in some location more relevant for the templates that use such code. olderwiser 17:19, 21 August 2024 (UTC)Reply
It is not the generation of dynamic SDs that violates the RfC. They were specifically accepted at the time if I remember correctly. The constraint was the usual policy that infobox generated SDs are the reponsibility of the editor who codes the infobox, and must be possible to manually override, which is the case in all that I have inspected. Using a Wikidata description automatically is bringing content into Wikipedia from Wikidata without personally checking that it is appropriate. Using Wikidata description when a Wikipedia description exists is as far as I can make out, still a violation of that decision to prevent Wikidata descriptions from being automatically published in Wikipedia, and the responsibility for whether they are appropriate is specifically laid on the person who imports them. In this case, that would be the coder of the automated system. Therefore, as this is the talk page for that code, it seems to be the right place to discuss it. Cheers, · · · Peter Southwood (talk): 18:45, 21 August 2024 (UTC)Reply
I'm confused. It is possible to override the SD generated by these templates. Or are you suggesting that this template should suppress the display of SD where is it derived from WikiData? While I did not follow the original RFC all that closely, I don't recall that the mandate was to prohibit the use of SDs from WikiData. olderwiser 18:56, 21 August 2024 (UTC)Reply
The mandate was that descriptions from Wikidata may be manually imported at the discretion of any editor, who takes personal responsibility that each imported Wikidata description is appropriate, but Wikidata descriptions must not be automatically imported without scrutiny. Cheers, · · · Peter Southwood (talk): 19:05, 21 August 2024 (UTC)Reply
Thanks for clarifying. My recollection of the RFC details was poor. But if this template does fetch SDs from Wikidata, then something has changed in how it functions since Template talk:Annotated link/Archive 1#Documentation clarity this comment in 2021. Pinging Pppery if there has been some further changes made. olderwiser 19:16, 21 August 2024 (UTC)Reply
Hmm, I wonder if it was the module update made by Fred Gandt in 2023 that did this. See Template talk:Annotated link § Module above. olderwiser 19:28, 21 August 2024 (UTC)Reply
Yes, looks like that did it. * Pppery * it has begun... 21:20, 21 August 2024 (UTC)Reply
Technically, Wikidata descriptions should not be displayed automatically even if there is no local short description, automatically replacing a good local short description with an unchecked Wikidata description is worse. Cheers, · · · Peter Southwood (talk): 19:10, 21 August 2024 (UTC)Reply
So much speculation when the RFC is freely available to read! (Scroll to the top for the outcome of this question, which was "Show no description where the magic word [later implemented as the short description template] does not exist") Unless there has been a new RFC on the matter since 2018, the current consensus is that if there is no local short description, no short description should be displayed. I believe that means that this template should never pull text from Wikidata. – Jonesey95 (talk) 00:16, 22 August 2024 (UTC)Reply
I concur. I am not aware of a later RfC on the matter. · · · Peter Southwood (talk): 04:38, 22 August 2024 (UTC)Reply

I have found more instances of the same problem with other infoboxes, requiring changes to a perfectly adequate short description generated by the infobox to prevent a Wikidata description from being displayed.

It looks to me like this problem is an artifact of a bigger problem, which is that the template is returning content from Wikidata which is explicitly in contravention of the community-wide RfC linked above by Jonesy95, and it should not have been coded to do that in the first place. I see two legitimate options.

  1. The code is reverted to not returning Wikidata descriptions under any circumstances, and refraining from doing so in future, accepting the community decision as remaining valid.
  2. The code is reverted in the same way until a new RfC has been run, overturning previous consensus, and allowing the use of Wikidata descriptions where Wikipedia short descriptions are not available, and ensuring that where Wikipedia short descriptions exist in any form, that they are not usurped by Wikidata descriptions under any circumstances.

Either way, this template is used on thousands of pages, and on some pages, hundreds of times, so it must be kept efficient to avoid excessively long loading time and crashes, which detract from its intended function. It may be necessary or desirable to split Template:Annotated link into two versions to keep it usable, in which case the original version with minimal options and minimum overheads should keep the original title.

If anyone sees other acceptable options, please list them below. Cheers, · · · Peter Southwood (talk): 03:40, 25 August 2024 (UTC)Reply

Minimum intervention would be to no-op the only= parameter (I've never seen it in the wild, though?) and hardcode only=explicit.
But the policy really does strike me as excessively "patch protecting". Are Wikidata entries really that oppressive? especially when the option to resolve any perceived issue by adding an SD. To my mind, this
  • Passenham – Village in Northamptonshire, England
is a lot more friendly than this
What ever happened to WP:Think of the reader?
I strongly advise that we do nothing. It is not broken, it doesn't need fixing. I have never seen any "long loading times and crashes". If we must satisfy the wikilawyers, then let's repeat the RFC first before spending any time on such low-impact coding work. 𝕁𝕄𝔽 (talk) 15:13, 25 August 2024 (UTC)Reply
It is not relevant whether you have seen a thing or not, what is relevant is whether it is happening, and repeating the claim that it is not broken in the face of evidence that it is broken is unpersuasive. Look, and you will find. Doing nothing is not an acceptable option. Display of a Wikidata description without checking that it is appropriate when no Wikipedia short description exists is explicitly not permitted, and that is the least bad effect. The template is suppressing actual Wikipedia short descriptions and replacing them with unchecked Wikidata descriptions, which is totally against the letter and spirit of the recorded consensus. Denigrating the people who decided that unmoderated Wikidata descriptions are not acceptable as wikilawyers is unlikely to persuade them to change their minds. You are free to start the RfC as soon as you have formulated the appropriate question. Until then, the template should be reverted to a condition where it does not import unmoderated Wikidata descriptions at all, as that is the correct way to do it. I will not do this myself as my coding skills are not up to it and I consider myself involved. · · · Peter Southwood (talk): 17:34, 25 August 2024 (UTC)Reply
Fred Gandt, As the person who has done the most recent edits to the template, I would like to give you the opportunity to make any comments or suggestions you think are appropriate at this point. You are probably in the best position to advise on what is possible, what is simple, and how we might withdraw from this position of non-conformity with established consensus with the least disruption. Cheers, · · · Peter Southwood (talk): 17:53, 25 August 2024 (UTC)Reply
It seems to me that the purpose of this template is being forgotten in a nit-picky sprawl about what constitutes a proper short description; this template is for annotating links, by pulling a description that is short from a convenient and generally reliable location, with more ways to influence the result that I can be bothered to list (again; see docs), and importantly, is an entirely optional alternative to writing the annotations by hand. I think you're looking for a fight that doesn't exist and I have no intention of doing anything about it. Fred Gandt · talk · contribs 18:26, 25 August 2024 (UTC)Reply
Fred, the issue apparently is that there are some infoboxes that generate a short description but don't use {{SD}} to do so and such SDs are invisible to this template. So it is not really about 'proper' short descriptions but rather about how they should be generated. Thus if we force only=explicit, then any invocation of this template for an article that has an infobox generated SD will show nothing. Which apparently is The Right Thing To Do. 𝕁𝕄𝔽 (talk) 19:20, 25 August 2024 (UTC)Reply
Maybe Habst would like to have a crack at it? Fred Gandt · talk · contribs 21:33, 25 August 2024 (UTC)Reply
Thanks for the ping, I made {{anbl}} for a specific use case but don't have experience with the actual extracting short descriptions part.
It looks like the problem lies in Module:GetShortDescription, which it seems like surprisingly (to me) uses a regex on the wikitext to find short descriptions, so it doesn't catch transcluded {{short description}} calls like the one provided by {{Infobox Australian place}}. Surely there is a better way than regex here to get the SD? Until I just discovered this, I thought it would have been fetched via some Mediawiki API method, like how you can use mw.title.getCurrentTitle() to get the page title without manually parsing the wikitext.
If such an API method doesn't exist, I think a Phabricator ticket should be created to add it. It seems like there is a method to fetch SD from Wikidata, but not one to fetch the Wikipedia SD used on the mobile site. Once the Phabricator ticket is implemented, Module:GetShortDescription should use that method. That would fix this issue. --Habst (talk) 22:05, 25 August 2024 (UTC)Reply
Article short descriptions are available on the "Page information" page as the "Local description". Can this template just pull that item somehow instead of parsing the page text? If so, it would probably be a lot faster and simpler than this this template currently is. And Wikidata can be ignored easily, per the RFC. – Jonesey95 (talk) 04:20, 26 August 2024 (UTC)Reply
Good suggestions. · · · Peter Southwood (talk): 05:44, 26 August 2024 (UTC)Reply
When I wrote the original template in September 2018 I did not use Module:GetShortDescription as it did not exist (first edit 06:21, 20 January 2023‎), so it is possible to extract the short description by another method, probably without all of the module's bells and whistles, and probably significantly faster, but as displayed on mobile etc (I think this is from API). This worked acceptably for several years and tens of thousands of annotated links. I have no objection in principle to broadening its usefulness, as long as the default remains fast and does not conflict with consensus practice. If a user chooses to select an option which pulls in a description from off-wiki, that is on their head, and the source should be mentioned in the annotation per WP:Verifiable. Cheers, · · · Peter Southwood (talk): 08:18, 26 August 2024 (UTC)Reply
The purpose of the template was originally to extract the "Wikipedia:Short description" of a page as defined by WMF and the magic word they coded for it, and to display it as an annotation to a link in a list in an article. It appeared to be quick and efficient. I know this because it was my intention when I created this template in the first place. If that purpose has changed, has it been explained somewhere? Who made the decision? Was it discussed somewhere? Since then the template has been used for the original purpose in a large number of articles, some of which, like index and outline articles, have a large number of annotated links, and some of which have become extremely slow to load, to the extent that I am having to split lists repeatedly to get acceptable load times. · · · Peter Southwood (talk): 04:53, 26 August 2024 (UTC)Reply
Another useful side effect of the original template was that it drew the editor's attention to articles where there was no WP:Short description, which encourages the creation of short descriptions for those articles, thereby increasing the number of articlea with a short description. · · · Peter Southwood (talk): 05:04, 26 August 2024 (UTC)Reply
@Pbsouthwood, I'm confused about how you were able to get the Wikipedia short description without using regex or textual analysis on the wikitext. In my research there is no API method to do that. Can you provide a minimum working example or hint? --Habst (talk) 15:21, 26 August 2024 (UTC)Reply
Take a look at the old version of the code, Last edit by User:Pbsouthwood. I took it out and tested it and it still works. See User:Pbsouthwood/Annotated link/test. I also did a test using the current code which is about half the speed if I read the stats correctly, but the new code has more functions and checks so probably not a very fair comparison. Cheers, · · · Peter Southwood (talk): 08:25, 27 August 2024 (UTC)Reply
PS: Don't ask me how it works, I have no idea. I probably got a suggestion from someone and messed around with it until it worked. Cheers, · · · Peter Southwood (talk): 08:29, 27 August 2024 (UTC)Reply
I added one of the problem links to the test pages. The old code also does not appear to see the short descriptions generated by some infoboxes. · · · Peter Southwood (talk): 09:12, 27 August 2024 (UTC)Reply
@Pbsouthwood, thanks. So I looked into it, and the old code uses Module:Template parameter value which ultimately (if you look at that module's source code) just uses a regex search as well. So it's still susceptible to the same problem as the OP, until we get an API method. --Habst (talk) 12:11, 27 August 2024 (UTC)Reply
Yes, I have found that out by experiment too. (see subsection on statistics below). It affects about a quarter of all short descriptions, so worth fixing. Cheers, · · · Peter Southwood (talk): 12:57, 27 August 2024 (UTC)Reply

When would Wikidata be appropriate

edit

<brainstorming a bit> I have been trying to think of a circumstance in which fallback to Wikidata description for an annotated link would be a good thing. So far none come to mind. If the Wikidata description is good enough for use as a short description, it should be imported. If it is the same, use the Wikipedia short description, If there is no Wikipedia short description, and the Wikidata description is not suitable, either omit or create one for the topic on Wikipedia. If there are other cases I have not thought of that would benefit from an imported Wikidata description, please list them here so I can understand why people would want to use them. From my researches it seems that it may be possible to pull a description from other Wikimedia projects using this template. It this correct? Is there a notice identifying the source for verification? Could we see an example? Using a description imported from Wikidata is relatively clearly not permitted, I would guess per WP:Verification, any source other than English Wikipedia would need a reference of some kind. I would also guess that an interproject link would be generally acceptable, and incidentally also provide attribution, though for such short statements attribution might not be necessary (probably should check this with WMF copyright lawyers).</brainstorming> Cheers, · · · Peter Southwood (talk): 10:26, 26 August 2024 (UTC)Reply

I can see the logic of that. If I recall correctly, the reason to introduce the "fallback to Wikidata" was because it seemed that the vast majority of articles lacked any form of SD. I have an impression, no more, that the problem (while still substantial) is no longer quite so embarassingly terrible. As Peter said at 05:04 UTC, using {{AnnotatedListOfLinks}} on a SeeAlso has been a good prompt for me too, to fill in the blanks. And yes, also to correct any silly or verbose pseudo-SDs imported from Wikidata.
So maybe it is time to bite the bullet now and no-op all the Wikidata import code and see how loud the screams are? 𝕁𝕄𝔽 (talk) 12:06, 26 August 2024 (UTC)Reply
@JMF, before this is done, the code must be changed to switch from the regex parser to an API-based parser to get the Wikipedia short description. I don't know if this is possible currently or requires a Phabricator ticket, but that would actually resolve the parent question while simply making a no-op would not. --Habst (talk) 15:22, 26 August 2024 (UTC)Reply
Sorry, I was being lazy. I meant "take it out of use", without any idea of how significant or otherwise that would be. And before we get into the means, we have to have consensus on the ends. Though I don't see how else we can comply with the existing RFC (I really can't see any likelihood of a countervailing RFC succeeding). 𝕁𝕄𝔽 (talk) 15:59, 26 August 2024 (UTC)Reply
I think we will find that a very large number of short descriptions are currently the type that are generated by infoboxes and therefore ignored in favour of Wikidata descriptions. My guess is in the hundreds of thousands, possibly millions, but it should be possible to find out. Cheers · · · Peter Southwood (talk): 07:47, 27 August 2024 (UTC)Reply
Also agree about a new RfC having little chance of success.· · · Peter Southwood (talk): · · · Peter Southwood (talk): 08:15, 27 August 2024 (UTC)Reply
Template Annotated link used to get short descriptions without a regex parser (apparently not), and the old code still works (which I think uses API). I ran a test on it a day or two ago, and it was also faster, but has no fancy functions and only three parameters. I have no idea how this could be integrated with all the additional functions Fred Gandt and possibly others added as I don't write Lua and am not great with templates even in Wikicode. Cheers, · · · Peter Southwood (talk): 08:12, 27 August 2024 (UTC)Reply
I looked into this, and it seems like the old code used Module:Template parameter value which still uses regex, but just offloads it to this other module and so it's still susceptible to the same problem. We're still in need of an API method or Phabricator ticket to solve this issue. --Habst (talk) 12:13, 27 August 2024 (UTC)Reply
Update: I can see a possible use for Wikidata descriptions as annotations when they are unsuitable for use as WP:Short descriptions, but are appropriate as annotations in the specific use cases. When this is done it must be a deliberate action of the editor, so definitively not a fallback, but an informed and conscious choice, and should include a link for attribution and verification. I do not have any examples, but can see the possibility, though it may generally be better to just manually annotate, with a normal citation for verifiabiity. This would still be importing content that could change without notice from outside of English Wikipedia, so it is a bit of a grey area, and may well meet with opposition, however we do allow links to Wiktionary, and some articles import data from Wikidata, so there is precedent. Cheers, · · · Peter Southwood (talk): 03:08, 28 August 2024 (UTC)Reply
No, that would just create needless complications in the template code, potentially conflict with the RFC decision, and delay resolution of this issue. On the few occasions it might arise, it is just as easy for the editor to manually copy the wikidata info. --𝕁𝕄𝔽 (talk) 11:06, 28 August 2024 (UTC)Reply
I agree that it would probably not be worth the effort, and may well slow the execution excessively, but I do not know that, so I mentioned it for completeness, usually a desirable thing when brainstorming. Whether it would conflict with the RfC decision is debatable, as it would be an informed choice by the editor, and referenced, but as you say, could cause delays for very little gain if any. Cheers, · · · Peter Southwood (talk): 11:53, 28 August 2024 (UTC)Reply

Stats

edit


  • There are a total of 6,873,711 content pages in the main namespace, of which 360,409 are disambiguation pages.
    Out of 6,513,302 articles, 5,619,969 have a short description and 893,333 do not have a short description.
    5,619,969 / 6,513,302 = 86.284% complete (quite good?)
  • Of the 5,619,969 pages with a short description, About 4,243,936 pages include the template {{Short description}} These should(?) produce a short description accessible to {{Annotated link}} (Search string: insource:"Short description" hastemplate:"Short description"), which leaves 5,619,969-4,243,936 = 1,376,033 short descriptions produced by other means, possibly all inaccessible to Template:Short description. (about 25%, a significant fraction). It is possible that all or most of these are using Wikidata descriptions when used in Template:Annotated link. At this stage we do not have an absolute number.
  • There are currently 1,861 pages in category "Pages displaying wikidata descriptions as a fallback via Module:Annotated link", some of them will have multiple instances, so this is a minimum for instances. This number will grow as the use of Annotated links grows, and could peak at about 25% perhaps.

Redirects

edit

There are also about 2676 pages in category:Pages displaying short descriptions of redirect targets via Module:Annotated link. This should perhaps also not be by default. While some short descriptions of redirect targets are totally appropriate, such as {{R from alternative name}}s/synonyms, etc, others, like {{R from subtopic}}s may be quite confusing, and some will be plain wrong. It may be reasonably feasible to filter for good types of rcat, but it may be easier to leave the choice to the editor while this filtering feature is being considered, and I don't know all the rcats well enough to say which ones will always or even usually be OK. Also a lot of redirects have no rcats. The absence of an annotation is generally not a major problem as it is the original default condition. If anyone is sufficiently concerned by the lack, it is usually not a big job to fix at source by manually adding a suitable short description or just use a manual local annotation, and doing so will help expand the number of useful short descriptions in our articles and redirects. However, re-using short descriptions from R to synonym and the like does seem appropriate, as adding those to each of those redirects would be a right pain unless automated. Cheers, · · · Peter Southwood (talk): 08:14, 28 August 2024 (UTC)Reply

Peter, can you dig into this more? I have certainly added SDs to redirect articles where it is a {{Redirect to section}} or {{Redirect to anchor}}, typically because the SD for the whole target article is inappropriate, unhelpful or both. So it is essential that the facility continues to exist and be supported. Or have I misunderstood your concern?
I suspect that there are very very few straight redirects with their own SDs (why would anyone bother?). If this template is used with an SD-less redirect, it derives it from the target article, which seems to make sense. --𝕁𝕄𝔽 (talk) 15:54, 28 August 2024 (UTC)Reply
Adding a short description to a redirect where the SD of the redirect is sub-optimal works just like any other local short description, I do just what you say you do, and have not had problems. When there is no local short description at a redirect, the Annotated link template currently fetches the SD of the redirect target, which as you say is not always appropriate, and one must manually fix these by going to the redirect page and adding a suitable SD. It should be possible to filter by Rcat which SDs from the target are likely to be good, like R to synonym, R to short name, etc, and which are likely to be bad, like R to section and R from subtopic. Using such a filter to decide which target article SDs should be used and which should not would be a useful feature, though not essential. Problem is there are a lot of Rcats and I do not know which ones indicate that the target SD will be good or bad. Currently there appears to be no filter, and Annotated link just gets the target SD in all cases, good or bad, and one has to manually check if they are appropriate, then fix as needed. I hope this helps, but if not ask again. Cheers, · · · Peter Southwood (talk): 06:28, 29 August 2024 (UTC)Reply
Time for another hand-waving reply  , since I don't know the significance of this idea. Surely it would be better to have a bot that goes round collecting a list of such cases for attention (as happens in a number of cases I have seen, such as bare URLs), rather than build that function into this template? Especially given the concern about it load. 𝕁𝕄𝔽 (talk) 22:26, 29 August 2024 (UTC)Reply
Maybe, but the bot should preferably fix the problem by adding the SD to the redirect. Human attention should not be wasted where it is not needed, we have better things to do. There is already a list of similar cases generated by the template, so it is partway there. A bot might eliminate the need for this function, which could streamline the template a bit, and might, as you suggest, reduce the load and speed up the performance. Cheers, · · · Peter Southwood (talk): 05:17, 30 August 2024 (UTC)Reply
Do you use the CSS to make the Annotated link maintenance category warnings visible? It is quite useful.· · · Peter Southwood (talk): 06:35, 29 August 2024 (UTC)Reply
No, I haven't come across that? Where do I find it? 𝕁𝕄𝔽 (talk) 22:27, 29 August 2024 (UTC)Reply
It is conveniently listed in the top matter of the category pages (Category:Pages displaying short descriptions of redirect targets via Module:Annotated link and Category:Pages displaying wikidata descriptions as a fallback via Module:Annotated link), (kudos to Fred Gandt), and can just be copied and pasted into your CSS. You will suddenly be very aware of the cases when you encounter them in articles. · · · Peter Southwood (talk): 05:20, 30 August 2024 (UTC)Reply
I was about to suggest another maintenance category for ANLI links to redirect-to-section or redirect-to-anchor articles but I suspect it would be huge.  . 𝕁𝕄𝔽 (talk) 19:23, 30 August 2024 (UTC)Reply
It would be huge, and I don't see the point, as there is no problem with R to section and R to anchor that needs maintenance that would remove those links from the category, so the maintenance category would just keep getting bigger and more useless instead of smaller. As a general principle, performing the targeted maintenance should automatically remove an article from a maintenance category. Redirects without a short description would need a short description to remove them from such a category, but there are a lot of redirects which should never be used in an annotated link, like from misspellings, foreign languages etc, that do not need a short description, and they would waste editor time for no useful effect. However there may be some maintenance categories we have not thought of yet that would be useful, so don't stop thinking yet.
A category for redirects to a section or anchor, or from a subtopic which also do not have a short description would be useful, but may require a bot to populate and update. In this case most of the redirects should have a short description, and adding one should remove the redirect from the category eventually. Cheers, · · · Peter Southwood (talk): 07:08, 31 August 2024 (UTC)Reply
There is already at least one other maintenance category, for short descriptions without a space, which basically means they are one word or hyphenated. I will try to find it again and leave a link here. There may be others I have not found yet. They may even be listed somewhere, but if so I don't know where. There is so much on Wikipedia that one only discovers by luck. · · · Peter Southwood (talk): 07:25, 31 August 2024 (UTC)Reply
Category:Pages displaying short descriptions with no spaces via Module:Annotated link, and they are listed in Category:Wikipedia maintenance. I don't know if I found them all, and some are more useful than others. · · · Peter Southwood (talk): 08:06, 31 August 2024 (UTC)Reply
I have also found them listed at Template:Annotated link in the documentation, which is the logical place to look once one has assumed they may exist. Hindsight 20/20 again. Cheers, · · · Peter Southwood (talk): 08:19, 31 August 2024 (UTC)Reply