Template:DPLA metadata/doc

Overview

The {{DPLA metadata}} template renders the file-information block for files uploaded by the Digital Public Library of America (DPLA) ingestion bot. Unlike most uses of metadata templates like {{Information}} or {{Artwork}}, the primary displayed fields are not authored as template parameters—they are read live from the file's structured data on Commons (SDC), so the rendered page always reflects the current SDC state. Note that while this template is only designed to work correctly for DPLA-maintained files, it does have fallbacks which should work in other situations, and might work for you on a DPLA file derivitave or even other Commons files (but please test first!).

The template renders up to two stacked boxes:

  • A blue box showing metadata DPLA has contributed and continues to maintain. Each row is read directly from a DPLA-authored SDC statement (one marked with the determination method or standard (P459) determined by GLAM institution and stated at its website (Q61848113) "determination method = heuristic" qualifier).
  • An optional light-yellow box showing additional metadata contributed by Wikimedia editors — either as explicit template parameters or as non-DPLA SDC statements on the same properties. This is where you should put your own corrections, translations, or supplementary descriptions. You cannot not edit the blue box, as they come from the DPLA-sourced SDC statements. DPLA bot will overwrite any changes during its next sync to those statements that don't align with the authoritative source metadata. The yellow box means you do not have to add a second {{Information}} template for user-contributed metadata, and it is also how we preserve data when we adopt another user's upload (of a participating institution's file) into the DPLA system, by migrating it into the template parameters.

When a file has neither DPLA-authored SDC nor user-contributed values, the template renders nothing.

Editing DPLA-uploaded files

If you want to add, correct, or translate metadata on a DPLA-uploaded file, you have two equivalent options:

1. Add wikitext parameters

Pass any of the parameters listed in the parameters table below directly to the template. The values appear in the yellow user-contributed box, alongside (or instead of) the DPLA-authored values:

{{DPLA metadata
 |description = An expanded narrative of the scene depicted, with context not present in the source catalog.
 |author      = Smith, John, 1842-1901
 |date        = 1870-04
}}

The yellow box accepts either {{Information}}-style or {{Artwork}}-style parameter names where they differ — see the parameters table for the full set of accepted aliases.

To point at related images or alternate versions of the file (the standard {{Artwork}} / {{Information}} "Other versions" idiom), pass one or more {{Other version}} calls to the other versions parameter:

{{DPLA metadata
 |other versions = {{other version|Alternate scan.jpg}} {{other version|Another crop.jpg}}
}}

Related images can also be added structurally via related image (P6802) (related image) SDC statements — the yellow-box row renders from either source.

2. Add a non-DPLA SDC statement

Any SDC statement on a property the template renders, when not marked as DPLA-authored (i.e. lacking the determination method or standard (P459) determined by GLAM institution and stated at its website (Q61848113) qualifier), is treated as user-contributed and appears in the yellow box.

This is the recommended path for multilingual translations: add a monolingual-text statement on title (P1476) (title) or original catalog description (P10358) (description) in your language without the DPLA determination-method qualifier. The translation will appear in the yellow box alongside the DPLA-authored English value.

Explicit wikitext parameters take precedence over SDC fallbacks when both are present for the same field.

Tracking categories

When a file carries DPLA-authored SDC, the template adds the file to three tracking categories:

Unresolvable partners fall back to Media contributed by the Digital Public Library of America with unknown partner or Media contributed by the Digital Public Library of America with unknown institution respectively; both are maintenance categories DPLA staff monitor.

User-only invocations (yellow box without blue box) do not add the tracking categories — these are reserved for DPLA-attributed files.

Use during bot upload

Current state

User:DPLA bot today uploads files with a {{Artwork}}-based wikitext block. The {{DPLA metadata}} template is not yet written at upload time; it is a parallel rendering option that displays the same metadata from the file's structured data (SDC) once the SDC sync phase has populated it. If you see a file using {{Artwork}} rather than this template, that is the normal current state — both renderings co-exist on Commons during the transition described below.

Planned workflow for new uploads

The template is designed to support the following lifecycle, which will become DPLA bot's default once the upload code is migrated:

  1. Upload — every file is uploaded with the {{DPLA metadata}} template populated by explicit wikitext parameters (title, description, creator, date, etc.). Wikitext parameters are necessary at this step because MediaWiki's upload API does not allow SDC statements to be attached in the same request, and Commons will not tolerate a file landing with no readable description even briefly.
  2. SDC sync — a subsequent edit posts the same metadata as MediaInfo structured data via wbeditentity. At this point the wikitext parameters become redundant — the same values now live in SDC and the Lua module renders them automatically.
  3. Cleanup — a one-time follow-up edit removes the redundant wikitext parameters, leaving a bare {{DPLA metadata}} invocation. The template then renders the file's metadata entirely from SDC, so any subsequent edit DPLA makes to the source data flows through to the displayed page without re-editing the wikitext.

Step 3 is what makes the SDC the single source of truth: explicit wikitext parameters override SDC on display (see "Editing DPLA-uploaded files" above), so leaving them in place would mask any future SDC corrections.

Adoption of community-uploaded files

DPLA's pipeline includes duplicate-detection logic that identifies files already on Commons matching a DPLA item (typically uploaded by a Commons editor directly from the partner's catalog or from Flickr). When the pipeline adopts such a file into the DPLA system — renaming it to the canonical ... - DPLA - <id>.<ext> form — the editor-contributed metadata in the existing wikitext is migrated into {{DPLA metadata}}'s parameters, preserving attribution and any details the original uploader recorded. SDC sync then layers the DPLA-authoritative values on top, which appear in the blue box; the migrated editor values continue to appear in the yellow user-contributed box.

This adoption flow is not yet implemented; today's pipeline handles the duplicate detection and SDC sync against the {{Artwork}}-based wikitext format.

Parameters

Category:Template documentation#DPLA%20metadata/doc

Renders DPLA-authored structured data, plus optional user-contributed augmentations, as a two-box file-information block.

Usage


{{subst:DPLA metadata/doc |title= |description= |author= |date= |institution= |subject= |source= |permission= |other versions= }}

All parameters below are optional and appear in the user-contributed (yellow) box. Leaving every parameter unset is the normal case for a freshly DPLA-uploaded file: the blue box alone renders from SDC, and the yellow box is omitted.

Template parameters

ParameterDescriptionDefaultStatus
title
Title
TitleA user-supplied title — for example, a translation of the DPLA-authored title in your language. When unset, falls back to any non-DPLA title (P1476) (title) statement on the file's MediaInfo entity.title (P1476)optional
description
Description
DescriptionAdditional or translated description text. When unset, falls back to any non-DPLA original catalog description (P10358) (description) statement. To add a translation in another language, use a language template: {{fr|Une description en français}}.original catalog description (P10358)optional
author
artist, creator, Author, Artist, Creator
CreatorCreator of the original work. Same value goes into the "Creator" row regardless of which alias is used. When unset, falls back to any non-DPLA creator (P170) (creator) statement. Use the {{Creator}} template (e.g. {{Creator:Pierre-Auguste Renoir}}) where one is available.creator (P170)optional
date
Date
DateDate the original work was created. Use a {{Other date}}, ISO date, or natural-language text. When unset, falls back to any non-DPLA inception (P571) (inception) statement.inception (P571)optional
institution
Institution
InstitutionThe contributing institution. Accepts plain wikitext (a name or a {{Institution}} template call). When unset, falls back to any non-DPLA collection (P195) (collection) statement.collection (P195)optional
subject
Subject
SubjectSubject keywords or {{Depicts}}-style descriptive terms. When unset, falls back to any non-DPLA main subject (P921) (main subject) statement.main subject (P921)optional
source
Source
SourceSource of the digital file or its original. Free-text wikitext, including URLs. Does not fall back to SDC — the blue box already shows DPLA's authoritative File URL / IIIF manifest / Catalog record links.emptyoptional
permission
Permission
PermissionAdditional licensing information that should appear in the yellow user-contributed box (for example, an editor-supplied {{Cc-by-sa-4.0}} tag asserting a downstream re-license). Does not fall back to SDC — the blue box already shows the DPLA-asserted rights from RightsStatements.org statement according to source website (P6426) (rights status).emptyoptional
other versions
Other versions, other_versions
Other versionsRelated images or alternate versions of the file. Accepts one or more {{Other version}} template invocations (the standard {{Artwork}} / {{Information}} idiom). When unset, falls back to non-DPLA related image (P6802) (related image) statements on the file's MediaInfo entity — including inferred-from-Wikitext statements the DPLA-bot migration writes when it adopts a community upload's {{Artwork}} "Other versions" field. Each SDC statement is expanded as {{other version|<filename>}} at render time, so a value populated via wikitext and one populated via SDC produce the same output.related image (P6802)optional
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

Category:TemplateData documentation

Renders DPLA-authored structured data, plus optional user-contributed augmentations, as a two-box file-information block.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Creatorauthor artist, creator, Author, Artist, Creator

Creator of the original work. Same value goes into the "Creator" row regardless of which alias is used. When unset, falls back to any non-DPLA [[d:Special:EntityPage/P170|creator&#32;<small>(P170)</small>]] (creator) statement. Use the [[:Template:Creator|&#123;&#123;Creator&#125;&#125;]] template (e.g. <code>{{Creator:Pierre-Auguste Renoir}}</code>) where one is available.

Default
[[d:Special:EntityPage/P170|creator&#32;<small>(P170)</small>]]
Stringoptional
Datedate Date

Date the original work was created. Use a [[:Template:Other date|&#123;&#123;Other date&#125;&#125;]], ISO date, or natural-language text. When unset, falls back to any non-DPLA [[d:Special:EntityPage/P571|inception&#32;<small>(P571)</small>]] (inception) statement.

Default
[[d:Special:EntityPage/P571|inception&#32;<small>(P571)</small>]]
Stringoptional
Descriptiondescription Description

Additional or translated description text. When unset, falls back to any non-DPLA [[d:Special:EntityPage/P10358|original catalog description&#32;<small>(P10358)</small>]] (description) statement. To add a translation in another language, use a [[Commons:Language templates|language template]]: <code>{{fr|Une description en français}}</code>.

Default
[[d:Special:EntityPage/P10358|original catalog description&#32;<small>(P10358)</small>]]
Stringoptional
Institutioninstitution Institution

The contributing institution. Accepts plain wikitext (a name or a [[:Template:Institution|&#123;&#123;Institution&#125;&#125;]] template call). When unset, falls back to any non-DPLA [[d:Special:EntityPage/P195|collection&#32;<small>(P195)</small>]] (collection) statement.

Default
[[d:Special:EntityPage/P195|collection&#32;<small>(P195)</small>]]
Stringoptional
Other versionsother versions Other versions, other_versions

Related images or alternate versions of the file. Accepts one or more [[:Template:Other version|&#123;&#123;Other version&#125;&#125;]] template invocations (the standard [[:Template:Artwork|&#123;&#123;Artwork&#125;&#125;]] / [[:Template:Information|&#123;&#123;Information&#125;&#125;]] idiom). When unset, falls back to non-DPLA [[d:Special:EntityPage/P6802|related image&#32;<small>(P6802)</small>]] (related image) statements on the file's MediaInfo entity — including inferred-from-Wikitext statements the DPLA-bot migration writes when it adopts a community upload's [[:Template:Artwork|&#123;&#123;Artwork&#125;&#125;]] "Other versions" field. Each SDC statement is expanded as <code>{{other version|&lt;filename&gt;}}</code> at render time, so a value populated via wikitext and one populated via SDC produce the same output.

Default
[[d:Special:EntityPage/P6802|related image&#32;<small>(P6802)</small>]]
Contentoptional
Permissionpermission Permission

Additional licensing information that should appear in the yellow user-contributed box (for example, an editor-supplied <code>{{Cc-by-sa-4.0}}</code> tag asserting a downstream re-license). Does not fall back to SDC — the blue box already shows the DPLA-asserted rights from [[d:Special:EntityPage/P6426|RightsStatements.org statement according to source website&#32;<small>(P6426)</small>]] (rights status).

Contentoptional
Sourcesource Source

Source of the digital file or its original. Free-text wikitext, including URLs. Does not fall back to SDC — the blue box already shows DPLA's authoritative File URL / IIIF manifest / Catalog record links.

Stringoptional
Subjectsubject Subject

Subject keywords or [[:Template:Depicts|&#123;&#123;Depicts&#125;&#125;]]-style descriptive terms. When unset, falls back to any non-DPLA [[d:Special:EntityPage/P921|main subject&#32;<small>(P921)</small>]] (main subject) statement.

Default
[[d:Special:EntityPage/P921|main subject&#32;<small>(P921)</small>]]
Stringoptional
Titletitle Title

A user-supplied title — for example, a translation of the DPLA-authored title in your language. When unset, falls back to any non-DPLA [[d:Special:EntityPage/P1476|title&#32;<small>(P1476)</small>]] (title) statement on the file's MediaInfo entity.

Default
[[d:Special:EntityPage/P1476|title&#32;<small>(P1476)</small>]]
Stringoptional

Additional information

The template is intended to be used in the following namespaces: the File namespace

The template is intended to be used by the following user groups: no user group specified

Placement:

Top of the file description page (file namespace only).

Relies on:
Module:DPLA (rendering logic), Template:License from structured data (license display), Template:Institution (institution row), Template:Divbox (box framing), Template:NoC-US (RightsStatements.org NoC-US display).

Example

{{DPLA metadata|See the "Editing DPLA-uploaded files" section above for invocations with and without user-contributed augmentations.}}

renders as:


Localization

This template displays field labels and banner strings in the viewer's interface language, falling back to English when a translation is not yet available. Translations for most labels live in Module:DPLA/i18n — a Lua data page that any Commons editor can update.

How to add your language

  1. Open Module:DPLA/i18n for editing.
  2. Copy the existing en = { ... } block.
  3. Paste it below the English block and rename the key to your language code (e.g. fr = for French, de = for German, pt-br = for Brazilian Portuguese).
  4. Translate each string on the right of the = sign. Keep the keys (left side) unchanged.
  5. Save. The new translation is picked up on the next page render — no admin action needed.

Comments at the top of the module page describe each key, what it represents, and any per-key translation notes.

A few translation notes

  • creator ≠ "Author". DPLA's source institutions are primarily archives, where the creator (per the Society of American Archivists definition) is the entity responsible for the records' creation or aggregation, not necessarily the author of any single item. For example, a folder of correspondence to the White House from the public has the Office of the President as its creator, even though the President didn't write the letters. Choose the archival-records term in your language rather than the literary-authorship one.
  • Banner strings preserve the DPLA interwiki link. banner_dpla and banner_user contain a [[w:Digital Public Library of America|Digital Public Library of America]] link. You can translate the visible label inside the pipe; the link target before the pipe must stay as-is.
  • $1 / $2 placeholders in page_n and partnership_text_* are substituted at render time with the page number, institution name, or hub name. Keep them in place; you can reorder them as your language's grammar requires.
  • Short labels inside link cells. file_url, iiif_manifest, catalog_record, and circa appear inline next to small icons. Keep them brief.

Labels translated elsewhere

The following labels reuse existing Commons file-information messages, which already carry translations into many languages via translatewiki.net. To improve those translations, register an account at translatewiki.net and translate the messages there; no edit to this template or Module:DPLA/i18n is needed:

  • TitleMediaWiki:Wm-license-artwork-title
  • DescriptionMediaWiki:Wm-license-information-description
  • DateMediaWiki:Wm-license-information-date
  • SourceMediaWiki:Wm-license-information-source
  • PermissionMediaWiki:Wm-license-information-permission

If a viewer's language is missing from one of these messages on Commons, the module falls back to the English string.

Wikidata-backed fallbacks

For six Module:DPLA/i18n keys, the module also consults the matched Wikidata label as an intermediate fallback — between the i18n table and the English baseline. Editors who add their language to Module:DPLA/i18n always win, but if a viewer's language hasn't been added there yet, Wikidata's community-maintained label catches the gap for these concepts:

So the priority order, per label, is: reused MediaWiki message (if applicable) → Module:DPLA/i18n[viewer-lang] → Wikidata label of the matched item or property in viewer-lang → English. Adding a translation to Module:DPLA/i18n is still useful for overriding wording (e.g. a more idiomatic local term than the literal Wikidata label) but no longer strictly required for these six keys.

This fallback is deliberately limited to single-noun concepts that match a Wikidata entity precisely. Institution, Partnership, and Page N don't use it because their Wikidata labels drift semantically across languages or carry a placeholder the WD label doesn't accommodate.

See also

Category:TemplateData documentation Category:Template documentation