Модуль:Сущность: различия между версиями

мНет описания правки
мНет описания правки
Строка 101: Строка 101:


local function makeSourceLink(s)
local function makeSourceLink(s)
     local className = s.name .. (s.kind and (s.kind:sub(1, 1):upper() .. s.kind:sub(2)) or "")
     local kind = ""
 
    if s.kind then
        kind = mw.ustring.upper(mw.ustring.sub(s.kind, 1, 1)) ..
              mw.ustring.sub(s.kind, 2)
    end
 
    local className = s.name .. kind
     local tplLabel = "Template:" .. s.tplPath
     local tplLabel = "Template:" .. s.tplPath
     return "[[" .. tplLabel .. "|" .. className .. "]]"
     return "[[" .. tplLabel .. "|" .. className .. "]]"
end
end