Skip to content

LrMediaWiki2 v2.0.0 – Complete SDC Field Support

Choose a tag to compare

@krichel89 krichel89 released this 28 Jun 18:21

[2.0.0] – 2026-06-28

Major: Structured Data (SDC) Field Support

The most significant change in v2.0: Complete support for most Wikimedia Commons Structured Data (SDC) fields directly via description_all key-value extraction.

New Features

SDC Key=Value Fields in description_all

  • Added caption_en, caption_de, caption_fr, caption_it for multilingual SDC Captions (P2096)
  • Added creator for SDC Creator (P170) – Wikidata Q-ID format
  • Added depicts for SDC Depicts (P180) – portrait/person references
  • Added copyright for SDC Copyright Status (P6216)
  • Added license for SDC License (P275)
  • Automatic extraction of all key-value pairs from description_all
  • Validation against SDC schema before upload

Single-Call API Upload

  • Refactored MediaWikiApi.lua for single-call wbeditentity uploads
  • All SDC fields are uploaded in one API request (instead of multiple calls)
  • Reduced network latency and improved reliability

Refactored Metadata Field

  • Unified description_all field replaces fragmented description/metadata fields
  • Freetext Wikitext format with structured key-value extraction
  • Supports Wikitext blocks ({{lang|...}}), templates and categories in the same field

Multilingual Caption Support

  • Automatic processing of {{en|...}}, {{de|...}}, {{fr|...}} blocks
  • Mapping to SDC Captions in multiple languages
  • Complete Wikitext content is preserved (links, formatting)

Breaking Changes

  • description_all replaces separate fields – Old separate description fields are no longer used
  • Key=Value format is case-sensitivecreator=Q640 not Creator=Q640
  • Wikidata Q-IDs requiredcreator, depicts, copyright, license require valid Q-IDs

Bug Fixes & Improvements

  • Improved error handling for invalid SDC keys
  • Better logging for key extraction during export
  • Fixed: Multilingual captions are now correctly mapped in SDC
  • Fixed: Templates and categories were partially mishandled in v1.8
  • Improved: Location template continues to be correctly prepended to description_all

Documentation

  • NEW: SDC-Workflow.md – Practical workflow examples
  • NEW: Refactoring-Details.md – Technical documentation
  • Updated: README.md with v2.0 features & SDC reference table
  • Updated: Installation.md with new metadata set explanations