Module:tln-headword: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Tag: Undo |
||
| Line 1: | Line 1: | ||
local | local p = {} | ||
local | function p.noun(frame) | ||
local args = frame:getParent().args | |||
local | local title = mw.title.getCurrentTitle().text | ||
local g = args.g or "?" | |||
local rom = args.rom or "" | |||
local pl = args.pl or "" | |||
local plrom = args.plrom or "" | |||
local text = "'''" .. title .. "'''" | |||
if rom ~= "" then | |||
text = text .. " • (" .. rom .. ")" | |||
end | |||
text = text .. " " .. g | |||
if pl ~= "" then | |||
text = text .. ", plural '''" .. pl .. "'''" | |||
if plrom ~= "" then | |||
text = text .. " (" .. plrom .. ")" | |||
end | |||
end | |||
return text | |||
end | end | ||
return p | |||
Revision as of 19:15, 18 June 2026
- This module lacks a documentation subpage. Please create it.
- Useful links: subpage list • links • transclusions • testcases • sandbox
local p = {}
function p.noun(frame)
local args = frame:getParent().args
local title = mw.title.getCurrentTitle().text
local g = args.g or "?"
local rom = args.rom or ""
local pl = args.pl or ""
local plrom = args.plrom or ""
local text = "'''" .. title .. "'''"
if rom ~= "" then
text = text .. " • (" .. rom .. ")"
end
text = text .. " " .. g
if pl ~= "" then
text = text .. ", plural '''" .. pl .. "'''"
if plrom ~= "" then
text = text .. " (" .. plrom .. ")"
end
end
return text
end
return p