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 2: | Line 2: | ||
-- Named constants for all modules used, to make it easier to swap out sandbox versions. | -- Named constants for all modules used, to make it easier to swap out sandbox versions. | ||
local gender_and_number_module = "Module:getn" | local gender_and_number_module = "Module:getn" | ||
local headword_data_module = "Module:headword/data" | local headword_data_module = "Module:headword/data" | ||
Line 47: | Line 46: | ||
return (rsubn(term, foo, bar)) | return (rsubn(term, foo, bar)) | ||
end | end | ||
local function text_in_script(text, script_code) | local function text_in_script(text, script_code) | ||
Line 269: | Line 243: | ||
else | else | ||
head_parts = concat(head_parts) | head_parts = concat(head_parts) | ||
end | end | ||
Line 306: | Line 274: | ||
if transliteration_page and transliteration_page.exists then | if transliteration_page and transliteration_page.exists then | ||
translits_formatted = " [[ | translits_formatted = " [[" .. langname .. " transliteration|•]]" .. translits_formatted | ||
saw_translit_page = true | saw_translit_page = true | ||
end | end | ||
Line 316: | Line 284: | ||
if transliteration_page and transliteration_page.exists then | if transliteration_page and transliteration_page.exists then | ||
translits_formatted = " [[ | translits_formatted = " [[" .. langname .. " transliteration|•]]" .. translits_formatted | ||
end | end | ||
end | end | ||
Line 379: | Line 347: | ||
-- right into the 'data' table to disable inflection links of the entire headword | -- right into the 'data' table to disable inflection links of the entire headword | ||
-- when inflected forms aren't entry-worthy, e.g.: in Vulgar Latin | -- when inflected forms aren't entry-worthy, e.g.: in Vulgar Latin | ||
local nolinkinfl = part.face == "hypothetical" | local nolinkinfl = part.face == "hypothetical" or part.nolinkinfl or data.nolinkinfl | ||
local formatted | local formatted | ||
Line 682: | Line 649: | ||
local escaped_langname = pattern_escape(full_langname) | local escaped_langname = pattern_escape(full_langname) | ||
local matches_lang_pattern = "^" .. escaped_langname .. " " | local matches_lang_pattern = "^" .. escaped_langname .. " " | ||
-- If `pos_category` not given, try to infer it from the first specified category. If this doesn't work, we | -- If `pos_category` not given, try to infer it from the first specified category. If this doesn't work, we | ||
Line 720: | Line 679: | ||
-- add an appropriate category. | -- add an appropriate category. | ||
local postype = export.pos_lemma_or_nonlemma(data.pos_category) | local postype = export.pos_lemma_or_nonlemma(data.pos_category) | ||
if not data.noposcat then | |||
insert(data.categories, 1, full_langname .. " " .. postype .. "s") | insert(data.categories, 1, full_langname .. " " .. postype .. "s") | ||
end | end | ||
Line 924: | Line 875: | ||
------------ 8. Insert additional categories. ------------ | ------------ 8. Insert additional categories. ------------ | ||
if has_redundant_head_param then | if has_redundant_head_param then | ||
Line 1,153: | Line 1,099: | ||
if page.namespace == "" and not data.lang:hasType("reconstructed") then | if page.namespace == "" and not data.lang:hasType("reconstructed") then | ||
local m_links = require(links_module) | local m_links = require(links_module) | ||
end | end | ||