Модуль:Prototypes/Роль: различия между версиями

Нет описания правки
Нет описания правки
 
(не показана 1 промежуточная версия этого же участника)
Строка 6: Строка 6:
-- Обёртка для вызова перевода
-- Обёртка для вызова перевода
local function translate(value)
local function translate(value)
return "{{ucfirst:{{#invoke:Ftl|main|translation|" .. value .. "}}}}"
return "{{ucfirst:{{#invoke:Loc|GetString|" .. value .. "}}}}"
end
end


Строка 46: Строка 46:
        for _, req in ipairs(job.requirements) do
        for _, req in ipairs(job.requirements) do
            if req["!type"] == "DepartmentTimeRequirement" and req.department and req.time then
            if req["!type"] == "DepartmentTimeRequirement" and req.department and req.time then
                result = result .. "<li>[[{{ucfirst:{{#invoke:Ftl|main|translation|department-" .. req.department .. "}}}}]]: " ..
                result = result .. "<li>[[{{ucfirst:{{#invoke:Loc|GetRawString|department-" .. req.department .. "}}}}]]: " ..
                    formatTime(req.time) .. "</li>"
                    formatTime(req.time) .. "</li>"
            elseif req["!type"] == "RoleTimeRequirement" and req.role and req.time then
            elseif req["!type"] == "RoleTimeRequirement" and req.role and req.time then
                result = result .. "<li>[[{{ucfirst:{{#invoke:Ftl|main|translation|" .. req.role .. "}}}}]]: " ..
                result = result .. "<li>[[{{ucfirst:{{#invoke:Loc|GetRawString|" .. req.role .. "}}}}]]: " ..
                    formatTime(req.time) .. "</li>"
                    formatTime(req.time) .. "</li>"
            elseif req["!type"] == "OverallPlaytimeRequirement" and req.time then
            elseif req["!type"] == "OverallPlaytimeRequirement" and req.time then