Jump to content

Template talk:Val

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Module talk:Val)

Template-protected edit request on 27 March 2024

[edit]

The unit "fb-1" currently links to Barn (unit). I propose that it would be better to have it link to the section Barn (unit)#Inverse femtobarn. It provides specific information on that unit and would be more helpful to readers. Also, many other units link to specific sections within an article for the same reason, so this would be justified. Purplemountainmantalk contribs 21:21, 27 March 2024 (UTC)[reply]

Done. Johnuniq (talk) 03:19, 28 March 2024 (UTC)[reply]

Spacing

[edit]

This is causing spacing issues on articles. See for example the usage on K2-18b in the "Evolution" section. Is there any way to shrink the numbers so that it fits within the line without enlarging the surrounding space? Viriditas (talk) 20:55, 3 April 2024 (UTC)[reply]

Not really. There is an accessibility guideline somewhere saying that text should not be too small. If that format is considered undesirable, perhaps some manual wikitext could be used to say +this -that? Johnuniq (talk) 05:34, 4 April 2024 (UTC)[reply]

A teragram is not a tonne

[edit]

The current list of units contains:

Tg [[Tonne|g]] SI

which is not correct: a Tg is a teragram, i.e. 1012 g, which is a million tonnes, not just one. Can we please fix this?

Spidermario (talk) 16:50, 10 July 2024 (UTC)[reply]

It has been like that for a long time. Perhaps whoever added those units thought Teragram was not a suitable link target? Anyway, the fix is simple. It would be nice if someone examined Module:Val/units and commented here if there were any other problems that should be fixed at the same time. I'll have a look in a couple of days if no one beats me to it. Johnuniq (talk) 01:29, 11 July 2024 (UTC)[reply]
I have made a brief scan through it. This is not comprehensive (the syntax is not that familiar to me) but this is what I notice (in addition to Tg, which could be linked to Teragram (unit)).
Ω [[Ohm|Ω]] SI → should be extended with support of the SI prefixes.
uM [[Molarity|M]] 1e-6
uM [[Molarity|M]] SI
μM [[Molarity|M]] SI
There may be some esoteric cases (e.g. pp [[Page (paper)|pp]] and possibly R [[Rayleigh (unit)|R]] SI) that do not belong in a general template such as this.
Quondum 13:27, 4 October 2024 (UTC)[reply]
Further observations:
Remove the nonstandard mcg [[Microgram|g]] SI.
The barn (all cases that link to Barn (unit)) is nonstandard (and esoteric, even though quite well-known in a specialized area of particle physics). It also potentially conflicting with other uses of 'b' (such as for 'bit'). We should not be linking these in a general template such as this: these should be linked explicitly from the article.
There are problems with lack of support for some SI units (e.g. siemens: {{val|ul=S}}S, ohm: {{val|ul=uΩ}}, and possibly more.
Johnuniq, this is the kind of thing that I tended to contribute to and maintain, but this has become a protected template, and working through a "please implement this change" request process is just too cumbersome for me to do it this way. If we can find an alternative where I can work on changes with less friction (but preferably without full template editor capabilities), I could be more actively involved with Module:Val/Units. —Quondum 12:57, 10 October 2024 (UTC)[reply]
I will put a message at your talk about the template editor right. Some enthusiastic editors have added a bunch of units to val but that rather misses the point of the template. It is not possible to cover every conceivable unit that someone might want to use and the idea was that units would be added when needed, not because they might be nice. A big problem is that it is hard to find out if a unit is currently used. Therefore, removing a unit from the module might break an article. To my mind, that suggests units should not be added until they are needed. However, hundreds have been so cleaning up what is there would be good. Years ago, when I was working on Module:Val, I downloaded a database dump of all articles and extracted a list of all {{val}} usages. There is a tool for examining template usage now although I have forgotten how to find it at the moment (template tiger?). I thought it was in a link on one of the standard pages (Template:Val or history?). Someone will know. Johnuniq (talk) 01:08, 11 October 2024 (UTC)[reply]

Decibel

[edit]

Are Decibel units intentionally omitted from this template? Adding |ul=dB linking to Decibel would be a good start. If someone wants to go to town on it, see Decibel § List of suffixes for a bunch of derived units. ~Kvng (talk) 19:38, 14 September 2024 (UTC)[reply]

Although I would not be averse to adding specifically only |ul=dB as a widely known unit, I would oppose any of its suffixes (e.g. dBm) or other metric prefixes (e.g. B = 10 dB, cB = 0.1 dB). The use of units of logarithmic strength of field and power quantities (bell, decibel, neper, etc.) is without the level of systematization that the SI has (including a heavily entrenched historical choice), and we cannot cater to the myriad inconsistent variations in a general template, nor should we be favouring any variant over another. —Quondum 13:43, 4 October 2024 (UTC)[reply]
Thanks. Like I said, adding |ul=dB linking to Decibel would be a good start. Is there someone who could do this? The template is protected. ~Kvng (talk) 16:33, 4 October 2024 (UTC)[reply]
Kvng, if you want to request this change, see the process outlined at Wikipedia:Edit requests. —Quondum 13:03, 10 October 2024 (UTC)[reply]

Pop-up

[edit]

Is it possible to add a parameter yielding a pop-up of the unit name without the link?-- Carnby (talk) 08:41, 15 September 2024 (UTC)[reply]

Not a parameter, but it can be defined in the unit. Search for "abbr" at Module:Val/units. Example:
  • {{val|12|u=mg/L}}12 mg/L
Johnuniq (talk) 08:55, 15 September 2024 (UTC)[reply]
@Johnuniq I see. I was asking just because amperes (A) was written "amps" in FASTON terminal.-- Carnby (talk) 12:17, 15 September 2024 (UTC)[reply]