มอดูล:number list/data/tlh
หน้าตา
- The following documentation is generated by Module:documentation. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • testcases • sandbox
This module contains data on various types of numbers in Klingon.
(edit)
local export = {}
local numbers = {}
export.numbers = numbers
numbers[0] = {cardinal = "pagh"}
numbers[1] = {cardinal = "wa'"}
numbers[2] = {cardinal = "cha'"}
numbers[3] = {cardinal = "wej"}
numbers[4] = {cardinal = "loS"}
numbers[5] = {cardinal = "vagh"}
numbers[6] = {cardinal = "jav"}
numbers[7] = {cardinal = "Soch"}
numbers[8] = {cardinal = "chorgh"}
numbers[9] = {cardinal = "Hut"}
numbers[10] = {cardinal = "maH"}
local function unpack_ipairs(t)
local i = 0
return function()
i = i + 1
if t[i] then
return i, unpack(t[i])
end
end
end
for i = 1, 10 do
numbers[i].ordinal = numbers[i].cardinal .. 'DIch'
numbers[i].adverbial = numbers[i].cardinal .. 'logh'
end
for i = 1, 9 do
local tens = i * 10
if i > 1 then
numbers[tens] = { cardinal = numbers[i].cardinal .. 'maH' }
end
for ones = 1, 9 do
numbers[tens + ones] = { cardinal = numbers[tens].cardinal .. ' ' .. numbers[ones].cardinal }
end
end
numbers[100] = {cardinal = "vatlh"}
numbers[1000] = {cardinal = {"SaD", "SanID"}}
numbers[10000] = {cardinal = "netlh"}
numbers[100000] = {cardinal = "bIp"}
numbers[1000000] = {cardinal = "'uy'"}
local piqdstyle = "font-family: pIqaD, Constructium, 'Klingon pIqaD HaSta', Code2000, Horta, 'Unifont CSUR', 'Kurinto Text Aux', 'Kurinto Book Aux', 'Kurinto Sans Aux'"
local digits = {'', '', '', '', '', '', '', '', ''}
digits[0] = ''
for key,value in pairs(numbers) do
if key < 10 then
numbers[key].numeral = '<span style="'..piqdstyle..'">'..digits[key]..'</span>'
else
local inp = tostring(key)
local outp = {}
for i = 0, #inp do
table.insert(outp, digits[tonumber(string.sub(inp, i, i))])
end
numbers[key].numeral = '<span style="'..piqdstyle..'">'..table.concat(outp)..'</span>'
end
end
return export