Module:Wd/i18n: Difference between revisions
NeonWabbit (talk | contribs) No edit summary |
NeonWabbit (talk | contribs) No edit summary |
||
| Line 5: | Line 5: | ||
function p.init(aliasesP) | function p.init(aliasesP) | ||
p = { | p = { | ||
["version"] = " | ["version"] = "8", -- increment this each time the below parameters are changed to avoid reference conflict errors | ||
["errors"] = { | ["errors"] = { | ||
["unknown-data-type"] = "Unknown or unsupported datatype '%s'.", | ["unknown-data-type"] = "Unknown or unsupported datatype '%s'.", | ||
| Line 70: | Line 70: | ||
[aliasesP.referenceURL] = "url", | [aliasesP.referenceURL] = "url", | ||
[aliasesP.publicationDate] = "date", | [aliasesP.publicationDate] = "date", | ||
[aliasesP.lastUpdate] = "date", | |||
[aliasesP.retrieved] = "access-date", | [aliasesP.retrieved] = "access-date", | ||
[aliasesP.title] = "title", | [aliasesP.title] = "title", | ||
[aliasesP.subjectNamedAs] = "title", | |||
[aliasesP.archiveURL] = "archive-url", | [aliasesP.archiveURL] = "archive-url", | ||
[aliasesP.archiveDate] = "archive-date", | [aliasesP.archiveDate] = "archive-date", | ||
| Line 94: | Line 96: | ||
[aliasesP.title] = "title", | [aliasesP.title] = "title", | ||
[aliasesP.publicationDate] = "date", | [aliasesP.publicationDate] = "date", | ||
[aliasesP.lastUpdate] = "date", | |||
[aliasesP.retrieved] = "access-date" | [aliasesP.retrieved] = "access-date" | ||
} | } | ||
| Line 103: | Line 106: | ||
-- - raw-value-params: params taking a raw value (which means the property is rendered with getValue with raw=true) | -- - raw-value-params: params taking a raw value (which means the property is rendered with getValue with raw=true) | ||
-- - mandatory-params: params that are required be in the template call (after potentially appending numbers to params listed in numbered-params) | -- - mandatory-params: params that are required be in the template call (after potentially appending numbers to params listed in numbered-params) | ||
-- - prioritization: table associating a list of properties, in the order in which they are preferred, to template parameters; | |||
-- properties not mentioned here have the lowest priority; | |||
-- prioritization of properties handled through additionalProcessedProperties is unsupported; | |||
-- no key of this table can be from numbered-params | |||
-- Leaving out the "template" field causes the output type to be ignored. | -- Leaving out the "template" field causes the output type to be ignored. | ||
["web"] = { | ["web"] = { | ||
["template"] = "Cite web", | ["template"] = "Cite web", | ||
["numbered-params"] = {"author"}, | ["numbered-params"] = {"author"}, | ||
["mandatory-params"] = {"url"} | ["mandatory-params"] = {"url"}, | ||
["prioritization"] = { | |||
["date"] = {aliasesP.lastUpdate, aliasesP.publicationDate}, | |||
["title"] = {aliasesP.title, aliasesP.subjectNamedAs} | |||
} | |||
}, | }, | ||
["q"] = { | ["q"] = { | ||
["template"] = "Cite Q", | ["template"] = "Cite Q", | ||
["raw-value-params"] = {"1"}, -- the first, unnamed parameter of CiteQ takes a QID, not the name of the item cited | ["raw-value-params"] = {"1"}, -- the first, unnamed parameter of CiteQ takes a QID, not the name of the item cited | ||
["mandatory-params"] = {"1"} | ["mandatory-params"] = {"1"}, | ||
["prioritization"] = { | |||
["date"] = {aliasesP.lastUpdate, aliasesP.publicationDate} | |||
} | |||
} | } | ||
} | } | ||