이 모듈에 대한 설명문서는 모듈:Wd/i18n/설명문서에서 만들 수 있습니다
-- The values and functions in this submodule should be localized per wiki.
-- load submodule "aliasesP" that lives next to this submodule
local aliasesP = mw.loadData((...):sub(1, (...):match('^.*()/') - 1).."/aliasesP")
local p = {
["errors"] = {
["unknown-data-type"] = "‘$1’ 틀은 알 수 없거나 대응하지 않습니다. ",
["missing-required-parameter"] = "필요한 매개변수가 정의되어 있지 않습니다. 최소 하나 정도는 필요합니다.",
["extra-required-parameter"] = "매개변수 ‘'$1'’에 대해서는 임의로 정의할 필요가 있습니다.",
["no-function-specified"] = "호출을 하기 위한 함수를 지정해주세요.", -- equal to the standard module error message
["main-called-twice"] = '함수 ‘"main"’은 두번 호출할 수 없습니다.',
["no-such-function"] = '함수 ‘"$1"’가 존재하지 않습니다.' -- equal to the standard module error message
},
["info"] = {
["edit-on-wikidata"] = "위키데이터에서 직접 편집"
},
["numeric"] = {
["decimal-mark"] = ".",
["delimiter"] = ","
},
["datetime"] = {
["prefixes"] = {
["decade-period"] = ""
},
["suffixes"] = {
["decade-period"] = "년대",
["millennium"] = "천 세기",
["century"] = "세기",
["million-years"] = "백만 년",
["billion-years"] = "억 년",
["year"] = "년",
["years"] = "년"
},
["julian-calendar"] = "율리우스력", -- linked page title
["julian"] = "율리우스력",
["BCE"] = "BCE",
["CE"] = "CE",
["common-era"] = "en:Common Era" -- linked page title
},
["coord"] = {
["latitude-north"] = "북위",
["latitude-south"] = "남위",
["longitude-east"] = "동경",
["longitude-west"] = "서경",
["degrees"] = "° ",
["minutes"] = "' ",
["seconds"] = '"',
["separator"] = ", "
},
["values"] = {
["unknown"] = "알 수 없음",
["none"] = "없음"
},
["cite"] = {
["version"] = "2", -- increase this each time the below parameters are changed to avoid conflict errors
["web"] = {
-- <= left side: all allowed reference properties for *web page sources* per https://www.wikidata.org/wiki/Help:Sources
-- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite web]] (if non-existent, keep empty i.e. "")
[aliasesP.statedIn] = "website",
[aliasesP.referenceURL] = "url",
[aliasesP.publicationDate] = "date",
[aliasesP.retrieved] = "access-date",
[aliasesP.title] = "title",
[aliasesP.archiveURL] = "archive-url",
[aliasesP.archiveDate] = "archive-date",
[aliasesP.language] = "language",
[aliasesP.author] = "author", -- existence of author1, author2, author3, etc. is assumed
[aliasesP.publisher] = "publisher",
[aliasesP.quote] = "quote",
[aliasesP.pages] = "pages" -- extra option
},
["q"] = {
-- <= left side: all allowed reference properties for *sources other than web pages* per https://www.wikidata.org/wiki/Help:Sources
-- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite Q]] (if non-existent, keep empty i.e. "")
[aliasesP.statedIn] = "1",
[aliasesP.pages] = "pages",
[aliasesP.column] = "at",
[aliasesP.chapter] = "chapter",
[aliasesP.sectionVerseOrParagraph] = "section",
["external-id"] = "id", -- used for any type of database property ID
[aliasesP.title] = "title",
[aliasesP.publicationDate] = "date",
[aliasesP.retrieved] = "access-date"
}
}
}
function p.getOrdinalSuffix(num)
if tostring(num):sub(-2,-2) == '1' then
return "" -- 10th, 11th, 12th, 13th, ... 19th
end
num = tostring(num):sub(-1)
if num == '1' then
return ""
elseif num == '2' then
return ""
elseif num == '3' then
return ""
else
return ""
end
end
function p.addDelimiters(n)
local left, num, right = string.match(n, "^([^%d]*%d)(%d*)(.-)$")
if left and num and right then
return left .. (num:reverse():gsub("(%d%d%d)", "%1" .. p['numeric']['delimiter']):reverse()) .. right
else
return n
end
end
return p