Template:Val is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should be proposed here first. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use ((edit template-protected)) to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
This is the talk page for discussing improvements to the Val template. |
|
Archives: 1, 2, 3, 4, 5, 6, 7Auto-archiving period: 3 months |
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: |
|||||||||||||||||||||||||||||
|
The template ((Val2)) was considered for deletion on 2014 February 7. The result of the discussion was "move to Template:Val/sandbox2". |
Hi, on bnwiki, this module does not gives result in Bengali digit, so i did this. It works but not fully, see bn:Module talk:Val#উদাহরণ for examples. And for bnwiki, ((val|1234567.1234567|fmt=commas)) should be 12,34,567.1234567 instead of 1,234,567.1234567. Please help to fix. Thanks. আফতাবুজ্জামান (talk) 21:30, 18 December 2023 (UTC)
numdot
and numsep
were added for the Italian Wikipedia, and likewise mtext
allows easy customization of the error messages. However, there is no method to change digit translation or digit grouping. Module:Convert has a lot more and can group digits 2,2,3 but I would be reluctant to copy that tricky code into val and test it. Regarding translating the output, why not use bn:Module:EnDigitConverter that I wrote 8 years ago? I see it's now bn:Module:ConvertDigit. Maybe bn:Template:ConvertDigit which uses the module could be put in whatever template you are using for bn:Template:Val. Johnuniq (talk) 04:16, 19 December 2023 (UTC)
Compare:
((val|1|/|2.3|u=m/s))
→ 1/2.3 m/s((val|1|/|2.3|u=ft))
→ 1/2.3 ft((val|1|/|2.3|u=in))
→ 1/2.3 invs.:
((val|1|/|2.3|u="))
→ 1″/2.3″((val|1|/|2.3|u='))
→ 1′/2.3′((val|1|/|2.3|u=°))
→ 1°/2.3°((val|1|/|2.3|u=deg))
→ 1°/2.3°— sbb (talk) 01:36, 24 January 2024 (UTC)
to
.
((val|1|-|2.3|u=ft))
→ 1–2.3 ft((val|1|to|2.3|u=ft))
→ 1 to 2.3 ft((val|1|-|2.3|u='))
→ 1′–2.3′((val|1|to|2.3|u='))
→ 1′ to 2.3′((val))
. If I want 1/2.3 in
(as in, the sensor size, 1/2.3 in), it works. But other unit codes as noted, repeat. What is the rationale for treating different units differently? Or perhaps better asked, what is the set of units that don't repeat (such as "m/s", "ft", "in", ...) and what is the set of units that do repeat? — sbb (talk) 03:30, 11 February 2024 (UTC)
x
or ×
(that's a WP:MOS issue) or if the unit is flagged with ANGLE
at Module:Val/units. You might not need ((val)). Just write out what is needed. Val is to replace tricky wikitext. Johnuniq (talk) 05:07, 11 February 2024 (UTC)
((val))
's docs only mention a single example using slash, but does not prescribe slash as a range. It is merely a conjoining (conjunction) format, one of several, including range-types (hyphen, "to", "and") as well as product/area types (×, "by"). I understand that in the Lua code, "/" is treated like a conjunction, but that doesn't mean it's appropriate syntax as a conjunction.((val|1|/|2.3|u=ft))
(1/2.3 ft) but the repeated unit label of "°" for ((val|1|/|2.3|u=deg))
(1°/2.3°)?You might not need ((val)). Just write out what is needed.I need to represent
1/2.3 in
, which works with ((val)) just fine.Val is to replace tricky wikitext.I disagree with that. Templates like ((val)) are especially useful to consistently and cleanly represent a combined value and unit, rather than having a hodge-podge of numbers that were forgotten to be wedded to a unit label with ((nbsp)).
degree
which does not repeat:
((val|1|/|2|u=degree))
→ 1/2°This edit request to Module:Val/units has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Hi, I intended to add the ((val))
template to this article. Therefore I suggest the addition of the CGS-but-commonly-used unit of luminosity in particle colliders, cm-2·s-1. Thanks, sware • 🗣 • 🏲 22:03, 21 March 2024 (UTC)
This edit request to Module:Val/units has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
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)