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)[reply]

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)[reply]
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)[reply]
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)[reply]
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)[reply]
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)[reply]
@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)[reply]
@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)[reply]
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)[reply]
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)[reply]
I leave choice to users :) that's why I ask :) Currently there is two for, Tobias1984, me, and one against, you. TomT0m (talk) 12:08, 17 February 2014 (UTC)[reply]

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)[reply]

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)[reply]

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)[reply]

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

Redirect[edit]

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

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)[reply]

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)[reply]

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

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

templatedata[edit]

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

ParameterDescriptionTypeStatus
item1

the item to show

Page namerequired

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

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

{{Editprotected}} I think this should not have been added to the main template page. There is a (freely editable) /doc subpage, which is (surprise!) for such documentation. I added TemplateData to the /doc subpage, please remove it from the main template page. Thanks in advance, —Tacsipacsi (talk) 13:27, 4 July 2020 (UTC)[reply]

✓ Done --Matěj Suchánek (talk) 17:05, 6 July 2020 (UTC)[reply]

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)[reply]

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

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)[reply]

whitespacing[edit]

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

@galaktos: Are you saying you saw the space reproduced in the output? Because if so, that got fixed and is not the current behaviour. Arlo Barnes (talk) 00:35, 31 December 2019 (UTC)[reply]
@Arlo Barnes: I have no idea what I was saying four years ago :D looks fine now, yeah. —Galaktos (talk) 21:28, 6 January 2020 (UTC)[reply]

Make it substitutable[edit]

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

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)[reply]

"Ucfirst:" option[edit]

{{Edit request}}

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

Example:

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>]]
}}</includeonly>

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

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)[reply]
@Jarekt: I agree. Although ucfirst is shorter and more accurately reflects the claimed action. --Kaganer (talk) 21:07, 16 April 2018 (UTC)[reply]
✓ Done --Jarekt (talk) 14:20, 28 November 2018 (UTC)[reply]

add an anchor as available in template:Property[edit]

Hi! each statement and identifier in an item offers to address this content using #Pfoo . is it possible to allow a named or unnamed parameter to append #PARAMETER to the generated link? regards
no bias — קיין אומוויסנדיקע פּרעפֿערענצן — keyn umvisndike preferentsn talk contribs 18:14, 9 November 2019 (UTC)[reply]


Label language on EntityUsage: ko and or loaded[edit]

Using {{Q+|86989622}} ( entity selector (Q86989622): feature of Wikibase ) on Help:Suggesters and selectors shows on Special:EntityUsage/Q86989622 several languages in addition to "en". Is this a bug somewhere in {{Q}}, {{Q+}} or {{Autodescription}}, a module, or of Wikibase itself? --- Jura 15:29, 10 March 2020 (UTC)[reply]

I think this is a bad use of Wikibase Lua API. --Matěj Suchánek (talk) 10:35, 11 March 2020 (UTC)[reply]

Bug when label includes wikicode[edit]

{{Q|Q27931257}} renders as:

Isolation, characterization, and inactivation of the APA1 gene encoding yeast diadenosine 5',5'''-P1,P4-tetraphosphate phosphorylase (Q27931257)

although the correct title is:

Isolation, characterization, and inactivation of the APA1 gene encoding yeast diadenosine 5',5'''-P1,P4-tetraphosphate phosphorylase

We need some code to trap this and similar cases. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 20:22, 7 November 2020 (UTC)[reply]

Reported to Module talk:Wikidata label#Escaping. --Matěj Suchánek (talk) 11:38, 8 November 2020 (UTC)[reply]
✓ Done @Pigsonthewing, Matěj Suchánek: This was fixed at the source by c:Special:Diff/524477781/prev and locally by Special:Diff/1336321084/prev. —Uzume (talk) 03:54, 7 January 2021 (UTC)[reply]

Direction[edit]

{{Edit request}}

Labels in RTL languages are shown as if they are LTR. Here's an example:

Forced ltr: one Halych (Q146450) two

Forced rtl: אחת Halych (Q146450) שתיים

The display of the link is supposed to be the same in both lines. That is, even if the Hebrew label is embedded within English text, the label must still be RTL. In particular, the apostrophe character (') is supposed to be on the left end of the label: האליץ'.

This happens very often if my UI is in Hebrew, but I'm reading a talk page or a user page in English.

Ideally, the HTML structure should be like this:

  1. The label must be in a span tag with the lang and the dir value of the language in which it's displayed.
    • If the label is not translated to that language, there are two possible solutions:
    1. If it's possible, figure out which language this is, and use the lang and dir values of that language.
    2. If it's not possible, that's OK! The easy solution is to translate the label, and someone should translate it anyway :)
  2. The Q number must be in <span dir="ltr">. It's always LTR, and putting it within a tag with an explicit dir value makes sure that it's bidi-isolated and doesn't get jumbled up with the label, the words next to it, etc.

Can anyone please fix that?

Thanks :) Amir E. Aharoni {{🌎🌍🌏}} talk 13:40, 29 February 2024 (UTC)[reply]

@User:יונה בנדלאק: could you help? Estopedist1 (talk) 20:29, 29 February 2024 (UTC)[reply]
I don't have enough technical knowledge to do it. i can see that this template use template:Label who use module:Wikidata label. I think it better to add a fix at the module. - yona b (talk) 09:24, 3 March 2024 (UTC)[reply]
@Amire80:: seems to be a technical problem. I opened discussion here: Template_talk:Q#Direction--Estopedist1 (talk) 20:16, 3 March 2024 (UTC)[reply]