45,640
edits
No edit summary |
No edit summary |
||
Line 186: | Line 186: | ||
local args = require("Module:parameters").process(frame:getParent().args, params) | local args = require("Module:parameters").process(frame:getParent().args, params) | ||
local | local cur_num = args[1] or 1 | ||
local cur_type = args.type | local cur_type = args.type | ||
if not (type(cur_num) == "number" or cur_num:find "^%d+$") then | if not (type(cur_num) == "number" or cur_num:find "^%d+$") then | ||
error("Extraneous characters in parameter 2: should be decimal number (integer).") | error("Extraneous characters in parameter 2: should be decimal number (integer).") | ||
end | end | ||
local alt_pagename = args[ | local alt_pagename = args[2] or false | ||
local remove_suffix = args[ | local remove_suffix = args[3] or false | ||
-- Get the data from the data module. | -- Get the data from the data module. | ||
Line 454: | Line 452: | ||
end | end | ||
local sc = args["sc"]; | local sc = args["sc"]; | ||
local headlink = args["headlink"] | local headlink = args["headlink"] | ||
Line 461: | Line 458: | ||
local tr = args["tr"] | local tr = args["tr"] | ||
local prev_symbol = if_not_empty(args[ | local prev_symbol = if_not_empty(args[1]) | ||
local cur_symbol = if_not_empty(args[ | local cur_symbol = if_not_empty(args[2]); | ||
local next_symbol = if_not_empty(args[ | local next_symbol = if_not_empty(args[3]) | ||
local prev_term = if_not_empty(args[ | local prev_term = if_not_empty(args[4]) | ||
local next_term = if_not_empty(args[ | local next_term = if_not_empty(args[5]) | ||
local cardinal_term = args["card"]; local cardinal_alt = args["cardalt"]; local cardinal_tr = args["cardtr"] | local cardinal_term = args["card"]; local cardinal_alt = args["cardalt"]; local cardinal_tr = args["cardtr"] | ||
Line 489: | Line 486: | ||
sc = (sc and (require("Module:scripts").getByCode(sc) or error("The script code \"" .. sc .. "\" is not valid.")) or nil) | sc = (sc and (require("Module:scripts").getByCode(sc) or error("The script code \"" .. sc .. "\" is not valid.")) or nil) | ||