45,333
edits
(Created page with "local m_languages = require("Module:languages") local m_links = require("Module:links") local m_utilities = require("Module:utilities") local m_table = require("Module:table")...") |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
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 60: | Line 40: | ||
local param_mods = {"t", "alt", "tr", "ts", "pos", "lit", "id", "sc", "g", "q", "eq"} | local param_mods = {"t", "alt", "tr", "ts", "pos", "lit", "id", "sc", "g", "q", "eq"} | ||
local param_mod_set = m_table.listToSet(param_mods) | local param_mod_set = m_table.listToSet(param_mods) | ||
Line 324: | Line 299: | ||
suffix = from | suffix = from | ||
end | end | ||
end | end | ||
return prefix, suffix | return prefix, suffix | ||
Line 458: | Line 429: | ||
table.insert(textsegs, | table.insert(textsegs, | ||
(dimtype and dimtype .. " " or "") .. | (dimtype and dimtype .. " " or "") .. | ||
"[[diminutive]]" .. | "[[wikt:diminutive|diminutive]]" .. | ||
(xlittext ~= "" and ", " .. xlittext .. "," or "") .. | (xlittext ~= "" and ", " .. xlittext .. "," or "") .. | ||
" of the ") | " of the ") | ||
Line 466: | 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 name|given names]]" or | table.insert(textsegs, numdims > 1 and "[[wikt:given name|given names]]" or | ||
"[[given name]]") | "[[wikt:given name|given name]]") | ||
local need_comma = false | local need_comma = false | ||
if numdims > 0 then | if numdims > 0 then | ||
Line 549: | Line 520: | ||
local function insert_cats_gender(g) | local function insert_cats_gender(g) | ||
if g == "unknown-gender" then | if g == "unknown-gender" then | ||
return | return | ||
end | end | ||
Line 678: | 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|diminutive]]") | ||
elseif args.aug then | elseif args.aug then | ||
table.insert(textsegs, " [[augmentative]]") | table.insert(textsegs, " [[wikt:augmentative|augmentative]]") | ||
end | end | ||
table.insert(textsegs, " ") | table.insert(textsegs, " ") |