Auto-Capitalizing all Wikidata imports?

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]

Lowercasing Wikidata exports

On a related note, would it be feasible to lowercase any short descriptions on Wikidata that are exported from Wikipedia? Whenever I export a short description from Wikipedia, it remains capitalized on Wikidata as well. This is contrary to Wikidata guidelines, which state that the first letter of Wikidata descriptions should generally be lowercased except for proper names. – Epicgenius (talk) 17:16, 13 January 2025 (UTC)[reply]

See the discussion below, and many topics in this page's archive (do a find on the page for "export"). There is not an easy way to do this, since SDs like "English footballer" (there a LOT of those) and "Greek astronomer" should not be lower-cased on export. If I were on Wikidata dealing with this problem, I would have developed a query with a whitelist of valid capitalized words to ignore. Maybe the Wikidata folks who have been tidying up our export errors for a few years could share that whitelist, and we can use it in this gadget. Eihel, who on Wikidata could supply us with information about the tools editors there use to find invalid upper-case first characters while ignoring false positives? – Jonesey95 (talk) 19:56, 24 February 2025 (UTC)[reply]

Obscure template-in-shortdesc bug

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]
I think I can use a regex like \{\{\s*[Ss]hort description\s*\|((?:[^{}]|\{\{[^{}]*}\})*)\}\} to fix this to allow for one level of nested templates. Thanks for reporting. Galobtter (talk) 18:29, 8 January 2025 (UTC)[reply]
In practice, a SD with an embedded template is itself an error and there are several reports to detect and report any evil SDs so we can repair them. If the helper detects a template, it should complain (maybe highlight the template part or just display the raw wiki code) and refuse to save the SD until the template is cleared — GhostInTheMachine talk to me 20:20, 8 January 2025 (UTC)[reply]
Agree. Lets not help users automate new errors. Gonnym (talk) 12:14, 12 January 2025 (UTC)[reply]
Sounds good, if this is considered an error, then I don't think anything needs to be changed, other than maybe adding a detection mechanism. Galobtter (talk) 22:49, 12 January 2025 (UTC)[reply]

Suitable for mobile devices

I can use it with a mobile device? MPian (talk) 01:05, 28 January 2025 (UTC)[reply]

On my mobile, it works fine. Windharp (talk) 07:14, 4 February 2025 (UTC)[reply]
Thanks. 𝐌P𝛂n 𓃠 {✝alk} 08:50, 5 February 2025 (UTC)[reply]

Output of SD of "none" may be changing

Please see this discussion about a possible change to the output of the SD template when the SD is set to "none". It appears to affect the output of this gadget. – Jonesey95 (talk) 18:02, 29 January 2025 (UTC)[reply]

Cosmetic edit

It seems that it's still possible to save an edit even if the "save" button is grayed out, by pressing the ↵ Enter key, if {{short description}} is lowercase. This happened to me here, where the short description template was changed from lowercase to uppercase. I'm not too concerned about this, but someone else may see this as a WP:COSMETIC edit, so would it be possible to prevent editors from pressing ↵ Enter to save the short description if the "save" button is grayed out? – Epicgenius (talk) 20:13, 22 February 2025 (UTC)[reply]

I don't see "Shortdesc Helper" on Gadgets.

I clicked Gadgets and went to "Editing" section, but there's no "Shortdesc Helper". Camilasdandelions (talk!) 17:22, 23 February 2025 (UTC)[reply]

@Camilasdandelions: At Preferences → Appearance, what is your skin setting? Shortdesc helper is only enabled for certain skins. --Redrose64 🌹 (talk) 18:51, 23 February 2025 (UTC)[reply]
My skin is vector 2022 Camilasdandelions (talk!) 02:21, 24 February 2025 (UTC)[reply]
I have Vector 2022 enabled, and I see "Shortdesc helper: easily add and edit page short descriptions" in the "Gadgets" → "Editing" section. – Jonesey95 (talk) 04:38, 24 February 2025 (UTC)[reply]
No, I only see this, I don't know what's the problem of mine:
  • Add two new dropdown boxes below the edit summary box with some useful default summaries
  • Citation expander: automatically expand and format citations using Citation bot
  • (S) Syntax highlighter: Alternative to the default coloring of wiki syntax in the edit box (works best in Firefox and works almost all of the time in Chrome and Opera)
  • (S) HotCat: easily add, remove, and change categories on a page, with name suggestions (example)
  • (U) wikEdDiff: improved diff view between article versions (not needed if wikEd is used)
  • (S) ProveIt is a tool that adds a graphical user interface to find, edit, add and cite references (demo)
  • ProveIt (classic version) is a tool that adds a graphical user interface to find, edit, add and cite references (demo). This is the classic, original version of the gadget.
  • (U) wikEd: alternative full-featured integrated text editor for Firefox, Safari, and Google Chrome (documentation)
  • AFC Helper Script: easily review Articles for creation submissions (drafts)
  • (D) CharInsert: add a toolbar under the edit window for quickly inserting wiki markup and special characters (troubles?)
  • Enable the legacy (2006) editing toolbar. This will be overridden by the "Enable the editing toolbar" option in the Editing tab.
  • (D) Add extra buttons to the legacy (2006) editing toolbar
  • (D) refToolbar: add a "cite" button to the editing toolbar for quick addition of commonly used citation templates
Camilasdandelions (talk!) 12:02, 24 February 2025 (UTC)[reply]
@Camilasdandelions: Try this. At Preferences → Appearance, select "MinervaNeue", and save. Then again at Preferences → Appearance, select "Vector (2022)" and save. Now check Preferences → Gadgets again. --Redrose64 🌹 (talk) 21:14, 24 February 2025 (UTC)[reply]
I did all, but it is still same. :( My condition is mobile web, should I join Wikipedia on my PC? Camilasdandelions (talk!) 11:00, 25 February 2025 (UTC)[reply]

Wikidata descriptions

Hello @Gonnym, GhostInTheMachine, and Jonesey95:,

If you have any misunderstanding about what I added on the page, you can talk to me here. The lines I added on this page are useful, because many mistakes are made on WD from this tool, even today.

It is better to be aware of the rules of Wikidata, because the replacement text or summaries you made are wrong:

  • The tool imports and exports.
  • WP short descriptions do not have the same rules as WD descriptions.
  • WP has no editorial rights on WD which is an independent project.

Regards. —Eihel (talk) 13:00, 24 February 2025 (UTC)[reply]

You somehow confuse "misunderstanding" with "don't agree with you". Gonnym (talk) 13:01, 24 February 2025 (UTC)[reply]
Eihel, you removed ", which are mostly the same as Wikipedia's". Why? I read the guidelines on Wikidata, and they are almost the same as ours. IIRC, we adapted ours from theirs, since theirs were pretty well developed. – Jonesey95 (talk) 15:01, 24 February 2025 (UTC)[reply]
Hello too, @Gonnym:, If you undo my edit while adding an off-topic summary of my edit, we will not move forward in this matter. Or maybe you wanted to make me understand something else. It would be easier to write to me on which point "you do not agree with me", no? If it is about the style (bold), I could do without it. I remind you again that my edit concerns the export from WP, and not the import on WP, because this tool allows you to modify WD. In this case, the rules of WD are not respected. I gave you a very concrete case on your WD discussion page. Best regards. —Eihel (talk) 15:11, 24 February 2025 (UTC)[reply]
Hi too, @Jonesey95:. Do you think these are the same rules? You write that you read the rules about descriptions on WD. Why do I have to send you this too? Now, can we agree on what I put, please? Kind regards. —Eihel (talk) 15:25, 24 February 2025 (UTC)[reply]
If what has you so worked up is the minor issue of an upper-case first letter in the SD exported to Wikidata in this edit by me and this edit by Gonnym, the gadget is not supposed to do that. I recommend that you file a bug against the gadget (including a whitelist of words like "English" that should not be lower-cased) and use some combination of tracking categories, queries, AWB, and bots on Wikidata to make quick work of the errant casing. Here on Wikipedia, we use Category:Pages with lower-case short description to track and fix similar errors; you could probably do something like that on Wikidata.
Aside from the lower-case first letter, I don't see much difference in the Wikidata description guidelines from the ones that we have here. If people are disregarding substantive Wikidata guidelines about descriptions that are different from those we have here, please let us know what you have observed, preferably with diffs. – Jonesey95 (talk) 19:43, 24 February 2025 (UTC)[reply]
Just a quick follow-up: I stumbled across this capitalized Wikidata description that was added in 2019 (not via this helper gadget, apparently) and not fixed until today. A database report would serve Wikidata well and would allow for quick fixing of these errors. – Jonesey95 (talk) 15:38, 27 February 2025 (UTC)[reply]

This gadget needs adaptation to dark mode

Hello, MediaWiki:Gadget-Shortdesc-helper.css should be updated to use colors with sufficient contrast in dark mode. Thanks, Escargot bleu (talk) 14:28, 5 March 2025 (UTC)[reply]

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]

Protected edit request on 24 March 2025

Please add "copy" attribute to line 22 and 26. Nemoralis (talk) 22:56, 24 March 2025 (UTC)[reply]

Done. * Pppery * it has begun... 00:46, 25 March 2025 (UTC)[reply]
No tags for this post.