Property talk:P373

From Wikidata
Jump to navigation Jump to search

Documentation

Commons category
name of the Wikimedia Commons category containing files related to this item (without the prefix "Category:")
RepresentsCommons category (Q24574745)
Data typeString
Corresponding templateTemplate:Commons category (Q48029)
Template parametercommons or commonscat in dozens of templates in many languages, such as nl:Sjabloon:Taxobox
DomainNo restriction (note: this should be moved to the property statements)
Allowed values
According to this template: Only existing Commons categories are allowed. The name is without the "Category:" prefix
According to statements in the property:
[^{}\[\]<>]+
When possible, data should only be stored as statements
Usage notes입력할 때 분류명 앞에 붙는 "Category:"는 빼고 쓰세요.
ExampleCalosoma reticulatum (Q569101)Calosoma reticulatum
Gorilla (Q36611)Gorilla
Bangladesh Armed Forces (Q790022)Bangladesh Armed Forces
Formatter URLhttps://commons.wikimedia.org/wiki/Category:$1
Robot and gadget jobsBots should be collecting this based on current template usage. If a category at Commons gets deleted and/or renamed, Wikidata should be updated. The commonscat.py Pywikipedia script should be updated.
Tracking: sameCategory:Commons category with local link same as on Wikidata (Q11925741)
Tracking: differencesCategory:Commons category with local link different than on Wikidata (Q11925740)
Tracking: usageCategory:Commons category link is on Wikidata (Q22914718)
Tracking: local yes, WD noCategory:Commons category not in Wikidata, but available on Wikipedia (Q19821559)
See alsotopic's main category (P910), Commons gallery (P935), Commons Institution page (P1612), Commons Creator page (P1472), content partnership category (P8464)
Lists
Proposal discussionProposal discussion
Current uses
Total5,008,539
Main statement4,999,24099.8% of uses
Qualifier6,2530.1% of uses
Reference3,046<0.1% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
Conflicts with “instance of (P31): Wikimedia template (Q11266439): this property must not be used with the listed properties and values. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P373#Conflicts with P31, search, SPARQL
Format “(?!:?Category:)[^{}\[\]<>]+: value must be formatted using this pattern (PCRE syntax). (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P373#Format, SPARQL
Scope is as main value (Q54828448), as reference (Q54828450): the property must be used by specified way only (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P373#Scope, SPARQL
Single value: this property generally contains a single value. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: Hussein (Q30091418)
List of violations of this constraint: Database reports/Constraint violations/P373#Single value, SPARQL
Allowed entity types are Wikibase item (Q29934200): the property may only be used on a certain entity type (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P373#Entity types
Link to Commons namespace “Category”: this property should contain a well-formed link to an existing page on Wikimedia Commons. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P373#Commons link
This property is being used by:

Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.)

Constraints[edit]

Commons sitelinks to be copied to P373 property
Items with no P373, but with a category in the Commons sitelink. That category can be saved as P373. (Help)
Violations query: SELECT ?item ?sitelink WHERE { ?item ^schema:about [ schema:isPartOf <https://commons.wikimedia.org/>; schema:name ?sitelink ] . MINUS { ?item wdt:P373 [] } . MINUS { ?item wdt:P31 wd:Q4167836 } . MINUS { ?item wdt:P31 wd:Q4167410 } . FILTER( STRSTARTS( ?sitelink, 'Category:' ) ) . } LIMIT 500
List of this constraint violations: Database reports/Complex constraint violations/P373#Commons sitelinks to be copied to P373 property
Commons sitelinks different from P373 property
Items with sitelinks linking to a different category than the property (Help)
Violations query: SELECT DISTINCT ?item { ?item wdt:P373 ?ccat; ^schema:about [ schema:isPartOf/^wdt:P856 wd:Q565; schema:name ?name ] . FILTER ( STRSTARTS( STR( ?name ), 'Category:' ) ) . FILTER ( STRAFTER( STR( ?name ), 'Category:' ) != ?ccat ) . } LIMIT 7000
List of this constraint violations: Database reports/Complex constraint violations/P373#Commons sitelinks different from P373 property
Two category items linking to the same Commons category
Generally only one category item should link to a Commons category (Help)
Violations query: SELECT DISTINCT ?item ?item2 ?value { ?item wdt:P373 ?value . ?item wdt:P31 wd:Q4167836 . ?item2 wdt:P373 ?value . ?item2 wdt:P31 wd:Q4167836 . FILTER( ?item != ?item2 && STR( ?item ) < STR( ?item2 ) ) . } LIMIT 1000
List of this constraint violations: Database reports/Complex constraint violations/P373#Two category items linking to the same Commons category
Commons category sitelink does not match P373
P373 should generally be the same as the sitelink (Help)
Violations query: SELECT ?item ?commonscat ?sitelink ?name WHERE { ?item wdt:P373 ?commonscat. ?sitelink schema:about ?item; schema:isPartOf <https://commons.wikimedia.org/>; schema:name ?name . FILTER( CONTAINS(STR(?sitelink), 'Category:') = true ) . FILTER( ?commonscat != SUBSTR(STR(?name), 10) ) .} LIMIT 1000
List of this constraint violations: Database reports/Complex constraint violations/P373#Commons category sitelink does not match P373

Discussion[edit]

Context at time of creation[edit]

This property is an intermediate step until we have full Commons support. When we get that we can just convert the data. Up until now Commons category links got updated the interwiki way: Decentral with a lot of efforts, see this page for some statistics. By putting this in a central place we are much more efficient and it doesn't really matter anymore what kind of templates some language Wikipedia use to represent the data. Multichill (talk) 20:44, 30 March 2013 (UTC)Reply[reply]

See Wikidata:Wikimedia Commons for next discussions. --ŠJů (talk) 21:52, 25 April 2013 (UTC)Reply[reply]

English property title[edit]

Hi. I changed "Commons category" to "Wikimedia Commons category", as I think the former is ambiguous and confusing. My edit was undone in this edit as being "too long". I don't understand. Are there length restrictions or guidelines somewhere? --MZMcBride (talk) 16:34, 6 April 2013 (UTC)Reply[reply]

Dear MZMcBride, names here can be ambiguous, that's why we have a description for this property. This is the standard name used in most Wikipedia's and changing it is confusing. Multichill (talk) 18:30, 9 April 2013 (UTC)Reply[reply]
"Wikimedia Commons" seems to be far more popular as an article title than "Commons", looking at Q565. "Commons" is a regular noun in English. That's where the name "Wikimedia Commons" got its name, of course. It seems kind of silly to now associate "Commons" primarily with a file repository. --MZMcBride (talk) 06:43, 12 April 2013 (UTC)Reply[reply]
Capitalized word Commons is not a regular noun in English, the capitalization is adequate distinguishing. --ŠJů (talk) 15:57, 6 August 2013 (UTC)Reply[reply]

Galleries on Commons[edit]

There're a lot of pages in the main namespace on Wikimedia Commons, they are usually galleries and also often contain interwiki. Is there a property for this? If no, I want to create one. Ain92 (talk) 11:27, 12 June 2013 (UTC)Reply[reply]

No, that one hasn't been created yet. Probably has to do with the fact that galleries are much less used than categories on Commons. Commons has 109.210 galleries and 2.727.327 categories. Multichill (talk) 21:45, 13 June 2013 (UTC)Reply[reply]
Proposed at Wikidata:Property proposal/Sister projects#Commons gallery 7 July 2013. --ŠJů (talk) 15:52, 6 August 2013 (UTC)Reply[reply]

Unique value violations[edit]

This should ignore duplicates which are in different namespaces (article/category/portal). JAn Dudík (talk) 09:28, 1 August 2013 (UTC)Reply[reply]

  • Already done, special form {{Constraint:Unique value|separate category processing=yes}} is used. — Ivan A. Krestinin (talk) 20:06, 6 August 2013 (UTC)Reply[reply]

A check of disambiguation pages would be fine, because a commons category link should not be disambig.

It is possible to check this in the database by joining the table page_props on pp_page = page_id and look for rows, where pp_propname = 'disambiguation'. Thanks. 84.182.127.111 13:48, 6 August 2013 (UTC)Reply[reply]

This check can be included in the "Existing category" check. Treat a disambig category as missing and add a hint behind it to see it in the database report. That would be enough, no need for a new check. 84.182.125.23 02:25, 13 August 2013 (UTC)Reply[reply]

A check if the linked commonscat is a "category redirect" would be fine. 84.182.125.23 18:35, 12 August 2013 (UTC)Reply[reply]

This check can be included in the "Existing category" check. Treat a category redirect as missing and add a hint behind it to see it in the database report. That would be enough, no need for a new check. 84.182.125.23 02:25, 13 August 2013 (UTC)Reply[reply]
This check is included in the "Existing category" already. — Ivan A. Krestinin (talk) 03:22, 13 August 2013 (UTC)Reply[reply]

Next step[edit]

At Wikidata:Property proposal/Generic#Topic main category I proposed a new property that will replace this one over time. Multichill (talk) 19:01, 9 September 2013 (UTC)Reply[reply]

Now that Commons is linked to Wikidata, is it time to get rid of Commons category (P373) entirely? — JFG talk 02:30, 31 October 2013 (UTC)Reply[reply]
See Wikidata:Requests for comment/Commons links. — Ivan A. Krestinin (talk) 04:10, 31 October 2013 (UTC)Reply[reply]
No, too early. This is used a lot and no replacement is available yet. Multichill (talk) 20:40, 31 October 2013 (UTC)Reply[reply]
Just a late comments, interwiki links are for galleries therefore this property is still essential. John F. Lewis (talk) 20:26, 30 January 2014 (UTC)