Njuikes sisdollui

Modula:Ca:Wikidata/veahkki

Wikipedia

Dette er dokumentasjonssiden for Modula:Ca:Wikidata

[ edit ]

Documentation in Catalan Wikipedia in English.

Pages
Changelog
  • 2019-03-18 Prefixed everything to Module:Ca:Wikidata (diff)
  • 2019-03-19 Fixed references printing bug, added whitelist/blacklist is defined filtering. (diff1, diff2)
{{#invoke:Ca:Wikidata|claim|property= |qualifier= |value= |list= |tablesort= |formatting= |separator= |conjunction= |item= |lang= |editicon= |showerrors= |default= }}
Additional parameters
{{#invoke:Ca:Wikidata|claim|property= |qualifier= |qualifier2= |...|qualifierx= |formatting=table |tablesort= |sorting= |rowformat= |rowsubformat1= |...|rowsubformatx= |colformat0= |...|colformatx= |case0= |...|casex= |separator= |conjunction= |item= |lang= |editicon= |showerrors= |default= }}

The Beatles: {{#invoke:Ca:Wikidata|claim|item= Q1299 | property = p527 |qualifier = P580 |qualifier2 = P582|formatting=table|tablesort= 1 |rowformat=* $0 <small>($1 - $2)</small>|separator=,  |conjunction= and |colformat1=Y|colformat2=Y}}

The Beatles:

Population: {{#invoke:Ca:Wikidata |claim| item= Q985564| property = P1082|qualifier = P585 |formatting=table|rowformat=* $0 $1|tablesort=1|sorting=-1|colformat1=Y-m-d|references=true}}

  • 19 831 [1] 2007-12-31 WBREPONAME}}

Infobox usage

[rievdat wikiteavsttain]
claim
Returns with a certain format the value (or values) of a statement or the qualifier of a statement. By default, this refers to the item (Qnnnn) of the active article.
getLabel
Returns a tag in the specified language, or the default language.

Currently not supported functions. See usage from cawiki. getParentValues, linkWithParentLabel, getTAValue, years_old

Text is blindly Google translated and needs love and care. Please remove this after checking. Source: Catalan Wikipedia (Google Translate)
  • property (mandatory) = Property of the declaration, with format "P" followed by a number.
  • qualifier (optional) = Qualifier property, with format "P" followed by a number. Numbering goes qualifier, qualifier2, qualifier3 ...
  • value (optional) = Preferred value to Wikidata. If value is - then do not display anything.
  • list (optional, deprecated) = default value true is only supported value in sewiki. Other values see cawiki.
  • formatting (optional) = Formatting type. possible values, for each type:
    • Entity format:
      • formatting = raw Identifier number of the element.
      • formatting = label Element tag.
      • formatting = sitelink Title of the Wikipedia page of the item, without a link. If it does not exist, the raw format returns with the wikidata prefix :.
      • formatting = internallink Internal link whenever possible, either on the Wikipedia page (sitelink) or on the label. If there is no link to the Wikipedia element, and there is a tag, it prevents the default link to Wikidata, even if it is a red link.
      • formatting = pattern Format according to a pattern using $ 1 as the parameter to replace.
        You can include templates or parser functions in the format: {{{{{}} template {{!}} Parameter {{!}} Name {{ = }} parameter {{ ) }}}
      • The default format is a linked link, either to sitelink or to a wikited: raw , using label as the link tag.
        • formatting = ucfirst Variant of the default uppercase format on the label. In a list, just capitalize on the first element.
        • formatting = ucinternallink Variant of the "ucfirst" format combined with "internallink".
    • Text format (string)
      • formatting = weblink External link format [http://example.com example.com]
      • formatting = pattern Format according to a pattern using $1 as the parameter to replace. Example: formatting=[http://whc.unesco.org/en/list/$1 $1]. For properties that already have a self-generated WD link, the pattern is found on the property's discussion page.
    • Numeric format (quantity)
      • formatting=unit Numeric format including drive. If it's different from 1, put it in plural according to Module: Wikidata / Units.
      • formatting=unitcode Numeric format including the code or abbreviation of the unit. For a code other than the one defined in Symbol of the unit (P5061) you can add it to Module: Wikidata / Units.
    • Multilingual text format (monolingualtext)
      • formatting = language code in which the value of the parameter is written, in the case of parameters with monolingual text format, such as the official Name Almmolaš namma (P1448).
      • formatting = text Recovers raw text, without the mark of language.
        By default, the language flag is included when it's different from the local language of the wiki: <span lang="en">United...</span> .
      • formatting = pattern Format according to a pattern using $ language and $ text as variables to be replaced. For example, "formatting = ($ language) $ text" to remove the text with the language code in parenthesis front.FIXME: lost in google translation
      • list = lang Sols removes the values ​​corresponding to the defined language or the default language. See lang parameter.
    • Format coordinates (globecoordinate)
      • formatting = latitude Latitude value in a coordinate declaration, in decimal format
      • formatting = longitude value in a coordinate declaration, in decimal format
      • formatting = dimension value in a coordinate declaration, in meters, equivalent to the dim parameter of GeoHack .
      • formatting = globe (by default) Template globe parameter value : coord , required for coordinates outside the Earth. The data is defined in the Module: Map celestial / data .
    • Date format (time):
      • formatting = format #time Accepts any valid format of the #time parser function . For example: formatting = dmY (03-19-2019), formatting = [[jgg]] ( March 19 )
      • formatting = Y (2019). By default, use the format "j FY" (March 19, 2019)
    • Tableformat (item + qualifiers)
      • formatting=table Properties list formatting=table with its qualifiers. You can indicate the format of each line and each column in the table. The separators are by default line breaks (see separator and conjunction ). Specific parameters for this format:
      • qualifier2 ... qualifierN = Additional qualifier to the first qualifier , with unlimited number of consecutive values. qualifier x = P nnn1 OR P nnn2 Alternative definition of a qualifier when the first one does not exist. A case of typical use is Date (P585) OR Start date (P580) . There is no limit for successive ORs. The blank spaces before and after are optional.
      • qualifierN = P nnn1 /P nnn2 Higher property P nnn2 of the element corresponding to P nnn1 being this one of the qualifiers or the property. With an empty value of P nnn1 (qualifier x = / P nnn2 ) obtains a second property of the same element. Allows you to obtain additional data defined in the corresponding element. For example, to get the subway lines with its icon: qualifier = P81 / P154. It can be combined with the OR option taking the OR priority.
      • rowformat= Format of the most qualifying row of property. The property is indicated with $ 0 and the qualifications $ 1 to $ x. Default is rowformat=$0 ($1, ... $x) . You can include lists * or # and also templates or parser functions in the format: {{{{{}} template | Parameter | Name = parameter Málle:)}
      • rowsubformat1 ... rowsubformat x = Optional subform to apply to $ 1- $ x defined in rowformat. It may be useful not to break the format in case of an empty qualifier. For example, "rowformat = $ 0 $ 1" and "rowsubformat1 = for $ 1" results "$ 0 for $ 1" or "$ 0" without a qualifier.
      • colformat0 ... colformat x = Optional format to apply to the columns, 0 for the property and 1-x for the qualifiers. Accept the same syntax as formatting for each type of value.
      • case0 ... case x = Grammatical case to apply to each column. See below. The case parameter, without numbering, applies to all values.
      • whitelist0 ... whitelist x = List, separated by a vertical bar (/), of the items to display for a column.
      • blacklist0 ... blacklist x = List, separated by a vertical bar (/), of the items that will not be displayed for a column. If you use a whitelist for a column and a blacklist for another, the results may be unexpected (see a comment on it )
      • tablesort = with values ​​of 0 ax, allows to order the table by the property (0) or the qualifiers (1 ax). Accept multiple keys separating them with / . Ex: tablesort=0/2/1. By default, sorting is by the rank of the property (preferential, normal, obsolete) and by the age of definition in Wikidata.
      • sorting = -1 reverses the sorting by descending it. With any other value, or in its absence, the order is ascending. In the case of tablesort with multiple keys, the sorting criteria will be applied to all equally.
      • list=false (see above) removes only the first row of the table, according to the order indicated or by default.
  • separator(optional) = Separator to use in lists or tables. In the case of lists, the default is MediaWiki: Comma-separator , in Catalan a comma and a blank space ','. In case of default tables is a line break
    . In some cases, if it is included in tags that use strip markers ,
    one
    may not work. The alternative is to use separator = LF for a line feed control character.
  • conjunction (optional) = Conjunction to use as a separate tab between the last two elements in the list. The default is equal to the separator if it is defined and if it is not MediaWiki: And more MediaWiki: Word-separator , in Catalan 'i'. In the case of default tables is a line break
  • case (optional) = Grammatical case to be generated. Defined cases:
    • case = gender, according to the definition of Sex or gender (P21) of the element (current page, item or itemgender) removes the value of Female form of the label (P2521) .
    • case = infoboxlabel, remove the label without complement with prepositions and other corrections defined in Module: Wikidata / labels in the table infoboxlabels. It can be combined with itemgender to add in addition the case = gender.
    • case = infoboxdata, for changes in the tag of the link in values ​​of a infobox, for example to use a simpler alias or abbreviations more appropriately for a infobox. The changes are defined in the table infoboxdata of the Module: Wikidata / labels . It is necessary to consider beforehand if it were necessary to modify the tag to Wikidata.
    • case = smallcaps, remove the label in the poplar case.
  • item(optional) = Allows you to specify an item (Qnnnnn) other than the active item. It is necessary to use it moderately for its high consumption of resources. It can also be used as a global parameter in the template or higher invocation.
  • itemgender (optional) = Element where the female shape is checked according to Sex or gender (P21) , by default item . It is used in combination with case = gender or case = infoboxlabel.
  • lang (optional) = Indicates the code of a given language. It can also be used as a global parameter in the template or higher invocation. By default, use the local wiki language for the main article space or user language defined in preferences for other namespaces. If you do not find the value in this language try it in the alternative languages ​​defined in MediaWiki. For example, for Catalan, the alternative languages ​​are Occitan and English. If the value has not been found in the requested language, add a small pencil as an icon to translate it into Wikidata. This icon can be removed with the editicon parameter.
  • dotranslations (optional) = try to failback to other languages than northern sami. If failback language is used the text is highlighted with yellow and article is categorized to category:Wikipedia:Links_to_Wikidata_element_with_missing_Northern_Sami_label
  • editicon (optional) = Defines if you put a small pencil Translate as an icon to edit Wikited in case the value has not been found in the requested language. Default is true . With editicon = false or editicon = is not false .
  • showerrors (optional) = With any value, it shows the error message, if any. If it is not defined it will display the default parameter in case of error.
  • default (optional) = Text to display in case of error. It has no effect if the showerrors setting is defined. If it is not defined, and neither the showerrors parameter will return an empty value in the event of an error.
  1. Kaupunkien ja kuntien lukumäärät ja väestötiedot: Finlands kommunförbund.