Jump to content

Wikipedia talk:Shortdesc helper

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Gadget is breaking message box display on deleted pages

[edit]

I filed a ticket. Please review at your convenience. Thank you. –Novem Linguae (talk) 03:00, 14 July 2023 (UTC)[reply]

Bump. This bug is still happening for me. –Novem Linguae (talk) 23:31, 11 April 2024 (UTC)[reply]
Noting that I just came here to report this issue as well. ‍—‍a smart kitten[meow] 11:12, 5 May 2024 (UTC)[reply]

Feature request: option to append birth/death year

[edit]

Eg. (born 1975) or (1975–2023) which is missing from a lot of biographical articles. Would make life easier. Samuel Wiki (talk) 15:33, 30 July 2024 (UTC)[reply]

Why not just type it? MichaelMaggs (talk) 15:55, 30 July 2024 (UTC)[reply]
Keyboards don't have en dashes, and there is no bot that fixes en dashes in short descriptions.
PS. if somebody wants to create a bot that changes hyphens to en dashes in short descriptions, here's a quick regex pattern I cooked up in a few minutes:
{{[Ss]hort description\|[^\(]*\([0-9]{4}-[0-9]{4}\)}}
-1ctinus📝🗨 16:07, 30 July 2024 (UTC)[reply]
Why type it when you could just click a button? Samuel Wiki (talk) 16:26, 30 July 2024 (UTC)[reply]
Here's a tip: it may be more helpful to open a GitHub issue request than talking about it here in order to get the devs attention. -1ctinus📝🗨 16:27, 30 July 2024 (UTC)[reply]
On Mac OS, type option-hyphen to get an en dash. Pretty easy. I expect that there is a similar shortcut for other operating systems. – Jonesey95 (talk) 16:34, 30 July 2024 (UTC)[reply]
Windows sucks, so there is no quick short cut to write an en dash that's easy to remember :) -1ctinus📝🗨 16:38, 30 July 2024 (UTC)[reply]
You said it, not me. – Jonesey95 (talk) 18:03, 30 July 2024 (UTC)[reply]
@1ctinus: Yes there is: – emits – and see also Wikipedia:How to make dashes. --Redrose64 🌹 (talk) 05:37, 31 July 2024 (UTC)[reply]
I remembered that I actually did make a script to do exactly what you are describing: I don't remember it actually working that well, though. It is only tested for the timeless.js skin:
document.body.addEventListener("keyup", (e) => {
  if (e.key === "ScrollLock") {
let born = "";
let died = "";
let ret = "(–)";
try { 
born = Array.from(document.querySelectorAll('tr'))
      .find(el => el.innerText.includes("Born")).innerHTML.match(/[0-9][0-9][0-9][0-9]/)[0]} finally {}
try {
died = Array.from(document.querySelectorAll('tr'))
      .find(el => el.innerText.includes("Died")).innerHTML.match(/[0-9][0-9][0-9][0-9]/)[0]} finally {}
if(born !== "" && died !== ""){
    ret = "(" + born + "–" + died + ")";
} else if(born !== ""){
    ret = "(born "+ born +")";
} else if(died !== ""){
    ret = "(died " + died + ")";
}
    document.getElementById("sdh-descriptionbox").firstChild.value += ret;
  }
});
-1ctinus📝🗨 16:37, 30 July 2024 (UTC)[reply]
Samuel Wiki, could you explain exactly what you're suggesting? If you want a button that automatically extracts dates from the article, that would be hopelessly unreliable given the variability in the way dates appear in the text and/or infoboxes. It would definitely have to exclude living people per WP:SDDATES to avoid copying into the SD an unsourced birth date (surprisingly common). And it would encourage unthinking additions of dates for all articles, regardless of WP:SDDATES and WP:SDSHORT. Writing a SD requires an editor to think, just like the addition of any other content. I'd be against it. If you're concerned about layout, the SD Helper already corrects dashes automatically. I've just changed the SD on Pierre Desvignes by adding "(1764-1827)", which the helper automatically changed to "(1764–1827)". MichaelMaggs (talk) 17:11, 30 July 2024 (UTC)[reply]
Yes, a button that pulls in the years from categories, Wikidata or the body (up to the dev). It could preview the change in the text box. Just like how it is now, it is up to editors to ensure the info is sourced. I'm not asking for this to be done in bulk by a bot, just a button to make it faster for editors to do what they already do. Samuel Wiki (talk) 17:57, 30 July 2024 (UTC)[reply]

Auto-Capitalizing all Wikidata imports?

[edit]

I used to think, "edit and import" is the standard option to take, given that the WD imports are all in lower case. Only now did I fully understand that capitalization occurs the instant you click "import". How about we have these suggested descriptions automatically capitalized to make the tool a bit less confusing? Biohistorian15 (talk) 18:24, 7 September 2024 (UTC)[reply]

The description that you describe as "suggested" is the actual Wikidata description, which is shown as it exists on Wikidata. Wikidata descriptions typically start with a lower-case letter. It would be inaccurate to capitalize that description when it is displayed here. That is why this page says If there is no local short description but there is a Wikidata description, the gadget will instead show that in pink, with an option to import it to Wikipedia (capitalising the first letter).Jonesey95 (talk) 22:21, 7 September 2024 (UTC)[reply]
Yes, sure. But the WP short descriptions are supposed to be capitalized, aren't they? In that case, I am merely proposing that the WD import option has them already (locally) shown as such. Biohistorian15 (talk) 08:08, 8 September 2024 (UTC)[reply]
Yes to your question. In re your proposal, please re-read my answer above. – Jonesey95 (talk) 21:02, 8 September 2024 (UTC)[reply]

Where do I find the tool?

[edit]

I need to find a button to the tool, where is it?? Susbush (talk) 08:50, 3 October 2024 (UTC)[reply]

@Susbush. Try Special:Preferences, then click on Gadgets, then look for Shortdesc Helper. Tick the box for it. Click save. –Novem Linguae (talk) 09:30, 3 October 2024 (UTC)[reply]
Thx Susbush (talk) 09:47, 3 October 2024 (UTC)[reply]

Obscure template-in-shortdesc bug

[edit]

Reporting a bug from this shortdesc-helped edit, where a backslash template in the shortdesc being replaced with a simple forward slash resulted in text being moved outside of the shortdesc template:

{{short description|British comedian, actress (born 1990{{\}}1991)}}
+
{{Short description|British comedian, actress (born 1990/1991)}}1991)}}

Belbury (talk) 08:36, 18 October 2024 (UTC)[reply]

@Belbury: As with any other bot- or script-assisted edit, it's up to the user who activated the script or bot (in this case GhostInTheMachine (talk · contribs)) to verify that the edit is valid, before committing it to save. If a mistake is made by the edit, it is their responsibility to fix it. --Redrose64 🌹 (talk) 15:53, 18 October 2024 (UTC)[reply]
I was able to reproduce this error. Put the first SD into your sandbox and save it, then use the tool to edit it. I saw "British comedian, actress (born 1990 / 1991)" in the edit box. I selected the slash and the spaces on either side, then typed a slash. The edit window showed "British comedian, actress (born 1990/1991)". When I clicked Save, two stray braces were still left in the text of the SD, causing an erroneous display.
The tool might be improved by exposing the actual text of the SD, which included the braces, instead of showing the parsed version but somehow saving a version with some stray braces still in it. – Jonesey95 (talk) 16:04, 18 October 2024 (UTC)[reply]
The shortdesc helper doesn't include a "before committing" verification step, it's just a Save button. I should have tried to replicate this to make sure that it wasn't user error, though, thanks to Jonesey95 for doing that. Belbury (talk) 16:30, 18 October 2024 (UTC)[reply]
The SD Helper sees the }} inside the Short description and treats this first pair of brackets as the end of the template. So it takes {{short description|British comedian, actress (born 1990{{\}} as the SD to be edited, leaving the final 1991)}} untouched. Yes it would help if the SD Helper allowed for nested templates. {{circa}} and {{ndash}} are the most common ones. I catch most of them, just not this one GhostInTheMachine talk to me 16:40, 18 October 2024 (UTC)[reply]