Template talk:Val

bnwiki
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, $1,234,567.123$ should be 12,34,567.1234567 instead of 1,234,567.1234567. Please help to fix. Thanks. আফতাবুজ্জামান (talk) 21:30, 18 December 2023 (UTC)
 * @আফতাবুজ্জামান: Module:Val is quite complex and I never got around to providing much localization. As you can see,  and   were added for the Italian Wikipedia, and likewise   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)
 * @Johnuniq, If i use bn:Template:ConvertDigit, for example $1,234.568 deg$ won't work correctly. I was trying to use Module:Num Converter and was half successful. As you can see examples here, i am getting half Bengali and half English digit (e.g. 1২৩৪.5678°±1.23°). I was wondering if you could tell me which part (line) in the module produce that 1 & 5678 & 1.23 etc, so that i can just add "convert('bn', tostring(...))" to them. If you want, please directly edit the bn:Module:Val, it's not live yet. আফতাবুজ্জামান (talk) 23:34, 19 December 2023 (UTC)
 * I'll try to look at the issue maybe over the weekend. Feel free to post here and remind me next week if I forget to respond. Johnuniq (talk) 09:05, 20 December 2023 (UTC)
 * I have started looking and translating the digits won't be a problem. I should be done in a couple of days. Johnuniq (talk) 04:29, 27 December 2023 (UTC)
 * I put a preliminary version at bn:Module:Val. Johnuniq (talk) 08:30, 27 December 2023 (UTC)
 * @Johnuniq, Thank you. আফতাবুজ্জামান (talk) 20:06, 27 December 2023 (UTC)

Bug in unit apply to both numerator and denominator for inch/ft/min/sec (single/dbl quote)?
Compare:
 * &rarr;  1/2.3 m/s
 * &rarr;  1/2.3 ft
 * &rarr;  1/2.3 in

vs.:

&emsp;—&#8239;sbb&#8239;(talk) 01:36, 24 January 2024 (UTC)
 * &rarr;  1″/2.3″
 * &rarr;  1′/2.3′
 * &rarr;  1°/2.3°
 * &rarr;  1°/2.3°
 * Are you referring to how the second group repeats the unit while the first doesn't? That is an intentional feature that applies to ranges. It makes more sense when using a dash or.
 * Johnuniq (talk) 02:09, 24 January 2024 (UTC)
 * (Sorry for the late reply, I don't think I was notified of your response to me).
 * I understand that it makes sense for ranges. But I'm not specifying a range, I'm specifying a vulgar fraction, and it seems to be supported (if only notionally) by . If I want 1/2.3 in (as in, the sensor size, $1 ft$), 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? &emsp;—&#8239;sbb&#8239;(talk) 03:30, 11 February 2024 (UTC)
 * In val, a slash is a range, not a fraction. It might end up looking like a fraction but val treats it as a range. That is for usage where the slash sort-of means "or". Units are repeated if the range is  or   (that's a WP:MOS issue) or if the unit is flagged with   at Module:Val/units. You might not need . Just write out what is needed. Val is to replace tricky wikitext. Johnuniq (talk) 05:07, 11 February 2024 (UTC)
 * Where in WP is a range designated by a slash? I can't think of anywhere. '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 (&times;, "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.
 * But there's an obvious need for fractional values, and it seems slash should provide that.
 * And again, what is the MOS range rule that produces only the single unit label of "ft" for ($1 ft$) but the repeated unit label of "°" for  ($1 ft$)?
 * I need to represent 1/2.3 in, which works with just fine.
 * I disagree with that. Templates like 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.
 * My point in this comment is that there's no logical reason angle unit labels should be treated any differently than other unit labels with "/". I understand that does, but there appears to be no logic for that. And nowhere in MOS does slash indicate a sort-of range like "or". &emsp;—&#8239;sbb&#8239;(talk) 08:15, 11 February 2024 (UTC)
 * I'm just reporting how it is which has been unchanged since at least August 2015 when the template was switched to using Module:Val. Slash is handled the same way by convert. At any rate, I just added unit  which does not repeat:
 * That might be adequate for your use case. Johnuniq (talk) 08:54, 11 February 2024 (UTC)
 * I disagree with that. Templates like 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.
 * My point in this comment is that there's no logical reason angle unit labels should be treated any differently than other unit labels with "/". I understand that does, but there appears to be no logic for that. And nowhere in MOS does slash indicate a sort-of range like "or". &emsp;—&#8239;sbb&#8239;(talk) 08:15, 11 February 2024 (UTC)
 * I'm just reporting how it is which has been unchanged since at least August 2015 when the template was switched to using Module:Val. Slash is handled the same way by convert. At any rate, I just added unit  which does not repeat:
 * That might be adequate for your use case. Johnuniq (talk) 08:54, 11 February 2024 (UTC)
 * That might be adequate for your use case. Johnuniq (talk) 08:54, 11 February 2024 (UTC)

Template-protected edit request on 21 March 2024
Hi, I intended to add the 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, swar e • 🗣 • 🏲 22:03, 21 March 2024 (UTC)
 * No edit request is needed—a unit can be added at Module:Val/units. That's a bit daunting and I'm happy to do it but some details are needed. The units are sort-of grouped logically. Do you see a place where the wanted unit would go? Each unit has an easy-to-type code to identify the unit. Any suggestion? If the unit is linked, what article should it link to? Bear in mind that there is not much point adding a unit to val if the unit will only be used in one or two places. Johnuniq (talk) 04:36, 22 March 2024 (UTC)

Template-protected edit request on 27 March 2024
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). 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. Purplemountainman talk contribs 21:21, 27 March 2024 (UTC)
 * Done. Johnuniq (talk) 03:19, 28 March 2024 (UTC)

Spacing
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)
 * 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)

A teragram is not a tonne
The current list of units contains:

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

Spidermario (talk) 16:50, 10 July 2024 (UTC)
 * 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)