Difference between revisions 2346 and 2347 on wawikisource--[[ __ __ _ _ _ _ _ _ _ | \/ | ___ __| |_ _| | ___ _ / \ _ _| |_ ___ | |_ _ __ __ _ _ __ ___| | __ _| |_ ___ | |\/| |/ _ \ / _` | | | | |/ _ (_) / _ \| | | | __/ _ \| __| '__/ _` | '_ \/ __| |/ _` | __/ _ \ | | | | (_) | (_| | |_| | | __/_ / ___ \ |_| | || (_) | |_| | | (_| | | | \__ \ | (_| | || __/ |_| |_|\___/ \__,_|\__,_|_|\___(_)_/ \_\__,_|\__\___/ \__|_| \__,_|_| |_|___/_|\__,_|\__\___| Authors and maintainers: * User:Zolo - original version * User:Jarekt ]] -- local function to help normalize input arguments local function normalize_input_args(input_args, output_args) for name, value in pairs( input_args ) do if value ~= '' then -- nuke empty strings if type(name)=='string' then name=string.lower(name) end -- convert to lower case output_args[name] = value end end return output_args end -- initialize object to be returned local p = {} --[[ autotranslate This function is the core part of the Autotranslate template. Usage from a template: {{#invoke:fallbackautotranslate|autotranslate|base=|lang= }} Parameters: frame.args.base - base page name frame.args.lang - desired language (often user's native language) Error Handling: (contracted; show full) 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. return frame:expandTemplate{ title = page, args = args} end return p All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://wa.wikisource.org/w/index.php?diff=prev&oldid=2347.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|