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

Нет описания правки
Нет описания правки
Строка 5: Строка 5:
local dpOk, dpModule = pcall(require, "Module:GetField")
local dpOk, dpModule = pcall(require, "Module:GetField")
local dp = dpOk and dpModule or nil
local dp = dpOk and dpModule or nil
local ucfirst = dp and dp.ucfirst or function(s)
    if not s or s == "" then return s end
    return string.upper(s:sub(1, 1)) .. (s:sub(2) or "")
end


local switchModeRegistry = {}
local switchModeRegistry = {}
Строка 833: Строка 828:
     local whitelistSearchStrings = extract_whitelist_search_strings(keyFilter)
     local whitelistSearchStrings = extract_whitelist_search_strings(keyFilter)


    local function processEntity(kind, name, isStore)
local function processEntity(kind, name, isStore)
        local tplPath = ucfirst(kind) .. "/" .. name
local tplPath = kind .. "/" .. name
        if isStore then
if isStore then
            tplPath = tplPath .. "/store"
tplPath = tplPath .. "/store"
        end
end


         local content = load_template_content(tplPath)
         local content = load_template_content(tplPath)