Template talk:Convert/Archive March 2013
This is an archive of past discussions about Template:Convert. 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. |
Help in porting to Gujarati Wikipedia
I am trying to port this convert template to Gujarati Wikipedia. When template handles with plural units, it converts but it puts 's' after. To understand, what i am telling see this. Can somebody point me out which template should be manpiluated for plural changes? Thanks!-- Samkit (Talk/Contributions) 09:10, 10 February 2013 (UTC)
- There are basicly two parts to pluralising. For some units pluralising in English simply means adding an "s" ("metre" → "metres", "mile" → "miles", etc.). For others it's more tricky (e.g. "foot" → "feet", "inch" → "inches", "kilometre per hour" → "kilometres per hour", etc.). For these more tricky ones there is the parameter
l
on the unit subtemplates (e.g. {{convert/ft}}, {{convert/in}}, {{convert/km/h}}, etc.). The second part comes with the display subtemplates (e.g. {{convert/LoffAoffDbSoff}}, {{convert/LoffAonSoff}}, etc.). These check whether the numerical value is one and if it is use the parametern
(from the unit subtemplates) if not then they usel
if it is given or, if not,n
with an added "s". I've gone and deleted this code from the Gujarati convert/LoffAoffDbSoff and convert/LoffAonSoff so the "s"s aren't appearing on the page in question but that won't fix things for every option (i.e. various linking, display, abbreviating, range, etc. options). I don't know how plurals are handled in Gujarati (nor whether they even exist) so I don't want to go to far. JIMp talk·cont 00:09, 19 February 2013 (UTC)- Sorry for late reply. Actually, in gujratati language, units are used in singular form only, they are not used in plural form. I want to localize whole Template, are there any other things to watch out for?? Samkit (Talk/Contributions) 19:55, 1 March 2013 (UTC)
- See #Lua Module:Convert below (the link in that post is obsolete, see here instead). The module, which is a month or more away from full implementation, is useful for localization because all messages are in one module, and all units are defined on one wiki page. Johnuniq (talk) 23:17, 1 March 2013 (UTC)
- But I am not sure that whether scribunto extension is deployed on gu.wikipedia. Thaks! Samkit (Talk/Contributions) 16:32, 4 March 2013 (UTC)
- It's likely that it is not there at the moment. However, Scribunto will be deployed to all projects, probably within a week. One way to see when it has arrived is to use Special:PrefixIndex (that's for enwiki; use the corresponding link on your wiki). In "Namespace", if you see "Module" near the bottom of the list, Scribunto is available. Johnuniq (talk) 21:53, 4 March 2013 (UTC)
- As of three days ago, the plan was to deploy Lua to all wikis on the 13th. Dragons flight (talk) 22:17, 4 March 2013 (UTC)
- It's likely that it is not there at the moment. However, Scribunto will be deployed to all projects, probably within a week. One way to see when it has arrived is to use Special:PrefixIndex (that's for enwiki; use the corresponding link on your wiki). In "Namespace", if you see "Module" near the bottom of the list, Scribunto is available. Johnuniq (talk) 21:53, 4 March 2013 (UTC)
- But I am not sure that whether scribunto extension is deployed on gu.wikipedia. Thaks! Samkit (Talk/Contributions) 16:32, 4 March 2013 (UTC)
- See #Lua Module:Convert below (the link in that post is obsolete, see here instead). The module, which is a month or more away from full implementation, is useful for localization because all messages are in one module, and all units are defined on one wiki page. Johnuniq (talk) 23:17, 1 March 2013 (UTC)
- Sorry for late reply. Actually, in gujratati language, units are used in singular form only, they are not used in plural form. I want to localize whole Template, are there any other things to watch out for?? Samkit (Talk/Contributions) 19:55, 1 March 2013 (UTC)
Need Radiation doses
I would like to see some of these:
- 100 rems (1.0 Sv) (rem)
- 100 sieverts (10,000 rem) or 100 sievert[convert: unknown unit] (sievert)
- 100 grays (10,000 rad) or 100 gray[convert: unknown unit] (gray)
- 100 rads (1.0 Gy) (rad)
- But please stay away from this 100 roentgen[convert: unknown unit] (roentgen) because there is no simple conversion for roentgens, and there are quite a few different meanings for it. People would misuse this one. I almost would like this one flagged so that no one decides later it would be a good idea to convert it. It has to be manually converted.
- 100 curies (3,700 GBq) (Yea, this works) or 100 microcuries (3,700 kBq) (doesn't work) or 100 Curie[convert: unknown unit] (Curie)
- 100 gigabecquerels (2,700 mCi) (Yea, this works)
These are commonly-encountered, and quite confusing units. I know most of the idiosyncrasies of these, so I can help if needed. Basically, the USA uses the non-SI units to a great extent, so many publications now list both to be readable by large audiences. The other issue is all of the SI prefixes. Take the curie, for example. I have seen μμCi used for some things (very tiny) and the typical sievert measurements can be pretty small, while the becqueral is just crazy large with GBq. I like to saw logs! (talk) 08:52, 23 February 2013 (UTC)
{{Convert|100|μCi}}
100 microcuries (3,700 kBq) (doesn't work) but{{Convert|100|µCi}}
100 microcuries (3,700 kBq) does. Due to different characters for μ & µ -- WOSlinker (talk) 10:46, 23 February 2013 (UTC)
- Units limited by use in articles: Typically, conversion units have not been added unless they were used in several articles. For that reason, {Convert} did not even convert tablespoons "tbsp" after 12 years of Wikipedia: 10 US tablespoons = 147.867648 ml. However, I think we should add the expected conversions, even if not used in several articles yet. Hence, now I have added "UStbsp" and "AUtbsp":
- {{convert|1.00000|UStbsp|ml}} → 1.00000 US tablespoon (14.7868 ml)
- {{convert|1.00000|AUtbsp|ml}} → 1.00000 Australian tablespoon (20.0000 ml)
- For radiation, the following exist:
- {{convert|1.000000|Bq|Ci|abbr=off}} → 1.000000 becquerel (2.70270×10−11 curies)
- {{convert|1.000000|Bq|abbr=off}} → 1.000000 becquerel (27.0270 picocuries)
- {{convert|1.000000|kBq|abbr=off}}} → 1.000000 kilobecquerel (27.0270 nanocuries)}
- {{convert|1.000000|GBq|abbr=off}} → 1.000000 gigabecquerel (27.0270 millicuries)
- I will try to add the other unit-codes to {Convert} to handle sievert, rad (unit), and gray (unit) later. -Wikid77 (talk) 14:04, 25 February 2013 (UTC)
Thanks a lot! When a new radiation emergency comes along, it would be great to offer these. Imagine if an emergency happened in the USA, which uses the rem, mrem, and the µCi a lot. Other folks will want to see the more familiar units. I like to saw logs! (talk) 08:37, 4 March 2013 (UTC)
Multiple output units
Is it possible to use one {{convert}} call to output multiple units? For example, say the primary measure is in a unit that is not common to either the US or SI standard, and you want to display both conversions. It would be ideal if the output could be for example
- 500 rods (1.6 mi, 2.5 km)
Because {{convert|500|rod|mi}}
spits out format already of
- 500 rods (1.6 mi)
I don't see how to use it to provide more than one output value succinctly. The only way seems to be to do
500 rods ({{convert|500|rod|mi|disp=output only}}, {{convert|500|rod|km|disp=output only}})
which gives
- 500 rods (1.6 mi, 2.5 km)
Is there a better way using one convert call and no duplicated fixed input text? - Keith D. Tyler ¶ 17:55, 20 March 2013 (UTC)
{{convert|500|rod|mi km}}
gives 500 rods (1.6 mi; 2.5 km) -- WOSlinker (talk) 18:31, 20 March 2013 (UTC)