Difference between revisions 51776 and 51777 on wikimaniawiki-- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs local htmlBuilder = require('Module:HtmlBuilder') local messageBox = require('Module:Message box') local libraryUtil = require('libraryUtil') (contracted; show full) --]] checkType('formatMessage', 1, cfgKey, 'string') checkType('formatMessage', 2, valArray, 'table') local msg = cfg[cfgKey] or error('formatMessage: no message found for cfg key "' .. cfgKey .. '"', 2) local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('formatMessage: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 24) end local ret = gsub(msg, '$([1-9][0-9]*)', getMessageVal) return ret end local function makeWikilink(page, display) (contracted; show full) if subpage == cfg.sandboxSubpage or subpage == cfg.testcasesSubpage then return currentTitle.baseText else return currentTitle.text end 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://wikimania.wikimedia.org/w/index.php?diff=prev&oldid=51777.
![]() ![]() 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.
|