Wikiorðabók
iswiktionary
https://is.wiktionary.org/wiki/Wikior%C3%B0ab%C3%B3k:Fors%C3%AD%C3%B0a
MediaWiki 1.47.0-wmf.19
case-sensitive
Miðill
Kerfissíða
Spjall
Notandi
Notandaspjall
Wikiorðabók
Wikiorðabókarspjall
Mynd
Myndaspjall
Melding
Meldingarspjall
Snið
Sniðaspjall
Hjálp
Hjálparspjall
Flokkur
Flokkaspjall
Viðauki
Viðaukaspjall
Samheitasafn
Samheitasafnsspjall
Skjátexti
Skjátextaspjall
Module
Module talk
Event
Event talk
Module:tilvísun
828
118918
393197
393109
2026-09-13T23:45:06Z
Ow! That Hurts!
8952
393197
Scribunto
text/plain
local p = {}
local metadata = mw.loadData('Module:tilvísun/data')
-- Helper: Fetch argument, checking aliases natively, allowing for suffix (-2)
local function get_arg(args, key, suffix)
suffix = suffix or ""
local val = args[key .. suffix]
if not val or val == "" then
for alias, standard_key in pairs(metadata.aliases) do
if standard_key == key then
local alias_key = alias .. suffix
if args[alias_key] and args[alias_key] ~= "" then
val = args[alias_key]
break
end
end
end
end
if val and val ~= "" then return mw.text.trim(val) end
return nil
end
-- Helper: Process custom wikilink shorthand with prefixes (t:, w:, wm:, etc.) and <h:Display>
local function process_shorthand(text)
if not text or text == "" then return text end
text = mw.text.trim(text)
local prefix, content = string.match(text, "^([a-zA-Z]+):(.*)")
if prefix then
local lower_prefix = string.lower(prefix)
local valid_prefixes = {
t=true, w=true, wm=true, m=true, mw=true,
q=true, s=true, b=true, c=true, d=true, v=true,
wikt=true, meta=true, species=true,
wikipedia=true, wikimedia=true
}
if valid_prefixes[lower_prefix] then
content = mw.text.trim(content)
local h_match = string.match(content, "<h:(.-)>")
local target = content
if h_match then
target = string.gsub(content, "%s*<h:.->", "")
target = mw.text.trim(target)
h_match = mw.text.trim(h_match)
if lower_prefix == "t" then
return "[[" .. target .. "|" .. h_match .. "]]"
else
return "[[" .. lower_prefix .. ":" .. target .. "|" .. h_match .. "]]"
end
else
target = mw.text.trim(target)
if lower_prefix == "t" then
return "[[" .. target .. "]]"
else
return "[[" .. lower_prefix .. ":" .. target .. "|" .. target .. "]]"
end
end
end
end
return text
end
-- Helper: Parse inline translations like <þ:Dagarnar> and apply style correctly
local function format_field(text, style)
if not text or text == "" then return nil end
local trans = string.match(text, "<þ:(.-)>")
local base = text
if trans then
base = string.gsub(text, "%s*<þ:.->", "")
end
base = mw.text.trim(base)
trans = trans and mw.text.trim(trans) or nil
base = process_shorthand(base)
if trans then trans = process_shorthand(trans) end
if style == "quotes" then
local inner = base
if trans then inner = inner .. " [" .. trans .. "]" end
return "„" .. inner .. "“"
elseif style == "italic" then
local styled_base = "''" .. base .. "''"
if trans then
return styled_base .. " [''" .. trans .. "'']"
end
return styled_base
else
if trans then
return base .. " [" .. trans .. "]"
end
return base
end
end
-- Helper: Format chapter or section with number in the requested format
local function format_subdivision(title, num, unit_suffix, use_quotes)
if (not title or title == "") and (not num or num == "") then return nil end
local formatted_title = nil
if title and title ~= "" then
if use_quotes then
formatted_title = format_field(title, "quotes")
else
formatted_title = format_field(title, "plain")
end
end
local formatted_num = nil
if num and num ~= "" then
local clean_num = string.gsub(num, "%.$", "")
formatted_num = "(" .. clean_num .. ". " .. unit_suffix .. ")"
end
if formatted_title and formatted_num then
return formatted_title .. " " .. formatted_num
elseif formatted_title then
return formatted_title
elseif formatted_num then
return formatted_num
end
return nil
end
-- Helper: Small Caps HTML wrapper
local function small_caps(text)
if not text or text == "" then return "" end
return '<span style="font-variant: small-caps;">' .. text .. '</span>'
end
-- Helper: Format semicolon-separated names with "og" (without Oxford comma)
local function format_names(name_str)
if not name_str then return nil end
local names = {}
for name in string.gmatch(name_str, "([^;]+)") do
name = mw.text.trim(name)
name = process_shorthand(name)
table.insert(names, small_caps(name))
end
if #names == 0 then return nil end
local result_str = names[1]
if #names == 2 then
result_str = names[1] .. " og " .. names[2]
elseif #names > 2 then
result_str = names[1]
for j = 2, #names do
if j == #names then
result_str = result_str .. " og " .. names[j]
else
result_str = result_str .. ", " .. names[j]
end
end
end
return result_str
end
-- DATA EXTRACTOR
local function extract_data(args, suffix)
local d = {}
local raw_tegund = get_arg(args, 'tegund', suffix) or get_arg(args, 'type', suffix) or "vef"
raw_tegund = mw.ustring.lower(raw_tegund)
if raw_tegund == "bók" then raw_tegund = "bok" end
if raw_tegund == "tímarit" then raw_tegund = "timarit" end
if raw_tegund == "bókarkafli" then raw_tegund = "bok" end
d.tegund = raw_tegund
-- Core & Roles
d.mainauthor = get_arg(args, 'aðalhöfundur', suffix) or get_arg(args, 'mainauthor', suffix)
d.authors = get_arg(args, 'höfundur', suffix) or get_arg(args, 'author', suffix)
if d.authors then d.authors = format_names(d.authors) end
d.unregistered = get_arg(args, 'óskráður', suffix) or get_arg(args, 'óskráð', suffix)
d.raw_translator = get_arg(args, 'þýðandi', suffix) or get_arg(args, 'translator', suffix)
d.translators = format_names(d.raw_translator)
d.raw_editor = get_arg(args, 'ritstjóri', suffix) or get_arg(args, 'editor', suffix)
d.editors = format_names(d.raw_editor)
-- Date & Titles
d.year = get_arg(args, 'dags', suffix) or get_arg(args, 'ár', suffix) or get_arg(args, 'year', suffix)
if d.year then d.year = process_shorthand(d.year) end
d.title = get_arg(args, 'titill', suffix) or get_arg(args, 'title', suffix)
-- Edition Formatting
d.edition = get_arg(args, 'útgáfa', suffix) or get_arg(args, 'edition', suffix)
if d.edition then
d.edition = process_shorthand(d.edition)
local clean_ed = string.gsub(d.edition, "%.$", "")
if not string.find(string.lower(clean_ed), "útgáfa") then
d.edition = clean_ed .. ". útgáfa"
end
end
-- Chapters & Sections
d.chapter = get_arg(args, 'kafli', suffix) or get_arg(args, 'chapter', suffix) or get_arg(args, 'kaflanafn', suffix) or get_arg(args, 'kaflaheiti', suffix) or get_arg(args, 'kaflititill', suffix) or get_arg(args, 'chapter-name', suffix) or get_arg(args, 'chapter_name', suffix)
d.chapter_number = get_arg(args, 'kaflanúmer', suffix) or get_arg(args, 'chapter-number', suffix) or get_arg(args, 'chapter_number', suffix)
d.section = get_arg(args, 'hluti', suffix) or get_arg(args, 'deild', suffix) or get_arg(args, 'grein', suffix) or get_arg(args, 'section', suffix) or get_arg(args, 'hlutanafn', suffix) or get_arg(args, 'hlutaheiti', suffix) or get_arg(args, 'section-name', suffix) or get_arg(args, 'section_name', suffix)
d.section_number = get_arg(args, 'deildarnúmer', suffix) or get_arg(args, 'hlutanúmer', suffix) or get_arg(args, 'section-number', suffix) or get_arg(args, 'section_number', suffix)
-- Containers, Series & Volumes
d.container = get_arg(args, 'tímarit', suffix) or get_arg(args, 'journal', suffix) or get_arg(args, 'albúm', suffix) or get_arg(args, 'album', suffix)
d.bindi = get_arg(args, 'bindi', suffix)
if d.bindi then d.bindi = process_shorthand(d.bindi) end
d.series = get_arg(args, 'ritröð', suffix) or get_arg(args, 'series', suffix)
if d.series then d.series = process_shorthand(d.series) end
-- Locators & Positions
d.volume = get_arg(args, 'árgangur', suffix) or get_arg(args, 'volume', suffix)
if d.volume then d.volume = process_shorthand(d.volume) end
d.issue = get_arg(args, 'tölublað', suffix) or get_arg(args, 'issue', suffix)
if d.issue then d.issue = process_shorthand(d.issue) end
d.pages = get_arg(args, 'síður', suffix) or get_arg(args, 'síða', suffix) or get_arg(args, 'pages', suffix)
if d.pages then d.pages = process_shorthand(d.pages) end
-- Publication Info
d.location = get_arg(args, 'útgáfustaður', suffix) or get_arg(args, 'location', suffix)
if d.location then d.location = process_shorthand(d.location) end
d.publisher = get_arg(args, 'útgefandi', suffix) or get_arg(args, 'publisher', suffix)
if d.publisher then d.publisher = process_shorthand(d.publisher) end
d.printer = get_arg(args, 'prentari', suffix) or get_arg(args, 'printer', suffix)
if d.printer then d.printer = process_shorthand(d.printer) end
d.print_location = get_arg(args, 'prentunarstaður', suffix) or get_arg(args, 'print-location', suffix) or get_arg(args, 'print_location', suffix)
if d.print_location then d.print_location = process_shorthand(d.print_location) end
-- Identifiers & URLs
d.doi = get_arg(args, 'doi', suffix)
d.isbn = get_arg(args, 'isbn', suffix)
d.issn = get_arg(args, 'issn', suffix)
d.url = get_arg(args, 'vefslóð', suffix) or get_arg(args, 'url', suffix)
d.access = get_arg(args, 'sótt', suffix) or get_arg(args, 'access-date', suffix)
d.note = get_arg(args, 'athugasemd', suffix) or get_arg(args, 'note', suffix)
if d.note then d.note = process_shorthand(d.note) end
d.is_empty = not (d.authors or d.raw_editor or d.raw_translator or d.year or d.title or d.edition or d.container or d.publisher or d.printer or d.url or d.access or d.section or d.section_number or d.chapter or d.chapter_number or d.bindi or d.series or d.unregistered)
return d
end
-- BUILDER (Flexible Type-Aware Wiktionary Citation Style)
local function build_citation(d, is_part2)
local tegund = d.tegund or "vef"
local auth_date = ""
-- 1. Author and Date construction (Fallback checks: unregistered -> translator -> editor)
local auth = nil
if d.unregistered then
auth = "''óskráð''"
else
auth = d.authors or (d.mainauthor and format_names(d.mainauthor))
end
local editor_as_author = false
local translator_as_author = false
if not auth then
if d.raw_translator then
local translator_names = format_names(d.raw_translator)
if translator_names then
auth = translator_names .. ", þýð."
translator_as_author = true
end
elseif d.raw_editor then
local editor_names = format_names(d.raw_editor)
if editor_names then
auth = editor_names .. ", ritstj."
editor_as_author = true
end
end
end
if auth then
if d.year and not is_part2 then
auth_date = auth .. " (" .. d.year .. ")"
else
auth_date = auth
end
else
if d.year and not is_part2 then
auth_date = "(" .. d.year .. ")"
end
end
local body_parts = {}
local chapter_str = format_subdivision(d.chapter, d.chapter_number, "kafli", true)
local section_str = format_subdivision(d.section, d.section_number, "hluti", false)
if tegund == "bok" or tegund == "bók" then
if d.title then
table.insert(body_parts, format_field(d.title, "italic"))
end
if d.editors and not editor_as_author then
table.insert(body_parts, d.editors .. ", ritstj.")
end
if d.translators and not translator_as_author then
table.insert(body_parts, d.translators .. ", þýð.")
end
if d.edition then
table.insert(body_parts, d.edition)
end
if d.bindi then
table.insert(body_parts, d.bindi .. ". bindi")
end
if chapter_str then
table.insert(body_parts, chapter_str)
end
if section_str then
table.insert(body_parts, section_str)
end
if d.series then
table.insert(body_parts, format_field(d.series, "italic"))
end
local pub_parts = {}
if d.location and d.publisher then
table.insert(pub_parts, d.location .. ": " .. d.publisher)
elseif d.publisher then
table.insert(pub_parts, d.publisher)
elseif d.location then
table.insert(pub_parts, d.location)
end
if d.print_location and d.printer then
table.insert(pub_parts, d.print_location .. ": " .. d.printer)
elseif d.printer then
table.insert(pub_parts, d.printer)
elseif d.print_location then
table.insert(pub_parts, d.print_location)
end
if #pub_parts > 0 then
table.insert(body_parts, table.concat(pub_parts, ", "))
end
if is_part2 and d.year then
table.insert(body_parts, d.year)
end
if d.pages then
table.insert(body_parts, d.pages)
end
elseif tegund == "timarit" or tegund == "tímarit" then
if d.title then
table.insert(body_parts, format_field(d.title, "quotes"))
end
if d.translators and not translator_as_author then
table.insert(body_parts, d.translators .. ", þýð.")
end
if d.bindi then
table.insert(body_parts, d.bindi .. ". bindi")
end
if chapter_str then
table.insert(body_parts, chapter_str)
end
if section_str then
table.insert(body_parts, section_str)
end
local container_parts = {}
if d.editors and not editor_as_author then
table.insert(container_parts, d.editors .. ", ritstj.")
end
if d.container then
table.insert(container_parts, "í " .. format_field(d.container, "italic"))
end
if d.edition then
table.insert(container_parts, d.edition)
end
if d.series then
table.insert(container_parts, format_field(d.series, "italic"))
end
if #container_parts > 0 then
table.insert(body_parts, table.concat(container_parts, ", "))
end
local loc_parts = {}
if d.volume then table.insert(loc_parts, d.volume .. ". árgangur") end
if d.issue then table.insert(loc_parts, d.issue .. ". tölublað") end
local pub_str = ""
if d.location and d.publisher then
pub_str = d.location .. ": " .. d.publisher
elseif d.publisher then
pub_str = d.publisher
elseif d.location then
pub_str = d.location
end
if pub_str ~= "" then table.insert(loc_parts, pub_str) end
local print_str = ""
if d.print_location and d.printer then
print_str = d.print_location .. ": " .. d.printer
elseif d.printer then
print_str = d.printer
elseif d.print_location then
print_str = d.print_location
end
if print_str ~= "" then table.insert(loc_parts, print_str) end
if #loc_parts > 0 then
table.insert(body_parts, table.concat(loc_parts, ", "))
end
if is_part2 and d.year then
table.insert(body_parts, d.year)
end
if d.pages then table.insert(body_parts, d.pages) end
else
-- Standard/Web fallback
if d.title then
table.insert(body_parts, format_field(d.title, "quotes"))
end
if d.editors and not editor_as_author then
table.insert(body_parts, d.editors .. ", ritstj.")
end
if d.translators and not translator_as_author then
table.insert(body_parts, d.translators .. ", þýð.")
end
if d.bindi then
table.insert(body_parts, d.bindi .. ". bindi")
end
if chapter_str then
table.insert(body_parts, chapter_str)
end
if section_str then
table.insert(body_parts, section_str)
end
if d.container then
table.insert(body_parts, "í " .. format_field(d.container, "italic"))
end
if d.edition then
table.insert(body_parts, d.edition)
end
if d.series then
table.insert(body_parts, format_field(d.series, "italic"))
end
local pub_parts = {}
if d.location and d.publisher then
table.insert(pub_parts, d.location .. ": " .. d.publisher)
elseif d.publisher then
table.insert(pub_parts, d.publisher)
elseif d.location then
table.insert(pub_parts, d.location)
end
if d.print_location and d.printer then
table.insert(pub_parts, d.print_location .. ": " .. d.printer)
elseif d.printer then
table.insert(pub_parts, d.printer)
elseif d.print_location then
table.insert(pub_parts, d.print_location)
end
if #pub_parts > 0 then
table.insert(body_parts, table.concat(pub_parts, ", "))
end
if is_part2 and d.year then
table.insert(body_parts, d.year)
end
if d.pages then
table.insert(body_parts, d.pages)
end
end
-- Identifiers & URLs & Notes
local ids = {}
if d.doi then table.insert(ids, "DOI: " .. d.doi) end
if d.isbn then table.insert(ids, "ISBN " .. d.isbn) end
if d.issn then table.insert(ids, "ISSN " .. d.issn) end
if d.url then
if d.access then
table.insert(ids, "[" .. d.url .. " sótt " .. d.access .. "]")
else
table.insert(ids, d.url)
end
elseif d.access then
table.insert(ids, "sótt " .. d.access)
end
if #ids > 0 then
table.insert(body_parts, table.concat(ids, ", "))
end
if d.note then
table.insert(body_parts, "(" .. d.note .. ")")
end
-- Assemble final citation string
local final_parts = {}
if auth_date ~= "" then
table.insert(final_parts, auth_date)
end
if #body_parts > 0 then
table.insert(final_parts, table.concat(body_parts, ", "))
end
return table.concat(final_parts, ", ")
end
function p.tilvisun(frame)
local args = frame:getParent().args
if not args['höfundur'] and not args['ritstjóri'] and not args['þýðandi'] and not args['titill'] and not args['author'] and not args['editor'] and not args['translator'] and not args['óskráður'] and not args['óskráð'] then
args = frame.args
end
local d1 = extract_data(args, "")
local d2 = extract_data(args, "-2")
local final_str = ""
if not d1.is_empty then
final_str = build_citation(d1, false)
end
if not d2.is_empty then
local p2_str = build_citation(d2, true)
local tenging = get_arg(args, 'tenging', "") or "þýtt sem"
if final_str ~= "" then
final_str = final_str .. "; " .. tenging .. " " .. p2_str
else
final_str = p2_str
end
end
return final_str
end
return p
krnswfxzjsjurimny4zzqbdszz11mrk
Module:tilvitnun-stil
828
118922
393201
393113
2026-09-14T00:20:45Z
Ow! That Hurts!
8952
393201
Scribunto
text/plain
local p = {}
local tilvisun = require('Module:tilvísun')
local function getLastWord(s)
if not s or s == "" then return "" end
s = mw.text.trim(s)
local words = {}
for word in s:gmatch("%S+") do
table.insert(words, word)
end
return words[#words] or ""
end
-- Splits an author string into a list of individual persons,
-- ignoring separators inside brackets [[...]] or <...> tags
local function getAuthorsList(str)
if not str or str == "" then return {} end
local authors = {}
local depth_bracket = 0
local depth_angle = 0
local i = 1
local startIdx = 1
while i <= #str do
local c = str:sub(i,i)
if c == '[' then depth_bracket = depth_bracket + 1 end
if c == ']' then depth_bracket = depth_bracket - 1 end
if c == '<' then depth_angle = depth_angle + 1 end
if c == '>' then depth_angle = depth_angle - 1 end
if depth_bracket == 0 and depth_angle == 0 then
local foundSplit = false
local splitLen = 0
if c == ';' or c == ',' then
foundSplit = true
splitLen = 1
else
local rest = str:sub(i)
if rest:match("^%s+og%s+") then
foundSplit = true
splitLen = #rest:match("^(%s+og%s+)")
elseif rest:match("^%s+&%s+") then
foundSplit = true
splitLen = #rest:match("^(%s+&%s+)")
end
end
if foundSplit then
local part = mw.text.trim(str:sub(startIdx, i - 1))
if part ~= "" then
table.insert(authors, part)
end
i = i + splitLen - 1
startIdx = i + 1
end
end
i = i + 1
end
local finalPart = mw.text.trim(str:sub(startIdx))
if finalPart ~= "" then
table.insert(authors, finalPart)
end
return authors
end
-- Parses an individual person string to separate the link target from the display name
local function parseAuthor(authorStr)
if not authorStr or authorStr == "" then return nil, "", false end
authorStr = mw.text.trim(authorStr)
-- 1. Check for <h:...> override format
local basePart, hPart = authorStr:match("^(.-)%<h:(.-)%>")
if basePart and hPart then
local display = mw.text.trim(hPart)
basePart = mw.text.trim(basePart)
local bTarget = basePart:match("%[%[([^|%]]+)%]%]") or basePart:match("%[%[([^|%]]+)|")
if bTarget then
return bTarget, getLastWord(display), true
end
local prefix = basePart:match("^([a-zA-Z]+):")
if prefix and (prefix:lower() == "w" or prefix:lower() == "t") then
return basePart, getLastWord(display), true
end
return basePart, getLastWord(display), false
end
-- 2. Check for standard bracketed link
local linkTarget, display = authorStr:match("%[%[([^|%]]+)|?([^%]]*)%]%]")
if linkTarget then
if not display or display == "" then display = linkTarget end
return linkTarget, getLastWord(display), true
end
-- 3. Check for prefix like w: or t:
local prefix, namePart = authorStr:match("^([a-zA-Z]+):(.+)$")
if prefix and (prefix:lower() == "w" or prefix:lower() == "t") then
namePart = mw.text.trim(namePart)
return authorStr, getLastWord(namePart), true
end
-- 4. Plain text
return nil, getLastWord(authorStr), false
end
-- Formats a single author into small caps, preserving links if present
local function formatSingleAuthor(authorStr)
local linkTarget, lastWord, isLinked = parseAuthor(authorStr)
if isLinked and linkTarget then
return string.format('[[%s|<span style="font-variant: small-caps;">%s</span>]]', linkTarget, lastWord)
else
if lastWord ~= "" then
return string.format('<span style="font-variant: small-caps;">%s</span>', lastWord)
end
end
return ""
end
-- Parses location parameters supporting w:/t: prefixes and <h:...> display overrides
local function parseLocation(locStr)
if not locStr or locStr == "" then return "" end
locStr = mw.text.trim(locStr)
-- 1. Check for <h:...> override format
local basePart, hPart = locStr:match("^(.-)%<h:(.-)%>")
if basePart and hPart then
local display = mw.text.trim(hPart)
basePart = mw.text.trim(basePart)
return string.format('[[%s|%s]]', basePart, display)
end
-- 2. Check for prefix like w: or t:
local prefix, namePart = locStr:match("^([a-zA-Z]+):(.+)$")
if prefix and (prefix:lower() == "w" or prefix:lower() == "t") then
namePart = mw.text.trim(namePart)
return string.format('[[%s|%s]]', locStr, namePart)
end
-- 3. Plain text / already bracketed
return locStr
end
function p.main(frame)
local args = frame.args
local parentArgs = frame:getParent() and frame:getParent().args or {}
local combinedArgs = {}
for k, v in pairs(parentArgs) do combinedArgs[k] = v end
for k, v in pairs(args) do combinedArgs[k] = v end
-- 1. Generate the full citation using Module:tilvísun
local full_citation = ""
local status, res = pcall(function()
if type(tilvisun.main) == "function" then
local mockFrame = {
args = combinedArgs,
getParent = function() return { args = combinedArgs } end
}
return tilvisun.main(mockFrame)
else
error("Module:tilvísun has no main function")
end
end)
if status and res then
full_citation = res
else
full_citation = mw.getCurrentFrame():expandTemplate{ title = 'tilvísun', args = combinedArgs }
end
-- 2. Generate the short citation
local smallcaps_author = ""
-- Priority Order: Override -> höfundur -> þýðandi -> ritstjóri
local raw_author = combinedArgs["nafn"] or combinedArgs["höf-hnekkja"] or combinedArgs["hof-hnekkja"]
if not raw_author or raw_author == "" then
raw_author = combinedArgs["höfundur"] or combinedArgs["höf"] or ""
end
if not raw_author or raw_author == "" then
raw_author = combinedArgs["þýðandi"] or combinedArgs["þýð"] or ""
end
if not raw_author or raw_author == "" then
raw_author = combinedArgs["ritstjóri"] or combinedArgs["ritstj"] or ""
end
if raw_author ~= "" then
local authors = getAuthorsList(raw_author)
if #authors == 1 then
smallcaps_author = formatSingleAuthor(authors[1])
elseif #authors == 2 then
local a1 = formatSingleAuthor(authors[1])
local a2 = formatSingleAuthor(authors[2])
if a1 ~= "" and a2 ~= "" then
smallcaps_author = a1 .. " og " .. a2
elseif a1 ~= "" then
smallcaps_author = a1
else
smallcaps_author = a2
end
elseif #authors > 2 then
local a1 = formatSingleAuthor(authors[1])
if a1 ~= "" then
smallcaps_author = a1 .. ' <span style="font-variant: small-caps;">et al.</span>'
end
end
end
-- Fallback 1: Location parameter
if smallcaps_author == "" then
local location = combinedArgs["útgáfustaður"] or combinedArgs["staður"] or combinedArgs["útgáfustaðir"] or ""
if location ~= "" then
smallcaps_author = parseLocation(location)
end
end
-- Fallback 2: Final safety net (óskráð) in regular italic text, bypassing small caps entirely
if smallcaps_author == "" then
smallcaps_author = "''óskráð''"
end
local year = combinedArgs["ár-hnekkja"] or combinedArgs["ar-hnekkja"]
if not year or year == "" then
local ar_or_dags = combinedArgs["ár"] or combinedArgs["dags"] or ""
year = getLastWord(ar_or_dags)
end
year = year:gsub("[%[%]]", "")
local short_citation = ""
if smallcaps_author ~= "" then
if year ~= "" then
short_citation = string.format("%s, %s", smallcaps_author, year)
else
short_citation = smallcaps_author
end
else
short_citation = year
end
-- 3. Wrap both into the {{stil}} template
return mw.getCurrentFrame():expandTemplate{
title = 'stil',
args = {
[1] = short_citation,
[2] = full_citation
}
}
end
return p
1yuotagcrxr1gdlae1f1mop36d9639n
Snið:afleitt
10
118991
393196
393190
2026-09-13T23:33:18Z
Ow! That Hurts!
8952
393196
wikitext
text/x-wiki
→ {{stil|''sjá afleidd orð''|{{#invoke:tenglahóp|main}}}}<noinclude>
</noinclude>
syebz318tidbx6ghgt7ip8ce52gs86l
Snið:til:mi:Te Aka 3
10
119141
393198
2026-09-13T23:47:52Z
Ow! That Hurts!
8952
skapað
393198
wikitext
text/x-wiki
{{tilvísun
|höfundur=John Cornelius Moorfield
|tímarit=Te Aka: Māori–English, English–Māori Dictionary and Index<þ:Te Aka: Maórísk-ensk og ensk-maórísk orðabók og -skrá>
|útgáfa=3
|útgefandi=Longman/Pearson Education New Zealand
|ár=2011
|isbn=978-1-4425-3846-7
|titill=[https://maoridictionary.co.nz/search?idiom={{#switch:{{{idiom|}}}|in=&|ex=0|only=1}}phrase={{#switch:{{{phrase|}}}|in=&|ex=0|only=1}}proverb={{#switch:{{{proverb|}}}|in=&|ex=0|only=1}}loan={{#switch:{{{loan|}}}|in=&|ex=0|only=1}}histLoanWords={{#switch:{{{histloan|}}}|in=&|ex=0|only=1}}&keywords={{urlencode:{{{1|{{pagename}}}}}}} {{{entry|{{{1|{{PAGENAME}}}}}}}}]
|sótt={{{sótt}}}
}}
cyp20iulprrrwojyr5k8gtft4qilvjt
393200
393198
2026-09-14T00:01:11Z
Ow! That Hurts!
8952
393200
wikitext
text/x-wiki
{{tilvísun
|höfundur=John Cornelius Moorfield
|tímarit=Te Aka: Māori–English, English–Māori Dictionary and Index<þ:Te Aka: Maórísk-ensk og ensk-maórísk orðabók og -skrá>
|útgáfa=3
|útgefandi=Longman/Pearson Education New Zealand
|ár=2011
|isbn=978-1-4425-3846-7
|titill=[https://maoridictionary.co.nz/search?idiom={{#switch:{{{idiom|}}}|in=&|ex=0|only=1}}phrase={{#switch:{{{phrase|}}}|in=&|ex=0|only=1}}proverb={{#switch:{{{proverb|}}}|in=&|ex=0|only=1}}loan={{#switch:{{{loan|}}}|in=&|ex=0|only=1}}histLoanWords={{#switch:{{{histloan|}}}|in=&|ex=0|only=1}}&keywords={{urlencode:{{{1|{{PAGENAME}}}}}}} {{{entry|{{{1|{{PAGENAME}}}}}}}}]
|sótt={{{sótt}}}
}}
43ev7jpy27hvi4qukmgq49qngh2fwtn
Snið:til:mi:On-line
10
119142
393199
2026-09-13T23:53:28Z
Ow! That Hurts!
8952
skapað
393199
wikitext
text/x-wiki
{{tilvísun
|tímarit=On-line Te Reo Māori Dictionary<þ:Te Reo Māori orðabók á netinu>
|titill=[https://www.dictionary.maori.nz/{{{1|{{PAGENAME}}}}} {{{1|{{PAGENAME}}}}}]
|sótt={{{sótt}}}
}}
dcfvydqvwliv69v0gqw3tqei1nzpvbx