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

AC/DC [publish changes button]; Files to edit: [six filenames]; Statements to add: depicts Caroline Zhang with expression, gesture or body pose Biellmann spin; [add statement button]
Screenshot of the gadget.

Add to Commons / Descriptive Claims, in short AC/DC, is a gadget to add a collection of structured data statements to a set of files.


Enable it in your preferences.

Button normal.svg JavaScript is disabled in your browser.


The gadget adds a “AC/DC” link to the Tools section of the sidebar; click it to open the main dialog. Enter the names of the files you want to edit in the input field, and edit the statements below it, using the regular structured commons user interface elements. When you’re ready, click the big blue button at the top (“publish changes” in English, but it may be translated) to start adding these statements to all the listed files. Do not close the browser window/tab until the dialog is done and closes itself (a progress bar should have appeared at the top).

You can paste multiple titles into the file list (with or without the “File:” prefix), separated by pipe (|), tab or line break characters. After pressing Enter, they will be split up accordingly. Note, however, that this gadget does not scale well with lots of files; there’s no hard limit, but just adding several hundred titles to the input will hang the browser for some seconds, and I have not yet tried actually making edits at that scale. Most likely, it would just take ages, and you would have to keep your device running and your browser open for that entire time.

You can also add all the files in a category or a PagePile, by clicking the ellipsis icon and then the “Load category” or “Load PagePile” buttons, then entering the category title or PagePile ID into the dialog that opens afterwards. The same considerations as in the previous paragraph apply – this will likely not scale well to thousands of files. (The user interface also becomes somewhat unwieldy if the list of files is too long, so you probably want to define the statements to add first, and only load the category or PagePile at the end.)

If a statement with the same value as one you want to add already exists on a file, then any missing qualifiers will be added to the existing statement, and it will be marked as prominent if you specified so. Otherwise, a new statement will be added. There is no support for removing statements or qualifiers or unmarking prominent statements yet.

Known issues[edit]

Adding structured data to pages may add them to your watchlist even if you don’t have the “Add pages and files I edit to my watchlist” setting enabled. This is not a bug in AC/DC specifically (phabricator:T216369), but it becomes more serious when mass-editing many files.

There is no internationalization / translation of the user interface yet.

In general, this gadget is coupled rather tightly to WikibaseMediaInfo internals and implementation details, and as a result may break in unintended ways. If you notice something wrong, please notify me as soon as possible.


Since , edits made through this gadget are tagged “ACDC”; you can find them in the recent changes. (Prior to that date, there’s no certain way to find or distinguish ACDC edits.)

The gadget has no global “off switch” for administrators yet; if you’re an interface administrator, you can blank MediaWiki:Gadget-ACDC.js as a last resort.