Module:headword: Difference between revisions

No edit summary
Tag: Manual revert
No edit summary
 
(One intermediate revision by the same user not shown)
Line 425: Line 425:


local langname = data.lang:getCanonicalName()
local langname = data.lang:getCanonicalName()
local transliteration_page = new_title(langname .. " transliteration", "Wiktionary")
local transliteration_page = new_title(langname .. " transliteration")
local saw_translit_page = false
local saw_translit_page = false


if transliteration_page and transliteration_page:getContent() then
if transliteration_page and transliteration_page:getContent() then
translits_formatted = " [[Wiktionary:" .. langname .. " transliteration|•]]" .. translits_formatted
translits_formatted = " [[" .. langname .. " transliteration|•]]" .. translits_formatted
saw_translit_page = true
saw_translit_page = true
end
end
Line 1,508: Line 1,508:
-- Add to various maintenance categories.
-- Add to various maintenance categories.
export.maintenance_cats(page, data.lang, data.categories, data.whole_page_categories)
export.maintenance_cats(page, data.lang, data.categories, data.whole_page_categories)
if data.affix then
for _, aff in ipairs(data.affix) do
if mw.ustring.match(aff, "^%-[^-]*%-$") then
table.insert(data.categories, data.lang:getCanonicalName() .. " terms interfixed with " .. aff)
elseif mw.ustring.match(aff, "%-%s%-") then
table.insert(data.categories, data.lang:getCanonicalName() .. " terms circumfixed with " .. aff)
elseif mw.ustring.match(aff, "%-$") then
table.insert(data.categories, data.lang:getCanonicalName() .. " terms prefixed with " .. aff)
elseif mw.ustring.match(aff, "^%-") then
table.insert(data.categories, data.lang:getCanonicalName() .. " terms suffixed with " .. aff)
end
end
end


------------ 10. Format and return headwords, genders, inflections and categories. ------------
------------ 10. Format and return headwords, genders, inflections and categories. ------------