Wikidata:WikiProject Commons/Template workshop
General approach for adapting existing Commons templates
edit(see current work on eg {{Creator}}
and {{Institution}}
for examples of this process)
- Port the existing template to Wikidata
- Create test page, by copying an instance of template page use to Wikidata
- Copy template (and sub-template) pages to Wikidata
- Keep copying until test page works (need not copy all languages)
- Begin to test drawing information from Wikidata
- Identify mapping between template fields and Wikidata; store on template talk page
- On the test page, create a version that starts drawing some fields from Wikidata
- Also consider making a wikitext-generating version, that can be used to cut & paste back to Commons
- Create a wrapper that can fill fields for an arbitrary Q-number
- Test more instances
- In detail, compare existing templated data values with Wikidata values across the whole corpus
- Create a new, adapted version that uses Wikidata more natively
- Remove translation code, instead rely on Wikidata for translations of data
- Start migrating template code to Lua
Resources
editPhase 2 templates
edit(Templates which need only access properties of a directly sitelinked item, that can be implemented on Commons as soon as the community asks for Phase 2 to be turned on)
Header templates for Galleries
editeg: {{SimpleCommonsGalleryHeader}}
Header templates for Categories
editNeeded: Header template, giving link to corresponding article in wiki of current lang, perhaps with a dropdown to offer links in other languages
eg: {{SimpleCommonsCategoryHeader}}
Need to identify existing header templates
edit- cf c:Barack Obama for model
- c:Template:Translation table -- 19871 transclusions (not all article headers)
- c:Template:Multilingual description -- 159808 transclusions (not all article headers -- some categories, some files)
- c:Template:On Wikipedia -- 5655 transclusions -- eg: c:Category:Archaeology
- c:Template:Sisterheader -- 2164 transclusions
- c:Template:See also
Phase 3 templates
edit(Templates which need to access properties of a different item)
Creator
edit{{Creator}}
-- existing Commons template, copied across (translations not implemented; some functionality not implemented)- See Template talk:Creator for mapping between Commons Creator template and wikidata, for development
- Template:Creator/statictest -- testbed for feeding data from wikidata to existing Commons template.
- Template:Creator/wrapper/test -- test of wrapper of template, for multiple testcases.
Lua scratchpad: Module:Creator, interface template(s):{{CreatorProperties}}
- Analysis needed for the whole cohort, to compare values of properties on current templates vs Wikidata
Institution
edit{{Institution}}
-- existing template, copied over from Commons- Template:Institution/statictest -- testbed for feeding data from wikidata to existing Commons template.
- Template:Institution/wrapper/test -- see talk page there for comments and progress
- Analysis needed for the whole cohort, to compare values of properties on current templates vs Wikidata
Artwork
edit- Wikidata_talk:WikiProject_Visual_arts/Item_structure#Mapping_of_commons:Template:Artwork
- Template:Artwork -- mockup by User:Zolo
New templates
edit- Wikidata:WikiProject Structured Data for Commons/test/Topics
- -- a prototype template to let us test how to display a set of "topics", each topic being a Q-number, with options eg just to display a count of them; or to display a list of their names; or a list of the topic names with mini-descriptions.