Template talk:Number table sorting

message: Centralized discussion for all issues surrounding sortkeys for wikitables created here: Template talk:Sort. ~ trialsanderrors 09:02, 5 April 2007 (UTC)
thread_title: [[Template talk:Sort]]

message: See Wikipedia:Village pump (technical)#Bizarre interaction between age and nts templates. —Steve Summit (talk) 01:25, 29 November 2008 (UTC)
thread_title:  Bizarre interaction with '''age''' template 

message: I am trying to translate this template for an Indian language which uses the Indian numbering system. Anyone has an idea how to modify this template for that? 
Thanks Abhijit Sathe (talk) 21:43, 13 July 2009 (UTC)
thread_title:  Indian numbering system 

message: Many pages would like to use this template with a non-numeric prefix, e.g. a less-than sign or a greater-than sign (see List of European capital cities by area).  One option is to just use  for the entire table, but it would be helpful if we could add a  option to this template.  To do this, change </span>}} to </span>}}, which will insert the optional prefix between the "no display" and actual display parts.  Thanks! 134.253.26.6 (talk) 16:57, 15 November 2010 (UTC)
replies: text: That seems sensible and fairly uncontroversial, so done. Please could you update the documentation? — Martin (MSGJ · talk) 17:10, 15 November 2010 (UTC)
replies: text:  Documentation updated.  Thank you. 134.253.26.6 (talk) 18:03, 15 November 2010 (UTC)
thread_title:  Edit request from 134.253.26.6, 15 November 2010 

message: I'm making some edits to a large table containing lots of dates and find the formatnum magic word is causing commas in the years, which looks odd.
I've just updated the sandbox () with a new argument  that will optionally suppress that formatnum call. Could someone effect that edit to the template itself, please?
The specifics of the edit are changing
 }}
to
 }}
, the rest of the template is merely a copy/paste of the current revision. Thanks! — OwenBlacker (Talk) 15:52, 16 April 2011 (UTC)
replies: text: Wouldn't it be more logical to use  instead of ? Obviously the default would be "yes" in this case. — Martin (MSGJ · talk) 16:50, 17 April 2011 (UTC)
replies: text:  I don't really have any strong preference; I'd not really thought about it either way. I've created a template  that's waiting for this edit, but that's easy enough to change. — OwenBlacker (Talk) 21:41, 17 April 2011 (UTC)
replies: text: . Please let me know if this does not work correctly. — Martin (MSGJ · talk) 12:26, 18 April 2011 (UTC)
replies: text:  Perfect, thank you. — OwenBlacker (Talk) 12:34, 24 April 2011 (UTC)
thread_title:  Requested edit: Making number formatting optional 

message: I was confused a bit by this article. It mentioned that the template is useful if text follows a number, but didn't specifically state how the template was supposed to be used in that situation. I figured it out, you simply type  and put text after it to achieve that result. I would recommend that this be stated explicitly somehow. The wikitext " as of January 2012" achieves an output of "426,004 as of January 2012" but with the numerical sort key 426,004. Please state this in the article, I can't edit it myself. I believe it will be highly useful to others, and should only serve to make the article better. Thanks. Jessemv (talk) 05:04, 13 January 2012 (UTC)
replies: text: Hi Jessemv, the documentation for this template is held at Template:Number table sorting/doc and this is fully editable by anyone, so please make the changes you see fit. Regards — Martin (MSGJ · talk) 14:39, 13 January 2012 (UTC)
replies: text: Brilliant, I'll try my best. :) Jessemv (talk) 22:53, 13 January 2012 (UTC)
thread_title:  Proposed edit: explicitly state how to use the template for following text 

message: I was looking at this template wondering whether we could do the same thing quicker; whether the code could be simplified (look, for example at ).  Sure it could thought I and we could easily extend the range a bit whilst we're at it.  
We're limitted to a range of ±1016 with a precision of 6 decimal places.  Look at the hidden output.  There's an "&" and twenty-three digits (unless it's out of range).  The first digit is a "1" or "0" (for positive & negative), I thought, we could get five times the range by going all the way up to "9".  The next sixteen digits are calculated one by one.  This is inefficient.  The final six digits are calculated altogether.  This is better; so why not calculate those sixteen digits like that?  And why not?  So I got to work on a new design.
To cut a medium-length story short, it's just dawned on me that we're doing it all wrong.  I'm planning to significantly simplify the code and at the same time vastly expand the range.  I'm not talking five times the range anymore, not five hundred time nor even five million; more like five thousand octoquadragintillion.  It's simple.  Don't do the same thing quicker do something better & quicker.  Instead of having the first digit represent the sign have the first four digits represent the sign and the order of magnitude.  The next fourteen digits will represent the significand. 
Instead of using zeros to show magnitude, use numbers.  We'll be looking at a range of about ±10300 to ±10–300 instead of the current ±1016 to ±10–6. JIMp talk·cont 08:00, 9 May 2012 (UTC)
replies: text: Don't forget that  uses this template's sub-templates. –droll [chat] 18:47, 9 May 2012 (UTC)
thread_title:  And now for something completely different ... 

message: There is a prefix parameter with this template, but would it be very difficult to add a suffix parameter? If this parameter was to be added, it would be like this:
 would display: 10,000 (est.)
Would this be difficult to implement? Thanks. Dustin (talk) 18:39, 20 June 2014 (UTC)
thread_title:  Addition of a suffix parameter 

message: Template:Nts redirects to Template:Number table sorting. Surely the redirect should be tagged 
NickGibson3900 Talk 08:06, 22 September 2014 (UTC)
replies: text: Done --Redrose64 (talk) 18:35, 22 September 2014 (UTC)
thread_title:  Protected edit request on 22 September 2014 

message: While checking Module:Val I have noticed many minor differences regarding sort keys. The issues probably do not affect table sort orders, but there is a problem in the template if anyone wants a challenge. I believe the val sort keys shown below (generated by the code at function make_table_or_sort in Module:Convert/sandbox) are correct.
* ← 
* ←
* ← 
* ←
* ← 
* ←
* ← 
* ←
Johnuniq (talk) 03:49, 28 July 2015 (UTC)
thread_title:  Sort key quirks 

message: Can this be used in other templates? One user keeps adding it to Template:Player3. However, it breaks the table as - (hyphen), – (ndash) and — (mdash) can no longer be used there. – Sabbatino (talk) 22:41, 27 December 2016 (UTC)
thread_title:  Nts template in other templates 

message: : The switch to the module has caused minor Linter errors when the variable %s is empty. The error message looks like this: Error in Template:Nts:  is not a valid number. Note the two consecutive single quote marks, which the parser interprets as opening italic formatting. Can you please make a minor adjustment to insert a space between the two quote marks, or do something else to prevent this formatting error? Thanks. – Jonesey95 (talk) 10:39, 30 March 2019 (UTC)
replies: text: , sure, ill fix it later today. —TheDJ (talk • contribs) 13:41, 30 March 2019 (UTC)
replies: text: Don't think thats new though... if i remember the testcase results correctly, it did that before as well... —TheDJ (talk • contribs) 13:43, 30 March 2019 (UTC)

text: , ok, invalid input is now allowed —TheDJ (talk • contribs) 12:37, 31 March 2019 (UTC)
replies: text: Thanks, that seems to have cleared up the problem at :Template:WDL/doc, for example. – Jonesey95 (talk) 19:14, 31 March 2019 (UTC)
thread_title:  Minor error in error message 

message: : the recent modification is causing problems at 2019 Alberta municipal censuses. Historically I have coded  in blank fields until the census results are published and it simply rendered as nothing. The old way was helpful because I didn't have to comment out the empty template previously (i.e. ). Cheers, Hwy43 (talk) 21:38, 30 March 2019 (UTC)
replies: text: , invalid input is now allowed. —TheDJ (talk • contribs) 12:37, 31 March 2019 (UTC)
replies: text: Thanks! Hwy43 (talk) 21:11, 1 April 2019 (UTC)
thread_title:  NTS template modification 

message: List of legislatures by number of members looks rather silly with the populations of China and India in scientific notation. Is there a way to suppress this and use regular numbers? Or perhaps just converting everything to data-sort-type="number" would be better? Would have to figure out how to do that automatically instead of by hand... Reywas92Talk 05:22, 19 April 2019 (UTC)
replies: text: It appears there is no way to disable that scientific notation display. If I ever had time I might fix that but meanwhile I put a kludge in the article to workaround the problem. Johnuniq (talk) 07:20, 19 April 2019 (UTC)
replies: text: A fix for this would be great. List of mergers and acquisitions by Alphabet also looks silly with scientific notation. - Samuel Wiki (talk) 05:28, 7 June 2019 (UTC)
thread_title:  No scientific notation 

message: tried to use format=gaps parameter to use gaps in the template, but it did not like it. when using international thousands separators like , or ٬ or arabic thousands separator ٬ the sorting does not work correctly. how would one do this? ThurnerRupert (talk) 01:10, 15 August 2023 (UTC)
thread_title:  how to put international number format or gaps into number? 

message: The docs for Template:Number table sorting hidden have a deprecation notice directing editors to use this template instead, but I don't see anything in the docs that make clear how one would achieve the same result. It looks to me like data-sort-value might be the better substitute? Walkersam (talk) 00:23, 20 April 2024 (UTC)
replies: text: I don't have an answer to your point about the deprecation notice, but both templates use data-sort-value. The following shows input to Special:ExpandTemplates and the result:


123,456,789.00123

 Johnuniq (talk) 01:01, 20 April 2024 (UTC)
thread_title:  ntsh