Changes
m
fix
local p = {}
function p.renderTranslatedTemplate(frame, template)
--[[ If on a translation subpage (like Foobar/de), this function renders
a given template in the same language, if the translation is available.
Otherwise, the template is rendered in its default language, without
modification. This is aimed at replacing Template:TNT. ]]
local langcode = ''
if ( mw.language.isValidCode( subpage ) )
then
local translation = mw.title.new( frame[template]..'/'..subpage, 'Template' )
if ( translation.id ~= 0)
then