Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21e9adb6969f814

Jump to content

Module talk:Cite Q/config

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia

Edit 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 //

  1. 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
    
  2. Find this code line in Module:Cite Q (line #141):
    label = cfg.i18n_t["unknown-author"] .. (cfg.i18n_t["unknown-author-trackingcat"] or "")
    
  3. 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)Reply