45,333
edits
No edit summary |
No edit summary |
||
(12 intermediate revisions by the same user not shown) | |||
Line 44: | Line 44: | ||
local lang, sc, usex, translation, transliteration, transcription, noenum, | local lang, sc, usex, translation, transliteration, transcription, noenum, | ||
inline, ref, quote, lit, substs, qualifiers, source, nocat, brackets, footer, | inline, ref, quote, lit, substs, qualifiers, source, nocat, brackets, footer, | ||
sortkey = | sortkey, added_class = | ||
data.lang, data.sc, data.usex, data.translation, data.transliteration, | data.lang, data.sc, data.usex, data.translation, data.transliteration, | ||
data.transcription, data.noenum, data.inline, data.ref, data.quote, | data.transcription, data.noenum, data.inline, data.ref, data.quote, | ||
data.lit, data.substs, data.qualifiers, data.source, data.nocat, | data.lit, data.substs, data.qualifiers, data.source, data.nocat, | ||
data.brackets, data.footer, data.sortkey | data.brackets, data.footer, data.sortkey, data.class | ||
--[[ | --[[ | ||
Line 86: | Line 86: | ||
local substs = mw.text.split(substs, ",") | local substs = mw.text.split(substs, ",") | ||
for _, subpair in ipairs(substs) do | for _, subpair in ipairs(substs) do | ||
local subsplit = mw.text.split(subpair, mw.ustring.find(subpair, "//") and "//" or "/") | local subsplit = mw.text.split(subpair, mw.ustring.find(subpair, "//") and "//" or "/") | ||
Line 113: | Line 112: | ||
elseif translation then | elseif translation then | ||
translation = span(class.translation, translation) | translation = span(class.translation, translation) | ||
elseif lang:getCode() ~= "en" and lang:getCode() ~= "und" then | elseif lang:getCode() ~= "en" and lang:getCode() ~= "mul" and lang:getCode() ~= "und" then | ||
-- add trreq category if translation is unspecified and language is not english or undetermined | -- add trreq category if translation is unspecified and language is not english, translingual or undetermined | ||
table.insert(categories, "Requests for translations of " .. lang:getCanonicalName() .. " usage examples") | table.insert(categories, "Requests for translations of " .. lang:getCanonicalName() .. " usage examples") | ||
translation = "<small>(please add an English translation of this " .. example_type .. ")</small>" | translation = "<small>(please add an English translation of this " .. example_type .. ")</small>" | ||
Line 131: | Line 130: | ||
end | end | ||
if not nocat and namespace == "" or namespace == "Reconstruction" or namespace == "Contionary" then | if not nocat and (namespace == "" or namespace == "Reconstruction" or namespace == "Contionary") then | ||
if quote then | if quote then | ||
table.insert(categories, lang:getCanonicalName() .. " terms with quotations") | table.insert(categories, lang:getCanonicalName() .. " terms with quotations") | ||
Line 256: | Line 255: | ||
result = table.concat(result) | result = table.concat(result) | ||
local class = quote and class.container_quotation or class.container_ux | |||
if added_class then | |||
class = class .. " " .. added_class | |||
end | |||
result = div(class, result) | |||
result = result .. require("Module:utilities").format_categories(categories, lang, sortkey) | result = result .. require("Module:utilities").format_categories(categories, lang, sortkey) | ||
if noenum then | if noenum then |