Module talk:Convert: Difference between revisions

Content deleted Content added
Indian numbering system: lakhs and crores: Adding conversion of these dimensionless units will go a long way to resolving problems of comprehension in tens of thousands of articles.
Tag: Reverted
(7 intermediate revisions by 3 users not shown)
Line 43:
Testing on this problem is at [[:uk:User:Johnuniq/convert]] with discussion at [[:uk:User talk:Johnuniq/convert]]. The bug seems to have been present since the original <code>varname</code> used for certain languages was developed more than ten years ago. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 11:05, 15 September 2024 (UTC)
 
== IndianCall numberingfrom system:other lakhsLua and croresmodule ==
 
There currently doesn't seem to be an easy way to call this module from another Lua module. I made a small change to the sandbox code [[Special:Diff/1252830342/1303398379|here]] that works well in my tests, and if there are no objections I can implement it in the main module. <span class="nowrap">--[[User:Ahecht|Ahecht]] ([[User talk:Ahecht|<b style="color:#FFF;background:#04A;display:inline-block;padding:1px;vertical-align:middle;font:bold 50%/1 sans-serif;text-align:center">TALK<br />PAGE</b>]])</span> 19:02, 30 July 2025 (UTC)
I request that we enhance the module to include [[lakhs]] and [[crores]].
:Doesn't the 'standard' naming style (if there is one) use an underscore-prefixed function name for functions called from an external module as a way to distinguish those functions from template-called function names? So instead of <code>do_convert</code> it would be <code>_main_convert</code>? That seems to be in keeping with [[Module:Convert]]'s use of an underscore prefix for the helper function <code>_unit</code> which is called from another module.
 
:—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 19:19, 30 July 2025 (UTC)
The [[Indian numbering system]] is the main nomenclature used in South Asia to name large numbers. From the lead:
::@[[User:Trappist the monk|Trappist the monk]] Makes sense, I've updated the sandbox. <span class="nowrap">--[[User:Ahecht|Ahecht]] ([[User talk:Ahecht|<b style="color:#FFF;background:#04A;display:inline-block;padding:1px;vertical-align:middle;font:bold 50%/1 sans-serif;text-align:center">TALK<br />PAGE</b>]])</span> 19:23, 30 July 2025 (UTC)
: {{xt|The terms ''[[lakh]]'' or 1,00,000 (one hundred thousand, written as ''100,000'' in Pakistan, and outside the [[Indian subcontinent]]) and ''[[crore]]'' or 1,00,00,000 (ten million, written as ''10,000,000'' outside the subcontinent) are the most commonly used terms in [[Indian English]] to express large numbers in the system.}}
:::The sandbox code looks good to me. I put a test at [[Module:Sandbox/Johnuniq/temp]] with result at [[Module talk:Sandbox/Johnuniq/temp|talk]]. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 04:25, 31 July 2025 (UTC)
This is a dimensionless unit, or if you wish, the units are integers. (Hence if implemented, the data item in 'all_units' at [[Module:Convert/data]] could be named <code>["ins"]</code> for 'Indian numbering system'). Note also the main pattern of comma-separation into groups of two and three digits, not just three.
::::{{done}} <span class="nowrap">--[[User:Ahecht|Ahecht]] ([[User talk:Ahecht|<b style="color:#FFF;background:#04A;display:inline-block;padding:1px;vertical-align:middle;font:bold 50%/1 sans-serif;text-align:center">TALK<br />PAGE</b>]])</span> 21:03, 31 July 2025 (UTC)
 
These terms should be converted to standard English terms, mostly with the term ''million'', except for values up to 9 lakh, which could be 900,000. Sample usage in articles:
* '''lakh''' – [https://en.wikipedia.org/w/index.php?search=lakh+insource%3A%2F%5B0-9%5D%2A+lakhs%3F+%2A%2F+-intitle%3Alakh&title=Special:Search&profile=default&fulltext=1 6,914 articles]
* '''crore''' – [https://en.wikipedia.org/w/index.php?search=crore+insource%3A%2F%5B0-9%5D%2A+crores%3F+%2A%2F+-intitle%3Acrore&title=Special:Search&profile=default&fulltext=1 10,809 articles]
The plural sometimes has the -s, and sometimes doesn't; so both '2 lakhs' and '2 lahk' are seen; same for crore(s).
 
This arose at the Rfc at [[Wikipedia talk:Manual of Style/Dates and numbers#RfC Indian numbering conventions|Wikipedia talk:Manual of Style/Dates and numbers]], where in my !vote ([[Special:Diff/1258247883|diff]]) I called for using template {{tl|Convert}}, only to realize after the fact that the template will not handle it. This conversion is badly needed, as it will resolve a sore point about usage of lakhs and crores in many articles. Thanks, [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 23:46, 18 November 2024 (UTC)