Mòdul:Wikidades/i18n/en/ús

De la Viquipèdia, l'enciclopèdia lliure

Page for translation in local language and settings for local wiki used by Module:Wikidades. It includes:

  • Table i18n["errors"] for translations of messages.
  • Table i18n["datetime"] for default settings of date formats in local language. For each precision it accepts either:
    Input value is a number for precision 0 to 9, and a timestamp with ISO 8601 format for precision 10 and 11 (i.ex. +1582-10-04T00:00:00Z)
    • Table i18n["datetime"]["hms"] for abbreviated hours, minutes and seconds, as in 1h 23m 45shms. It is used with formatting=durationhms.
  • Table i18n["years-old"] for singular and plural expression for age, as 'year old' and 'years old', used by function yearsOld according to PLURAL magic word. It can include up to six values for some languages, from version 20210517. See the documentation of PLURAL magic word in your language, i.e. at m:Help:Magic words#Language-dependent word conversions, mw:Help:Magic words#Localization or translatewiki:Plural/Mediawiki plural rules, more detailed in base rules from CLDR and additional rules for Mediawiki. For example, Slavic languages as Russian use nominative singular, genitive singular and genitive plural; Arabic language use: zero, one, two, few 3-10, many 11-99, other 100-102. Default output format is "$1 ["years-old"]". Table values can include a pattern for formatting, i.e. "($1 years old)". This is used from version 20191204.
  • Table i18n["cite"] with parameter names of local templates Plantilla:Ref-web (Q5637226) and Plantilla:Ref-publicació (Q5624899). Those templates are used with option references= of function claim.
  • Variable i18n["addpencil"] (true/false) habilitates the pencil icon linked to corresponding Wikidata statement. Planned to overwrite by mw:Wikidata Bridge with a pop-up editing interface. See also parameter editicon in main module. It is false by default. This is used from version 20200129. If enabled with templates using prior versions of the module, check first that templates are not broken. See Module:Wikidata/addpencil/en/ús for some tips.
  • Variable i18n["categorylabels"]: category title populated with pages that have labels not found in the local language. By default, it is void with no categorization. This is used from version 20200210.
  • Variable i18n["categoryprop"]: tracking categories of pages by property used. Value $1 is the Pid used. If void then no category is added. This is used from version 20200810.
  • Variable i18n["categoryref"]: category title populated with pages that use references from Wikidata. By default, it is void with no categorization. This is used from version 20210304.
  • Table i18n["addfallback"] for additional fallback language codes added to default fallbacks defined in MediaWiki for the local language. Wikidata's labels are fetched by default in local language, its default fallback languages and the additional ones. Check default fallback languages defined in MediaWiki previewing {{#invoke:Wikidades/debug|getFallbacks|<code>}}. Please, avoid duplicating language codes. By default, it is an empty table {}. This is used from version 20200303.
  • Table i18n["suppressids"]: list of Qids, comma separated, with values to be suppressed. For example, {'Q22282939'} will suppress Contingut no lingüístic (Q22282939) in all queries. By default, it is an empty table {}. Statement definition «no value» is not any Qid, for this case see parameter shownovalue.
  • Variable i18n["qidlabels"]: (true/false) shows labels with numerical identifier Qid if no translation is found in local language or fallback languages. True by default, false optional.
  • Table cases for changes in labels needed in local wiki. See parameter case= of function claim. General purpose cases are:
    • case=infoboxlabel fix labels in local language to a more suitable form for an infobox (label parameter of infobox template). This is defined at Module:Wikidades/labels with function fixInfoboxLabel or table infoboxlabels.
    • case=infoboxdata fix label values in local language to a more suitable form for an infobox (data parameter of infobox template). This is defined at Module:Wikidades/labels with function fixInfoboxData or table infoboxdata. For example, it can be used for a short alias or abbreviation.
    • case=location adds a referent to a location or administrative unit, generally the state subject to local wiki fixes. In particular, case=locationcontext avoids any anachronistic reference according to a context date. Learn more at Module:Location/en
    • Genitive, plural and ordinal are examples or other potential grammatical cases that are language dependent. They can be defined here with a simple function or a more complex function calling another module. If necessary, ask for help at ca:Module talk:Wikidades.