Jump to content

Module:Template translation: Difference between revisions

From Solarpunk Wiki
Qv1et (talk | contribs)
Add dummy Template translation module to fix missing module errors
 
Qv1et (talk | contribs)
Try to fix error
Line 2: Line 2:
local p = {}
local p = {}


-- Some templates call "checkTranslation"
function p.checkTranslation(frame)
function p.checkTranslation(frame)
     -- Do nothing; just prevent script errors
     -- Return nothing, but no error
     return ''
     return ''
end
end


-- Some templates call "layout"
function p.layout(frame)
function p.layout(frame)
     -- Also return nothing
     -- Return nothing, but no error
     return ''
     return ''
end
end
-- Some templates call "main" (rare, but safe to include)
function p.main(frame)
    return ''
end
-- Must return a table to avoid "nil value" errors
return p

Revision as of 15:54, 5 October 2025

Documentation for this module may be created at Module:Template translation/doc

-- Dummy "Template translation" module to avoid errors
local p = {}

-- Some templates call "checkTranslation"
function p.checkTranslation(frame)
    -- Return nothing, but no error
    return ''
end

-- Some templates call "layout"
function p.layout(frame)
    -- Return nothing, but no error
    return ''
end

-- Some templates call "main" (rare, but safe to include)
function p.main(frame)
    return ''
end

-- Must return a table to avoid "nil value" errors
return p
Cookies help us deliver our services. By using our services, you agree to our use of cookies.