Help talk:Gadget-ACDC

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search


Let me know if you would be okay for this to be made a gadget :)

Jean-Fred (talk) 08:18, 8 August 2019 (UTC)Reply[reply]

@Jean-Frédéric: well, I assume as a gadget this would definitely have to support some older browsers… --Lucas Werkmeister (talk) 19:44, 8 August 2019 (UTC)Reply[reply]
@Jean-Frédéric: the script should now support any modern browser supported by MediaWiki (though it would be nice to have some more people test this), so I guess it’s one step closer to becoming a gadget? :) --Lucas Werkmeister (talk) 22:20, 24 August 2019 (UTC)Reply[reply]

@Lucas Werkmeister: ✓ Now a gadget :-) Jean-Fred (talk) 17:11, 11 September 2019 (UTC)Reply[reply]

@Jean-Frédéric: wow, thanks a lot! (But how do I edit it now when necessary? Post an edit request on this talk page, I guess?) --Lucas Werkmeister (talk) 20:33, 11 September 2019 (UTC)Reply[reply]
Ah, yeah, that’s a good point. Yes, please use {{Edit request}} on the talk page and ping me. (Alternatively, get interface admin rights ? ;-) ) Jean-Fred (talk) 21:03, 11 September 2019 (UTC)Reply[reply]
I’m not sure how serious you were, but I figure it doesn’t hurt to ask 🙃 --Lucas Werkmeister (talk) 21:29, 12 September 2019 (UTC)Reply[reply]


Thanks for this tool! Just gave it a try.

The selection of pictures
  • Selecting visually (like Cat-A-lot does) would be handy
  • Selecting by name was smoother than I expected thanks to autocompletion, and thanks to the tool not suggesting already selected images: I could keep pasting Raph Koster - Game Developers Conference Online 2012 - until I got all 11 pictures
  • The script froze when adding a Depicts to 11 files. The JS Console gives:

TypeError: statementWidget.getData(...).toArray(...).flatMap is not a function[Learn More] index.php:393:60

Jean-Fred (talk) 08:32, 8 August 2019 (UTC)Reply[reply]

@Jean-Frédéric: Thanks! Which browser (version) are you using? The flatMap issue alone can be worked around with a few lines of code, but I’m not sure if everything else would still work then. (On the other hand, if you got that far, then I think your browser must support most of the other modern features I’m using.) Also, I definitely should improve error handling so it doesn’t look like the script froze. --Lucas Werkmeister (talk) 17:19, 8 August 2019 (UTC)Reply[reply]
@Lucas Werkmeister: Firefox 61.0.1 (64-bit) for Ubuntu (yeah, I know, it’s out of support ^__^") Jean-Fred (talk) 17:35, 8 August 2019 (UTC)Reply[reply]
@Jean-Frédéric: ah, those dang Linux distros keeping old Firefox versions alive ^^ I’ve improved the error handling a bit, and flatMap should work now :) --Lucas Werkmeister (talk) 19:43, 8 August 2019 (UTC)Reply[reply]

Visual file selection[edit]

+1 to needing a visual file change component -- also because I can't see the files, I have to "know" which file I am going after. Sadads (talk) 15:45, 9 August 2019 (UTC)Reply[reply]

@Christian Ferrer, Sadads, and Jean-Frédéric: Building a powerful visual file selector might take a lot of time, though, and it’s essentially duplicate effort with VisualFileChange, Cat-a-lot and possibly other gadgets already existing. I think it would be much better if those tools had the option to export the current selection, and then you could import it into AC/DC (or other tools, too). That could be as simple as copying the list of files to the user’s clipboard, but even more useful would probably be PagePile integration. Would that work for you? (On the AC/DC side I’d probably have to add a warning for piles of more than, dunno, 100 files.) --Lucas Werkmeister (talk) 14:48, 11 August 2019 (UTC)Reply[reply]
Yes, it would be fine to be abble to copy a selected list of files. Christian Ferrer (talk) 17:13, 11 August 2019 (UTC)Reply[reply]
Pagepile integration would be fine if we could get it in and out of the other tools or there was a one click url into AC/DC (i.e. AC/DC could grab a pile from a url variable) . Worth reaching out to the maintainers for pagepile production? Sadads (talk) 00:44, 12 August 2019 (UTC)Reply[reply]
Yes, why not. Christian Ferrer (talk) 11:20, 12 August 2019 (UTC)Reply[reply]
@Perhelion and Zhuyifei1999: Would love your thoughts on this? Anyone else we should ask? Sadads (talk) 19:55, 12 August 2019 (UTC)Reply[reply]
Magnus Manske (who maintains pagepile)? --Zhuyifei1999 (talk) 14:52, 13 August 2019 (UTC)Reply[reply]
It turns out PagePile needs some changes before I can even start to use it from a user script. I’ve sent a pull request. (Once that’s done, yes, it should be possible to make AC/DC read the ID from the URL.) --Lucas Werkmeister (talk) 20:19, 14 August 2019 (UTC)Reply[reply]
@Christian Ferrer, Sadads, and Jean-Frédéric: PagePile integration is now live! You can click the ellipsis icon in the files input to load a PagePile, and soon there will also be a link to AC/DC in the PagePile tool (though it will only work for people who have installed the user script, at least until we make it a gadget). --Lucas Werkmeister (talk) 19:52, 24 August 2019 (UTC)Reply[reply]
Great, thanks you. I just tried with a page pile created with PetScan, and that's worked. I notice that File:Mihyla palmipes 120607-0085 krw.jpg have been ignored, because BotMultichill already did it, that leaded me to notice that the tool don't push to "Preferred rank" an existing "Normal rank" value. But anyway that's already very great, thanks again. Christian Ferrer (talk) 13:21, 25 August 2019 (UTC)Reply[reply]
@Christian Ferrer: hm, interesting – I think I can make AC/DC bump normal-rank statements to preferred ones, but I take it the inverse shouldn’t happen – if the statement already exists with preferred rank, and you specify normal rank in AC/DC, it shouldn’t be demoted? --Lucas Werkmeister (talk) 12:38, 27 August 2019 (UTC)Reply[reply]
Good question.. theoretically I would say no, because if the statements are already at preferred rank it is because there is surely a good reason for this. In another hand the tool will be more powerful if we have the possibility to demote statements (for maintenance purposes, or to fix a few mistakes). So finally the two possibilities are worth. The only thing I am afraid is that someone comes to put a statement on all the files of a category (via a pagepile), without checking what have been done, and so then overriding the potentially justified preferred rank(s) with less relevant normal rank(s). It would be perfect if we could have the choice, a kind of option "do you want to override the existing preferred/normal ranks?". Possible? Christian Ferrer (talk) 17:23, 27 August 2019 (UTC)Reply[reply]
I would add that what would be perfect would be a seeting by default with no overinding of the existing rank(s), and with a possibility to easily set the tool, in the dialog box, for that it overides the existing ranks. Christian Ferrer (talk) 10:34, 28 August 2019 (UTC)Reply[reply]
@Christian Ferrer: bumping statements to preferred rank is now supported – I’m not yet convinced the inverse operation would be very useful, and I don’t want to clutter the UI too much, so for now I’m leaving that out / waiting for another tool to offer it. --Lucas Werkmeister (talk) 12:40, 1 September 2019 (UTC)Reply[reply]
Ok, very fine, thanks you. Christian Ferrer (talk) 14:29, 1 September 2019 (UTC)Reply[reply]
@Perhelion and Zhuyifei1999: Is there an opportunity to create pagepile outputs for your tools? Sadads (talk) 12:21, 27 August 2019 (UTC)Reply[reply]
Which tool are you referring to? I don't really 'own' a user script / gadget here ;) --Zhuyifei1999 (talk) 22:55, 27 August 2019 (UTC)Reply[reply]
Aren't you maintaining/contributing to Cat-a-lot or Visual File Change? The idea would be to make a set from one of those tools that could be sent to AC/DC, perhaps with a pagepile or similar, Sadads (talk) 15:17, 28 August 2019 (UTC) (reping coorectly: @Zhuyifei1999: Sadads (talk) 15:18, 28 August 2019 (UTC))Reply[reply]
As far as I understand, pagepile is a database of lists of pages right? So your idea is for the tools to export their page lists to pagepile right?
The pagepile manual seems all about PHP-tools. Is there a public HTTP endpoint to create a pagepile? --Zhuyifei1999 (talk) 17:19, 28 August 2019 (UTC)Reply[reply]
@Zhuyifei1999: yes, essentially you POST to with action=create_pile_with_data, wiki=commonswiki (or other dbname), and data being the newline-separated list of pages. Each line of data contains the title and namespace number separated by a tab (Test.png 6), or the namespace number can be set to -999 to instead interpret the first field as the full title (File:Test.png -999). See the QuickCategories source code for a Python version of this. However, PagePile doesn’t (yet) send an Access-Control-Allow-Origin header for the create_pile_with_data response, so while you can create a PagePile from client-side JS, the browser won’t let you read the response and you won’t get the pile ID. --Lucas Werkmeister (talk) 19:37, 28 August 2019 (UTC)Reply[reply]
Hmm. I think I would wait for a CORS fix. --Zhuyifei1999 (talk) 21:48, 28 August 2019 (UTC)Reply[reply]
I have added Access-Control-Allow-Origin to the create_pile and create_pile_with_data actions. If it's abused by others I'll have to wait for CORS, but maybe try it now? --Magnus Manske (talk) 13:04, 3 September 2019 (UTC)Reply[reply]
@Zhuyifei1999: in case you missed it – creating PagePiles from user scripts should now be possible (though I haven’t tried it out myself). --Lucas Werkmeister (talk) 21:13, 16 September 2019 (UTC)Reply[reply]
I am badly lacking time. I'll see if I can do it this weekend --Zhuyifei1999 (talk) 04:26, 17 September 2019 (UTC)Reply[reply]
Can't. Maybe next weekend --Zhuyifei1999 (talk) 21:53, 22 September 2019 (UTC)Reply[reply]
@Zhuyifei1999: if it helps, I’ve put together a JavaScript function to create a PagePile: see User:Lucas Werkmeister/createPagePile. Feel free to copy that code into any tool/gadget you’re working on. --Lucas Werkmeister (talk) 14:04, 4 October 2019 (UTC)Reply[reply]
Thanks. I'll try my best to find some time for this --Zhuyifei1999 (talk) 21:04, 4 October 2019 (UTC)Reply[reply]
@Lucas Werkmeister: Sorry about the delay. I have much more time now. As far as I understand, the goal is to allow cat-a-lot and VFC to export its page list to pagepile right? Is importing a list from pagepile also wanted? (I can do this with VFC but I don't think it's doable for cat-a-lot) --Zhuyifei1999 (talk) 03:32, 19 December 2019 (UTC)Reply[reply]
@Zhuyifei1999: for the interaction with AC/DC, only export would be needed – I don’t know if import would also be useful to users, independently of that. --Lucas Werkmeister (talk) 11:58, 19 December 2019 (UTC)Reply[reply]
@Lucas Werkmeister: Where do you think the buttons for export should be located? --Zhuyifei1999 (talk) 18:30, 19 December 2019 (UTC)Reply[reply]
@Zhuyifei1999: I don’t know, I don’t use the gadgets myself :) perhaps Christian Ferrer, Sadads or Jean-Frédéric have ideas? --Lucas Werkmeister (talk) 21:16, 20 December 2019 (UTC)Reply[reply]
Hi, 2 or 3 things here: 1/ Though this is out of the topic ACDC, to be abble to import a pagepile into VFC is in fact not a bad idea, and that can be useful for maintenace tasks (e.g. to be abble to select files coming from a pagepile), including to use ACDC! 2/ in the VFC interface, if buttons we should have, then those buttons should be IMO at top, right next to the buttons "invert selection" and "Advanced Select Files". May I suggest "Import a pagepile", "Create a pagepile", and... if possible "Export selected files to ACDC". Christian Ferrer (talk) 21:37, 20 December 2019 (UTC)Reply[reply]
@Christian Ferrer: VFC already uses the 'What user or category is this action about' menu; wouldn't "Import a pagepile" be redundant? Or is this an advanced selection like 'select files that are intersection with a given pagepile'? "Create a pagepile"... also selected files right? So "Export selected files to pagepile". --Zhuyifei1999 (talk) 01:22, 21 December 2019 (UTC)Reply[reply]
I did not think about the 'What user or category is this action about' menu, then inside this menu an option "pagepile" would maybe be useful. As far I know VFC is quite limited to "What user or category...", but tools such as Petscan allows to create more complex selections, example this is a pagepile with 249 files created from the intersection of two categories, with the possibility to import (use) this page pile in VFC, then you will be abble to make an additional "visual selection" on this list.
Once VFC is open, it doesn't matter whether it's from classic ways ("What user or category..." or in a new way such with an existinf pagepile), you select files and a useful button for me would be "Export to ACDC", example right next to the button "Execute" or "cancel", or, to follow how VFC works, why not in the menu "action"... Try to speak about technical things in english is quite hard for me, and I hope you understood me quite well, otherwise sorry... Christian Ferrer (talk) 07:38, 21 December 2019 (UTC)Reply[reply]
It's fine. I'll try to fgure out the implementation today. --Zhuyifei1999 (talk) 21:24, 22 December 2019 (UTC)Reply[reply]
@Christian Ferrer: Do you think it would make sense to put the 'export to pagepile' as an action, and something like 'view pagepile' & 'start ACDC with this pagepile' in the end menu (the 'What would you like to do next?' one)? --Zhuyifei1999 (talk) 10:58, 23 December 2019 (UTC)Reply[reply]
@Zhuyifei1999: Yes, quite good. 'export to pagepile' in the menu "action" → → a pagepile is created and is open automatically → → in the 'pagepile' page in the menu "Use this pagepile in" an option "ACDC" should be available. Christian Ferrer (talk) 11:41, 23 December 2019 (UTC)Reply[reply]
@Sadads: Interesting, I'm with Zhuyifei1999. For Cat-a-lot (initial version by Magnus Manske ;-)) there has been such a (import) feature request in the past and I was on the way to fulfill it. @Export/PagePile (I also don't know): Unfortunately I've not many experience with this, so I would need concrete information how this format should look like. @VisualFileChange is certainly one of the most powerful tools for Commons and can be extended with many things (I guess Rillke finds this interesting too). -- User: Perhelion 22:51, 3 September 2019 (UTC)Reply[reply]
AC/DC will now automatically load the currently selected Cat-a-lot files (if Cat-a-lot is active). --Lucas Werkmeister (talk) 22:50, 9 February 2022 (UTC)Reply[reply]

Deduplication of statements?[edit]

So I started seriously playing around with the category to Depicts potential of AC/DC today, and was wondering if the tool makes sure that you don't add a duplicate of the exact same statement(+ qualifiers)? I am asking, because I could imagine starting a set with one or two manual "depicts" statements but finding hints of which categories that might contribute great information about particular statements, and doing that in batch. But when I run AC/DC it would be quite hard to go through and manually look for statements already there, especially in larger batches. There might be some complexity here, because you might, for example, have two bycicles: one red and facing left and one blue and facing right, but you want to add two separate depicts statements in batch. Sadads (talk) 16:06, 13 September 2019 (UTC)Reply[reply]

@Sadads: Currently, the gadget will not add duplicate statements – if there’s an existing statement with the same value, it will add any missing qualifiers to it, and optionally bump its rank from Normal to Preferred (but never vice versa). I guess in terms of “depicts”, that’s more useful for individual items (people, buildings, etc.) than for classes of items. (If you try to add two statements with the same value in the same AC/DC batch, you should actually see an error message about that.) --Lucas Werkmeister (talk) 13:06, 14 September 2019 (UTC)Reply[reply]
Thanks! That makes a lot of sense: how does it handle "different" qualifiers? I.e. there could be two bycicles, one red, one blue and it doesn't make a sense for the additional color to the first bicycle. Sadads (talk) 00:15, 17 September 2019 (UTC)Reply[reply]

Global off switch?[edit]

In the Monitoring section, I wrote that the gadget has no global “off” switch yet. I think I put that there thinking of some other bots/tools, but does this gadget need a global off switch? Because otherwise I might as well remove that sentence. (This is mainly a question for the admins, I suppose.) --Lucas Werkmeister (talk) 13:57, 20 September 2019 (UTC)Reply[reply]

Well, I’ve removed it now, since it doesn’t look like anyone’s asking for it at the moment. --Lucas Werkmeister (talk) 13:44, 4 October 2019 (UTC)Reply[reply]
I don’t think an off-switch is necessary either. :) Jean-Fred (talk) 13:53, 4 October 2019 (UTC)Reply[reply]


I don't see the gadget in my preferences. How is it exactly called? Juandev (talk) 19:58, 28 September 2019 (UTC)Reply[reply]

@Juandev: Per MediaWiki:Gadget-ACDC:
Add to Commons / Descriptive Claims (ACDC): Add a collection of structured data statements to a set of files. [documentation / talk] 
Jean-Fred (talk) 18:28, 29 September 2019 (UTC)Reply[reply]

I see thx. Juandev (talk) 16:46, 30 September 2019 (UTC)Reply[reply]

I’ve tried to clarify the installation instructions a bit. --Lucas Werkmeister (talk) 13:26, 4 October 2019 (UTC)Reply[reply]
I added the “ACDC” keyword in the listing too. Jean-Fred (talk) 13:52, 4 October 2019 (UTC)Reply[reply]


I have created a page pile and the tools show an error message, that the PP doesn't exist.

BTW, would it be possible to add the functionality of manual selection, as Cat-a-lot does? That would be useful if the person has the user/project category or gallery, sees images with a similar feature and can select them to mass populate structured data statements. Juandev (talk) 16:46, 30 September 2019 (UTC) Red the above. Juandev (talk) 16:52, 30 September 2019 (UTC)Reply[reply]

@Juandev: which pile was it? --Lucas Werkmeister (talk) 13:28, 4 October 2019 (UTC)Reply[reply]

I don't remember. I had generated it via PetScan, it didnt work. I waited for some time and then tried again. It was not working again, so I closed it. Juandev (talk) 21:19, 6 October 2019 (UTC)Reply[reply]

Automatic go back[edit]

Hello, I sometimes use the tools with pagepiles of more than one hundred of files. The list is displayed in the tool window/box with a vertical scroll bar. Issue: when we want to add a statement we need to go at bottom of thta window, when adding this statement the position automatically returns to the top of the window, we go again at bottom to add a value for the statement, and once it's done the position automatically returns to the top of the window. That is the same thing for each statements and/or each values.

It's a little annoying even if, of course, we can do with.

Proposed solution, a frame with a vertical scroll bar (when needed) to show the list of selectioned files, this frame being included in the tool window. Though I've no idea how to do such a thing. Christian Ferrer (talk) 19:37, 6 October 2019 (UTC)Reply[reply]

Another option could be to put the list of populating items below the statements: the item population sometimes takes forever, and if the updates didn't lock the screen back at the beginning, you could use that time to model the statements you want to add. Sadads (talk) 13:39, 7 October 2019 (UTC)Reply[reply]
@Christian Ferrer and Sadads: my current recommendation is to add the statements first and then load the files, so it doesn’t matter so much if they make editing the statements annoying ^^
I also thought about a vertical scrollbar on the files list so its height is limited, but I tried it out just now and wasn’t very happy with how that affected the indicator (*) and icon (…). (Though both look rather silly as the widget gets higher, anyways, and arguably the indicator isn’t very necessary and the icon for the menu should move elsewhere, so perhaps this’ll be a viable option in the future.)
I would be surprised if you could do much useful browser interaction while the gadget is busy filling the files list, regardless of where on the page that happens, to be honest. --Lucas Werkmeister (talk) 16:58, 1 November 2019 (UTC)Reply[reply]
Thanks for the tip, I tried starting by adding the statements first, and that suits me. Christian Ferrer (talk) 16:26, 2 November 2019 (UTC)Reply[reply]
@Lucas Werkmeister: That is the behavior I fall back on, but that is counter-intuitive in the interface (first step should be at the top). Sadads (talk) 17:33, 30 December 2019 (UTC)Reply[reply]

Translations possible[edit]

First: great tool! In the tool there are some lines of text that are manually added. Can this be made translatable? Romaine (talk) 20:37, 7 October 2019 (UTC)Reply[reply]

@Romaine: I’m open to it, but apparently there’s no standard way to do it :/ do you perhaps know if there’s at least an overview of the different options somewhere? --Lucas Werkmeister (talk) 21:53, 1 November 2019 (UTC)Reply[reply] --Juandev (talk) 11:40, 13 December 2019 (UTC)Reply[reply]

Bug on Android tablet and mobile[edit]

When I click on properties in Android, Chrome (both mobile and tablet) -- they try to open a new window/tab for the Wikidata item rather than selecting them for the data modeling. Do you think we could change the behaviour on the clicks a bit to make it flexible for us in those environments? (Would love to be able to model categories on my tablet). Sadads (talk) 19:13, 18 October 2019 (UTC)Reply[reply]

@Sadads: hm, does the same thing happen when editing structured data on file pages without AC/DC? --Lucas Werkmeister (talk) 19:03, 31 October 2019 (UTC)Reply[reply]
@Lucas Werkmeister: It appears that that is the case :/ We should probably find a bug somewhere else on phabricator. I will look, Sadads (talk) 19:18, 31 October 2019 (UTC)Reply[reply]
Created a task.Sadads (talk) 19:38, 31 October 2019 (UTC)Reply[reply]

Removing statements[edit]

So I have run into a couple situations where using Quickstatements, I didn't notice a category or set of files that I have that I want to remove a statement from (case in Point). Having a "remove these statements" toggle, would be awesome -- in that for most of these, I know exactly the formula for what is wrong for that category. Currently, Quickstatements isn't supporting the remove function either. Sadads (talk) 15:00, 15 November 2019 (UTC)Reply[reply]

@Lucas Werkmeister: Hey Lucas, just wanted to see if you caught this. Sadads (talk) 18:57, 3 December 2019 (UTC)Reply[reply]
@Sadads: I’ve seen it now, but I’m not sure how to fit this feature into the user interface.
The most straightforward approach would be to add another section of “statements to remove” below the current “statements to add”. (This would also let users add and remove statements at the same time, though I’m not sure how useful this would be.) But I feel like this makes the “remove” feature too promiment, and also takes away a lot of vertical screen space even when it’s not being used.
Some kind of toggle, as you mention, might be better, but I don’t know where to put it in the gadget, nor what it would be labeled (I guess it would have to change the “statements to add” heading to “statements to remove”). --Lucas Werkmeister (talk) 12:23, 19 December 2019 (UTC)Reply[reply]
Also, what would be the meaning of “remove” on a statement with qualifiers? Remove whole statement only if it has these qualifiers? Or remove only these qualifiers on statements with the same main value? --Lucas Werkmeister (talk) 12:33, 19 December 2019 (UTC)Reply[reply]
@Lucas Werkmeister: Sorry for the slow response. I have been on holiday. I think the first step would be whole statements, but eventually it would be nice to have just the qualifier -- i.e. I want to remove x qualifier from y statement This is a multistep thing I think from MVP to full feature. Sadads (talk) 17:45, 30 December 2019 (UTC)Reply[reply]
@Lucas Werkmeister: Its been a while, but I keep running into this problem: where I would like to remove a very specific set of stuff based on a search, etc. Sadads (talk) 00:58, 24 March 2020 (UTC)Reply[reply]
Update: this is now available; I still couldn’t figure out a good UI, so for now you have to add window.acdcEnableRemoveFeature = true; to your common.js to opt into it. --Lucas Werkmeister (talk) 19:48, 7 April 2020 (UTC)Reply[reply]

"+ Add depicts "[edit]

Currently there is just a "+ Add statement" button, but most of the time one would probably want to add depicts (P180). To save a step, maybe this could be there too. Jura1 (talk) 05:31, 13 December 2019 (UTC)Reply[reply]

✓ Done as part of the new “favorite properties” feature (defaults to depicts (P180)) --Lucas Werkmeister (talk) 23:26, 16 July 2020 (UTC)Reply[reply]

Translations available[edit]

The gadget now supports translating the messages in its user interface! It loads messages from MediaWiki:Gadget-ACDC-i18n.json – translations can be defined there. (The qqq pseudo-language code contains the message documentations.)

@Nikerabbit, Siebrand, and Amire80: it would be great to get this into – is it possible to have it export translations to an on-wiki JSON message page? --Lucas Werkmeister (talk) 10:12, 31 December 2019 (UTC)Reply[reply]

You can have a look how ProveIt gadgets does it, e.g. [1]. We cannot export to wiki pages, but we can export to a git repository (with definitions maintained there) where it should be easy for you to set up direct loading or synching with a bot. --Nikerabbit (talk) 07:21, 7 January 2020 (UTC)Reply[reply]

Watchlist issues[edit]

Hi A.Savin! I’m sorry you’ve had issues with AC/DC. I agree that the watchlist bug you encountered is annoying, but I don’t think it justifies incorrect documentation – and while I’m not sure how common the issue is, as far as I’m aware it’s not true that every AC/DC edit adds a page to your watchlist, as your edit suggests: the bug should only take effect in cases where a file did not have any structured data yet (captions or statements). Consequently, I’ve reverted that edit again.

That said, I also managed to find a solution for the bug; assuming it gets reviewed in time, and nothing else goes wrong, the fix might get deployed to Commons by next Wednesday. I hope you’ll consider giving AC/DC another chance then. --Lucas Werkmeister (talk) 22:41, 5 June 2020 (UTC)Reply[reply]

Update for anyone following this talk page: that issue should be resolved now. --Lucas Werkmeister (talk) 19:50, 16 June 2020 (UTC)Reply[reply]

"+ Add depicts: [subject item associated with category] "[edit]

Similar to #"+ Add depicts " above, a direct button for this could be helpful. Jura1 (talk) 17:15, 9 June 2020 (UTC)Reply[reply]

Link from Petscan[edit]

Hi, I use petscan to create page piles and I just discover that when the page pile is created, a link to the ACDC tool have been added in the list "Use this pagepile in:...". That's very great, thanks you! Christian Ferrer (talk) 09:41, 6 September 2020 (UTC)Reply[reply]

Nice, I’m glad it’s useful :) --Lucas Werkmeister (talk) 14:08, 7 September 2020 (UTC)Reply[reply]

Mark edits as minor[edit]

Thanks for offering this useful tool. I was asked by a user to mark my edits as minor. Is there any way to do so? Higa4 (talk) 00:35, 12 October 2020 (UTC)Reply[reply]

@Higa4: I don’t think so… the wbsetclaim API the gadget uses doesn’t even have a parameter to mark edits as minor, as far as I can tell. (But if it did, I’m still not sure how best to incorporate it into the gadget, because I don’t think all AC/DC edits should be marked as minor, and I’d have to find a way to let the user indicate that they want their edits to be marked as minor.) --Lucas Werkmeister (talk) 08:43, 12 October 2020 (UTC)Reply[reply]
Thanks. I see current situation. Higa4 (talk) 11:17, 12 October 2020 (UTC)Reply[reply]
I have filed phab:T265573 for the upstream issue that there is no way to make SDoC edits as minor. Jean-Fred (talk) 08:33, 15 October 2020 (UTC)Reply[reply]

Translating into other languages[edit]

Hi, what are the steps for translating this gadget into other languages? When I switch to the French version the interface and button are still in English. Is this because the translation is incomplete in some way or just something in my settings being set to English? I'd like to help translate this into Spanish.


John Cummings (talk) 10:57, 28 April 2021 (UTC)Reply[reply]

@John Cummings No French translation available, see Help:Gadget-ACDC#Localization Raymond 11:34, 28 April 2021 (UTC)Reply[reply]
Raymond, thanks very much. John Cummings (talk) 11:43, 28 April 2021 (UTC)Reply[reply]

Tool is invisible[edit]

Hello, since this morning I don't have anymore the link in the Tools section of the sidebar. Christian Ferrer (talk) 11:59, 30 April 2021 (UTC)Reply[reply]

+1 same. Strakhov (talk) 14:55, 30 April 2021 (UTC)Reply[reply]
The console on Firefox shows this error:
Skipped unresolvable module ext.gadget.ACDC load.php:8:705
Exception in resolve: load.php:2:383
DependencyError: Unknown module: es6-promise

Raymond 18:20, 30 April 2021 (UTC)Reply[reply]

The tool reappeared this morning. Christian Ferrer (talk) 04:47, 1 May 2021 (UTC)Reply[reply]
With thanks to @Jon (WMF) for this fix. Raymond 07:42, 1 May 2021 (UTC)Reply[reply]
I’m pretty sure that fix broke Internet Explorer support – I’ve hopefully fixed it again now (diff). Lucas Werkmeister (talk) 15:43, 1 May 2021 (UTC)Reply[reply]

Leads to missing strings when changing display language[edit]

When using this gadget and then changing display language from Germany to English, only the raw qqx strings are displayed. See the Phabricator ticket for details. -- Discostu (talk) 12:22, 17 May 2021 (UTC)Reply[reply]

@Discostu: thanks! I replied on Phabricator – according to my current understanding of the issue, there’s not much I can do about this in AC/DC, I think it needs a fix in the UniversalLanguageSelector. --Lucas Werkmeister (talk) 20:46, 17 May 2021 (UTC)Reply[reply]

Compatibility with Cat-a-lot file picker[edit]

At the moment this tool does not allow an user to pick some files and then operate just on them. Instead, this tool can be improved to read selected files from the selector provided with Help:Cat-a-lot.

See this screenshot.

Success requirement:

  • use a desktop computer
  • login in Wikimedia Commons
  • go in Special:Preferences#mw-prefsection-gadgets
  • enable Add to Commons / Descriptive Claims (ACDC)
  • enable Cat-a-lot
  • go to a random page like Category:Red Hat
  • click on CatALot in the bottom-down corner (it's a small yellow box)
  • click on a couple of random images (they will become yellow)
  • click on the blue link AC/DC on the left sidebar
  • At this point the field Files to edit is empty.
  • → Instead, it should list the selected files (instead of having to manually type it's name File:Whatever.jpg).

Note that the CSS selector is .cat_a_lot_selected. What do you think about? Thank you! :) --Valerio Bozzolan (talk) 15:32, 21 August 2021 (UTC)Reply[reply]

Migrated here: --Valerio Bozzolan (talk) 14:51, 6 December 2021 (UTC)Reply[reply]
See also #Visual file selection above. --Lucas Werkmeister (talk) 22:37, 6 December 2021 (UTC)Reply[reply]
✓ Done Lucas Werkmeister (talk) 22:49, 9 February 2022 (UTC)Reply[reply]


It seems there's a lot of "Lua error: too many expensive function calls." messages in the navbox on the article page. I hope this isn't a new issue. The Grid (talk) 21:12, 18 November 2021 (UTC)Reply[reply]

Strange, I don’t know why that happens here, but not (as far as I can tell) on other pages using the navbox… Lucas Werkmeister (talk) 19:33, 20 November 2021 (UTC)Reply[reply]
It seems to have resolved itself now 🤷 Lucas Werkmeister (talk) 22:49, 9 February 2022 (UTC)Reply[reply]

Two suggestions[edit]

Hello Lucas Werkmeister, thanks for this gadget, it is very useful. I have two suggestions. First, a checkbox so it only adds depicts statements when there isn't any yet, that way you avoid adding a more general depicts statement where (maybe) a more specific one was included by other user before. Second suggestion, a textbox for regular expression, right below where you type the category title, so you can filter which files you want to load from a category. Thanks again! emijrp (talk)

  1. Hm, I’m not convinced this would be useful, since the other statements might also be unrelated… maybe this kind of conditional logic could be done with a query, and putting the results into QuickStatements? (But I could probably be persuaded to add it if some other users also agree it would be useful, as long as I can find a good place for the checkbox in the interface.)
  2. This sounds like a fairly niche use case, and one that would be tricky to explain as well (since I assume not all users would know what regular expressions are)… it looks like PetScan has a regexp filter (“output” tab), so would it be possible to create the regex-filtered category with PetScan, export it as a PagePile, then import that PagePile into AC/DC? --Lucas Werkmeister (talk) 22:55, 9 February 2022 (UTC)Reply[reply]
Hello Lucas, thank for this Gadget as well,
I try to load a category with 5000 files, I'm wonder if i will get the whole category. One idea would be to focus on some letter at once, via regex. Like, A-E, then F-I, etc. So I lightly lean in in support with the regex idea. Yug (talk) 19:47, 24 July 2022 (UTC)Reply[reply]

audio transcription (P9533) [edit]

When trying to select the transcript language, the selector modal pops up under the ACDC modal. Arlo James Barnes 12:25, 3 May 2022 (UTC)Reply[reply]

✓ Done – should be fixed now, though the solution isn’t pretty. Thanks for letting me know. --Lucas Werkmeister (talk) 19:49, 3 May 2022 (UTC)Reply[reply]