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: a242b9186c88725b

Jump to content

Module talk:Sandbox/RexxS/Units

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 10 years ago by RexxS

@RexxS: I suspect that convertcode is the only thing we need in this table, as {{convert}} will provide the rest.  Martin (MSGJ · talk) 12:34, 27 April 2016 (UTC)Reply

Yes, of course, Martin, for the present application; I was thinking ahead to other applications where we want to know a unit name from its QID, but don't want to risk looking up a label that anyone can edit on Wikidata. --RexxS (talk) 13:19, 27 April 2016 (UTC)Reply
No need:
  • {{convert|1|feet|disp=unit}} gives singular: foot
  • {{convert|2|feet|disp=unit}} gives plural: feet
  • {{convert|1|feet|disp=unit|abbr=on}} gives abbreviation: ft
 Martin (MSGJ · talk) 13:31, 27 April 2016 (UTC)Reply
Sorry I'm not being clear. I was thinking of when other Lua Modules needed to return a vandal-proof unit name or abbreviation from QIDs, perhaps several times. It is far easier to 'require()' a lookup table than to make external calls to a heavyweight module like Module:Convert. Anyway, at present {convert} doesn't accept a QID like "Q253276", although Johnuniq is working on it. --RexxS (talk) 14:32, 27 April 2016 (UTC)Reply