Category talk:Pages with non-numeric formatnum arguments

From Guild Wars 2 Wiki
Jump to navigationJump to search

great, a category full of <number>%. -Chieftain AlexUser Chieftain Alex sig.png 21:56, 20 October 2021 (UTC)

(edit conflict) Seems like this category is complaining about {{formatnum:1,000}} or {{formatnum:1%}} introduced with MW 1.36. These are mostly caused by the template skill fact. However not sure why now for example a thousand separator is not a legit argument.
How to procede with this? Ignore or modify skill fact? --Tolkyria (talk) 22:02, 20 October 2021 (UTC)
Technically I guess the thousand separator is a string format. To "fix" it would need a whole load of string replacement functions. Ignore this category I think (about as useful as Category:Pages with broken file links). -Chieftain AlexUser Chieftain Alex sig.png 22:07, 20 October 2021 (UTC)
Well, this category triggers also on the german wiki where the comma and the dot usages are reversed, namely in german the comma is the decimal separator, so clearly a numeric argument. Indeed let us ignore this, using several string replaces is way too expensive for the template skill fact and would just torture the wiki. --Tolkyria (talk) 22:18, 20 October 2021 (UTC)
Nevermind, they are using {{formatnum: {{formatnum:<number>|R}} }} which avoids this categorization. --Tolkyria (talk) 22:26, 20 October 2021 (UTC)
Okay, I think the two skill fact unnamed parameter 1 values that fill up this category are:
  1. misc, which I cleaned up on the main skill pages, so they are only available on /history pages where I can't track them properly (only with dpl).
  2. #default, i.e. set to anything that isn't predefined, with around ~700 occurences, where ~200 appear in this category, while only ~20 actually needs formatnum to introduce a thousand separator. Mostly Shade skills with Life Force Cost: X,XXX and Spirit skills with Range: 5,000.
So both have a wide range of possible values including various non-accepted strings where only a minority actually needs formatnum. However, if we remove the formatnum for these two, then we should track them and add the thousand separator by hand. Easy for #default, more tricky for misc but after quickly checking all ~2800 Version histories category pages and subcategory pages I haven't found any occurence that needs formatnum, all random effects, no number greater equal than 1000.
Could be worth trying to get rid of formatnum from misc first, and then afterwards probably from #default. --Tolkyria (talk) 23:15, 20 October 2021 (UTC)