Template talk:Statement

From Wikidata
Jump to navigation Jump to search

Unmatched opening curly bracket[edit]

This template has an unmatched opening curly bracket ("{"). Presumably that's not deliberate? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 19:10, 23 June 2014 (UTC)[reply]

No, it's deliberate. I couldn't think of any other way to try to indicate that the following statement is associated with the item mentioned. Doesn't do a great job, though. --Yair rand (talk) 22:30, 23 June 2014 (UTC)[reply]
Hi, why do you think of {{C}} and its rendering ? It has a different color for the claim and allows qualifiers. TomT0m (talk) 16:18, 27 June 2014 (UTC)[reply]

@Yair rand: Well, Universe (Q1)instance of (P31)Universe (Q1) <= or < looks better for me. by Revicomplaint? at 13:31, 29 August 2014 (UTC)[reply]

I agree. I've changed the template to use <.
(Incidentally, that ping didn't actually show up in my notifications. Not sure why...) --Yair rand (talk) 16:57, 31 August 2014 (UTC)[reply]
Revi, Yair rand, what is the function of the greater-than sign in Universe (Q1)instance of (P31)Universe (Q1)? It's unfamiliar and jarring to me -- if it's not essential, can it be removed? Emw (talk) 11:24, 9 September 2014 (UTC)[reply]
You mean my example, or <? If it's latter, that means Q**** has statement "P** => Q***". Such as Yesan Mountain Fortress (Q18000000)instance of (P31)human (Q5) (in fact it isn't human, just example). Maybe we should modify < to <=? by Revicomplaint? at 11:31, 9 September 2014 (UTC)[reply]

Claim and statement templates[edit]

We should think of a way to merge the templates ... The main differences are:

  • Claim can handle qualifiers, while statement is more designed to handle statement lists on an item.
  • the appearance.

Maybe a solution with a scheme like would work:

Subject item
  • Statement1 / value
    qualifier1 value1
    qualifier2 value2
  • Statement2 / value
    qualifier12 value12
    qualifier22 value22
...

We got to find a good way to use parameters. Using lua maybe ? we would get more freedom. TomT0m (talk) 12:01, 14 July 2015 (UTC)[reply]

I believe moving to a Scribunto module would be good move and at least partially merging would also be good. That said a statement is a claim plus references. So far none of these really does the right thing. For example how to I express a claim on a property entity (property property item|value instead of item property item|value) ? 50.53.1.33 01:54, 31 October 2016 (UTC)[reply]

No real problem doing this. In {{C}} if the first parameter is not found to be a Qid or a number, it is rendered as wikitext, so if you write {{C|{{P|31}}||}} this just will work :
⟨ instance of (P31) ⟩  Wikidata property  ⟨ object or value ⟩
. author  TomT0m / talk page 14:18, 31 October 2016 (UTC)[reply]

Tests[edit]

comparison
{{Claim}} {{Statement}}
⟨ Ghandi ⟩ instance of (P31) View with SQID ⟨ human ⟩
Ghandiinstance ofhuman (Q5)
⟨ Ghandi ⟩ instance of (P31) View with SQID ⟨ human ⟩
start time (P580) View with SQID ⟨ Big bang ⟩
Ghandiinstance ofhuman (Q5)date of birth19th century
⟨ Ghandi ⟩ instance of (P31) View with SQID ⟨ human ⟩
start time (P580) View with SQID ⟨ Big bang ⟩
end time (P582) View with SQID no value Help
Ghandiinstance ofhuman (Q5)date of birth19th centurydate of death20th century
inline
⟨ Ghandi ⟩ instance of (P31) View with SQID ⟨ human ⟩
start time (P580) View with SQID ⟨ Big bang ⟩
end time (P582) View with SQID no value Help
test
inline Ghandiinstance ofhuman (Q5)date of birth19th centurydate of death20th century test

inline

⟨ Ghandi ⟩ instance of (P31) View with SQID ⟨ human ⟩
start time (P580) View with SQID ⟨ Big bang ⟩
end time (P582) View with SQID no value Help

test

inline Ghandiinstance ofhuman (Q5)date of birth19th centurydate of death20th century test


decrease padding to reduce line height[edit]

@Yair rand: Could we please slim the outcome of this template to something that always fits into lines? padding:3px; occasionally leads to an ugly overlap for instance if this template is used on a Flow talk page twice. I would suggest to make it padding:1px; (in vertical direction at least), which would suffice to my opinion. However, the syntax is a bit too complex for me to do that by myself… —MisterSynergy (talk) 08:17, 15 December 2015 (UTC)[reply]

Update to support Lexemes in the first parameter[edit]

See User:So9q/Template:statement --So9q (talk) 10:17, 21 March 2020 (UTC)[reply]

@Yair rand: could you take a look? Meanwhile I updated the documentation to warn that most entities are not supported. Cheers, VIGNERON (talk) 09:30, 14 July 2022 (UTC)[reply]