Template talk:Item documentation

Latest comment: 4 months ago by Matěj Suchánek in topic Add some Bengali translation

Taxonomy Browser edit

Taxonomy Browser seems to be dead.--Jklamo (talk) 08:03, 7 September 2017 (UTC)Reply

Can we add SQID? edit

Can we add https://tools.wmflabs.org/sqid/#/ ? It seems to be a much better tool for working and examining classes than the existing tools linked. Sadads (talk) 17:02, 30 October 2017 (UTC)Reply

I'm not a big fan of squid which is really really slow in my experience. I would consider removing it. PAC2 (talk) 22:22, 23 February 2021 (UTC)Reply

This templates causes errors on over 1000 pages edit

It seems like some changes in this template or templates it uses is causing errors in over 1000 pages, which are then added to Category:Pages with script errors. Can someone fix that issue, otherwise we might have to remove it from those pages. See for example Talk:Q1000003. --Jarekt (talk) 19:03, 18 May 2019 (UTC)Reply

Problem is in {{Is a}} when the result should be false. --Infovarius (talk) 23:52, 21 May 2019 (UTC)Reply
Fixed with this diff to replace the function with a Module:PropertyPath one. Also needed a bugfix on this last module to handle a missing « unknown value Help » case, it seems that there is a few classes with « some value » as a parent class. Maybe someone used this to « fix » a constraint that a class must have a parent class (probably not a good idea) ? @Jarekt, Infovarius: author  TomT0m / talk page 08:02, 22 May 2019 (UTC)Reply
@TomT0m, Infovarius: Thanks a lot for looking into it. --Jarekt (talk) 12:19, 22 May 2019 (UTC)Reply

More errors in Category:Pages with script errors edit

More errors in Category:Pages with script errors, see:

Any idea how to fix them? Or shell we just remove {{Item documentation}} them from those pages? --Jarekt (talk) 18:56, 1 July 2019 (UTC)Reply

@jarekt: « not enough memory » could mean some items in the class tree became too big and are loaded by the template that shows the class tree. If it’s this it will be enough to replace the code that load the full item with the api call that just retrieve the subclass of (P279) statement, I will investigate. author  TomT0m / talk page 19:09, 1 July 2019 (UTC)Reply
It seems someone, an IP, for some reason decided a few hours ago to add statements about some physical objects being special cases of mathematical objects resulting in a blow up of the parent class tree. Reverting these incorrect edits made everything fine. (coincidentely, we had a discussion about the class tree and what should be the rule, resulting into some talk about robustness. Hope it’s not a robustness test). Talk:Q63819493 had indeed an error but it was not because of this template. Is it a mispelling of another page ? author  TomT0m / talk page 20:18, 1 July 2019 (UTC)Reply

@TomT0m:, Could you also look at Talk:Q22001389. It also runs out of memory. --Jarekt (talk) 13:36, 30 July 2019 (UTC)Reply

 
@Jarekt: There is a couple of really wrong stuffs in the class tree of this item. It turns out, for example, that « wiktionary » is a superclass of « wiktionary linguistic version », but « wiktionary linguistic version » is a class of projects whereas « wiktionary » is a concrete project. A class of project can’t be a subclass of a concrete project. For some wrong reason a wiktionary edition is supposed to be … an industry. author  TomT0m / talk page 13:09, 31 July 2019 (UTC)Reply

✓ Done Scholia edit

Can we include a link to Scholia (example = https://tools.wmflabs.org/scholia/Q42 )? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 09:33, 8 December 2019 (UTC)Reply

  Support It would be a good idea PAC2 (talk) 07:01, 18 February 2021 (UTC)Reply

List of subclasses edit

Can we add a link to a SPARQL query for the list of subclasses in addition to the list of instances? That would be helpful --Hannes Röst (talk) 15:20, 9 September 2020 (UTC)Reply

@Hannes Röst: There are already three such at the bottom: Magnus’ tool, which creates a pretty tree-like output, but doesn’t show labels lately, and two SPARQL queries for direct and not necessarily direct subclasses. —Tacsipacsi (talk) 14:29, 11 September 2020 (UTC)Reply

Add label at top of template? edit

Can we add the item label at the top of this template? I sometimes open several/many talk pages in different tabs and it would be nice to be able to quickly identitfy which item's talk page I'm looking at. — The Erinaceous One 🦔 11:49, 2 October 2020 (UTC)Reply

I made the change. — The Erinaceous One 🦔 23:08, 2 October 2020 (UTC)Reply
My change works most places, but it is displays "ITEM DOCUMENTATION" on Template:Item documentation, instead of human (Q5). — The Erinaceous One 🦔 10:48, 5 October 2020 (UTC)Reply

Deployment strategy edit

I just discovered this template and I find it really useful. Is there any strategy or recommendation to deploy this template on all talk pages?

Is there any link between this tool which is manually added to every talk page and some other templates such as {{TP given name}} (@Jura1: which are directly integrated in talk pages using MediaWiki:Talkpageheader (@Jarekt:)? PAC2 (talk) 11:13, 27 December 2020 (UTC)Reply

I've just launched a request for comments about the topic Wikidata:Requests for comment/How should we develop and deploy documentation for items ?. PAC2 (talk) 17:39, 10 January 2021 (UTC)Reply

✓ Done Proposal to add two new queries in the Item documentation page edit

I suggest to add two new queries in the item documentation page : - the first one is the number of claims about the item by property type - the second one is the list of all claims about the item I've contributed to the sandbox, so you can see the result here Template:Item documentation/testcases. I find those queries really useful to learn more about an item. Tell me if you oppose or support my proposal. PAC2 (talk) 22:07, 20 January 2021 (UTC)Reply

I've integrated the two new queries (see here). Let my know if there is some bug. PAC2 (talk) 21:11, 1 February 2021 (UTC)Reply

✓ Done Proposal to add specific queries edit

I propose to add the {{TP award}} template for awards using the SWITCH command. See the difference in the source code and the output.

My idea behind is to add progressively class specific templates to the general {{Item documentation}} template.

I really believe that class specific predefined sparql queries have a great value for exploring wikidata and discover relationships between items.

Let me know if you support ({{Support}}) or oppose ({{Oppose}}) this suggestion. PAC2 (talk) 20:55, 2 February 2021 (UTC)Reply

It is implemented in the main template (see diff). Let me know if there are some problems PAC2 (talk) 21:30, 6 February 2021 (UTC)Reply

✓ Done Proposal to add subtemplate for organization edit

After the inclusion of {{TP award}}, I propose to add {{TP organization}} for items of class organization. The diff is here. Tell me if you {{Oppose}} or {{Support}} this suggestion before I merge it in the main template. Suggestions and improvement are welcome. PAC2 (talk) 21:00, 10 February 2021 (UTC)Reply

  Notified participants of WikiProject Organizations and

  Notified participants of WikiProject Companies for comments. PAC2 (talk) 19:40, 12 February 2021 (UTC)Reply

Yes, I'll change it. PAC2 (talk) 09:52, 13 February 2021 (UTC)Reply

@ArthurPSmith: yeah, the actual syntax does only work with direct instance, which requires to have the list of all relevant instances. I'd be happy to find a better solution. Any idea or example ? PAC2 (talk) 20:34, 15 February 2021 (UTC)Reply
I don't know much about templates so I don't know if it's possible, but I do know the constraints seem to allow following subclasses. Anyway, unless that can be fixed, can you add organization (Q43229), institution (Q178706), international organization (Q484652), government agency (Q327333), company (Q783794), professional association (Q829080), educational organization (Q5341295), educational institution (Q2385804), higher education institution (Q38723), school (Q3914), university (Q3918), college (Q189004) at least to the list of classes? ArthurPSmith (talk) 15:22, 16 February 2021 (UTC)Reply
It’s possible in theory to traverse back along the subclass of (P279) chain in Lua, but it may quickly reach the 500 loaded entities that are allowed per page (or another Lua limit like memory limit). Unfortunately there’s no such efficient method available in templates/modules like SPARQL that the constraints can use. —Tacsipacsi (talk) 00:21, 17 February 2021 (UTC)Reply
@Tacsipacsi: do you have any example of Lua code parsing all P279 subclasses? This wouldbbe a nice solution. PAC2 (talk) 19:42, 17 February 2021 (UTC)Reply

I have some bug with the switch command. Let's see if I find a solution 😊 PAC2 (talk) 06:59, 18 February 2021 (UTC)Reply

Merge is done but we need to find a better technique than this long list of values PAC2 (talk) 19:48, 18 February 2021 (UTC)Reply

Thanks to the new {{SwitchClass}} template developed by TomT0m, we have a new version in the sandbox (https://m.wikidata.org/wiki/Special:MobileDiff/1396229578?diffmode=source) which works with every subclass. PAC2 (talk) 09:25, 5 April 2021 (UTC)Reply

✓ Done Next idea : Create links with the wikiprojects based on P17, P27, etc edit

In Wikipedia in French, each article is related to a portal which is related to a portal. So it's easy to go from the article to the project and reach the community of interested contributors.

Wikidata has items and Wikiprojects but there is no links between items and wikiprojects. I think it would be useful to make a link to relevant wikiproject.

Here is a first version of what it could be. You can have a look at User:PAC2/Test to have a small test of what it could be.

What do you think of that new idea ? PAC2 (talk) 21:52, 18 February 2021 (UTC)Reply

I'll have a look PAC2 (talk) 22:21, 23 February 2021 (UTC)Reply

✓ Done Include {{TP administrative area}} edit

After {{TP award}} and {{TP organization}}, I propose to include {{TP administrative area}} (see diff) for all administrative subdivision such as countries, regions, cities, etc. Your feedback is welcome and feel free to complete the list of relevant classes. For now, we have : | capital city (Q5119), big city (Q1549591), country (Q6256) U.S. state (Q35657), commune of France (Q484170), department of France (Q6465). PAC2 (talk) 22:20, 23 February 2021 (UTC)Reply

Correction needed in the link List of instances edit

--MikePC (talk) 08:50, 26 February 2021 (UTC) The link List of instances [[1]] gives an additional Q into the query like in wd:QQ5.Reply

@MikePC: Should be OK now. author  TomT0m / talk page 10:14, 26 February 2021 (UTC)Reply

 Resolved Bug with Infobox for class chemical compound (Q11173) edit

In the code, we print {{Infobox}} if item is a chemical compound (Q11173).

{{#ifeq: {{is a|{{{1|{{PAGENAME}}}}}|Q11173}} | true
| <div style="background:#F0F0F0; border-radius: 4px; padding: 3px 10px; margin-bottom: 10px;">
{{Infobox|{{{1|{{PAGENAME}}}}}}}

As you can see (3S,5S)-3,5-dimethylpiperidine (Q40838069), there is a bug and {{Infobox}} doesn't work.

Should we remove this section of the code? PAC2 (talk) 22:08, 1 March 2021 (UTC)Reply

I think that this discussion is resolved and can be archived. If you disagree, don't hesitate to replace this template with your comment. PAC2 (talk) 11:40, 4 April 2021 (UTC)Reply

"Data to provide for this type of item" - where does this come from ? edit

N00b question: Looking around I couldn't find any explanation/documentation of why the Q5 example renders that nice extra block with the table "Data to provide for this type of item" while the other example doesn't. Is this an entity schema thing, or tied to constraints somehow? Would love to know how I make that part render when using the template. Moebeus (talk) 22:37, 3 March 2021 (UTC)Reply

@Moebeus: There’s nothing semantic about it, the template simply includes Talk:Q5/class, which uses plain old wikitext templates. —Tacsipacsi (talk) 23:45, 3 March 2021 (UTC)Reply
Aha, thank you so much for the explanation and quick reply! Moebeus (talk) 23:49, 3 March 2021 (UTC)Reply
I think that this discussion is resolved and can be archived. If you disagree, don't hesitate to replace this template with your comment. Moebeus (talk) 23:50, 3 March 2021 (UTC)Reply

Translations edit

Hi I think that langswitch should be removed and be transformed into the same way than https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab --Bouzinac💬✒️💛 19:30, 5 April 2021 (UTC)Reply

What would be the advantage? Is there a documentation for this method? PAC2 (talk) 20:46, 5 April 2021 (UTC)Reply

Hi PAC2 More tabular translation data, more easy to translate crosswikis, to add translations. https://www.mediawiki.org/wiki/Template:Graph:Lines is used widely crosswikis and its translations are stored into file one https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab .Bouzinac💬✒️💛 20:59, 5 April 2021 (UTC)Reply
And will this template be used cross-wiki ever? I don’t think so. Wikidata has items, and that’s it. Local templates need local solutions. The Translate extension might be one, but unfortunately it doesn’t support having multiple Chinese translations (simplified and traditional), while LangSwitch does. —Tacsipacsi (talk) 00:39, 6 April 2021 (UTC)Reply
Fyi, LangSwitch has been banned from enwiki. --Bouzinac💬✒️💛 07:36, 6 April 2021 (UTC)Reply
Which is totally irrelevant here, since enwiki is a monolingual site and thus isn’t prepared for this kind of internationalization, while Wikidata is multilingual, and the MediaWiki message mentioned in the enwiki deletion discussion does exist in quite a few languages; actually all internationalization methods (apart from using MediaWiki messages directly) that work on talk pages use it. Without this hack, it’s simply impossible to tell the user’s preferred language. —Tacsipacsi (talk) 22:59, 6 April 2021 (UTC)Reply

✓ Done Display item classification template only if the item is a subclass of something edit

{{Item documentation}} displays {{Item classification}} for all items. Yet, this template is only relevant if the item is a subclass of something else (ie has a value for subclass of (P279).

Therefore, I propose to display {{Item classification}} only if the item has a value for subclass of (P279) .

See the code source in sandbox and have a look at Template:Item documentation/testcases to check the behaviour.

If no one oppose this contribution, I will merge it in the main template in a few days]. PAC2 (talk) 06:15, 18 April 2021 (UTC)Reply

  Done PAC2 (talk) 06:08, 21 April 2021 (UTC)Reply

  Fixed There was a small bug due to the fact that I was using ifexist instead of if. PAC2 (talk) 05:51, 23 April 2021 (UTC)Reply

Next ideas edit

I have lots of ideas for this template. Here are my next ideas.

  • Add a link to Scholia in the useful links section
  •   Done Move the two generic queries to the useful links section
  •   Done Move the list of instances from the useful link section to the {{Item classification}}
  •   Done Add more generic queries for classes in the {{Item classification}}
  • Develop new class specific templates
  •   Done Complete the list of country specific projects

By the way

PAC2 (talk) 06:03, 23 April 2021 (UTC)Reply

✓ Done Proposal to add more specific queries to the Item classification template edit

I've made a proposal to add more generic queries to {{Item classification}}. The discussion goes here Template_talk:Item_classification#Adding_more_generic_queries. PAC2 (talk) 14:05, 25 April 2021 (UTC)Reply

✓ Done Regrouping useful links and generic queries section, removing the list of instances edit

I propose to group together the useful links and the generic queries sections. There is no reason to have two separate sections.

I also remove the list of instances link since it is now part of the Item classification template.

See Template:Item documentation/testcases to compare the actual version versus the sandbox. PAC2 (talk) 19:03, 30 April 2021 (UTC)Reply

Improving the style edit

The light blue background seems a bit old style to me. In the sandbox, I propose a lighter style based on a very light grey. See Template:Item_documentation/testcases. Do you agree with this change? PAC2 (talk) 13:30, 2 May 2021 (UTC)Reply

I think the current blue is elegant and not outdated at all. Also, even if there’s an overwhelming support for using grey (which I personally don’t like), at least choose a darker one—this one doesn’t stand out at all, it’s almost white. —Tacsipacsi (talk) 20:29, 2 May 2021 (UTC)Reply
Thanks for your feedback. I'll not change the style. PAC2 (talk) 05:17, 4 May 2021 (UTC)Reply

✓ Done New generic queries for occupations edit

I propose to add {{Generic queries for occupations}} template for all items of class occupation (Q12737077). See the sandbox for the difference and the Testcases .

By the way, I have redesigned the testcases page using flexbox layout. You may have two columns layout on large screen and one column layout on small screen.

PAC2 (talk) 05:33, 10 May 2021 (UTC)Reply

This is now integrated in the main template. PAC2 (talk) 19:53, 12 May 2021 (UTC)Reply

✓ Done Proposal to add occupation based generic queries edit

{{TP organization}}, {{TP administrative area}}, {{TP award}}, {{Generic queries for occupations}} are based on the value of instance of (P31). It is also relevant to have generic queries based on the occupation (occupation (P106) of the item. I propose the first generic queries based on occupation of the item with {{Generic queries for filmmakers}}. It relies on a new template : {{HasOccupation}}.

You can see an example in the testcases : Template:Item_documentation/testcases#Alice_Guy.

Feedback and contributions are welcome. PAC2 (talk) 20:44, 12 May 2021 (UTC)Reply

✓ Done Proposal to add template Generic queries for actors edit

Following the example of {{Generic queries for filmmakers}}, I've designed a new occupation specific template {{Generic queries for actors}}.

I've added the template in the sandbox for all items with occupation (P106) actor (Q33999).

As usual, you can check the result at the bottom of Template:Item documentation/testcases with Alice Guy's example. PAC2 (talk) 05:37, 17 May 2021 (UTC)Reply

Proposal to add image at the right edit

In the sandbox, I've tested a version with an image (P18) displayed at the top right of the template. See Template:Item documentation/testcases. I think it's great. What do you think ? PAC2 (talk) 05:42, 21 May 2021 (UTC)Reply

Why? The purpose of this template is to provide information that’s not directly available on the item page. image (P18) is perfectly available, there’s no need to duplicate it. This template is already getting too long only with useful information, there’s no need to put also some useless stuff in it. —Tacsipacsi (talk) 11:43, 21 May 2021 (UTC)Reply

OK, my idea was to make it look more attractive but you're right. It's a good idea to keep it simple. PAC2 (talk) 19:44, 8 June 2021 (UTC)Reply

✓ Done Proposal to add Scholia edit

I propose to add a link to Scholia in the useful links section. See the sandbox. PAC2 (talk) 19:54, 8 June 2021 (UTC)Reply

Fixed Bug edit

Alexandre Dumas (Q38337) displays {{Generic queries for occupations}} but it should not. Maybe human (Q5) is now a subclass of occupation (Q12737077). PAC2 (talk) 20:21, 14 June 2021 (UTC)Reply

{{IsSubclass|Q5|Q12737077}} : PAC2 (talk) 20:24, 14 June 2021 (UTC)Reply

I've found the problem : https://www.wikidata.org/w/index.php?title=Q24229398&diff=1437019461&oldid=1421586281 PAC2 (talk) 05:26, 15 June 2021 (UTC)Reply

  Fixed https://m.wikidata.org/wiki/Special:MobileDiff/1442325325 PAC2 (talk) 19:38, 15 June 2021 (UTC)Reply

✓ Done Proposal to add Generic queries for positions edit

I propose to add the template {{Generic queries for positions}} for all items of class position (Q4164871). The code is in the sandbox( diff). Does everyone agree with this proposal? PAC2 (talk) 10:07, 20 June 2021 (UTC)Reply

Example here : Minister of Culture (France) (Q12436652) PAC2 (talk) 10:12, 20 June 2021 (UTC)Reply

✓ Done Proposal to add new query which show the list of items with the same label edit

In the sandbox, I propose a new query which shows the list of entities with the same label. It can be useful to detect potential duplicates.

Here is one example

#title:Entities with same label
SELECT ?item ?itemLabel ?itemDescription ?nature ?natureLabel
WHERE {
wd:Q90 rdfs:label ?itemLabel filter (lang(?itemLabel) = "[AUTO_LANGUAGE]").
?item rdfs:label ?itemLabel.
OPTIONAL{
?item schema:description ?itemDescription filter (lang(?itemDescription) = "[AUTO_LANGUAGE]").
}
?item wdt:P31 ?nature.
?nature rdfs:label ?natureLabel filter (lang(?natureLabel) = "[AUTO_LANGUAGE]").
}
ORDER BY ?nature ?natureLabel
Entities with same label

Feedback is welcome. PAC2 (talk) 05:44, 26 June 2021 (UTC)Reply

  Done PAC2 (talk) 06:23, 9 July 2021 (UTC)Reply

✓ Done Add Generic queries for musicians edit

I propose to add a new generic query template based on occupation : {{Generic queries for musicians}}. You can look at an example here Talk:Q127330 and see the diff in the sandbox. PAC2 (talk) 05:22, 11 August 2021 (UTC)Reply

Saw this fly by on Talk:Q2599 and wanted to suggest the same thing. Sounds like a plan. @Moebeus: Jean-Fred (talk) 15:50, 11 August 2021 (UTC)Reply

✓ Done Proposal to add {{Generic queries for authors}} edit

I propose to add {{Generic queries for authors}} for all people with occupation author (Q482980).

I've added this in the sandbox. You can check the result here Virginia Woolf (Q40909). PAC2 (talk) 06:43, 1 September 2021 (UTC)Reply

  Done PAC2 (talk) 05:19, 5 September 2021 (UTC)Reply

Community awards edit

I've suggested Item documentation to the WikidataCon community award : Wikidata_talk:WikidataCon_2021/Contribute/Community_awards#Item_documentation_template_and_the_galaxy_of_embedded_templates. Tell me if you want to complete the description. PAC2 (talk) 20:19, 28 September 2021 (UTC)Reply

7,000 pages edit

The template is now included in 7,000 page !!! PAC2 (talk) 19:53, 4 November 2021 (UTC)Reply

Jura1 I'm not sure to understand your point. Do you mean deploying Item documentation template through MediaWiki:Talkpageheader or adding [..] to {{Item documentation}}? PAC2 (talk) 07:42, 6 November 2021 (UTC)Reply

  • By including them directly in the interface message. Wikidata is a database. Contrary to Wikipedia, we don't need to add these manually. Let's not carry over manual habits from Wikipedia. --- Jura 07:48, 6 November 2021 (UTC)Reply
I've launched a request for comment in January about this topic Wikidata:Requests for comment/How should we develop and deploy documentation for items ?. There was no clear conclusion. PAC2 (talk) 16:21, 6 November 2021 (UTC)Reply
There doesn't seem to be consensus to create thousands of otherwise empty talk page.
Back when this was started at Wikipedia, they lacked db functions to implement this without adding such templates, but at Wikidata the functions are available and, given that this is the main Wikibase installation, we should know better. --- Jura 07:26, 7 November 2021 (UTC)Reply

I still not really understand what you mean with DB functions and I believe that manual editing of talk pages may have some advantages but it's worth having the debate. I think it would be useful to ask the question in Wikidata:Project_chat. PAC2 (talk) 20:51, 8 November 2021 (UTC)Reply

Discussion in the project chat edit

For your information, there is a discussion related to Item documentation in the the project chat : Wikidata:Project_chat#Item_documentation_on_talk_page_header. PAC2 (talk) 20:27, 4 January 2022 (UTC)Reply

Follow-up here: MediaWiki_talk:Talkpageheader#Edit_request_2 There is a proposal to move this template to something like Template:Item documentation (temporary), blank this template and then call automatically using MediaWiki:Talkpageheader. Please comment at the discussion there if you have anything to say — Martin (MSGJ · talk) 08:53, 20 May 2022 (UTC)Reply

  Done — Martin (MSGJ · talk) 12:12, 26 May 2022 (UTC)Reply

✓ Done Generic queries for fictional characters edit

I propose to add the template {{Generic queries for fictional characters}} for all items of class fictional character (Q95074). See here : https://m.wikidata.org/wiki/Special:MobileDiff/1640977936?diffmode=source.

Does anyone disagree? PAC2 (talk) 20:28, 17 May 2022 (UTC)Reply

✓ Done Generic queries for elections edit

I propose to add the template {{Generic queries for elections}} for all items of class public election (Q40231) (See Special:MobileDiff/1656074724?diffmode=source). PAC2 (talk) 04:58, 7 June 2022 (UTC)Reply

Query linking items with lexemes edit

In the sandbox, I propose a new query (Special:MobileDiff/1663116140?diffmode=source) showing the list of all lexemes which correspond to the item by their sense.

I think it's very important to make the link between items and corresponding lexemes (see this discussion with Pa2chant.bis).

However, I still have some questions. This query is not relevant for humans, works or organizations since they should not have corresponding lexemes. I don't know what is the good filter.

Also, I don't know if we should show lexemes in all languages or only in the preferred language of the user.

What do you think? PAC2 (talk) 07:13, 19 June 2022 (UTC)Reply

  Checked : I've integrated the query. We will see if we need to add filters in the future. PAC2 (talk) 20:09, 21 June 2022 (UTC)Reply

Proposal to add {{Generic queries for transport network}} edit

With Bouzinac we've designed {{Generic queries for transport network}} for all items of class public transport network (Q18325841). We propose to add it to {{Item documentation}}.

Multichill (talk) Thryduulf (talk) 21:38, 2 November 2013 (UTC) -revi (talkcontribslogs)-- 01:13, 3 November 2013 (UTC) (was Hym411) User:JarrahTree (talk) 06:32, 3 November 2013 (UTC) A.Bernhard (talk) 08:28, 9 November 2013 (UTC) Micru (talk) 12:36, 9 November 2013 (UTC) Steenth (talk) YLSS (talk) 13:59, 25 November 2013 (UTC) Konggaru (talk) 12:31, 14 December 2013 (UTC) Elmarbu (talk) 21:48, 17 December 2013 (UTC) Nitrolinken (talk) 16:30, 14 February 2014 (UTC) George23820 Talk‎ 17:39, 17 August 2014 (UTC) Daniele.Brundu (talk) 21:34, 30 August 2015 (UTC) Dannebrog Spy (talk) 16:13, 9 December 2015 (UTC) Knoxhale 18:39, 26 June 2016 (UTC) happy5214 22:48, 8 July 2016 (UTC) Jklamo (talk) 07:32, 15 August 2016 (UTC) Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits DarTar (talk) 16:36, 5 September 2016 (UTC) Pizza1016 (talk | contribs) 01:33, 10 November 2016 (UTC) Sascha GPD (talk) 23:00, 1 February 2017 (UTC) Liuxinyu970226 (talk) 09:09, 2 February 2017 (UTC) A1AA1A (talk) 18:17, 21 May 2017 (UTC) Mauricio V. Genta (talk) 13:56, 9 June 2017 (UTC) Sam Wilson 10:26, 18 June 2017 (UTC) Danielt998 (talk) 05:01, 28 August 2017 (UTC) Maxim75 (talk) 06:04, 22 September 2017 (UTC) Fabio Bettani (talk) 17:48, 3 June 2018 (UTC) Geogast (talk) 23:51, 13 July 2018 (UTC) Bodhisattwa (talk) 19:29, 17 December 2018 (UTC) Jinoytommanjaly (talk) 13:13, 21 May 2019 (UTC) OktaRama2010 (talk) 00:25, 1 May 2020 (UTC) PhiH (talk) 14:20, 26 July 2020 (UTC) Jcornelius (talk) 18:47, 30 July 2020 (UTC) Mackensen (talk) 15:21, 29 August 2020 (UTC) Michgrig (talk) 22:04, 20 December 2020 (UTC) Trockennasenaffe (talk) 16:27, 5 September 2021 (UTC) Secretlondon (talk) 07:46, 3 September 2022 (UTC) GALAXYライナー (talk) 05:17, 14 October 2022 (UTC) Yirba (talk) 09:49, 10 August 2023 (UTC) Zwantzig (talk) 09:08, 07 September 2023 (UTC) S4b1nuz ᴇ.656(SMS) 16:16, 21 November 2023 (UTC) Prefuture (talk) 07:02, 16 December 2023 (UTC)Reply

  Notified participants of WikiProject Railways. PAC2 (talk) 20:13, 21 June 2022 (UTC)Reply

Proposal to add {{Generic queries for architects}} edit

I propose to add a new generic template for architects : Special:MobileDiff/1670357283?diffmode=source. PAC2 (talk) 07:17, 3 July 2022 (UTC)Reply

Article in the Signpost edit

In the last edition of the Signpost, I've written an article which explains how Item documentation can be used for assisting Wikipedia contributors. See the article here : Wikidata insights from a handy little tool. PAC2 (talk) 05:38, 15 August 2022 (UTC)Reply

New tool needed edit

We need a new tool called "depicted_by at Commons" (or some similar name) at Wikidata that links to, and gives a count, of items stored in Commons that use a Q-number from Wikidata in the depicts statements. If the tool existed I could click on it like I do at "What links here" and it would give me a count of how many documents at Commons link to say George Washington (Q23) and then list them. While that search would be large, and the count more important, for obscure people it would be very helpful to know there is an image at Commons and provide a link. Sometimes the person will be in a news article or we have an image of them. Currently we rely on the link to the Commons category, but there is always a mismatch between "depicts" and "Category:". If there is only one item, most people would not bother to create a category. It would help in deletion debates to know that a Wikidata entry is in-use at Commons with a depicts statement. We have deleted several Wikidata entries because we were not aware they were in-use at Commons. --RAN (talk) 00:28, 15 August 2022 (UTC)Reply

Yes I love the idea. We need to have a federated query between query.wikidata.org and https://wcqs-beta.wmflabs.org/. Do you have any example of such a query? This would be a good starting point. PAC2 (talk) 05:27, 15 August 2022 (UTC)Reply

A simple thing to do would be to add a link to a structured search on Commons.
For instance you can have the search of all medias in Commons with P180 equal to George Washington (Q23) with this url https://commons.m.wikimedia.org/w/index.php?search=haswbstatement%3AP180%3DQ23. PAC2 (talk) 06:13, 15 August 2022 (UTC)Reply
We can also add a link to the new View it tool : https://view-it.toolforge.org/?q=Q243 PAC2 (talk) 19:42, 30 August 2022 (UTC)Reply

See the diff Special:MobileDiff/1717199663?diffmode=source and the tests Template:Item documentation/testcases. PAC2 (talk) 20:24, 30 August 2022 (UTC)Reply

  Done PAC2 (talk) 19:50, 9 September 2022 (UTC)Reply

Class information edit

At the moment all class-related information (not just the classification) is collapsed in the "Classification of the class XXXX" section.

As a result, I have only just found the very very useful class-related queries that the template offers, which I hadn't previously realised existed.

Can I suggest maybe to move these out of the collapse-box, so that it is only the (potentially lengthy) classification tree that is collapsed? I think that could be quite helpful to people, to make these (very useful) queries more obvious. Thanks, Jheald (talk) 09:28, 14 September 2022 (UTC)Reply

Thanks a lot for this feedback. Right now, the classification tree and the class specific queries are in the same template. Therefore, the collapse apply to both automatically. However we could imagine to split {{Item classification}} into 2 templates. We could for instance create {{Generic queries for classes}}. PAC2 (talk) 17:13, 15 September 2022 (UTC)Reply
Perhaps a useful re-factoring anyway ? Jheald (talk) 17:25, 15 September 2022 (UTC)Reply
  Support I think this would make the template easier to read. — The Erinaceous One 🦔 06:26, 30 November 2022 (UTC)Reply
Thanks for the suggestions. I will do this as soon as possible. PAC2 (talk) 05:48, 14 March 2023 (UTC)Reply

Proposal to list statements with item as qualifier value, also references edit

@PAC2: I currently see no immediate means of finding cases where the item is used as a qualifier value. I propose adding "All qualifiers involving ..." alongside the existing "All claims about ..." for the sake of completeness. I don't think the two (claims and qualifiers) should be merged into a single query; it would make the resulting table too complex to read.

I would however consider including references and qualifiers in the same query, as the average number of references involving a particular item is probably too small to warrant a separate lookup, and the two could use the same table columns (with a separate column indicating Qual or Ref as appropriate to allow sorting them into different table sections). Maybe "All qualifiers/references involving ..." in that case then? --SM5POR (talk) 07:48, 10 March 2023 (UTC)Reply

@SM5POR thanks for the suggestion. It's a great idea. I think it would be better to separate qualifiers and references in two separate queries.
Do you have any example query which we could use in the template? PAC2 (talk) 05:51, 14 March 2023 (UTC)Reply
@PAC2 Yes, I agree; I changed my mind realizing the large number of references pertaining to items like German Wikipedia (Q48183). Here is a qualifier value example: All qualifiers involving consumer; it's based on the "All claims about" query. I'm not too sure about the optimization though; it may be possible to improve. --SM5POR (talk) 09:15, 15 March 2023 (UTC)Reply
I've implemented the query in the sandbox. See here and test cases. PAC2 (talk) 21:25, 9 April 2023 (UTC)Reply
I suggest also to add a query which adds all statement with the item as a reference. Here is my example query :

The following query uses these:

  • Items: Mediapart (Q619342)     
    #title: List of statement with Q619342 as a reference 
    SELECT ?subject ?subjectLabel ?property ?propertyLabel ?object ?objectLabel ?reference ?referenceLabel WHERE {
      hint:Query hint:optimizer "None".
      ?reference wikibase:reference ?pr.
      ?ref ?pr wd:Q619342.
      ?statement prov:wasDerivedFrom ?ref.
      ?subject ?p ?statement.
      ?property wikibase:claim ?p;
        wikibase:statementProperty ?ps.
        ?statement ?ps ?object.
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en". }
    }
    

PAC2 (talk) 20:53, 18 April 2023 (UTC)Reply

Only administrators can now change Item documentation edit

I discover that following @Ameisenigel contribution from last week (see https://www.wikidata.org/w/index.php?title=Template%3AItem_documentation&diff=prev&oldid=1872522170&diffmode=source), only administrators can now contribute to the Item documentation template. PAC2 (talk) 20:41, 18 April 2023 (UTC)Reply

I have protected this template because it is included in MediaWiki:Talkpageheader. We usually protect templates if they are used in the interface (e.g. the templates that are included in MediaWiki:Watchlist-summary are protected as well). Of course changes can be requested through {{Edit request}}. --Ameisenigel (talk) 08:31, 19 April 2023 (UTC)Reply
Thanks for your answer. I'll try to understand the process. PAC2 (talk) 21:20, 19 April 2023 (UTC)Reply

Add Czech translation edit

{{Edit protected}}

I’ve prepared a Czech translation of the template. Could some admin please apply User:Mormegil/Item documentation (diff)? Thanks. --Mormegil (talk) 17:41, 6 May 2023 (UTC)Reply

  Done. Can you please explain your modification concerning one CA translation (233rd line)? Was it intentional? Bencemac (talk) 12:19, 10 May 2023 (UTC)Reply
Thanks; yes, it was intentional, the “by property” part was IMHO an obvious forgotten remnant of the previous query caption. --Mormegil (talk) 07:38, 11 May 2023 (UTC)Reply
Thanks for clarifying! Bencemac (talk) 21:02, 11 May 2023 (UTC)Reply

Lua error for deleted items edit

I noticed in the talk of a deleted item (Talk:Q19325342) the following error: "Lua error in Module:Requests/union_of at line 199: attempt to index local 'item' (a nil value).". Could it be solved (e.g. avoiding this section for items having been deleted?). Thanks, --Epìdosis 15:55, 20 July 2023 (UTC)Reply

I also get "=== Union and disjoint queries===" instead of

Union and disjoint queries

185.221.219.189 03:36, 12 August 2023 (UTC)Reply

PositionHolderHistory|id= edit

Can{PositionHolderHistory|id= be part of the autodescription for position=? See: Talk:Q19546. The charts can get deleted or archived, or pushed down by discussions. RAN (talk) 23:07, 21 August 2023 (UTC)Reply

The header ({{PositionHolderHistory}}) could, but I don’t think the bot would find it that way, and it would be even more prone to breakage anyway if the header and the actual table would be defined at different places. The body itself couldn’t, since the body content is generated by the bot and differs from position to position, so including it in this template is not an option. —Tacsipacsi (talk) 23:27, 22 August 2023 (UTC)Reply

Add some Bengali translation edit

{{Edit protected}}

I’ve prepared remaining Bengali translation of this template. Please apply User:আফতাবুজ্জামান/sandbox (diff). Thanks. আফতাবুজ্জামান (talk) 17:29, 27 November 2023 (UTC)Reply

  Done --Matěj Suchánek (talk) 11:19, 3 December 2023 (UTC)Reply
Return to "Item documentation" page.