This page is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Why can't the Lua module handle proper unicode fraction symbols like ½ ? Using -1⁄2 is odd. John Vandenberg ( chat) 13:44, 3 October 2015 (UTC)
{{convert|2+1/2|in|mm}}
→ 2+1⁄2 inches (64 mm){{convert|3+7/8|in|mm}}
→ 3+7⁄8 inches (98 mm){{convert|48|mm|in|frac=8}}
→ 48 millimetres (1+7⁄8 in){{convert|44|mm|in|frac=8}}
→ 44 millimetres (1+3⁄4 in) (frac=4 or frac=8 give the same result here){{convert|70|mm|in|frac=128}}
→ 70 millimetres (2+97⁄128 in)text = text:gsub('½', '+1/2')
but in general I don't think that offering multiple ways of doing things is always desirable because too many options leads to confusion with people wondering why 2½ works but 2¼ doesn't. There are around 3000 converts in articles with input numbers using "1/2" (half), and another 3000 using other fractions like 1/4 or 3/8, and it's probably better that people get used to the fact they have to enter fractions like that.
Johnuniq (
talk) 05:27, 5 October 2015 (UTC){{convert|1|oz|g|spell=in}}
is
one ounce (28 g)
I believe it should be possible to use 'an ounce' rather than 'one ounce'. Is there some hidden option for that?! John Vandenberg ( chat) 14:16, 3 October 2015 (UTC)
{{convert|1|oz|g|disp=out}}
) → an ounce (28 g)Using spell=out does not seem to be working, but shown below =on and =in both work.
Quick testing seems to suggest this is independent of units or values
Independently of this, the "spell" parameter needs adding to TemplateData for VisualEditor use. Thryduulf ( talk) 16:34, 6 October 2015 (UTC)
|spell=in
spell input|spell=In
same, starting with uppercase letter|spell=on
spell input and output|spell=On
same, starting with uppercase letter{{convert|8|ft|in|0|spell=In|order=flip}}
→ Ninety-six inches (8 ft)|spell=out
? What about |spell=Out
?
Johnuniq (
talk) 01:05, 7 October 2015 (UTC)
The adjectival form for measurements seems to cause problems for Google Search's text-to-speech. I recently search for Panama Canal and when it read out the intro it spelled out the measurement, i.e. referred to it as "a seven seven point one dash k-i-l-o-m-e-t-r-e canal". I guess really it's more Google's problem than ours, but I was wondering if there was anything that could be done to improve accessibility in the meantime? Keepstherainoff ( talk) 16:00, 9 October 2015 (UTC)
When user's preferred system is Si, multiple imperial equivalents, automatically inserted by conversion, clutter majority of the articles, really ruining their readability. I suspect it is the same for the users accustomed to imperial units. It would be perfect if user could make wikipedia display all measurements, presented through conversion templates, in only one, preferred, system. I've been searching through the wikipedia user settings for related options and through the wikimedia RFCs for their discussions, but found only discussion of the preferred order here and old/abandoned discussion of "Auto unit conversion" which, as I understand, is different template and, even if finished, won't affect the behavior of Convert templates. Does anything like this already exist? Right now it seems to me it does not and I'm considering creating an RFC at mediawiki project, but feature seems so obvious that I wanted to double-check for the case I missed it. Thanks Darkdiatel ( talk) 10:13, 5 October 2015 (UTC)
Fossils of very large dragonfly ancestors ... these had wingspans of up to about <script>document.write((userPrefs.system == 'si')?'750 mm':'30 in');</script>
... these had wingspans of up to about <span msystem='si'>750 mm</span><span msystem='imperial'>30 in</span><span msystem='si(imperial)'>750 mm (30 in)</span>
750 mm<span class='imperial-equivalent'> (30 in)</span>
30 in<span class='si-equivalent'> (750 mm)</span>
Darkdiatel, a user preference would need to be added to the MediaWiki software or a MediaWiki extension, so that makes many parts of this suggestion largely beyond the scope of this template. However, this template could easily add some CSS classes which could allow WP:User CSS and WP:Gadgets to provide users with some level of control. We might even go further and implement parts of http://microformats.org/wiki/measure , which may also have some accessibility benefits. ;-) John Vandenberg ( chat) 00:38, 6 October 2015 (UTC)
<span class="convert-si convert-imperial"><span class="imperial">10 mi</span><span> (</span><span class="si">16 km</span><span>)</span></span>This way, logged-in users could display only the measurement system of their preference using either
.convert-si span:not(.si) {display:none;}or
.convert-imperial span:not(.imperial) {display:none;}in their user-specific CSS. It would also work with more than two systems of units. There may be ways to allow for simpler selectors to work, to ease switching units for those unfamiliar with CSS. SiBr4 ( talk) 22:45, 6 October 2015 (UTC)
<span>
that matches the .convert-si span:not(.si)
selector.convert-si
class prevents the imperial units from being hidden (SI units could still be omitted if imperial units are chosen), which is kind of counter-intuitive.
SiBr4 (
talk) 17:54, 7 October 2015 (UTC)For Alabama Great Southern Railroad: 3854 million net ton-miles {{convert|3654000000|STmi}} 3,654,000,000 STmi convert: unknown unit 10.5 million passenger miles {{convert|10500000|prmi}} 10,500,000 prmi convert: unknown unit. Peter Horn User talk 18:31, 19 October 2015 (UTC)
When abbr=in or abbr=out is used with order=flip, this template reverses the term to be abbreviated. Either this should be corrected, or the parameters in and out should be changed to first and last. Yours aye, Buaidh 15:41, 21 October 2015 (UTC)
{{convert|1|ft|in|abbr=in|order=flip}}
→ 12 in (1 foot){{convert|1|ft|in|abbr=out|order=flip}}
→ 12 inches (1 ft){{convert|1|ft|in|lk=in|order=flip}}
→ 12
inches (1 ft){{convert|1|ft|in|lk=out|order=flip}}
→ 12 inches (1
ft){{convert|1|ft|in|spell=In}}
→ One foot (12 in){{convert|1|ft|in|spell=In|order=flip}}
→ Twelve inches (1 ft){{convert|1|to(-)|2|ft|in}}
→ 1 to 2 feet (12–24 in){{convert|1|to(-)|2|ft|in|order=flip}}
→ 12 to 24 inches (1–2 ft){{convert|1x2x3|ft|in}}
→ 1 by 2 by 3 feet (12 in × 24 in × 36 in){{convert|1x2x3|ft|in|abbr=in}}
→ 1 ft × 2 ft × 3 ft (12 by 24 by 36 inches){{convert|1x2x3|ft|in|abbr=in|order=flip}}
→ 12 in × 24 in × 36 in (1 by 2 by 3 feet){{convert|6|mi3|abbr=in|order=flip}}
of rock. →We should at least update the documentation to warn users of potential anomalies when using order=flip. Yours aye, Buaidh 01:00, 26 October 2015 (UTC)
I was just looking for a way to convert angles, and so thought I should revive Template_talk:Convert/Archive_September_2015#Angle_conversions. What I am looking for is a conversion in the manner of roadsigns for the steepness of a road. For instance, one might see "1 in 3 (33%)", but ideally it should also be able to convert into degrees and radians. - mattbuck ( Talk) 13:38, 20 October 2015 (UTC)
This page is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Why can't the Lua module handle proper unicode fraction symbols like ½ ? Using -1⁄2 is odd. John Vandenberg ( chat) 13:44, 3 October 2015 (UTC)
{{convert|2+1/2|in|mm}}
→ 2+1⁄2 inches (64 mm){{convert|3+7/8|in|mm}}
→ 3+7⁄8 inches (98 mm){{convert|48|mm|in|frac=8}}
→ 48 millimetres (1+7⁄8 in){{convert|44|mm|in|frac=8}}
→ 44 millimetres (1+3⁄4 in) (frac=4 or frac=8 give the same result here){{convert|70|mm|in|frac=128}}
→ 70 millimetres (2+97⁄128 in)text = text:gsub('½', '+1/2')
but in general I don't think that offering multiple ways of doing things is always desirable because too many options leads to confusion with people wondering why 2½ works but 2¼ doesn't. There are around 3000 converts in articles with input numbers using "1/2" (half), and another 3000 using other fractions like 1/4 or 3/8, and it's probably better that people get used to the fact they have to enter fractions like that.
Johnuniq (
talk) 05:27, 5 October 2015 (UTC){{convert|1|oz|g|spell=in}}
is
one ounce (28 g)
I believe it should be possible to use 'an ounce' rather than 'one ounce'. Is there some hidden option for that?! John Vandenberg ( chat) 14:16, 3 October 2015 (UTC)
{{convert|1|oz|g|disp=out}}
) → an ounce (28 g)Using spell=out does not seem to be working, but shown below =on and =in both work.
Quick testing seems to suggest this is independent of units or values
Independently of this, the "spell" parameter needs adding to TemplateData for VisualEditor use. Thryduulf ( talk) 16:34, 6 October 2015 (UTC)
|spell=in
spell input|spell=In
same, starting with uppercase letter|spell=on
spell input and output|spell=On
same, starting with uppercase letter{{convert|8|ft|in|0|spell=In|order=flip}}
→ Ninety-six inches (8 ft)|spell=out
? What about |spell=Out
?
Johnuniq (
talk) 01:05, 7 October 2015 (UTC)
The adjectival form for measurements seems to cause problems for Google Search's text-to-speech. I recently search for Panama Canal and when it read out the intro it spelled out the measurement, i.e. referred to it as "a seven seven point one dash k-i-l-o-m-e-t-r-e canal". I guess really it's more Google's problem than ours, but I was wondering if there was anything that could be done to improve accessibility in the meantime? Keepstherainoff ( talk) 16:00, 9 October 2015 (UTC)
When user's preferred system is Si, multiple imperial equivalents, automatically inserted by conversion, clutter majority of the articles, really ruining their readability. I suspect it is the same for the users accustomed to imperial units. It would be perfect if user could make wikipedia display all measurements, presented through conversion templates, in only one, preferred, system. I've been searching through the wikipedia user settings for related options and through the wikimedia RFCs for their discussions, but found only discussion of the preferred order here and old/abandoned discussion of "Auto unit conversion" which, as I understand, is different template and, even if finished, won't affect the behavior of Convert templates. Does anything like this already exist? Right now it seems to me it does not and I'm considering creating an RFC at mediawiki project, but feature seems so obvious that I wanted to double-check for the case I missed it. Thanks Darkdiatel ( talk) 10:13, 5 October 2015 (UTC)
Fossils of very large dragonfly ancestors ... these had wingspans of up to about <script>document.write((userPrefs.system == 'si')?'750 mm':'30 in');</script>
... these had wingspans of up to about <span msystem='si'>750 mm</span><span msystem='imperial'>30 in</span><span msystem='si(imperial)'>750 mm (30 in)</span>
750 mm<span class='imperial-equivalent'> (30 in)</span>
30 in<span class='si-equivalent'> (750 mm)</span>
Darkdiatel, a user preference would need to be added to the MediaWiki software or a MediaWiki extension, so that makes many parts of this suggestion largely beyond the scope of this template. However, this template could easily add some CSS classes which could allow WP:User CSS and WP:Gadgets to provide users with some level of control. We might even go further and implement parts of http://microformats.org/wiki/measure , which may also have some accessibility benefits. ;-) John Vandenberg ( chat) 00:38, 6 October 2015 (UTC)
<span class="convert-si convert-imperial"><span class="imperial">10 mi</span><span> (</span><span class="si">16 km</span><span>)</span></span>This way, logged-in users could display only the measurement system of their preference using either
.convert-si span:not(.si) {display:none;}or
.convert-imperial span:not(.imperial) {display:none;}in their user-specific CSS. It would also work with more than two systems of units. There may be ways to allow for simpler selectors to work, to ease switching units for those unfamiliar with CSS. SiBr4 ( talk) 22:45, 6 October 2015 (UTC)
<span>
that matches the .convert-si span:not(.si)
selector.convert-si
class prevents the imperial units from being hidden (SI units could still be omitted if imperial units are chosen), which is kind of counter-intuitive.
SiBr4 (
talk) 17:54, 7 October 2015 (UTC)For Alabama Great Southern Railroad: 3854 million net ton-miles {{convert|3654000000|STmi}} 3,654,000,000 STmi convert: unknown unit 10.5 million passenger miles {{convert|10500000|prmi}} 10,500,000 prmi convert: unknown unit. Peter Horn User talk 18:31, 19 October 2015 (UTC)
When abbr=in or abbr=out is used with order=flip, this template reverses the term to be abbreviated. Either this should be corrected, or the parameters in and out should be changed to first and last. Yours aye, Buaidh 15:41, 21 October 2015 (UTC)
{{convert|1|ft|in|abbr=in|order=flip}}
→ 12 in (1 foot){{convert|1|ft|in|abbr=out|order=flip}}
→ 12 inches (1 ft){{convert|1|ft|in|lk=in|order=flip}}
→ 12
inches (1 ft){{convert|1|ft|in|lk=out|order=flip}}
→ 12 inches (1
ft){{convert|1|ft|in|spell=In}}
→ One foot (12 in){{convert|1|ft|in|spell=In|order=flip}}
→ Twelve inches (1 ft){{convert|1|to(-)|2|ft|in}}
→ 1 to 2 feet (12–24 in){{convert|1|to(-)|2|ft|in|order=flip}}
→ 12 to 24 inches (1–2 ft){{convert|1x2x3|ft|in}}
→ 1 by 2 by 3 feet (12 in × 24 in × 36 in){{convert|1x2x3|ft|in|abbr=in}}
→ 1 ft × 2 ft × 3 ft (12 by 24 by 36 inches){{convert|1x2x3|ft|in|abbr=in|order=flip}}
→ 12 in × 24 in × 36 in (1 by 2 by 3 feet){{convert|6|mi3|abbr=in|order=flip}}
of rock. →We should at least update the documentation to warn users of potential anomalies when using order=flip. Yours aye, Buaidh 01:00, 26 October 2015 (UTC)
I was just looking for a way to convert angles, and so thought I should revive Template_talk:Convert/Archive_September_2015#Angle_conversions. What I am looking for is a conversion in the manner of roadsigns for the steepness of a road. For instance, one might see "1 in 3 (33%)", but ideally it should also be able to convert into degrees and radians. - mattbuck ( Talk) 13:38, 20 October 2015 (UTC)