Add Wikidata edit links to missing names error
This commit is contained in:
parent
81088918e2
commit
d6a31b505e
1 changed files with 14 additions and 5 deletions
|
|
@ -184,7 +184,7 @@ local function makelink(v, out, link, maxpos, wdl, namestyle)
|
|||
label = label,
|
||||
last = last_name or nil,
|
||||
first = first_names or nil,
|
||||
qid = qnumber or nil,
|
||||
qid = qnumber,
|
||||
}
|
||||
else
|
||||
out[position] = label
|
||||
|
|
@ -206,7 +206,7 @@ local function makelink(v, out, link, maxpos, wdl, namestyle)
|
|||
label = label,
|
||||
last = last_name or nil,
|
||||
first = first_names or nil,
|
||||
qid = qnumber or nil,
|
||||
qid = qnumber,
|
||||
}
|
||||
else
|
||||
out[position] = label
|
||||
|
|
@ -859,8 +859,11 @@ local function _cite_q (citeq_args)
|
|||
local missing_names = {}
|
||||
for i, author in pairs(names.authors or {}) do
|
||||
if not author.last and i <= (citeq_args['display-authors'] or author_count) then
|
||||
if author.qid and author.qid == 'Q4233718' then
|
||||
if author.qid then
|
||||
-- ignore anonymous
|
||||
if author.qid ~= 'Q4233718' then
|
||||
table.insert(missing_names, author.label .. " <span title='edit author in Wikidata'>[[File:Wikidata-logo.svg|16px|alt=|link=[[:d:" .. author.qid .. "]] ]]</span>")
|
||||
end
|
||||
else
|
||||
table.insert(missing_names, author.label)
|
||||
end
|
||||
|
|
@ -868,8 +871,11 @@ local function _cite_q (citeq_args)
|
|||
end
|
||||
for i, editor in pairs(names.editors or {}) do
|
||||
if not editor.last and i <= (citeq_args['display-editors'] or editor_count) then
|
||||
if editor.qid and editor.qid == 'Q4233718' then
|
||||
if editor.qid then
|
||||
-- ignore anonymous
|
||||
if editor.qid ~= 'Q4233718' then
|
||||
table.insert(missing_names, editor.label .. " <span title='edit editor in Wikidata'>[[File:Wikidata-logo.svg|16px|alt=|link=[[:d:" .. editor.qid .. "]] ]]</span>")
|
||||
end
|
||||
else
|
||||
table.insert(missing_names, editor.label)
|
||||
end
|
||||
|
|
@ -877,8 +883,11 @@ local function _cite_q (citeq_args)
|
|||
end
|
||||
for i, translator in pairs(names.translators or {}) do
|
||||
if not translator.last then
|
||||
if translator.qid and translator.qid == 'Q4233718' then
|
||||
if translator.qid then
|
||||
-- ignore anonymous
|
||||
if translator.qid ~= 'Q4233718' then
|
||||
table.insert(missing_names, translator.label .. " <span title='edit translator in Wikidata'>[[File:Wikidata-logo.svg|16px|alt=|link=[[:d:" .. translator.qid .. "]] ]]</span>")
|
||||
end
|
||||
else
|
||||
table.insert(missing_names, translator.label)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue