diff --git a/module_citeq.lua b/module_citeq.lua index 8bca78e..d590967 100644 --- a/module_citeq.lua +++ b/module_citeq.lua @@ -1132,7 +1132,9 @@ local function cite_q (frame) local args = require ('Module:Arguments').getArgs(frame); args.qid = args.qid or args[1]; - if not args.qid then return nil end -- this should return an error message? + if not args.qid then + return cfg.i18n_t.errors.bad_qid_form .. cfg.i18n_t.trackingcats["invalid-qid"] + end args[1] = nil; -- unset; not needed local citesep = args.citesep; -- separator string between separate cites of {{cite q|q..., q...}}; any need to keep this? @@ -1152,9 +1154,6 @@ local function cite_q (frame) args.lang = nil -- QID as normal form; emit error if not ^Q%d+$ (e.g. a Wikidata URL) --- local qid_form = mw.ustring.match(mw.text.trim(args.qid), "^Q%d+$") or nil --- if not qid_form then --- return ' {{[[Template:Cite Q|Cite Q]]}}: QID parameter must be supplied as "Q" followed by digits, e.g. Q12345 ([[Template:Cite Q#Error messages|help]]) ' .. cfg.i18n_t.trackingcats["invalid-qid"] if not args.qid:match ('^Q%d+$') then return cfg.i18n_t.errors.bad_qid_form .. cfg.i18n_t.trackingcats["invalid-qid"]; end