Module:headword: Difference between revisions
No edit summary |
No edit summary |
||
| (11 intermediate revisions by the same user not shown) | |||
| Line 436: | Line 436: | ||
if not saw_translit_page and data.lang:hasType("etymology-only") then | if not saw_translit_page and data.lang:hasType("etymology-only") then | ||
langname = data.lang:getFullName() | langname = data.lang:getFullName() | ||
transliteration_page = new_title(langname .. " transliteration | transliteration_page = new_title(langname .. " transliteration") | ||
if transliteration_page and transliteration_page:getContent() then | if transliteration_page and transliteration_page:getContent() then | ||
translits_formatted = " [[ | translits_formatted = " [[" .. langname .. " transliteration|•]]" .. translits_formatted | ||
end | end | ||
end | end | ||
| Line 789: | Line 789: | ||
-- that. | -- that. | ||
if tbl == true then | if tbl == true then | ||
return | return | ||
end | end | ||
| Line 801: | Line 798: | ||
different = true | different = true | ||
end | end | ||
end | end | ||
return sortkey | return sortkey | ||
| Line 816: | Line 807: | ||
local canonical = lang:getCanonicalName() | local canonical = lang:getCanonicalName() | ||
local tbl, sortkey = page.wikitext_topic_cat[lang:getCode()] | local tbl, sortkey = page.wikitext_topic_cat[lang:getCode()] | ||
tbl = page.wikitext_langname_cat[canonical] | tbl = page.wikitext_langname_cat[canonical] | ||
if tbl then | if tbl then | ||
handle_raw_sortkeys(tbl, sortkey, page, lang, lang_cats) | handle_raw_sortkeys(tbl, sortkey, page, lang, lang_cats) | ||
insert(lang_cats, canonical .. " entries with language name categories using raw markup") | insert(lang_cats, canonical .. " entries with language name categories using raw markup") | ||
end | end | ||
end | end | ||
| Line 965: | Line 946: | ||
-- 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 postype then | |||
elseif not data.noposcat then | |||
local main_cat = data.lang:getMainCategoryName() | |||
if postype:match("^lemma") and main_cat ~= "lemma" then | |||
postype = main_cat | |||
end | |||
insert(data.categories, 1, full_langname .. " " .. postype .. "s") | |||
end | |||
insert(data.categories, 1, "Contionary") | |||
-- EXPERIMENTAL: see [[Wiktionary:Beer parlour/2024/June#Decluttering the altform mess]] | -- EXPERIMENTAL: see [[Wiktionary:Beer parlour/2024/June#Decluttering the altform mess]] | ||
| Line 1,011: | Line 993: | ||
end | end | ||
if is_reconstructed then | if is_reconstructed and not data.lang:hasType("conlang") then | ||
default_head = "*" .. default_head | default_head = "*" .. default_head | ||
end | end | ||
| Line 1,508: | Line 1,490: | ||
-- 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) | ||
------------ 10. Format and return headwords, genders, inflections and categories. ------------ | ------------ 10. Format and return headwords, genders, inflections and categories. ------------ | ||