Jump to content

Module:number list/data/igl

From Wiktionary, the free dictionary
local export = {}

local numbers = {}
export.numbers = numbers

local ordinal_prefix = "ẹ̀k"
local tens_prefix = "ẹ̀gw"

numbers[0] = {
	cardinal = "òfo",
}

numbers[1] = {
	cardinal = {"ényẹ́", "òókáà", "káà<q:adjectival>"},
	ordinal = {"éjódùdu"},
}

numbers[2] = {
	cardinal = "èjì",
}

numbers[3] = {
	cardinal = "ẹ̀ta", 
}
 
numbers[4] = {
	cardinal = "ẹ̀lẹ̀",
}

numbers[5] = {
	cardinal = "ẹ̀lú",
}

numbers[6] = {
	cardinal = "ẹ̀fà",
}

numbers[7] = {
	cardinal = "èbie",
}

numbers[8] = {
	cardinal = "ẹ̀jọ",
}

numbers[9] = {
	cardinal = "ẹ̀lá",
}

numbers[10] = {
	cardinal = "ẹ̀gwá",
}

numbers[11] = {
	cardinal = numbers[10].cardinal .. mw.ustring.sub(numbers[1].cardinal[2], 3)
}

local function create_ordinal(number)
	base_form = numbers[number].cardinal
	
	if mw.ustring.sub(base_form, 2, 2) == "̀" then
		return "ẹ́" .. mw.ustring.sub(base_form, 3)
	else 
		return "é" .. mw.ustring.sub(base_form, 2)
	end
end

for number = 2, 11 do
	str = create_ordinal(number)
	numbers[number].ordinal = ordinal_prefix .. str
end

for number = 12, 19 do
	base_num = number - 10
	numbers[number] = {
		cardinal = tens_prefix .. mw.ustring.sub(numbers[base_num].ordinal, 4),
	}
end

for number = 12, 19 do
	str = create_ordinal(number)
	numbers[number].ordinal = ordinal_prefix .. str
end

return export