Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Module:Autotranslate
(view source)
Revision as of 22:24, 9 February 2019
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}
WikiSysop
Bureaucrats
, private-view, public-view,
Administrators
97,692
edits
Navigation menu
Personal tools
British English
Log in
Request account
Namespaces
Module
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Create New Page
Temples of India
Subscribe Dharmawiki
Recent changes
Random page
Author Help
Donate to Cause
Donate For Dharma
Tools
Special pages
Printable version