Mô đun:category tree/lang/odt
Giao diện
- Tài liệu bên dưới được tạo bởi Module:documentation2. [sửa]
- Liên kết hữu ích: trang gốc • trang con của trang gốc • liên kết • nhúng • trường hợp kiểm thử • chỗ thử
Mô đun này xử lý việc tạo ra các mô tả và phân loại cho các trang thể loại tiếng Hà Lan cổ theo định dạng "LABEL tiếng Hà Lan cổ" trong đó LABEL có thể là bất kỳ văn bản nào. Ví dụ là Thể loại:Chia động từ 2.1 tiếng Bulgaria và Thể loại:Danh từ trung tính gốc vòm mềm tiếng Nga. Mô đun này là một phần của hệ thống cây thể loại, là một khuôn khổ chung để tạo ra mô tả và phân loại các trang thể loại.
Để biết thêm thông tin, hãy xem Module:category tree/lang/tài liệu.
LƯU Ý: Nếu bạn thêm một mô đun ngôn ngữ cụ thể mới, bạn phải thêm mã ngôn ngữ vào danh sách ở đầu Module:category tree/lang để mô đun được nhận dạng.
local labels = {}
local handlers = {}
local insert = table.insert
labels["verbs by derivation type"] = {
parents = {{ name = "verbs", sort = "derivation" }},
breadcrumb = "by derivation type",
}
labels["separable verbs"] = {
description = "{{{langname}}} verbs that split into two parts in certain constructions.",
parents = "verbs by derivation type",
breadcrumb = "separable",
}
labels["basic verbs"] = {
description = "{{{langname}}} verbs which are not prefixed and cannot be separated.",
parents = "verbs by derivation type",
breadcrumb = "basic",
}
labels["prefixed verbs"] = {
parents = "verbs by derivation type",
breadcrumb = "prefixed",
}
labels["contracted verbs"] = {
-- add a description
parents = {
"verbs by inflection type",
"irregular verbs",
},
breadcrumb = "contracted",
}
labels["irregular strong verbs"] = {
-- add a description
parents = {
"verbs by inflection type",
"irregular verbs",
"strong verbs",
},
breadcrumb = "irregular strong",
}
labels["Verner alternating verbs"] = {
description = "{{{langname}}} verbs which alternate between consonants according to [[w:Verner's law|Verner's law]].",
parents = "irregular strong verbs",
breadcrumb = "Verner alternating",
}
labels["irregular weak verbs"] = {
-- add a description
parents = {
"verbs by inflection type",
"irregular verbs",
"weak verbs",
},
breadcrumb = "irregular weak",
}
labels["hiatus verbs"] = {
-- add a description
parents = {
"verbs by inflection type",
"irregular verbs",
},
breadcrumb = "hiatus",
}
labels["consonant stem nouns"] = {
description = "{{{langname}}} nouns which end in a consonant.",
parents = "nouns by inflection type",
breadcrumb = "consonant stem",
}
insert(handlers, function (data)
local class = data.label:match("^class ([%d]) strong j%-present verbs$")
if class then
return {
description = "{{{langname}}} class " .. class .. " strong verbs with a -''j''- suffix in the present tense. ",
parents = {
"class " .. class .. " strong verbs",
"irregular strong verbs",
},
breadcrumb = "j-present",
}
end
end)
insert(handlers, function (data)
local separable, with = data.label:match("^(separable) verbs with (.+)$")
if separable and with then
return {
description = "{{{langname}}} verbs which separate into " .. with .. " and their stem.",
parents = "separable verbs",
breadcrumb = with,
}
end
end)
insert(handlers, function(data)
local gender, category
for _, g in ipairs({ "feminine", "masculine", "neuter" }) do
gender, category = data.label:match("^(" .. g .. ") (.+)$")
if gender then break end
end
category = category or data.label
local stem, POS = category:match("^(.-)%-stem (%w+)$")
if stem and POS then
local ret = {
description = "{{{langname}}} " .. (gender or "") .. " " .. POS .. " which decline in historical {{m|odt||-" .. stem .. "}}.",
breadcrumb = (gender and gender .. " " or "") .. "-" .. stem .. " stems",
}
if gender then
ret.parents = {
stem .. "-stem " .. POS,
"nouns by inflection type",
}
else
ret.parents = {
{ name = POS, sort = stem },
{ name = "nouns by inflection type", sort = stem },
}
end
return ret
end
end)
return { LABELS = labels, HANDLERS = handlers }