Module:category tree/affixes and compounds: Difference between revisions

No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 43: Line 43:
"pronouns",
"pronouns",
"proper nouns",
"proper nouns",
"roots",
"suffixes",
"suffixes",
"verbs",
"verbs",
Line 262: Line 263:
local _, display_term, lookup_term = m_affix.make_affix(term, data.lang, sc, affixtype, nil, true)
local _, display_term, lookup_term = m_affix.make_affix(term, data.lang, sc, affixtype, nil, true)
local _, display_alt = m_affix.make_affix(args.alt, data.lang, sc, affixtype)
local _, display_alt = m_affix.make_affix(args.alt, data.lang, sc, affixtype)
local _, display_tr = m_affix.make_affix(args.tr, data.lang, require("Module:scripts").getByCode("Latn"), affixtype)
local _, display_ts = m_affix.make_affix(args.ts, data.lang, require("Module:scripts").getByCode("Latn"), affixtype)
local latn = require("Module:scripts").getByCode("Latn")
local _, display_tr = m_affix.make_affix(args.tr, data.lang, latn, affixtype)
local _, display_ts = m_affix.make_affix(args.ts, data.lang, latn, affixtype)
local m_script_utilities = require("Module:script utilities")
local m_script_utilities = require("Module:script utilities")
local id_text = id and " (" .. id .. ")" or ""
local id_text = id and " (" .. id .. ")" or ""
Line 360: Line 363:
end
end
end
end
 
local displaytitle = "{{{langname}}} " .. labelpref .. m_script_utilities.tag_text(args.alt or display_alt or display_term, data.lang, sc, "term") .. id_text
local pagename = "{{{langname}}} " .. labelpref .. m_script_utilities.tag_text(display_term, data.lang, latn, "term") .. id_text
if displaytitle ~= pagename then
displaytitle = pagename
end
return {
return {
description = "{{{langname}}} " .. pos .. " " .. desc[affixtype] .. " " .. require("Module:links").full_link({
description = "{{{langname}}} " .. pos .. " " .. desc[affixtype] .. " " .. require("Module:links").full_link({
Line 366: Line 375:
additional = additional,
additional = additional,
breadcrumb = pos == "terms" and m_script_utilities.tag_text(args.alt or display_alt or display_term, data.lang, sc, "term") .. id_text or pos,
breadcrumb = pos == "terms" and m_script_utilities.tag_text(args.alt or display_alt or display_term, data.lang, sc, "term") .. id_text or pos,
displaytitle = "{{{langname}}} " .. labelpref .. m_script_utilities.tag_text(display_term, data.lang, sc, "term") .. id_text,
displaytitle = displaytitle,
parents = parents,
parents = parents,
umbrella = false,
umbrella = false,