Use tracking category for missing first/last names in Wikidata

This commit is contained in:
Jonathan Harker 2026-10-06 08:52:13 +13:00
parent b2ab54ccb4
commit d8200e32e0
2 changed files with 5 additions and 3 deletions

View file

@ -9,6 +9,8 @@ local cite_cfg = mw.loadData ('Module:Cite/config')
local cfg = mw.loadData ('Module:Cite_Q/config') local cfg = mw.loadData ('Module:Cite_Q/config')
local cs1_module = 'Module:Citation/CS1' -- don't load the module yet, may not be needed local cs1_module = 'Module:Citation/CS1' -- don't load the module yet, may not be needed
local cs1_cfg = mw.loadData('Module:Citation/CS1/Configuration') local cs1_cfg = mw.loadData('Module:Citation/CS1/Configuration')
local opt_cat = ''
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- makeOrdinal needs to be internationalised along with cfg.i18n_t -- makeOrdinal needs to be internationalised along with cfg.i18n_t
@ -363,6 +365,7 @@ local function get_name_list (nl_type, args, qid, wdl)
args[nl_type .. '-first' .. i] = args[nl_type .. '-first' .. i] or out[k].first args[nl_type .. '-first' .. i] = args[nl_type .. '-first' .. i] or out[k].first
else else
args[nl_type .. i] = label args[nl_type .. i] = label
opt_cat = opt_cat .. cfg.i18n_t.trackingcats['missing-author-first-last-names'];
end end
if link[k] then if link[k] then
args[nl_type .. '-link' .. i] = args[nl_type .. '-link' .. i] or link[k] -- author-linkn or editor-linkn args[nl_type .. '-link' .. i] = args[nl_type .. '-link' .. i] or link[k] -- author-linkn or editor-linkn
@ -886,12 +889,10 @@ local function _cite_q (citeq_args)
citeq_args.id = id citeq_args.id = id
end end
local opt_cat = ''
-- Indicator if item has been retracted -- Indicator if item has been retracted
local retract = '' local retract = ''
if citeq_args.retracted_by then if citeq_args.retracted_by then
opt_cat = cfg.i18n_t.trackingcats.retracted opt_cat = opt_cat .. cfg.i18n_t.trackingcats.retracted
local retract_id = string.gsub(citeq_args.retracted_by, 'Q', '') local retract_id = string.gsub(citeq_args.retracted_by, 'Q', '')
local retr_params = { local retr_params = {
citeq = 'yes', citeq = 'yes',

View file

@ -32,6 +32,7 @@ local i18n_t = {
["replaced"] = "[[Category:Cite Q - cites a replaced work]]<!-- replaced -->", ["replaced"] = "[[Category:Cite Q - cites a replaced work]]<!-- replaced -->",
["unknown-author"] = "", -- [[Category:Cite Q - author unknown]] removed as misplaced; someone is welcome to restore it if it is placed outside of the template parameter value ["unknown-author"] = "", -- [[Category:Cite Q - author unknown]] removed as misplaced; someone is welcome to restore it if it is placed outside of the template parameter value
["unknown-template"] = "[[Category:Cite Q - template unknown]]", ["unknown-template"] = "[[Category:Cite Q - template unknown]]",
["missing-author-first-last-names"] = "[[Category:Cite Q - authors with missing given and family names]]",
}, },
} }