47,726
edits
![]() | We're back! Sorry, bad combo of sickness, funeral and a month-long trip abroad. The site is back now. ![]() |
No edit summary |
No edit summary |
||
Line 110: | Line 110: | ||
-- Determine if term is reconstructed | -- Determine if term is reconstructed | ||
local is_reconstructed = data.lang:getType() == "reconstructed" | local is_reconstructed = data.lang:getType() == "reconstructed" | ||
or | or namespace == "Reconstruction" | ||
-- Create a default headword. | -- Create a default headword. | ||
Line 429: | Line 429: | ||
end | end | ||
end | end | ||
if not data.noposcat then | if not data.noposcat then | ||
Line 467: | Line 465: | ||
format_headword(data) .. | format_headword(data) .. | ||
format_genders(data) .. | format_genders(data) .. | ||
format_inflections(data | format_inflections(data) | ||
end | end | ||
function export.full_headword(data) | function export.full_headword(data) | ||
table.insert(data.categories, "Contionary") | table.insert(data.categories, "Contionary") | ||
Line 575: | Line 568: | ||
-- Categorise for palindromes | -- Categorise for palindromes | ||
if | if namespace ~= "Reconstruction" and mw.ustring.len(title.subpageText)>2 | ||
and require('Module:palindromes').is_palindrome( | and require('Module:palindromes').is_palindrome( | ||
title.subpageText, data.lang, data.sc | title.subpageText, data.lang, data.sc | ||
Line 581: | Line 574: | ||
table.insert(data.categories, data.lang:getCanonicalName() .. " palindromes") | table.insert(data.categories, data.lang:getCanonicalName() .. " palindromes") | ||
end | end | ||
if mw.ustring.match("%-%s%-") then table.insert(data.categories, data.lang:getCanonicalName() .. " circumfixed with " .. pagename) end | |||
if mw.ustring.match("%-$") then table.insert(data.categories, data.lang:getCanonicalName() .. " prefixed with " .. pagename) end | |||
if mw.ustring.match("^%-") then table.insert(data.categories, data.lang:getCanonicalName() .. " suffixed with " .. pagename) end | |||
-- This may add more categories (e.g. gender categories), so make sure it gets | -- This may add more categories (e.g. gender categories), so make sure it gets | ||
-- evaluated first. | -- evaluated first. | ||
Line 589: | Line 586: | ||
require("Module:utilities").format_categories( | require("Module:utilities").format_categories( | ||
data.categories, data.lang, data.sort_key, nil, | data.categories, data.lang, data.sort_key, nil, | ||
data.force_cat_output or test_force_categories, data.sc | data.force_cat_output or test_force_categories, data.sc | ||
) | ) |