Template talk:Convert/Archive March 2013

{{talkarchive}}

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. {{tl|convert/ft}}, {{tl|convert/in}}, {{tl|convert/km/h}}, etc.). The second part comes with the display subtemplates (e.g. {{tl|convert/LoffAoffDbSoff}}, {{tl|convert/LoffAonSoff}}, etc.). These check whether the numerical value is one and if it is use the parameter n (from the unit subtemplates) if not then they use l if it is given or, if not, n with an added "s". I've gone and deleted this code from the Gujarati [http://gu.wikipedia.org/wiki/%E0%AA%A2%E0%AA%BE%E0%AA%82%E0%AA%9A%E0%AB%8B:Convert/LoffAoffDbSoff convert/LoffAoffDbSoff] and [http://gu.wikipedia.org/wiki/%E0%AA%A2%E0%AA%BE%E0%AA%82%E0%AA%9A%E0%AB%8B:Convert/LoffAonSoff 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)

Need Radiation doses

I would like to see some of these:

  • {{Convert|100|rem}} (rem)
  • {{Convert|100|Sv}} or {{Convert|100|sievert}} (sievert)
  • {{Convert|100|Gy}} or {{Convert|100|gray}} (gray)
  • {{Convert|100|rad}} (rad)
  • But please stay away from this {{Convert|100|roentgen}} (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.
  • {{Convert|100|Ci}} (Yea, this works) or {{Convert|100|μCi}} (doesn't work) or {{Convert|100|Curie}} (Curie)
  • {{Convert|100|GBq}} (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)

:{{tlx|Convert|100|μCi}} {{Convert|100|μCi}} (doesn't work) but {{tlx|Convert|100|µCi}} {{Convert|100|µCi}} 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}} → {{convert|1.00000|UStbsp|ml}}

:*{{convert|1.00000|AUtbsp|ml}} → {{convert|1.00000|AUtbsp|ml}}

: For radiation, the following exist:

:* {{convert|1.000000|Bq|Ci|abbr=off}} → {{convert|1.000000|Bq|Ci|abbr=off}}

:* {{convert|1.000000|Bq|abbr=off}}{{ns}}→ {{convert|1.000000|Bq|abbr=off}}

:* {{convert|1.000000|kBq|abbr=off}}} → {{convert|1.000000|kBq|abbr=off}}}

:* {{convert|1.000000|GBq|abbr=off}} → {{convert|1.000000|GBq|abbr=off}}

: 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 {{tl|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

: {{convert|500|rod|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 ({{convert|500|rod|mi|disp=output only}}, {{convert|500|rod|km|disp=output only}})

Is there a better way using one convert call and no duplicated fixed input text?

- Keith D. Tyler 17:55, 20 March 2013 (UTC)

: {{tlx|convert|500|rod|mi km}} gives {{convert|500|rod|mi km}} -- WOSlinker (talk) 18:31, 20 March 2013 (UTC)