Changes

Jump to navigation Jump to search
402 bytes removed ,  22:24, 9 February 2019
no edit summary
Line 62: Line 62:  
end
 
end
 
   
 
   
-- find base template language subpage
+
 
local page = args.default  -- default page if provided or nil otherwise
  −
for _, language in ipairs(langList) do
  −
if mw.title.new(base .. '/' .. language).exists then
  −
page =  base .. '/' .. language -- returns only the page
  −
break
  −
end
  −
end
  −
assert(page, string.format('No fallback page found for autotranslate (base=[[%s]], lang=%s)', base, args.lang))
  −
   
-- Transclude {{page |....}} with template arguments the same as the ones passed to {{autotranslate}} template.
 
-- Transclude {{page |....}} with template arguments the same as the ones passed to {{autotranslate}} template.
 
return frame:expandTemplate{ title = page, args = args}
 
return frame:expandTemplate{ title = page, args = args}
Bureaucrats, private-view, public-view, Administrators
97,692

edits

Navigation menu