Wikipedia talk:Shortdesc helper

Interface-protected edit request on 24 March 2025

Please convert the "redirect" and "article" on line 1089 into a translatable message. It shows up as "article" on other wikis. Screenshot Nemoralis (talk) 23:02, 24 March 2025 (UTC)[reply]

Probably needs a change along these lines. I can't test this immediately myself, and so I don't want to make the change quite yet, but I'll try to do so a bit later today. Writ Keeper 13:12, 27 March 2025 (UTC)[reply]
 Done. @Nemoralis: There should be two new translatable text labels, 'sdh-article-label' and 'sdh-redirect-label', that get substituted into the larger text block, rather than the hardcoded English. Thanks! Writ Keeper 12:46, 28 March 2025 (UTC)[reply]
Thank you @Writ Keeper! Nemoralis (talk) 12:52, 28 March 2025 (UTC)[reply]
Looks like a patch has been deployed without being put in the repo at https://github.com/wikimedia-gadgets/shortdesc-helper. Someone should probably make a corresponding pull request at the repo. –Novem Linguae (talk) 13:25, 28 March 2025 (UTC)[reply]
To be fair, it doesn't look like this is the only time that's happened. :) Writ Keeper 14:35, 28 March 2025 (UTC)[reply]
Personally I think the existence of a repo here is counterproductive and adds an unhelpful layer of indirection for a gadget changed as rarely as this - the wiki page should suffice by itself. That view is somewhat heteredox, though. * Pppery * it has begun... 00:09, 3 April 2025 (UTC)[reply]
For infrequent changes yeah it's not very useful, however for when I was actively developing this it was useful to be able download the code and use a real editor (e.g. vscode) to make changes. So I personally don't particularly care about keeping it up-to-date these days. Galobtter (talk) 21:23, 12 September 2025 (UTC)[reply]
I think any multi-page (complex, big) gadget probably benefits from being in a GitHub repo. As long as the repo is in the wikimedia-gadgets organization so that there's lots of +2ers, has `npm start` and `npm run deploy` commands so that spinning up dev servers and deploying is easy, etc. Part of "easy deploying" (a critical part of DX (developer experience)) also means getting rid of beta versions and version numbers, which add steps to the deploy checklist. –Novem Linguae (talk) 21:30, 12 September 2025 (UTC)[reply]

Option to not use Wikidata Description

Hello! When using the script if showing Wikidata descriptions is enabled there is not a quick way to just make a new short description. I want to keep the Wikidata descriptions enabled because sometimes they are good, but I also want a way to take a page with a wikidata description and not a short description and just start fresh instead of clicking edit wikidata description and having to delete it all. Best wishes, Macaw*! 12:09, 31 October 2025 (UTC)[reply]

I click "Edit and import", Command-A (select all), backspace, and start typing. It takes almost zero effort. I recommend it. – Jonesey95 (talk) 15:47, 31 October 2025 (UTC)[reply]
Not sure if this is a Mac thing, but I can triple-click in the field to select everything; then backspace. MichaelMaggs (talk) 10:32, 10 November 2025 (UTC)[reply]

Never save changes to Wikidata

When I choose Save changes to Wikidata: Never and Add a button, "export",... What happened? Export button still works, I can still change the description on Wikidata. Henrydat (talk) 19:00, 8 November 2025 (UTC)[reply]

Error color

Could it be changed from DarkRed to usual var(--color-error, #bf3c2c)? Right now, it looks awful in the dark mode. — putnik 12:54, 17 November 2025 (UTC)[reply]

And the same question for .sdh-too-long's colors #d43900 and #e00000: probably they both can be just var(--color-error)/var(--color-desctructive), but with difference in boldness. — putnik 14:08, 18 November 2025 (UTC)[reply]

Potential error?

I have limited evidence that this gadget adds {{Short description}} to articles that already contain {{Short_description}}. See, for example, the edit histories of Samuel Jackson Holmes, Nose Creek, Delamarephorura capensis, and Carl Voegtlin --Lexiconaut (talk) 02:49, 17 January 2026 (UTC)[reply]

It looks like Samuel Jackson Holmes and the other articles had {{Short_description}} present (note the underscore). It may be that the gadget, like other tools referred to in the template's documentation, may not be able to detect the template when it uses the underscore. If the gadget can't be fixed, we should probably have a bot that replaces these and other redirects and aliases. I'm seeing one TFD in which GhostInTheMachine appeared to say that they were running such a bot or using a script to find them. Maybe they could add the underscore version to their script. – Jonesey95 (talk) 06:22, 17 January 2026 (UTC)[reply]
Also Template:Short d, a new redirect. – Jonesey95 (talk) 06:26, 17 January 2026 (UTC)[reply]
That should be deleted per the notice at Template:Short description. Gonnym (talk) 11:02, 17 January 2026 (UTC)[reply]
I have fixed the dozen or so uses of {{short d}}. We have a clear instruction to not use the redirects of the short description template. Their use causes all sorts of problems, not just with the helper, but also indirectly with many infobox templates. I tried to get the aliases deleted a while back, but was only partially successful. I don't have a bot to fix these redirects, just me. I fix a few most days. My daily "hunt for evil things" script simply looks for articles that use specific templates or turn up in specific error categories. I may need to add this new one to the list, however, the best option is to delete it (and all of the others) — GhostInTheMachine talk to me 14:37, 17 January 2026 (UTC)[reply]
Thanks for doing this valuable maintenance. Are you willing to add the underscore version (89 instances found with the search above) to your list? – Jonesey95 (talk) 15:16, 17 January 2026 (UTC)[reply]
Will do on Tuesday – not near my real computer ATM. I have started on a basic clean-up from here — GhostInTheMachine talk to me 15:36, 17 January 2026 (UTC)[reply]
Wonderful. Thanks! – Jonesey95 (talk) 15:57, 17 January 2026 (UTC)[reply]
Green tickY clean-up all done — GhostInTheMachine talk to me 22:15, 19 January 2026 (UTC)[reply]

I ran JWB to replace {{Short_description}} with {{Short description}} on a few hundred (<500) articles. (that's how I found the 4 articles referenced in my original post.) --Lexiconaut (talk) 23:44, 17 January 2026 (UTC)[reply]

Fixing the code

If anyone knows how to submit a code change request, I think that the code at line 164 of https://github.com/wikimedia-gadgets/shortdesc-helper/blob/master/Shortdesc-helper.js needs to be changed to

var PATTERN = /\{\{\s*[Ss]hort[ _]description\s*\|(.*?)\}\}/;

to fix this minor issue. I created a pull request, but I don't really know what I'm doing on github. – Jonesey95 (talk) 15:57, 17 January 2026 (UTC)[reply]

We have templates that also search for the string (eg {{Has short description}}). I promise to keep fixing the underscore versions forever... — GhostInTheMachine talk to me 16:14, 17 January 2026 (UTC)[reply]
We almost had .shortDescription from the title object via T216356. Gonnym (talk) 19:19, 17 January 2026 (UTC)[reply]
cc @Galobtter to take a look at the pull request.
Although GitHub is out of sync with the repo again. We should probably get stricter about requiring all changes to this script to go through GitHub, instead of {{IAER}}s.
Longer term, if Galobtter is willing to share maintainership with others such as myself, we might want to 1) get this added to https://gadget-deploy.toolforge.org/ for easy two click deploys, 2) start using squash and merge instead of regular merge so the master branch commit history is less messy, 3) get rid of version numbers which is extra work when deploying, 4) add a node script that can run the master branch in git in a localhost easily, for loading and testing patches, and 5) document all this in a README.md with more info than the current readme. –Novem Linguae (talk) 03:42, 18 January 2026 (UTC)[reply]
Sure that all sounds fine to me. As I made the repo part of wikimedia-gadgets already do you have permissions to do all of that? Let me know if you need anything from my side (personally I don’t have a strong opinion about keeping the repo up to date - but feel free to align this gadget with how other gadgets are deployed and maintained). Galobtter (talk) 22:04, 18 January 2026 (UTC)[reply]
Thanks for the quick reply. Yes, I do have enough access to do the above mentioned things (although I am pretty busy for the next two months). The other option (worth considering) would be to get rid of the repo and switch to onwiki {{IAER}}s. This gadget does look simple enough for that if we decide to go in that direction. –Novem Linguae (talk) 21:53, 19 January 2026 (UTC)[reply]