45,641
edits
Tag: Reverted |
No edit summary Tag: Manual revert |
||
Line 51: | Line 51: | ||
--[[ | --[[ | ||
if | if lang:getType() == "reconstructed" or namespace == "Reconstruction" then | ||
error("Reconstructed languages and reconstructed terms cannot have usage examples, as we have no record of their use.") | error("Reconstructed languages and reconstructed terms cannot have usage examples, as we have no record of their use.") | ||
end | end | ||
Line 72: | Line 72: | ||
if not sc then | if not sc then | ||
sc = | sc = require("Module:scripts").findBestScript(usex, lang) | ||
end | end | ||
Line 92: | Line 92: | ||
end | end | ||
transliteration = | transliteration = lang:transliterate(subbed_usex, sc) | ||
end | end | ||
Line 119: | Line 114: | ||
elseif lang:getCode() ~= "en" and lang:getCode() ~= "mul" 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, translingual 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") | |||
translation = "<small>(please add an English translation of this " .. example_type .. ")</small>" | translation = "<small>(please add an English translation of this " .. example_type .. ")</small>" | ||
end | end | ||
if usex then | if usex then | ||
usex = require("Module:links"). | if usex:find("[[", 1, true) then | ||
usex = require("Module:links").language_link({term = usex, lang = lang}, false) | |||
end | |||
local face | local face | ||
Line 137: | Line 130: | ||
end | end | ||
if not nocat and namespace == "" 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 266: | Line 259: | ||
class = class .. " " .. added_class | class = class .. " " .. added_class | ||
end | end | ||
result = | result = div(class, result) | ||
result = result .. require("Module:utilities") | result = result .. require("Module:utilities/format_categories")(categories, lang, sortkey) | ||
if noenum then | if noenum then | ||
result = "\n: " .. result | result = "\n: " .. result |