Compare commits
1 commit
ed199defcb
...
9e7fe5e48e
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e7fe5e48e |
1 changed files with 5 additions and 5 deletions
|
|
@ -826,7 +826,7 @@ local function _cite_q (citeq_args)
|
|||
local missing_names = {}
|
||||
for i, author in pairs(names.authors or {}) do
|
||||
-- mw.logObject(author)
|
||||
if not author.last and i <= (tonumber (citeq_args['display-authors']) or tonumber (author_count)) then
|
||||
if not author.last and i <= (citeq_args['display-authors'] or author_count) then
|
||||
if author.qid then
|
||||
-- ignore anonymous
|
||||
if author.qid ~= 'Q4233718' then
|
||||
|
|
@ -838,7 +838,7 @@ local function _cite_q (citeq_args)
|
|||
end
|
||||
end
|
||||
for i, editor in pairs(names.editors or {}) do
|
||||
if not editor.last and i <= (tonumber (citeq_args['display-editors']) or tonumber (editor_count)) then
|
||||
if not editor.last and i <= (citeq_args['display-editors'] or editor_count) then
|
||||
if editor.qid then
|
||||
-- ignore anonymous
|
||||
if editor.qid ~= 'Q4233718' then
|
||||
|
|
@ -867,7 +867,7 @@ local function _cite_q (citeq_args)
|
|||
if #missing_names > 0 and not string.find(opt_cat, name_cat, 1, true) then
|
||||
opt_cat = opt_cat .. name_cat
|
||||
-- TODO: format and i18n this string
|
||||
opt_cat = opt_cat .. ' <span class="error" style="font-size:inherit"><code class="cs1-code">{{[[Template:Cite Q|Cite Q]]}}</code>: Missing first/last names in Wikidata for ' .. table.concat(missing_names, ', ') .. ' ([[Template:Cite Q#Error messages|help]])</span> '
|
||||
opt_cat = opt_cat .. ' <span class="error" style="font-size:1em"><code class="cs1-code">{{[[Template:Cite Q|Cite Q]]}}</code>: Missing first/last names in Wikidata for ' .. table.concat(missing_names, ', ') .. ' ([[Template:Cite Q#Error messages|help]])</span> '
|
||||
end
|
||||
|
||||
-- change edition to ordinal if it's set and numeric
|
||||
|
|
@ -875,14 +875,14 @@ local function _cite_q (citeq_args)
|
|||
|
||||
-- handle supplied {{para|ref}} for readable ID, avoid CS1 duplicate default error
|
||||
local pubyear = yearFromDate(citeq_args['publication-date'])
|
||||
if citeq_args.ref and 'none' ~= citeq_args.ref then
|
||||
if citeq_args.ref then
|
||||
local citeref = make_citeref(names.authors or names.editors, pubyear)
|
||||
if citeq_args.ref == citeref then
|
||||
citeq_args.ref = nil -- avoid CS1 maint: ref duplicates default
|
||||
else
|
||||
local tpara = frame:expandTemplate{ title = 'para', args = {'ref', citeq_args.ref} }
|
||||
-- TODO: format and i18n this string
|
||||
opt_cat = opt_cat .. ' <span class="error" style="font-size:inherit"><code class="cs1-code">{{[[Template:Cite Q|Cite Q]]}}</code>: supplied ' .. tpara .. ' does not match value generated from Wikidata: <code class="cs1-code">' .. citeref .. '</code> ([[Template:Cite Q#Error messages|help]])</span> '
|
||||
opt_cat = opt_cat .. ' <span class="error" style="font-size:1em"><code class="cs1-code">{{[[Template:Cite Q|Cite Q]]}}</code>: supplied ' .. tpara .. ' does not match value generated from Wikidata: <code class="cs1-code">' .. citeref .. '</code> ([[Template:Cite Q#Error messages|help]])</span> '
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue