모듈:Wd/i18n/sandbox

-- The values and functions in this submodule should be localized per wiki.
local p = {}
function p.init(aliasesP)
	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",  -- increment this each time the below parameters are changed to avoid conflict errors
			"web" = {
				--  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" = {
				--  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"
			}
		}
	}
	p.getOrdinalSuffix = function(num)
		if tostring(num):sub(-2,-2) == '1' then
			return "th"  -- 10th, 11th, 12th, 13th, ... 19th
		end
		num = tostring(num):sub(-1)
		if num == '1' then
			return "st"
		elseif num == '2' then
			return "nd"
		elseif num == '3' then
			return "rd"
		else
			return "th"
		end
	end
	p.addDelimiters = function(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'numericdelimiter'):reverse()) .. right
		else
			return n
		end
	end
	return p
end
return p