Template talk:Medals table
![]() | Template:Medals table is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
This is the talk page for discussing improvements to the Medals table template. |
|
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
|
Initial creation
[edit]![](http://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Purple_arrow_down.svg/20px-Purple_arrow_down.svg.png)
I would like a template for medal table (example 2018 Asian Games medal table) so the total number of medal could be computed automatically. Currently {{Infobox country at games}} has this feature. Hddty. (talk) 05:01, 29 August 2018 (UTC)
- @Hddty.: I like this idea. Think it might be a good candidate for a module... --Zackmann08 (Talk to me/What I been doing) 21:40, 16 September 2018 (UTC)
In progress this is going to take me a few days but I hope to have a proof of concept done mid week. :-) --Zackmann08 (Talk to me/What I been doing) 22:16, 16 September 2018 (UTC)
- @Hddty.: can you take a look at {{Medals table}} and let me know what you think? Still working out a few kinks... But would love some feedback! --Zackmann08 (Talk to me/What I been doing) 22:36, 17 September 2018 (UTC)
- @Zackmann08: Cool! I didn't expect the column would be merged if the NOC has the same rank. My suggestion is, since the ranks are automatically generated based on medal, maybe better to use IOC codes to distinguish the parameter instead of number (example goldCHN, thus we don't need nation1). Sometimes in the main article we only display top 10 NOC + "Remaining NOCs" by transclusion (see 2016 Summer Olympics#Medal table, sometimes not, see 2018 Winter Olympics#Medal table) is this template able to do this? Also NOCs total number needs to be displayed in the bottom of the table. Hddty. (talk) 02:33, 18 September 2018 (UTC)
- @Hddty.: well much of the credit goes to Frietjes for her assistance! The use of the IOC codes is an interesting idea... Not sure whether it is practical to implement that in a module. @Frietjes: do you have any thoughts? I'm happy to try to implement it, but I'm curious what you think. --Zackmann08 (Talk to me/What I been doing) 03:46, 18 September 2018 (UTC)
- IOC codes should be possible by calling Module:Country alias. I would suggest
|gold_CHN=
or|goldCHN=
with the ability to override the display name with|nameCHN=
or|name_CHN=
, but if the name parameter isn't there, then it looks up the name from the 3 letter abbreviation using Module:Country alias. the other interesting feature with 2016 Summer Olympics medal table is the ability to show the full table on 2016 Summer Olympics medal table but only part of the table on 2016 Summer Olympics#Medal table. there are a few ways we could accomplish this, but the method used by Template:2004–05 FA Premier League table is probably the most obvious (see the show_limit parameter and 2004–05 Chelsea F.C. season#League table). Frietjes (talk) 13:27, 18 September 2018 (UTC)
- IOC codes should be possible by calling Module:Country alias. I would suggest
- @Hddty.: well much of the credit goes to Frietjes for her assistance! The use of the IOC codes is an interesting idea... Not sure whether it is practical to implement that in a module. @Frietjes: do you have any thoughts? I'm happy to try to implement it, but I'm curious what you think. --Zackmann08 (Talk to me/What I been doing) 03:46, 18 September 2018 (UTC)
- @Zackmann08: Cool! I didn't expect the column would be merged if the NOC has the same rank. My suggestion is, since the ranks are automatically generated based on medal, maybe better to use IOC codes to distinguish the parameter instead of number (example goldCHN, thus we don't need nation1). Sometimes in the main article we only display top 10 NOC + "Remaining NOCs" by transclusion (see 2016 Summer Olympics#Medal table, sometimes not, see 2018 Winter Olympics#Medal table) is this template able to do this? Also NOCs total number needs to be displayed in the bottom of the table. Hddty. (talk) 02:33, 18 September 2018 (UTC)
- @Hddty.: can you take a look at {{Medals table}} and let me know what you think? Still working out a few kinks... But would love some feedback! --Zackmann08 (Talk to me/What I been doing) 22:36, 17 September 2018 (UTC)
@Frietjes: I like it! You really have a knack for this stuff. Greatly appreciate your counsel here. @Hddty.: I'm going to play around with the above idea and see what I can come up with. Give me a day or two. :-) --Zackmann08 (Talk to me/What I been doing) 18:06, 18 September 2018 (UTC)
- @Hddty.: how does this look? Test it out and let me know if you have any thoughts or feedback. I would LOVE your assistance with improving the documentation. If anything is unclear please let me know.
- @Frietjes: I opted not to use the module you mentioned, partially because I don't entirely understand it... Instead what I am doing is invoking a template. The default template (if none is provided) is just {{Flagteam}}, but any of the templates in the Category:Flag template system should work. Thoughts? --Zackmann08 (Talk to me/What I been doing) 18:44, 18 September 2018 (UTC)
- @Zackmann08: If you look at 2016 Summer Olympics#Medal table the table is transcluded from 2016 Summer Olympics medal table but only showing top 10 ranked NOC + "Remaining NOCs", can this template do this? Sometimes we transcluded full table (see 2018 Winter Olympics#Medal table). Hddty. (talk) 02:58, 19 September 2018 (UTC)
- @Hddty.: uhhhh that's a good question. I shall look into it! --Zackmann08 (Talk to me/What I been doing) 04:12, 19 September 2018 (UTC)
- @Hddty.: ok so I made it happen! Here's how it will work... You create a template that is the table. (See Template:Medals table/testcases-show-limit). This template takes 1 or 2 params. The show limit and the link for "remaining". Then anywhere you want that table to appear, you just call the template. So as an example:
- @Hddty.: uhhhh that's a good question. I shall look into it! --Zackmann08 (Talk to me/What I been doing) 04:12, 19 September 2018 (UTC)
- @Zackmann08: If you look at 2016 Summer Olympics#Medal table the table is transcluded from 2016 Summer Olympics medal table but only showing top 10 ranked NOC + "Remaining NOCs", can this template do this? Sometimes we transcluded full table (see 2018 Winter Olympics#Medal table). Hddty. (talk) 02:58, 19 September 2018 (UTC)
{{Medals table/testcases-show-limit|show_limit=4|remaining_link=[[2018 Asian Games medal table|Remaining]]}}
gives you:
Rank | Nation | Gold | Silver | Bronze | Total |
---|---|---|---|---|---|
1 | ![]() | 132 | 92 | 65 | 289 |
2 | ![]() | 50 | 90 | 77 | 217 |
3 | ![]() | 50 | 60 | 77 | 187 |
![]() | 50 | 60 | 77 | 187 | |
5–6 | Remaining | 90 | 15 | 78 | 183 |
Totals (6 entries) | 372 | 317 | 374 | 1,063 |
How does that look to you? :-) --Zackmann08 (Talk to me/What I been doing) 18:38, 19 September 2018 (UTC)
- Furthermore you can simplify the template with something like Template:Medals table/testcases-include where you do an includeonly with the limit so that when the template is included elsewhere it limits the number automatically. --Zackmann08 (Talk to me/What I been doing) 18:43, 19 September 2018 (UTC)
I have a question. The current situation with Russion doping cases caused IAAF to exclude Russian federation, so Russian athletes participate as Neutrals, the sportpeople can win medals but they are not included (or not ranked) in the medal tables. Example European_Athletics_Championships#All-time_medal_table - is it possible to achieve smth like that with this template? --Pelmeen10 (talk) 21:54, 19 September 2018 (UTC)
- @Pelmeen10: so technologically speaking, sure that could be done. I'd just need to add a param similar to
{{{no_rank_ANA}}}
that if set would cause that nation/entity to be skipped in the rankings... But honestly seems kinda weird to have them in the table but no included in the rankings. An edge case to be sure. --Zackmann08 (Talk to me/What I been doing) 22:15, 19 September 2018 (UTC)- @Zackmann08: They are included in the table (if the official does not) mostly because the total medal count should match the distributed medals. Btw, how are notes added after the country? example. --Pelmeen10 (talk) 10:53, 20 September 2018 (UTC)
Rank | NOC | Gold | Silver | Bronze | Total |
---|---|---|---|---|---|
1 | Example | 0 | 0 | 0 | 0 |
@Zackmann08: Last request, make the host's country color like above because coloring the whole row is excessive. Also the number of gold, silver, bronze and total in "Remaining NOCs" shouldn't be italicized. Thanks. Hddty. (talk) 23:43, 19 September 2018 (UTC)
- @Hddty.:
Done --Zackmann08 (Talk to me/What I been doing) 23:54, 19 September 2018 (UTC)
- @Zackmann08: The host box should be put on the left. Hddty. (talk) 04:40, 20 September 2018 (UTC)
- @Frietjes: can you help me out with that? I tried like 10 different things but I can't get the purple box to the left of the host text... --Zackmann08 (Talk to me/What I been doing) 04:59, 20 September 2018 (UTC)
- @Zackmann08: The host box should be put on the left. Hddty. (talk) 04:40, 20 September 2018 (UTC)
@Zackmann08: Can you simplify it so we only need to put | show_limit = 10
there. Hddty. (talk) 05:17, 20 September 2018 (UTC)
- I mean in 2018 Asian Games medal table article that you just edited yourself to converting to use this template we need to put it like this:
| show_limit = {{{show_limit|<includeonly>10</includeonly>}}}
. Hddty. (talk) 09:45, 20 September 2018 (UTC)- Zackmann08 and Hddty.: (1) I moved the host note to the top of the table, but added the option to move it to the bottom with
|legend_position=b
(we can make the default bottom if this is better). (2) if you use|host=KOR
it will expand this into 'Host nation (South Korea)' for you. (3) I added an optional|host_note=
for a footnote after this text. (3) I added|note_XYZ=
to add a footnote for XYZ nation. (4) I added optional|source=
and|notes=
for source or notes at the foot of the table. we could probably make it so that|host=KOR
also toggles|host_KOR=y
, or the other way around. is there anything else that is missing? Frietjes (talk) 13:28, 20 September 2018 (UTC)- @Frietjes: YOU ROCKKKKK!!!!!! --Zackmann08 (Talk to me/What I been doing) 16:09, 20 September 2018 (UTC)
- Zackmann08 and Hddty.: (1) I moved the host note to the top of the table, but added the option to move it to the bottom with
Rank... Totals or gold?
[edit]SO it seems like most tables are determining the rank based on the number of gold medals, NOT the number of total medals... Should we update the template to reflect that? --Zackmann08 (Talk to me/What I been doing) 19:56, 19 September 2018 (UTC)
- medal table is based on gold medals, not total. --Pelmeen10 (talk) 21:02, 19 September 2018 (UTC)
Width
[edit]Hi, is that possible to give it an option to set the width of the second column (NOC) manually ? I just think something like this looks a bit ugly, other columns have more width than the country name. I mean we have fixed width for other columns. Mohsen1248 (talk) 23:36, 20 September 2018 (UTC)
Rank | Nation | Gold | Silver | Bronze | Total |
---|---|---|---|---|---|
1 | ![]() | 1 | 1 | 1 | 3 |
![]() | 1 | 1 | 1 | 3 | |
![]() | 1 | 1 | 1 | 3 | |
Totals (3 entries) | 3 | 3 | 3 | 9 |
- @Mohsen1248: I think it just makes things more complicated than they need to be. The point of the template is to make things look more consistent. How often do you have just 1 country in a table anyway? --Zackmann08 (Talk to me/What I been doing) 01:48, 21 September 2018 (UTC)
- Well if you ask me the thing was simple with the medal table. and they are now complicated. (even though I'm fine with both, no big deal) my point wasn't about having one country. (I edited my example to show you my point) but since "China" is a short name, the table looks ugly "to me" the nation column needs a bit more width than other columns in my opinion. speaking of complication, while this idea works for multisport events. what are you going to do with flag variants ? I see you edited 2000 World Karate Championships but you should know that wasn't
Yugoslavia who win that medal but
Yugoslavia and they are very different. the current template doesn't give me any option to fix that. (or at least I'm not aware if there is)
- or this one 1910 World Weightlifting Championships only in this case both countries in the medal used exactly the same parameters for the flag, so your templates work here but what about other competitions with different flag parameters ? another thing in case of tie, the template sorts countries based on IOC Code and not their name (for example India stands above Chinese Taipei or Thailand above Tajikistan) , don't you think you should fix these problems (specially flag variants) before editing hundreds of pages ? Mohsen1248 (talk) 03:06, 21 September 2018 (UTC)
- @Mohsen1248: well you may think it looks ugly to have columns be a default width but I don't see any problem with it... Additionally there is a
{{{name_IOC}}}
in the documentation that overrides the default name parameter. --Zackmann08 (Talk to me/What I been doing) 03:28, 21 September 2018 (UTC)- so this is it ? you don't like it and because of that you are not going to give other options ? apparently this is how things work in wikipedia recently. OK , but I still can't understand how we have "fixed" width for 3rd, 4th, 5th and 6th columns and only not for the 2nd column !
- OK, that
{{{name_IOC}}}
solves the flag variant issue but still my concern remains about the sorting countries based on NOC code and NOT alphabet (as I gave two examples). beside that you should be more careful with your edits. looks like I have to double check most of those pages for possible mistakes. for example 2015 World Weightlifting Championships you deleted one of those two medal tables considering it "duplicate". in this specific sport there are two medal tables at the end of the competition. Mohsen1248 (talk) 21:40, 21 September 2018 (UTC)- @Mohsen1248: if you feel the need to check all my edits, knock yourself out! I have checked and when you click on the top of the column, the sorting is based on the name that is displayed, not the IOC code. If you are seeing something different, please show me where and I will take a look. But currently I cannot reproduce your issue. --Zackmann08 (Talk to me/What I been doing) 21:57, 21 September 2018 (UTC)
- @Zackmann08: I also agree that, by default, the table should sorting the countries that have the same rank based on alphabet because the text is placed on the left (read first). Hddty. (talk) 06:38, 22 September 2018 (UTC)
- @Zackmann08: of course I'm going to check all pages in my watchlist (which is a big list) but when you finish it, beacuse I don't want to check them more than once. I checked few pages and there were mistakes in half of them at least. looks like you don't care about flag variants but some people do. For example here 1996 World Weightlifting Championships you used that parameter 1984 which solves it only for South Korea but we also have different flag for Japan. this is just an example there are several pages with the same problem. You say the sorting is based on IOC code, but what about this ? Mohsen1248 (talk) 09:56, 23 September 2018 (UTC)
- @Mohsen1248: if you feel the need to check all my edits, knock yourself out! I have checked and when you click on the top of the column, the sorting is based on the name that is displayed, not the IOC code. If you are seeing something different, please show me where and I will take a look. But currently I cannot reproduce your issue. --Zackmann08 (Talk to me/What I been doing) 21:57, 21 September 2018 (UTC)
- @Mohsen1248: well you may think it looks ugly to have columns be a default width but I don't see any problem with it... Additionally there is a
- Well if you ask me the thing was simple with the medal table. and they are now complicated. (even though I'm fine with both, no big deal) my point wasn't about having one country. (I edited my example to show you my point) but since "China" is a short name, the table looks ugly "to me" the nation column needs a bit more width than other columns in my opinion. speaking of complication, while this idea works for multisport events. what are you going to do with flag variants ? I see you edited 2000 World Karate Championships but you should know that wasn't
Rank | Nation | Gold | Silver | Bronze | Total |
---|---|---|---|---|---|
1 | ![]() | 1 | 0 | 0 | 1 |
![]() | 1 | 0 | 0 | 1 | |
Totals (2 entries) | 2 | 0 | 0 | 2 |
Show limit
[edit]![](http://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Purple_arrow_down.svg/20px-Purple_arrow_down.svg.png)
Hi, can you simplify the show_limit parameter from | show_limit = {{{show_limit|<includeonly>10</includeonly>}}}
to | show_limit = 10
. Also maybe we need a parameter to display/not display "Remaining NOCs*. Thanks. Hddty. (talk) 21:33, 20 September 2018 (UTC)
- @Hddty.: you're missing the point... You only want the value of the
{{{show_limit}}}
to take affect when the template is included on another page. That is why you using the includeonly tags. --Zackmann08 (Talk to me/What I been doing) 21:55, 20 September 2018 (UTC)- Hddty. and Zackmann08, yes, you can simplify the syntax, see the wikitext source for 2018 Asian Games#Medal table and 2018 Asian Games medal table. Frietjes (talk) 11:56, 21 September 2018 (UTC)
- @Hddty.: I left a reply on my talk page, but what Frietjes has said above is the 2nd solution. Both work! --Zackmann08 (Talk to me/What I been doing) 15:48, 21 September 2018 (UTC)
- When you get a chance, curious on your thoughts regarding the last case on Template:Medals_table/testcases#Skip_Nation... I think its such an edge case that I almost don't care but.... --Zackmann08 (Talk to me/What I been doing) 23:55, 21 September 2018 (UTC)
- (talk page stalker) I don't know why "-" is in the left column instead of "4", followed by "6" for Turkey and "7" for Switzerland and Sweden. We should continue this at Template talk:Medals table. – Jonesey95 (talk) 04:10, 22 September 2018 (UTC)
- Oh, now I see the note linking to this source from the 2017 world championships medal table. The "-" makes sense, but the testcases page needs a similar note. Can you make it so that the note number and the ^ are not bold? That would be more like other Notes sections, I think. – Jonesey95 (talk) 04:16, 22 September 2018 (UTC)
- (talk page stalker) I don't know why "-" is in the left column instead of "4", followed by "6" for Turkey and "7" for Switzerland and Sweden. We should continue this at Template talk:Medals table. – Jonesey95 (talk) 04:10, 22 September 2018 (UTC)
- When you get a chance, curious on your thoughts regarding the last case on Template:Medals_table/testcases#Skip_Nation... I think its such an edge case that I almost don't care but.... --Zackmann08 (Talk to me/What I been doing) 23:55, 21 September 2018 (UTC)
- @Hddty.: I left a reply on my talk page, but what Frietjes has said above is the 2nd solution. Both work! --Zackmann08 (Talk to me/What I been doing) 15:48, 21 September 2018 (UTC)
- Hddty. and Zackmann08, yes, you can simplify the syntax, see the wikitext source for 2018 Asian Games#Medal table and 2018 Asian Games medal table. Frietjes (talk) 11:56, 21 September 2018 (UTC)
@Jonesey95: the test case is just that, a test case... It doesn't really need a note it was just meant to verify that the rank can be skipped. We are using that page for testing while we update the module. --Zackmann08 (Talk to me/What I been doing) 04:25, 22 September 2018 (UTC)
- I think a test case showing how to make the note and that it works is valuable. If something happens in the sandbox that breaks the note, that breakage will show up on the testcases page. Edge cases like this one are valuable to keep on testcases pages. – Jonesey95 (talk) 04:41, 22 September 2018 (UTC)
- @Jonesey95: I should clarify, right now the test cases compare the old template ({{RankedMedalTable}}) to the new template/module. I'm still working out the kinks. Once we get things up and running consistently, then the test cases should be refactored so that they test the main template against the sandbox. You make a VERY good point! Thanks again. --Zackmann08 (Talk to me/What I been doing) 04:45, 22 September 2018 (UTC)
- it looks like the skip feature is working. basically, you have to reset the "last" parameters to make sure it doesn't try to rowspan it incorrectly. the only thing that I didn't test is if there are two consecutive skips, or a skip between two that should have the same rank. for the case that you have a skip between two with the same rank, we would just need to adjust the sort algorithm to include skips. Frietjes (talk) 13:18, 22 September 2018 (UTC)
- okay, I have adjusted the sort to include the "if skip", so the skipped rows are at after the others if they have the same rank. Frietjes (talk) 13:37, 22 September 2018 (UTC)
- @Jonesey95 and Hddty.: I added a notice at the top of the test cases page to reflect what I said above. I would welcome any additional test cases you can think up and document.--Zackmann08 (Talk to me/What I been doing) 22:41, 22 September 2018 (UTC)
- okay, I have adjusted the sort to include the "if skip", so the skipped rows are at after the others if they have the same rank. Frietjes (talk) 13:37, 22 September 2018 (UTC)
- it looks like the skip feature is working. basically, you have to reset the "last" parameters to make sure it doesn't try to rowspan it incorrectly. the only thing that I didn't test is if there are two consecutive skips, or a skip between two that should have the same rank. for the case that you have a skip between two with the same rank, we would just need to adjust the sort algorithm to include skips. Frietjes (talk) 13:18, 22 September 2018 (UTC)
- @Jonesey95: I should clarify, right now the test cases compare the old template ({{RankedMedalTable}}) to the new template/module. I'm still working out the kinks. Once we get things up and running consistently, then the test cases should be refactored so that they test the main template against the sandbox. You make a VERY good point! Thanks again. --Zackmann08 (Talk to me/What I been doing) 04:45, 22 September 2018 (UTC)
Try it out at 2003 World Championships in Athletics
[edit]I'd like to see this template tested in a sandbox using the content from 2003 World Championships in Athletics, which has a lot of ties. Thanks. – Jonesey95 (talk) 04:10, 22 September 2018 (UTC)
- @Jonesey95: I've already done a number of pages with ties like this so I just went ahead and converted that one for ya. Take a look. --Zackmann08 (Talk to me/What I been doing) 04:23, 22 September 2018 (UTC)
- Looks much better than the old one. Nice work. One nitpick: I would lower-case "nations" in the Totals cell, per MOS. While doing that, you'll have to make sure you don't lower-case the top header, though, which looks like it is re-used at the bottom. But you know that. I don't know Lua well enough to make the change. – Jonesey95 (talk) 04:28, 22 September 2018 (UTC)
- @Jonesey95: would love to hear your thoughts on Wikipedia:Templates_for_discussion/Log/2018_September_19#Template:RankedMedalTable. --Zackmann08 (Talk to me/What I been doing) 04:30, 22 September 2018 (UTC)
- Looks much better than the old one. Nice work. One nitpick: I would lower-case "nations" in the Totals cell, per MOS. While doing that, you'll have to make sure you don't lower-case the top header, though, which looks like it is re-used at the bottom. But you know that. I don't know Lua well enough to make the change. – Jonesey95 (talk) 04:28, 22 September 2018 (UTC)
Glitches
[edit]Would someone please fix the changes to use this template at the following. They are currently showing messages like "Lua error in Module:Country_alias at line 1778: Invalid country alias: PIC".
- 2003 FESPIC Youth Games
- 2008 Oceania Athletics Championships
- 2010 Thailand National Games
- 2011 Thailand National Games
- 2012 Thailand National Games
Johnuniq (talk) 01:12, 23 September 2018 (UTC)
- @Johnuniq:
Done sorry about that! Please {{ping}} me directly if you find any more. Still working out all the kinks. --Zackmann (Talk to me/What I been doing) 01:52, 23 September 2018 (UTC)
- Thanks! Johnuniq (talk) 02:10, 23 September 2018 (UTC)
@2016 Winter Youth Olympics#Medal table After 10, there shouldn't be 12. --Pelmeen10 (talk) 20:02, 23 September 2018 (UTC)
- @Pelmeen10: seriously you're killing me smalls!!! (Said 100% in jest) Another great catch. Do you understand why it is happening? Basically it is skipping the `mixed` team in the numbers. If you look at the main table you will see the numbers are correct. Should be an easy fix... let me take a look. --Zackmann (Talk to me/What I been doing) 20:52, 23 September 2018 (UTC)
- @Pelmeen10: alright should be fixed now. Keep up the great work! Do me 1 small favor? If and when you find more errors like these, {{ping}} me in your comments to make sure they are immediately brought to my attention? Thanks mate!!! --Zackmann (Talk to me/What I been doing) 20:55, 23 September 2018 (UTC)
* Host nation (Nepal)
Rank | Nation | Gold | Silver | Bronze | Total |
---|---|---|---|---|---|
1 | ![]() | 1 | 1 | 0 | 2 |
2 | ![]() | 0 | 0 | 1 | 1 |
![]() | 0 | 0 | 1 | 1 | |
![]() | 0 | 0 | 1 | 1 | |
Totals (4 entries) | 1 | 1 | 3 | 5 |
- @Zackmann08: should be alphabetical order? And the way how host is displayed, should be somewhat similar in every case, but sometimes it includes wikilink, sometimes it even includes flag... --Pelmeen10 (talk) 14:48, 26 September 2018 (UTC)
- probably fixed now. Frietjes (talk) 18:29, 26 September 2018 (UTC)
Found an error with using tooltip in "Team" parameter. Also NOC becomes "nocs" under Totals. --Pelmeen10 (talk) 09:08, 7 October 2018 (UTC)
2018 Winter Olympics medal table
- Pelmeen10, fixed. Frietjes (talk) 15:08, 7 October 2018 (UTC)
Request for migration to fix table-related Linter error
[edit]I've tried to fix a table-related Linter error at 2015 European Games medal table, to no avail. Can it be migrated to use the module? Note that it has an onlyinclude statement because part of the table is transcluded in another article. Thanks. – Jonesey95 (talk) 17:57, 23 September 2018 (UTC)
- Thanks, that was quick! The Linter error category in article space is now empty! (or was, after this last article was fixed; editors are always messing up tables, so if you check it after reading this, there are probably one or two in there) – Jonesey95 (talk) 07:30, 24 September 2018 (UTC)
Symbol for skip in rank
[edit]Is it correct if we use em dash there instead? The punctuation is often used in discography article to denotes a recording that did not chart. Hddty. (talk) 09:20, 24 September 2018 (UTC)
- I'd actually put "–" (en dash?), which is used in various articles/sports tables. And if "-" is used, this dashes script will fix it to "–" (for this medal table, ofc this script won't work). --Pelmeen10 (talk) 11:46, 24 September 2018 (UTC)
- At least it should be changed to en dash/em dash. Hddty. (talk) 14:09, 24 September 2018 (UTC)
- @Zackmann08: change "-" to "–" please. --Pelmeen10 (talk) 04:24, 5 October 2018 (UTC)
- At least it should be changed to en dash/em dash. Hddty. (talk) 14:09, 24 September 2018 (UTC)
Should the nations with zero medals be also marked with "–" rather than having a rank? --Pelmeen10 (talk) 13:21, 25 September 2018 (UTC)
Possible problem with flags using ISO/IOC/FIFA codes that are different
[edit]What code are you setting for Antigua and Barbuda? 2003 Pan American Junior Athletics Championships Netherland Antilles appears twice there. --Pelmeen10 (talk) 00:37, 24 September 2018 (UTC)
- @Pelmeen10: please try to indent and keep consistent with talk page format... Figure out the issue. @Frietjes: the name param is overriding the host format. I can look at it later but just an FYI. About to have dinner... --Zackmann (Talk to me/What I been doing) 01:00, 24 September 2018 (UTC)
- I believe that I fixed the Antigua and Barbuda problem with this edit. Revert me if I got it wrong. – Jonesey95 (talk) 07:40, 24 September 2018 (UTC)
- Self-reverted. This is a bit of a mess. For Antigua and Barbuda, the IOC code is ANT, but the ISO code is ATG.
- For Netherlands Antilles, the IOC code is AHO, but the ISO code (and the FIFA code) is ANT.
- Template:Country data ANT redirects to Netherlands Antilles. Zackmann08, your table replacement script may need to be adjusted, or the module may need to call the flags in a different way to ensure that IOC codes are used to match flags, not FIFA or ISO codes. I do not envy you your journey through this morass. See Template talk:Country alias for more. – Jonesey95 (talk) 08:11, 24 September 2018 (UTC)
- I once raised the problem (using wrong codes) here. "BRN" is another one (IOC code for Bahrain, but ISO code for Brunei). --Pelmeen10 (talk) 11:54, 24 September 2018 (UTC)
- I believe that I fixed the Antigua and Barbuda problem with this edit. Revert me if I got it wrong. – Jonesey95 (talk) 07:40, 24 September 2018 (UTC)
2 letter codes?
[edit]@Frietjes: what are your thoughts on adding support for 2 letter codes in addition to 3 letter ones... This would facilitate things like United Kingdom (UK),
Quebec (QC), etc.? I could see benefits but also a number of drawbacks. Curious what you think? --Zackmann (Talk to me/What I been doing) 19:06, 24 September 2018 (UTC)
- Zackmann08, is there an article that needs this? Frietjes (talk) 19:09, 24 September 2018 (UTC)
- @Frietjes: 1988 IAAF World Cross Country Championships is one example. Now I can get around it using
{{{gold_GBR=#}}}
...{{{name_GBR=
. But I'm curious whether adding the 2 letter codes might be a good idea. --Zackmann (Talk to me/What I been doing) 19:12, 24 September 2018 (UTC){{flagteam|UK}}
}}}- I strongly recommend supporting only one list of official country codes, if possible. See the section immediately above for the problems that can happen when there are multiple lists of country codes. In the documentation, make it extremely clear which list is supported. – Jonesey95 (talk) 19:58, 24 September 2018 (UTC)
- my feeling is that everything is passed through the specified (or implicitly specified) flag template. so, if the flag templates are allowing for different country codes, that's a problem that should be addressed in the flag templates. however, I don't see any problem with moving toward a single set of official country codes for consistency between articles. Frietjes (talk) 20:07, 24 September 2018 (UTC)
- God that would be AMAZING!! If only we could achieve that level of consistency... --Zackmann (Talk to me/What I been doing) 21:09, 24 September 2018 (UTC)
- See the section above. At some point, the documentation should say what will happen when someone uses ANT or BRN as a country code. A choice needs to be made and documented by the designer of the template. – Jonesey95 (talk) 03:34, 25 September 2018 (UTC)
- God that would be AMAZING!! If only we could achieve that level of consistency... --Zackmann (Talk to me/What I been doing) 21:09, 24 September 2018 (UTC)
- my feeling is that everything is passed through the specified (or implicitly specified) flag template. so, if the flag templates are allowing for different country codes, that's a problem that should be addressed in the flag templates. however, I don't see any problem with moving toward a single set of official country codes for consistency between articles. Frietjes (talk) 20:07, 24 September 2018 (UTC)
- I strongly recommend supporting only one list of official country codes, if possible. See the section immediately above for the problems that can happen when there are multiple lists of country codes. In the documentation, make it extremely clear which list is supported. – Jonesey95 (talk) 19:58, 24 September 2018 (UTC)
- @Frietjes: 1988 IAAF World Cross Country Championships is one example. Now I can get around it using
What is the sense of the last row?
[edit]I mean, what is the sense about "Totals"? In the 99% of the cases, total of golds will be the same as silvers and bronzes. Asturkian (talk) 19:52, 26 September 2018 (UTC)
- @Asturkian: I STRONGLY disagree... Having converted about 98% of the pages myself, very few of them have matching totals across all three. --Zackmann (Talk to me/What I been doing) 22:44, 26 September 2018 (UTC)
- Here are the first four pages on the "What links here" list: not matching, not matching, matching, not matching. A small sample, but a tiny amount of research supports a Totals row. – Jonesey95 (talk) 03:14, 27 September 2018 (UTC)
How the....
[edit]So question... How the heck do we want to deal with cases like this? (Taken from 1987 Pan American Games medal table.
Rank | Nation | Gold | Silver | Bronze | Total |
---|---|---|---|---|---|
1 | ![]() |
169/168 | 120/118 | 81/83 | 370/369 |
2 | ![]() |
75 | 52 | 48 | 175 |
3 | ![]() |
30 | 56/57 | 75 | 161/162 |
4 | ![]() |
14 | 14 | 33 | 61 |
We can't accept 169/168 as a value for {{{gold_USA}}}
because it won't compute with the math for finding the totals. In theory we could add a {{{gold_USA_display}}}
or similar that would override the mathematical value and display a custom value, but I feel like if we start doing things like that it (A) Makes this WAY more complicated than it should be and (B) kind of defeats the purpose of the template to begin with. My feeling is that if you have a table like this, then you should really just create a custom table. Thoughts? --Zackmann (Talk to me/What I been doing) 18:43, 27 September 2018 (UTC)
- I would pick the source that seems most trustworthy (or find a new, better one), use the numbers from that source, and preserve the notes explaining the possible discrepancies. – Jonesey95 (talk) 18:54, 27 September 2018 (UTC)
Add some color?
[edit]So working through converting some of the old ones and was curious what everyone thought of this manifestation? I kind of like having the colored columns. Any thoughts? --Zackmann (Talk to me/What I been doing) 01:38, 1 October 2018 (UTC)
Rank | Nation | Gold | Silver | Bronze | Total |
---|---|---|---|---|---|
1 | ![]() |
8 | 3 | 0 | 11 |
2 | ![]() |
2 | 3 | 2 | 7 |
- Make sure to read MOS:COLOR first. It may have some insights for you. – Jonesey95 (talk) 06:33, 1 October 2018 (UTC)
Another case to address
[edit]@Hddty., Frietjes, Pelmeen10, and Jonesey95: So I've come across another case we need to address (taken from FIS Nordic World Ski Championships 2009)...
Rank | Nation | Gold | Silver | Bronze | Total |
---|---|---|---|---|---|
1 | ![]() |
3 | 0 | 1 | 4 |
2 | ![]() |
3 | 0 | 0 | 3 |
3 | ![]() |
2 | 0 | 1 | 3 |
4 | ![]() |
2 | 0 | 0 | 2 |
Now there is a workaround I can do which is:
{{Medals table | team = Athlete | gold_AAA = 3 | silver_AAA = 0 | bronze_AAA = 1 | name_AAA = {{flagathlete|[[Aino-Kaisa Saarinen]]|FIN}} | gold_BBB = 3 | silver_BBB = 0 | bronze_BBB = 0 | name_BBB = {{flagathlete|[[Petter Northug]]|NOR}} ... }}
But that is obviously ugly as heck.... So I'm looking for suggestions. For 99% of the tables, just doing gold_<IOC> or silver_<3-letter-code> works fine. But for cases where a 3 letter code is not applicable, do we want to allow for other options? One thought I had was that we could also allow {{{gold_#}}}
, i.e. {{{gold_1}}}
, {{{gold_2}}}
, {{{gold_3}}}
, etc... Obviously {{{gold_1}}}
would match up with {{{silver_1}}}
, {{{bronze_1}}}
, {{{name_1}}}
etc. One thing that would we would have to do is that if you use a numbered param (instead of 3 letter codes) you MUST provide a display name.
My concern is that this is starting to get a bit complicated. I'm all for making templates work for as many cases as possible, but I wonder whether this might be a case where there should just be a second template? Frietjes you're the absolute expert here so I'll defer to you on the technical side of things, though I am more than happy to do the coding myself. --Zackmann (Talk to me/What I been doing) 00:34, 2 October 2018 (UTC)
Another example from Singapore at the 2006 Asian Games:
Rank | Sport | Gold | Silver | Bronze | Total |
---|---|---|---|---|---|
1. | Sailing | 5 | 3 | 2 | 10 |
2. | Bowling | 1 | 2 | 2 | 5 |
3. | Bodybuilding | 1 | 0 | 2 | 3 |
--Zackmann (Talk to me/What I been doing) 01:11, 2 October 2018 (UTC)
- I'm lazy, so I would do the 99% first and then look at the edge cases that are left to see if there is a way to address them together. – Jonesey95 (talk) 04:16, 2 October 2018 (UTC)
- What about we edit the table instead like below.
Rank | Athlete | Nation | Gold | Silver | Bronze | Total |
---|---|---|---|---|---|---|
1 | Aino-Kaisa Saarinen | ![]() |
3 | 0 | 1 | 4 |
- It looks weird to me that the athletes' name is sandwiched between the flag and the IOC code. Maybe it edited that way because {{RankedMedalTable}} don't have another column.
- I support the addition of
{{{gold_1}}}
etc so it would work on Singapore at the 2006 Asian Games. Hddty. (talk) 05:07, 2 October 2018 (UTC)- You could also add optional columns with labels, so that
|extra_column_header=Athlete
and|extra_column_1=Name of first athlete
, or something like that. That would allow for a label like "Sport" or "Athlete", populated by items of the editor's choice. – Jonesey95 (talk) 10:16, 2 October 2018 (UTC)- I like the 2nd table above with a separate column for Athlete and Nation.. That being said, I think this template is going to get too confusing. Not just in terms of complicated module code, but in terms of implementations... My vote at this point would be to create a {{athlete medals table}} or something of that nature... But that doesn't solve the initial problem of Sports instead of country tables... SO basically there seem to be 2 issues:
- 1) How do we handle the case where instead of rows representing nations, the rows represent a sport, club or some other entity that cannot accurately be represented by a 3 letter code.
- 2) How do we handle the case where the rows are for athletes, many of whom may be from the same country and thus cannot use the 3 letter country code as there would be duplication.
- My thinking at this point would be make case 1 work with this template but to create a second template for case 2. Thoughts? --Zackmann (Talk to me/What I been doing) 17:09, 2 October 2018 (UTC)
- So.... That was WAY easier than I thought it was going to be.... lol!!!! See Template:Medals table/testcases. Added like 15 characters of code and got it to work. PLEASE sanity check my work to make sure nothing else broke in the process.... but it looks like it worked! --Zackmann (Talk to me/What I been doing) 17:54, 2 October 2018 (UTC)
- You could also add optional columns with labels, so that
- I think the "rank" column for Singapore at the 2006 Asian Games is very confusing. The rank is not their rank in that specific sport's medal table (compare to Singapore_at_the_Olympics#Medal_tables) rather than list of their most successful sports. Never seen this type of "medal table" in Wiki before. Is this the only one like that? Maybe this should be changed to regular wikitable instead? --Pelmeen10 (talk) 18:24, 2 October 2018 (UTC)
- About the first example - it's also a bit funny one, because it's top10 most successful athletes usually, so "totals" row is quite pointless there i think. --Pelmeen10 (talk) 18:29, 2 October 2018 (UTC)
- (edit conflict) @Pelmeen10: Top be clear, that is how the table was to begin with... I just converted it over to use the new template. It had the rank already. You're point isn't without merit, but I just want to be clear that it isn't like the rank was suddenly added. Personally, I think the rank IS useful and not the least bit confusing. It shows which sports that team/country have gained the most medals in. Additionally, since I've converted nearly every single transclusion of the template, I can tell you that this absolutely isn't the only case like this. I've seen dozens of them.
- Your second point is also a good one. We can easily add a
{{{hide_totals}}}
. That work for ya? --Zackmann (Talk to me/What I been doing) 18:32, 2 October 2018 (UTC)
Adding hide_totals
[edit]Continuing from above but under a new heading... @Pelmeen10: I'm more than happy to add {{{hide_totals}}}
. Will only take me a minute or 2... But this might be a great opportunity for you to learn some Module stuff if you are interested? If you'd rather not no worries! Everyone has different interests with editing wikipedia so like I said, I'm happy to do it myself, but if you want to give it a try I added a new testcase already and you can experiment with Module:Medals table/sandbox. At the bottom you will see Preview page with this module. If you drop Template:Medals table/testcases into that field you can preview the results as you go. Let me know if you want to try it out and I'm happy to help. Otherwise, as I said, I'm happy to do it myself. :-) --Zackmann (Talk to me/What I been doing) 18:38, 2 October 2018 (UTC)
Template:Flagteam as default
[edit]The medal tables usually contain plain country names. "Flagteam" add 3 letter code in parenthesis which is not necessary in most cases. Many sports don't have any codes for countries and many sports are not connected to the Olympics (IOC codes). --Pelmeen10 (talk) 18:39, 2 October 2018 (UTC)
- @Pelmeen10: thanks for discussing here. I'd like to get input from @Jonesey95, Hddty., and Frietjes: and any others watching this... But it takes about 5 seconds to change the default parameter in the Module. I want to avoid having a default in the documentation like you did. It is better to just have a default in the module that can be over-ridden. TBH I actually agree with you. Initially this was designed with the focus on the Olympics which always has 3 letter codes... But most other sporting events do not, so unless one of the others raises something I haven't thought of, I think making the default flagcountry is a good call. Lets give it a day or 2? Without objection I will then change it. :-) --Zackmann (Talk to me/What I been doing) 18:45, 2 October 2018 (UTC)
Host nation shading
[edit]Was it intentional to change the host nation shading so that just the NOC cell is now highlighted and not the whole row? Or was it just something that got accidentally altered in the translation? Personally I preferred it when the whole row was highlighted so that you could see at a glance how many medals the host nation won. It's only my personal opinion but I thought the idea was to translate the tables seamlessly so that no-one would notice the difference. Rodney Baggins (talk) 13:34, 3 October 2018 (UTC)
- @Rodney Baggins: you are correct that the idea was to translate the tables seamlessly.
I'd like @Frietjes: to chime in here since she was the one to make that specific change but I think the situation below illustrates one reason that this was done.I.E. the rank being colored for both Cuba and USA when USA was the host. That being said... we could add the color to everything except for the rank? I'm certainly open to any ideas. Thanks for bringing this point up. Do know that if the decision is made to color the whole row instead of just the 1 cell, that change can easily be made in the module and will automatically be reflected on all the pages. --Zackmann (Talk to me/What I been doing) 16:38, 3 October 2018 (UTC)
Rank | Nation | Gold | Silver | Bronze | Total |
---|---|---|---|---|---|
1 | ![]() |
1 | 2 | 3 | 6 |
![]() |
1 | 2 | 3 | 6 | |
3 | ![]() |
0 | 1 | 1 | 2 |
- it was Hddty. who asked above
make the host's country color like above because coloring the whole row is excessive.
(diff) to which Zackmann08 repliedDone
(diff) after making the change here. Frietjes (talk) 16:52, 3 October 2018 (UTC)- @Frietjes: I am SO sorry! You're 100% right it WAS me!!! I want to be clear here, I was NOT trying to throw you under the bus!! I thought you had made that change and wanted to get insight into your decision. My apologies. --Zackmann (Talk to me/What I been doing) 16:59, 3 October 2018 (UTC)
So looking at starting some work on Template:MedalTable... Trying to decide whether to make it work with this template or do a separate Template/Module. Thoughts? --Zackmann (Talk to me/What I been doing) 02:57, 5 October 2018 (UTC)
Sport | Gold | Silver | Bronze | Total |
---|---|---|---|---|
![]() |
1 | 0 | 0 | 1 |
![]() |
1 | 0 | 0 | 1 |
![]() |
0 | 1 | 0 | 1 |
![]() |
0 | 0 | 2 | 2 |
Total | 2 | 1 | 2 | 5 |
Bahrein and Brunei
[edit]Currently the template displays BRN and BRU as Brunei, and BHR as Bahrein. But according to the List of IOC country codes, BHR does not exist, BRN is the code for Bahrein and BRU is the code for Brunei. -- ThiagoSimoes (talk) 02:07, 13 October 2018 (UTC)
- See the section "Possible problem" above. – Jonesey95 (talk) 05:58, 13 October 2018 (UTC)
Accessibility issue in FL medal tables
[edit]I noticed a little while ago that the table formatting in a medal table list I have on my watchlist was converted into the output from this template. That article is a featured list, and most of the formatting looks up to that standard. However, I'm not sure that tables formatted with this template meet the accessibility guidelines that featured lists should follow. The problem is it doesn't look like the tables include row and column scopes for web browsing tools like screen readers, as described here. As the featured list director, and primary contributor to that list I mentioned earlier, it would be quite unfortunate if using the seemingly nice-looking formatting from this template actually caused lists to not meet the FL criteria, so I'd like to request that support for scopes be added if at all possible. If it helps, I saw a comment at the merge discussion for Template:Medal table which indicates support for at least the column scopes exists in that template. If some formatting could be copied from that template to provide scope support here, that would be fantastic. Giants2008 (Talk) 15:17, 14 October 2018 (UTC)
- probably done. Frietjes (talk) 15:32, 9 June 2019 (UTC)
Zero medal rows
[edit]Hi, I notice that the Lua code relies upon the existence of a "gold" field in order to produce an output row for an IOC. Can this be modified to pickup any of gold, silver, or bronze? This will allow us to omit needless zero medal inputs. Thanks SFB 12:35, 9 June 2019 (UTC)
- Sillyfolkboy, should work now. Frietjes (talk) 15:28, 9 June 2019 (UTC)
Request for additional columns
[edit]Is it possible to give an option to add extra columns with arbitrary content? It would be usefull to be able to use this template for "Medals by Summer Games" and "Medals by Winter Games" tables in numerous "Country at the Olympics" articles. For example Austria at the Olympics. Almost all of these tables have additional columns "Athletes" and "Rank", which cannot be displayed using Medals table template. Nitobus (talk) 11:15, 7 June 2020 (UTC)
Plural of country
[edit]![]() | This edit request to Module:Medals table has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Not a big issue, but here the totals is spelled "countrys" instead of "countries". (I've removed the spelling error now by simply replacing country with nation, but handling this case in the template's code nevertheless would be nice.) --Cyfal (talk) 19:29, 22 October 2020 (UTC)
- I don't know Lua, but some part of {{Plural}} could probably be deployed in the code here. – Jonesey95 (talk) 19:46, 22 October 2020 (UTC)
- This is still a problem causing spelling errors. Suggesting low quality for articles that use this template! Graeme Bartlett (talk) 04:56, 16 August 2022 (UTC)
- Gnarly challenge – one ointment fly is that not all words ending in "y" pluralize to "ies", eg "Florida keys". Probably better just to remove everything except "Totals", as has been done in the module sandbox. (See User:Paine Ellsworth/Sandbox2 for example table.) P.I. Ellsworth , ed. put'r there 12:06, 16 August 2022 (UTC)
- This is still a problem causing spelling errors. Suggesting low quality for articles that use this template! Graeme Bartlett (talk) 04:56, 16 August 2022 (UTC)
Done – no longer calls
|team=
that resulted in "countrys", just reads "Totals ('#' entries)". P.I. Ellsworth , ed. put'r there 16:07, 17 August 2022 (UTC)
Cell color
[edit]![]() | This edit request to Module:Medals table has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
In mobile version the cell in countries color is gray. Could it be changed to white instead of gray? Hddty (talk) 03:43, 24 July 2021 (UTC)
Not done (as to the immediate edit request). Please make your changes in the sandboxes and verify test cases before activating the edit request. Feel free to continue discussing this below in the event someone else would like to work on it. — xaosflux Talk 15:33, 30 July 2021 (UTC)
- I don't have knowledge about the code. Hddty (talk) 13:43, 31 July 2021 (UTC)
- To editor Hddty: yes, this can be done just by changing the color hexcode on line #31 from "#f8f9fa" to "#ffffff" and adding css to line 90. See my sandox. I'm just not sure it should be done. In my mobile view the cell in countries color is a very light gray. Does this cause WP:accessibility problems that I can't see? P.I. Ellsworth , ed. put'r there 17:12, 17 August 2022 (UTC)
- @Paine Ellsworth: I don't think there is accessibility problems here. Since no one objected I think you can go ahead to edit this template. Thanks. Hddty (talk) 03:06, 27 January 2023 (UTC)
- To editor Hddty: my question was whether or not the present version causes accessibility problems, as it's fairly obvious that a lighter background would not have problems with accessibility. I see no controversy here, so the protected module has been
edited. P.I. Ellsworth , ed. put'r there 12:58, 27 January 2023 (UTC)
- To editor Hddty: my question was whether or not the present version causes accessibility problems, as it's fairly obvious that a lighter background would not have problems with accessibility. I see no controversy here, so the protected module has been
- @Paine Ellsworth: I don't think there is accessibility problems here. Since no one objected I think you can go ahead to edit this template. Thanks. Hddty (talk) 03:06, 27 January 2023 (UTC)
- To editor Hddty: yes, this can be done just by changing the color hexcode on line #31 from "#f8f9fa" to "#ffffff" and adding css to line 90. See my sandox. I'm just not sure it should be done. In my mobile view the cell in countries color is a very light gray. Does this cause WP:accessibility problems that I can't see? P.I. Ellsworth , ed. put'r there 17:12, 17 August 2022 (UTC)
- I don't have knowledge about the code. Hddty (talk) 13:43, 31 July 2021 (UTC)
Sort by code
[edit]![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please add a parameter so that the table can be sorted by NOC Code in case of ties (current Olympics use in case of ties). Currently in case of ties, the table is sorted by country name. Hddty (talk) 09:13, 24 July 2021 (UTC)
Not done (as to the immediate edit request). Please make your changes in the sandboxes and verify test cases before activating the edit request. Feel free to continue discussing this below in the event someone else would like to work on it. — xaosflux Talk 15:33, 30 July 2021 (UTC)
- I don't have knowledge about the code. Hddty (talk) 13:43, 31 July 2021 (UTC)
Bolding function
[edit]This template should have the option to bold out say the most medals. Not always the most medals overall is the nation with most gold medals, so it would be nice to bold out those most total, most bronze, most silver, most gold results. 188.27.36.191 (talk) 13:40, 4 August 2021 (UTC)
Comma
[edit]![]() | This edit request to Module:Medals table has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Is there a way to add a comma in the "Totals" row, when the total value exceeds 999? In other words, starting with the number one-thousand? I think it should appear as 1,000 (with a comma), not as 1000 (without a comma). I was directed to this Talk Page, with my question. I was told that a comma was "optional" with a four-digit number. But ... I think that most people would use/expect a comma, when there are four digits. Plus, it's easier to read (in my opinion). Thanks. Joseph A. Spadaro (talk) 19:07, 9 August 2021 (UTC)
- See here: Talk:2020 Summer Olympics medal table#Table / totals. Thanks. Joseph A. Spadaro (talk) 19:40, 9 August 2021 (UTC)
- +1 This template should absolutely be adjusted to include commas. Four-digit numbers without commas look like years. Brad (talk) 23:38, 11 August 2021 (UTC)
Not done: you are correct from the viewpoint of the US, the UK and China. In most of Europe it is reversed, so in the US the number 1,436.37 in most of Europe becomes 1.436,37. The practice of using a space to separate the 1000s is also common, as in 1 436,37 or 1 436.37 (both forms are common). Use of a comma to separate 1000s in Wikipedia articles is non-neutral from the global perspective. Exceptions occur of course, such as when an article is written in British English, which would use the UK form of large-number separators. Articles written in other forms of English might use a different form of separators. Where templates that are used in different kinds of English articles are concerned, the norm is to use no separators (for integers greater than 999). P.I. Ellsworth , ed. put'r there 12:51, 16 August 2022 (UTC)
- Hello, this is not the policy mentioned in the Wikipedia Manual of Style -- see MOS:DIGITS. User opinion would seem to be what matters within those confines, and I also think commas should be implemented. Brad (talk) 00:24, 12 August 2024 (UTC)
- A comma would be correct, not a full stop after the first number. This requires applying something like the "formatnum" magic word to the totals. I don't know how to do that in Lua, but I'm sure someone around here does. – Jonesey95 (talk) 20:51, 12 August 2024 (UTC)
Done ~ Tom.Reding (talk ⋅dgaf) 11:48, 13 August 2024 (UTC)
- Thanks! Looks perfect. Brad (talk) 22:12, 13 August 2024 (UTC)
- A comma would be correct, not a full stop after the first number. This requires applying something like the "formatnum" magic word to the totals. I don't know how to do that in Lua, but I'm sure someone around here does. – Jonesey95 (talk) 20:51, 12 August 2024 (UTC)
- Hello, this is not the policy mentioned in the Wikipedia Manual of Style -- see MOS:DIGITS. User opinion would seem to be what matters within those confines, and I also think commas should be implemented. Brad (talk) 00:24, 12 August 2024 (UTC)
- +1 This template should absolutely be adjusted to include commas. Four-digit numbers without commas look like years. Brad (talk) 23:38, 11 August 2021 (UTC)
Medals table with 4th, 5th and ... places
[edit]Hi there, I am building a medal table for a series of karate competitions.1 According to the rules of these competitions, the fourth to eighth places also have points. How can I create a table that includes fourth and subsequent positions? IWRUAH (talk) 11:53, 20 October 2021 (UTC)
- @IWRUAH: In that case you can use a regular wikitable, something similar is used here. Pelmeen10 (talk) 01:43, 26 February 2022 (UTC)
Template-protected edit request on 22 February 2022
[edit]![]() | This edit request to Module:Country alias has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The country for the IOC abbreviation "ROC" displays incorrectly. Each NOC should display the actually name of the NOC, followed by its IOC abbreviation, e.g., "Norway (NOR). In the case of the Russian Olympic Committee, it displays the abbreviation twice "ROC (ROC). It should display "Russian Olympic Committee (ROC). Or it should display "Russian OC (ROC), if the full name is too long for tables.
Please edit the appropriate template to implement this change. Thank you.
IOC = International Olympic Committee; NOC = National Olympic Committee; ROC=Republic of China, Taiwan (when used as country abbreviation) or Russian Olympic Committee (when used a IOC abbreviation Sparkie82 (t•c) 02:10, 22 February 2022 (UTC)
Not done for now: this requires an edit to a module that ultimately powers the {{FlagIOCteam}} template that is used inside the "Medals table" template, a module that is used on 49,000 pages. Such high use requires a consensus for any changes. Please garner a consensus for this change before using the edit request template, and please be sure to type your request on the correct talk page at Template talk:Country alias. See also the edit request at Template talk:Country alias#Template-protected edit request on 14 February 2022, which might be related. P.I. Ellsworth - ed. put'r there 05:24, 22 February 2022 (UTC)
can "Macedonia" be rendered for events that pre-date the name change?
[edit]Macedonia only changed it's name a few years ago. Can there be an additional code, to render the name "Macedonia" for events before 2019, but point the link to North Macedonia? Or if it needs a separate target, point it to Macedonia (country). skakEL 12:01, 2 May 2022 (UTC)
- In theory, yes, and in theory it should be as easy as adding
, year
to the args call in the variousframe:expandTemplate{title = flagTemplate, args = {IOC, event} }
lines, but in practice I haven't used this module enough to know for sure; I would need to sandbox a few things first. I'll put this on my list, but it's rather low-priority at the moment so any other watchers are free to start working on it. Primefac (talk) 10:49, 4 May 2022 (UTC)- skakkle, just to circle back around to this, do you have any specific examples of where this is happening? I'm having trouble narrowing it down to where the wrong name is placed. Primefac (talk) 10:25, 8 August 2022 (UTC)
Is it possible to find all medal tables with MKD usage? I'd guess there isnt too many of them to just add |name_MKD= Macedonia in them. Links to {{MKD}} should be OK already. Pelmeen10 (talk) 06:21, 3 August 2022 (UTC)
- Probably, but the issue comes from the
|flag_template=
parameter. For example, at 2000 Summer Olympics medal table|flag_template=flagIOC
and so the correct name/flag is called. I'm not sure the best way to check for both code and template. Primefac (talk) 10:25, 8 August 2022 (UTC)
Multiple host countries
[edit]Currently not the best way to display them if there are 2 (or more) hosts such as in 2015_Winter_Universiade#Combinated_Medal_table - displayed as "Host nation (Spain)Slovakia". Should have a better solution. Pelmeen10 (talk) 02:49, 3 August 2022 (UTC)
- @Primefac: any ideas? Pelmeen10 (talk) 06:26, 3 August 2022 (UTC)
- If I get some time this weekend I'll take a look (and at the issue in the section above). Primefac (talk) 08:23, 6 August 2022 (UTC)
Done using
|host1=
and|host2=
. If you actually do find someone with a third host, I can probably add that in as well. Primefac (talk) 09:19, 8 August 2022 (UTC)- @Primefac: what happened to the blue square with * ? Pelmeen10 (talk) 16:26, 16 August 2022 (UTC)
- Miscounted the if statements, should be fixed now. Primefac (talk) 18:51, 17 August 2022 (UTC)
- @Primefac: what happened to the blue square with * ? Pelmeen10 (talk) 16:26, 16 August 2022 (UTC)
- If I get some time this weekend I'll take a look (and at the issue in the section above). Primefac (talk) 08:23, 6 August 2022 (UTC)
Template-protected edit request on 16 April 2023
[edit]![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I would like to sync this template's module with my current revision of its sandbox (permalink, diff); I've simplified the logic by replacing instances of if a then else
with if not a then
, and also fixed some inconsistencies in the formatting. My version passes all of the /testcases. {{Lemondoge|Talk|Contributions}} 22:33, 16 April 2023 (UTC)
Collapsible rows
[edit]Could there be an additional option in which, for example, the first 30 rows are visible and the rest are collapsed but expandable. All-time Olympic:Complete ranked medals is very long with 154 entries, but it also shouldn't be shortened with the "show_limit" to summarize remaining entries. Miria~01 (talk) 12:57, 9 September 2023 (UTC)
Totals (n entries) is a false statement
[edit]To state the number of countries as a number of entries is simply false. To take the example of the 2022 European Cross Country Championships, the table states that there were 10 entries: that is wrong. There were 40 nations taking part.The current presentation suggests that no team at the event did more poorly than Belgium and Finland, while the truth is that 30 national federations looked jealously at the results that they had. This number adds no meaningful information (a glance at the final number in the ranking competition will satisfy the interest of anyone who could be interested in such an esoteric piece of data), and serves only to mislead.
It should be removed. Kevin McE (talk) 09:16, 1 December 2023 (UTC)
- If only ten teams win medals, then only ten teams are listed on the medal table. Thus, there are ten entries in the table. I'm not sure why this is an issue. For a larger table like the 2020 Olympics it is rather useful to know how many countries earned medals when the table is that long. Primefac (talk) 13:19, 1 December 2023 (UTC)
- No: there were 206 nations that entered the 2020 Summer Olympics. Nobody considers the scope of an event by entries on the medal table rather than nations entering the tournament. That is what describes the depth of competition and to what extent it is an acheivement to attain even one medal.
- It requires a very quick count of the teams that are joint last in the table to see how many teams appear there: that argument for the misleading claim might have some relevance if there were no rankings table. I really doubt that the number of nations gaining a medal in an historic games is really a piece of data that many people seek out: if there were demand for it, one suspects that someone would have seen fit to include a column here. And if it is not considered worth collating for the Summer Olympics, where is it a matter of interest? Google searches suggest that it is not.
- Is there any evidence that it is considered worthy of recording in Reliable Sources? Looking at 2016 games, Inside the Games,ESPN and CBS Sports (the first three non-wiki results on a Google search) all give full lists without a total. Or is it just WP:Synth because someone noticed that we can? Kevin McE (talk) 11:34, 5 December 2023 (UTC)
Use Module:Flagg
[edit]I switched the template to use Module:Flagg instead of {{flagteam}} or {{flagcountry}}, which should reduce the WP:PEIS on larger pages. I also added a few tweaks to improve the display of certain flags and better detect when historical flags should be used. All the testcases looked good after this change, but let me know if you come across any unintended consequences. --Ahecht (TALK
PAGE) 18:55, 18 April 2024 (UTC)
Dark mode
[edit]I think that the new dark mode makes it necesarry to change the template. E.g. in the article 2022–23 Grand Prix of Figure Skating Final the only problems in dark mode are the three medal tables. I hope that some minor changes in lines like defaultRowColor = '#ffffff' in Module:Medals table are enough. Kallichore (talk) 22:06, 19 July 2024 (UTC)
Sticky headers needed
[edit]Many tables transcluding this template are getting longer. As I think, sticky headers are needed, especially for readability. George Ho (talk) 05:32, 6 August 2024 (UTC)
Continent filtering
[edit]It can be useful if we could filter the table according to content. In case of regional competitions like Asian Games, we can either avoid using this parameter or just add sub regions. Footy2000♡; 06:09, 6 August 2024 (UTC)
Edit request 8 August 2024
[edit]![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Description of suggested change: I would like to update this template's module with the current revision of the sandbox (diff). I have added a functioning dark mode for the Vector 2022 skin and fixed the table header's and footer's colours so they match other tables on Wikipedia.
This revision passes all of the template's testcases. PitConclave (talk) 21:05, 8 August 2024 (UTC)
- I like the proposed version which works both under light and dark mode. The background color changes from white to grey in the light mode, so there is a small difference for the test cases. Is this intentional? But all in all I think the proposed change is a clear improvement.--Kallichore (talk) 21:21, 8 August 2024 (UTC)
- Hi Kallichore, I'm glad you like the proposed changes. And yes, the light mode table's background colour change is intentional; on Wikipedia pages with tables such as Canada at the Olympics, all of the tables on that page except for the ones using this template have a specific shade of grey as their background. I have updated this template to use that shade of grey on light mode. PitConclave (talk) 21:39, 8 August 2024 (UTC)
- Thanks, that sounds convincing to me. I fully agree with the proposed change.--Kallichore (talk) 21:57, 8 August 2024 (UTC)
- Hi Kallichore, I'm glad you like the proposed changes. And yes, the light mode table's background colour change is intentional; on Wikipedia pages with tables such as Canada at the Olympics, all of the tables on that page except for the ones using this template have a specific shade of grey as their background. I have updated this template to use that shade of grey on light mode. PitConclave (talk) 21:39, 8 August 2024 (UTC)
Done — Martin (MSGJ · talk) 21:23, 10 August 2024 (UTC)
Static row numbers
[edit]Current sorting option does its job, but fails when it comes to the rank column. For example, with the defeault table sorted according to gold medals, you have:
* Host nation (France)
Rank | NOC | Gold | Silver | Bronze | Total |
---|---|---|---|---|---|
1 | ![]() | 30 | 38 | 35 | 103 |
2 | ![]() | 29 | 25 | 19 | 73 |
3 | ![]() | 18 | 14 | 13 | 45 |
4 | ![]() | 14 | 19 | 21 | 54 |
5 | ![]() | 13 | 17 | 21 | 51 |
Totals (5 entries) | 104 | 113 | 109 | 326 |
But see what happens after clicking sort option for the Total table. There is no change in the Rank and France maintains 4th Rank while it is 3rd in the table. The static row numbers if implemented approprietly could solve this and make sorting useful. Footy2000♡; 08:31, 9 August 2024 (UTC)
- Sorry but I can't see any issue with the sorting on the rank column. It all seems to behave properly when I click — Martin (MSGJ · talk) 20:54, 10 August 2024 (UTC)
- Why should the overall rank change after sorting by other things? If you sort by lowest to higest, then it doesnt make sense that lowest gives 1st rank. Pelmeen10 (talk) 21:12, 10 August 2024 (UTC)
- I suppose Footy2000 would like to know the rank determined by counting the total number of medals. Maybe the documentation should say clearly that the template uses the gold medal count for the rank (with silver/bronze to break ties), which is the ranking system used e.g. by the International Olympic Committee.--Kallichore (talk) 21:32, 10 August 2024 (UTC)
Sticky header
[edit]Wouldn't it be desirable for long medal tables if the header was sticky at the top of the screen? Unfortunately, the following template Template:Sticky header cannot be used for medal tables using this template, so the code itself would have to be changed.
For comparison:
the main table (normal wikitable) in the all-time Olympics article the headers are sticky, however not in the other very long ranked table (using the template medals table). But in my opinion it would be a great advantage for the reader. Miria~01 (talk) 13:27, 12 August 2024 (UTC)
Template-protected edit request on 13 August 2024
[edit]![]() | It is requested that an edit be made to the template-protected template at Template:Medals table. (edit · history · last · links · sandbox · edit sandbox · sandbox history · sandbox last edit · sandbox diff · test cases · transclusion count · protection log) This template must be followed by a complete and specific description of the request, so that an editor unfamiliar with the subject matter could complete the requested edit immediately.
Edit requests to template-protected pages should only be used for edits that are either uncontroversial or supported by consensus. If the proposed edit might be controversial, discuss it on the protected page's talk page before using this template. Consider making changes first to the template's sandbox and test them thoroughly here before submitting an edit request. To request that a page be protected or unprotected, make a protection request. When the request has been completed or denied, please add the |
As proposed here Template talk:Medals table#Sticky header,
my suggestion is that medal table's headers should stick to the top of the screen as the table's data is scrolled in and out of view. It would be very useful for the reader at tall tables (e.g. All-time ranked table) to see the header as you scroll through the data.
A simple adding of following code lines, where the header row is build, would be sufficient
:css('position', 'sticky')
:css('top','0')
Miria~01 (talk) 10:02, 13 August 2024 (UTC)