Module:Template translation: Difference between revisions

Qv1et (talk | contribs)
Try to fix error
Qv1et (talk | contribs)
Another error to fix
 
Line 1: Line 1:
-- Dummy "Template translation" module to avoid errors
-- Dummy "Template translation" module to avoid errors
-- This disables multilingual template features, but prevents script errors.
local p = {}
local p = {}


-- Some templates call "checkTranslation"
-- Used by some templates to check translation status
function p.checkTranslation(frame)
function p.checkTranslation(frame)
    -- Return nothing, but no error
     return ''
     return ''
end
end


-- Some templates call "layout"
-- Used by some templates to layout multilingual content
function p.layout(frame)
function p.layout(frame)
    -- Return nothing, but no error
     return ''
     return ''
end
end


-- Some templates call "main" (rare, but safe to include)
-- Used by some templates for main entry point
function p.main(frame)
function p.main(frame)
     return ''
     return ''
end
end


-- Must return a table to avoid "nil value" errors
-- Used by license templates to display translated text
function p.renderTranslatedTemplate(frame)
    -- Return nothing but avoid errors
    return ''
end
 
-- Always return a table to prevent 'nil value' errors
return p
return p