Add tracking category for invalid QID

This commit is contained in:
Jonathan Harker 2026-11-04 14:17:59 +13:00
parent 1ddf3a5758
commit 675a8a804d
2 changed files with 2 additions and 1 deletions

View file

@ -1150,7 +1150,7 @@ local function cite_q (frame)
-- 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 ' <span class="error" style="font-size:inherit"><code class="cs1-code">{{[[Template:Cite Q|Cite Q]]}}</code>: QID parameter must be supplied as "Q" followed by digits, e.g. <code class="cs1-code">Q12345</code> ([[Template:Cite Q#Error messages|help]])</span> '
return ' <span class="error" style="font-size:inherit"><code class="cs1-code">{{[[Template:Cite Q|Cite Q]]}}</code>: QID parameter must be supplied as "Q" followed by digits, e.g. <code class="cs1-code">Q12345</code> ([[Template:Cite Q#Error messages|help]])</span> ' .. cfg.i18n_t.trackingcats["invalid-qid"]
end
local cites = {}

View file

@ -27,6 +27,7 @@ local i18n_t = {
["trackingcats"] = {
['expression-of-concern'] = "[[Category:Cite Q - cites a work with an expression of concern notice]]",
["erratum"] = "[[Category:Cite Q - cites a work with an erratum]]",
["invalid-qid"] = "[[Category:Cite Q - invalid QID]]",
["missing-wikidata"] = "[[Category:Articles with missing Wikidata information]]", -- TODO: point to a {{cite q}}-specific category; this one is specific to Module:WikidataIB
['no-label-or-title'] = '[[Category:Cite Q - missing label or title]]',
["retracted"] = "[[Category:Cite Q - cites a retracted work]]<!-- retracted -->",