Template talk:Q

From Wikidata
Jump to navigation Jump to search

Link to reasonator ?[edit]

If there is no opposition, I'll add a link to reasonator for the item, something like view with reasonator

(In the meantime I'll create the {{Reasonator}} template) TomT0m (talk) 18:18, 16 February 2014 (UTC)

Q template is used in many talk pages, technical reports, etc. I think link to Reasonator is not so useful to add it to all these pages. — Ivan A. Krestinin (talk) 18:50, 16 February 2014 (UTC)
The more Reasonator improves, the more interesting it becomes. Actually precisely on talk pages I find myself more and more frequently wanting to go on reasonator to have a better view on the item and to go to the edit page only if I need it, so I find this eventuality very useful (we're also discussing this on WD:PC btw.) TomT0m (talk) 19:35, 16 February 2014 (UTC)
From my point of view Resonator has two large disadvantages: it shows too many information and it does not allow quickly fix data mistakes. Another think: there are pages with large number of {{Q}} includes (for example Wikidata:Database reports/Constraint violations/P17 or Property talk:P225). Now its load time is not very high. Is suggested change increase page load time? — Ivan A. Krestinin (talk) 21:07, 16 February 2014 (UTC)
I don't think so, it's a trivial url generation with string concatenation, except if there is a really big issue with template transclusion ... I don't see how reasonator is worse to show data than Wikidata pages :) Anyway it would be a link addition, the link to the Wikidata page would not disappear. Plus reasonator editions capabilities are meant to be extended, now we can put items title in our language, it can do auto label description generation using item datas, I bet we soon be able to add this description to fill missing ones soon. TomT0m (talk) 21:17, 16 February 2014 (UTC)
Ivan A. Krestinin Hi, your pages seems to fail to load completely as is, can you split the constraint report into several subpages every N items with violation ? Independantly from the inclusion of {{Reasonator}} this seems to be a good idea ... for example ValterVB did this for his missing label and description report TomT0m (talk) 21:39, 16 February 2014 (UTC) EDIT : the second page of the report. He did not added an index page or navigation links but it was useless in this case. TomT0m (talk) 21:46, 16 February 2014 (UTC)
@TomT0m: I saw you test on User:ValterVBot/Labels and descriptions/fr/1 :) I can add it with bot, but I must split in max 500 item, so I need some day (propably) to update it. And yes you're right, I should add an index :) --ValterVB (talk) 22:14, 16 February 2014 (UTC)
@ValterVB: No thanks, there is no need to include this by bot :)
User:ValterVBot/Labels and descriptions/fr/1 shows one more annoyance: {{Q'}} increases line height and add many icons to list that are more bright than text but not more important than text. This is looked ugly. So please do not include link to Resonator to existing template. You created {{Q'}}. I think users who want insert link to Resonator to his comment or report can use {{Q'}}, who does not want - {{Q}}. — Ivan A. Krestinin (talk) 04:21, 17 February 2014 (UTC)
Ivan A. Krestinin The size of the icon is easily changeable, or another way to show the link is not a peoblem to create. TomT0m (talk) 07:53, 17 February 2014 (UTC)
As I say above please stay choice to users: add link to Resonator or do not add it to his comments. I do not want see this link in my comments (include archived) and reports. So if somebody want to see the link he can use {{Q'}}. — Ivan A. Krestinin (talk) 11:26, 17 February 2014 (UTC)
I leave choice to users :) that's why I ask :) Currently there is two for, Tobias1984 (talkcontribslogs), me, and one against, you. TomT0m (talk) 12:08, 17 February 2014 (UTC)

Did a test with {{Q'}} and Special:Redirect/109914938, it seems the limit is not the performance but the number of template inclusion (the last 100/150 Q templates are not expanded), which means it would work very fine if I had copy/pasted the code instead of using template inclusion. I'll do another test. TomT0m (talk) 22:10, 16 February 2014 (UTC)

OK, so, my results : {{Q'}} is a little more expensive than {{Q}} as it calls it and make some existence test. This is why some of the 100+ last items does not load in those cases. But adding the lines to include the link to reasonator does not change anything I noticed to that. So no, it would not penalize anything to include them in Q.

Ivan A. Krestinin : it is a good idea to split your report pages, it will make them load faster and most important will reduce the number of template inclusion per page, allowing your pages to be fully loaded. TomT0m (talk) 22:27, 16 February 2014 (UTC)

Wikimedia Commons[edit]

Could we use this template on Commons ? If yes, could someone import the template ? Pyb (talk) 17:15, 15 May 2014 (UTC)

Not yet. Phase 2 is necessary. Pyb (talk) 11:55, 20 May 2014 (UTC)


Template return Script error if Item is a redirect (ex. Q3760925) --ValterVB (talk) 07:52, 20 August 2014 (UTC)

Equivalent on client wikis[edit]

Is there a way I can use something like Q in a client wiki (for instance it.wikipedia) to show the "local title" (label), linked? --Nemo 10:51, 5 October 2014 (UTC)

Remove fragment from the link[edit]

{{Edit request}} Please remove #top from the links to make them behave like a standard [[Q...]] link. Petr Matas 02:11, 20 December 2014 (UTC)

@לערי ריינהארט: Why did you add it? Matěj Suchánek (talk) 16:14, 20 December 2014 (UTC)

After three days of no response here, I removed it. It's unnecessary and useless.--Jasper Deng (talk) 20:50, 23 December 2014 (UTC)


Hi, a sample templatedata it would be nice to include {{Edit request}}

Displays an item label in user language and a link to its wikipage

Template parameters


the item to show


 – The preceding unsigned comment was added by TomT0m (talk • contribs).

@TomT0m: - ✓ Done --George (Talk · Contribs · CentralAuth · Log) 16:10, 15 March 2015 (UTC)

Bug in Q20643070[edit]

Hello, it seems that there is a "display" problem with the item Q20643070. Indeed, here (in French), it shows "table (Q20643070)". Problem is "table" because this item does not have any label (in any language). Is it a Mediawiki bug or a bug of this template? Could someone fix this problem? Thanks in advance. Pamputt (talk) 19:15, 21 July 2015 (UTC)

It also shows "table (Q20643070)" in English. Thibaut120094 (talk) 20:50, 21 July 2015 (UTC)
Fixed [1]. --Zolo (talk) 21:15, 21 July 2015 (UTC)
Thank you. Pamputt (talk) 21:31, 21 July 2015 (UTC)
Merci. Visite fortuitement prolongée (talk) 21:59, 21 July 2015 (UTC)

Multiple items[edit]

I think it would be useful to support multiple items like {{Q|1|2|3}}Universe (Q1), Earth (Q2), life (Q3) – either in this template, or in a separate one (perhaps “Qs”). —Galaktos (talk) 21:52, 25 August 2015 (UTC)


{{Q| Q1}}Universe (Q1) – looks weird, should that be considered a bug? —Galaktos (talk) 21:06, 12 September 2015 (UTC)

Make it substitutable[edit]

Please make this template substitutable. --JulesWinnfield-hu (talk) 12:00, 2 March 2016 (UTC)

Language parameter?[edit]

The discussion here definitely prompts the idea of a second parameter to let one change the label output by this template. I've altered the version at Meta to do this already, but since the template there is much simpler there than on here, I'm curious as to how one would change the source of the template on Wikidata to allow for changing the label language. Mahir256 (talk) 16:14, 1 June 2016 (UTC)

"Ucfirst:" option[edit]

{{Edit request}}

Plase add otional parameter "ucfirst", and if it is specified, the result would be wrapped in {{ucfirst: and }}.


current look
  • code - {{label|{{{1|}}}}}
  • result (example for Q21502838) - conflicts-with constraint
proposed optional look
  • code - {{ucfirst:{{label|{{{1|}}}}}}}
  • result (example for Q21502838) - Conflicts-with constraint

This is needed for using in the documentation pages like Help:Property constraints portal/Commons link, in cases where a template called at the beginning of a sentence.

Proposed code:

<includeonly>{{#ifeq: {{str left|{{{1|}}}|1}} | Q  
 | [[{{{1|}}}|{{#if:{{{ucfirst}}}|{{ucfirst:{{label|{{{1|}}}}}}}|{{label|{{{1|}}}}}}} <small>{{int:parentheses|{{{1|}}}}}</small>]]
 | [[Q{{{1|}}}|{{#if:{{{ucfirst}}}|{{ucfirst:{{label|Q{{{1|}}}}}}}|{{label|Q{{{1|}}}}}}} <small>{{int:parentheses|Q{{{1|}}}}}</small>]]

--Kaganer (talk) 11:10, 3 April 2018 (UTC)

Kaganer Commons templates c:Template:Q and c:Template:Label use capitalization option for that purpose. Let's use that for consistency. --Jarekt (talk) 12:37, 13 April 2018 (UTC)
@Jarekt: I agree. Although ucfirst is shorter and more accurately reflects the claimed action. --Kaganer (talk) 21:07, 16 April 2018 (UTC)
✓ Done --Jarekt (talk) 14:20, 28 November 2018 (UTC)