Module talk:Cite Q/config
Add topicEdit request: Change Label lookup code to reduce unnecessary entity usage
[edit source]Hello, I am writing on behalf of the Wikidata For Wikimedia Projects team.
We looked at how this module uses data from Wikidata, and found a suggestion to improve its performance.
// What we suggest //
- Delete the highlighted line of code from the
local i18n_t =table (line #10):local i18n_t = { ["cite_q"] = "{{cite Q|", ["erratum"] = "(erratum)", ["unknown-author"] = mw.wikibase.getLabel("Q4233718"):gsub("^%l", mw.ustring.upper), ["wdq"] = "[[WDQ (identifier)|Wikidata]]", -- go through "WDQ
- Find this code line in Module:Cite Q (line #141):
label = cfg.i18n_t["unknown-author"] .. (cfg.i18n_t["unknown-author-trackingcat"] or "")
- And replace it with the following code:
label = mw.wikibase.getLabel("Q4233718"):gsub("^%l", mw.ustring.upper) .. (cfg.i18n_t["unknown-author-trackingcat"] or "")
With this change, the extra Wikidata lookup only happens on the pages that genuinely need it, rather than on every page using this module. That's a small fix on its own, but multiplied across all the pages this template touches, it adds up to a meaningful reduction in unnecessary load.
// Questions or Feedback //
If you have any questions or you would like us to make the edit for you, please let us know. You can contact us by replying to this post, or reaching us at our Project Talk page.Thank you! -- Danny Benjafield (WMDE) (talk) 07:57, 21 July 2026 (UTC)