https://drmf-beta.wmflabs.org/index.php?title=Module:Wd/i18n&feed=atom&action=history
Module:Wd/i18n - Revision history
2024-03-29T15:11:21Z
Revision history for this page on the wiki
MediaWiki 1.42.0-wmf.12
https://drmf-beta.wmflabs.org/index.php?title=Module:Wd/i18n&diff=63409&oldid=prev
Admin: 1 revision imported
2020-01-02T15:52:22Z
<p>1 revision imported</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 16:52, 2 January 2020</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Admin
https://drmf-beta.wmflabs.org/index.php?title=Module:Wd/i18n&diff=63408&oldid=prev
enwiki>Scottywong: Changed protection level for "Module:Wd/i18n": Highly visible template ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
2019-10-12T21:36:53Z
<p>Changed protection level for "<a href="/wiki/Module:Wd/i18n" title="Module:Wd/i18n">Module:Wd/i18n</a>": <a href="/index.php?title=WP:High-risk_templates&action=edit&redlink=1" class="new" title="WP:High-risk templates (page does not exist)">Highly visible template</a> ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</p>
<p><b>New page</b></p><div>-- The values and functions in this submodule should be localized per wiki.<br />
<br />
-- load submodule "aliasesP" that lives next to this submodule<br />
local aliasesP = mw.loadData((...):sub(1, (...):match('^.*()/') - 1).."/aliasesP")<br />
<br />
local p = {<br />
["errors"] = {<br />
["unknown-data-type"] = "Unknown or unsupported datatype '$1'.",<br />
["missing-required-parameter"] = "No required parameters defined, needing at least one",<br />
["extra-required-parameter"] = "Parameter '$1' must be defined as optional",<br />
["no-function-specified"] = "You must specify a function to call", -- equal to the standard module error message<br />
["main-called-twice"] = 'The function "main" cannot be called twice',<br />
["no-such-function"] = 'The function "$1" does not exist' -- equal to the standard module error message<br />
},<br />
["info"] = {<br />
["edit-on-wikidata"] = "Edit this on Wikidata"<br />
},<br />
["numeric"] = {<br />
["decimal-mark"] = ".",<br />
["delimiter"] = ","<br />
},<br />
["datetime"] = {<br />
["prefixes"] = {<br />
["decade-period"] = ""<br />
},<br />
["suffixes"] = {<br />
["decade-period"] = "s",<br />
["millennium"] = " millennium",<br />
["century"] = " century",<br />
["million-years"] = " million years",<br />
["billion-years"] = " billion years",<br />
["year"] = " year",<br />
["years"] = " years"<br />
},<br />
["julian-calendar"] = "Julian calendar", -- linked page title<br />
["julian"] = "Julian",<br />
["BCE"] = "BCE",<br />
["CE"] = "CE",<br />
["common-era"] = "Common Era" -- linked page title<br />
},<br />
["coord"] = {<br />
["latitude-north"] = "N",<br />
["latitude-south"] = "S",<br />
["longitude-east"] = "E",<br />
["longitude-west"] = "W",<br />
["degrees"] = "°",<br />
["minutes"] = "'",<br />
["seconds"] = '"',<br />
["separator"] = ", "<br />
},<br />
["values"] = {<br />
["unknown"] = "unknown",<br />
["none"] = "none"<br />
},<br />
["cite"] = {<br />
["version"] = "2", -- increase this each time the below parameters are changed to avoid conflict errors<br />
["web"] = {<br />
-- <= left side: all allowed reference properties for *web page sources* per https://www.wikidata.org/wiki/Help:Sources<br />
-- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite web]] (if non-existent, keep empty i.e. "")<br />
[aliasesP.statedIn] = "website",<br />
[aliasesP.referenceURL] = "url",<br />
[aliasesP.publicationDate] = "date",<br />
[aliasesP.retrieved] = "access-date",<br />
[aliasesP.title] = "title",<br />
[aliasesP.archiveURL] = "archive-url",<br />
[aliasesP.archiveDate] = "archive-date",<br />
[aliasesP.language] = "language",<br />
[aliasesP.author] = "author", -- existence of author1, author2, author3, etc. is assumed<br />
[aliasesP.publisher] = "publisher",<br />
[aliasesP.quote] = "quote",<br />
[aliasesP.pages] = "pages" -- extra option<br />
},<br />
["q"] = {<br />
-- <= left side: all allowed reference properties for *sources other than web pages* per https://www.wikidata.org/wiki/Help:Sources<br />
-- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite Q]] (if non-existent, keep empty i.e. "")<br />
[aliasesP.statedIn] = "1",<br />
[aliasesP.pages] = "pages",<br />
[aliasesP.column] = "at",<br />
[aliasesP.chapter] = "chapter",<br />
[aliasesP.sectionVerseOrParagraph] = "section",<br />
["external-id"] = "id", -- used for any type of database property ID<br />
[aliasesP.title] = "title",<br />
[aliasesP.publicationDate] = "date",<br />
[aliasesP.retrieved] = "access-date"<br />
}<br />
}<br />
}<br />
<br />
function p.getOrdinalSuffix(num)<br />
if tostring(num):sub(-2,-2) == '1' then<br />
return "th" -- 10th, 11th, 12th, 13th, ... 19th<br />
end<br />
<br />
num = tostring(num):sub(-1)<br />
<br />
if num == '1' then<br />
return "st"<br />
elseif num == '2' then<br />
return "nd"<br />
elseif num == '3' then<br />
return "rd"<br />
else<br />
return "th"<br />
end<br />
end<br />
<br />
function p.addDelimiters(n)<br />
local left, num, right = string.match(n, "^([^%d]*%d)(%d*)(.-)$")<br />
<br />
if left and num and right then<br />
return left .. (num:reverse():gsub("(%d%d%d)", "%1" .. p['numeric']['delimiter']):reverse()) .. right<br />
else<br />
return n<br />
end<br />
end<br />
<br />
return p</div>
enwiki>Scottywong