45,342
edits
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
local force_cat = false -- for testing | local force_cat = false -- for testing | ||
-- version of rsubn() that discards all but the first return value | -- version of rsubn() that discards all but the first return value | ||
Line 449: | Line 429: | ||
table.insert(textsegs, | table.insert(textsegs, | ||
(dimtype and dimtype .. " " or "") .. | (dimtype and dimtype .. " " or "") .. | ||
"diminutive" .. | "[[wikt:diminutive]]" .. | ||
(xlittext ~= "" and ", " .. xlittext .. "," or "") .. | (xlittext ~= "" and ", " .. xlittext .. "," or "") .. | ||
" of the ") | " of the ") | ||
Line 457: | Line 437: | ||
table.insert(genders, args["or"]) | table.insert(genders, args["or"]) | ||
table.insert(textsegs, table.concat(genders, " or ") .. " ") | table.insert(textsegs, table.concat(genders, " or ") .. " ") | ||
table.insert(textsegs, numdims > 1 and "given names" or | table.insert(textsegs, numdims > 1 and "[[wikt:given name|given names]]" or | ||
"given name") | "[[wikt:given name]]") | ||
local need_comma = false | local need_comma = false | ||
if numdims > 0 then | if numdims > 0 then | ||
Line 539: | Line 519: | ||
end | end | ||
local function insert_cats_gender(g) | local function insert_cats_gender(g) | ||
if g == "unknown-gender" then | |||
return | |||
end | |||
if g ~= "male" and g ~= "female" and g ~= "unisex" then | if g ~= "male" and g ~= "female" and g ~= "unisex" then | ||
error("Unrecognized gender: " .. g) | error("Unrecognized gender: " .. g) | ||
Line 665: | Line 648: | ||
table.insert(textsegs, " " .. m_table.serialCommaJoin(nametypes)) | table.insert(textsegs, " " .. m_table.serialCommaJoin(nametypes)) | ||
if args.dim then | if args.dim then | ||
table.insert(textsegs, " diminutive") | table.insert(textsegs, " [[wikt:diminutive]]") | ||
elseif args.aug then | elseif args.aug then | ||
table.insert(textsegs, " augmentative") | table.insert(textsegs, " [[wikt:augmentative]]") | ||
end | end | ||
table.insert(textsegs, " ") | table.insert(textsegs, " ") |