Vscode: Format the extension download count with commas

Created on 26 Jun 2017  Â·  10Comments  Â·  Source: microsoft/vscode

Would be easier to read as 2,545,308.

image

Also this might depend on the locale; Japanese for example counts by 10000, not 1000. Not sure if this looks natural.

bug extensions good first issue help wanted verified

Most helpful comment

Japanese and Chinese count by 10000 but most applications I've seen

  • count by 1000 if using all digits: 2,545,308
  • count by 10000 if using native language: 254 万 (Chinese)

All 10 comments

Japanese and Chinese count by 10000 but most applications I've seen

  • count by 1000 if using all digits: 2,545,308
  • count by 10000 if using native language: 254 万 (Chinese)

@rebornix that makes it easy then :smiley:

@Tyriar
@rebornix
@joaomoreno
I'm happy to add this to my July contributions list...

Clarification:
the comments above appear to mix commentary on numerical delimiters and rounding

after some thought and inspection I see that the extension sidebar use is rounded numbers:
254K
12K
123
25M
2.1M
et cetera
for Japanese and Chinese use the ten thousand 's character
for the detailed extensions page use the full number with comma delimiters (1000 or 10000 for Japanese and Chinese)
I can start this but I may need help with a Katana characters

@cleidigh I'd stick with just comma separated numbers for thousands, regardless of locale. @rebornix indicated that both 254 万 and 2,545,308 are common so that's good enough to use the latter and keep it simple. Also the full number would be best imo, as there's more room than in the side bar.

sorry had to recommit with squashed commits

@Tyriar
Wow, what a huge contribution ;-)
PR #29783 103
note the possibility of supporting periods in German using Platform.locale if you guys want

Is this one-liner PR okay?

Ping @sandy081

@joaomoreno should @sandy081 be the assignee on this issue?

Numbers should be formatted using the current locale as 1,234 is not "one thousand ..." in German, but "one point two ..." which of course doesn't make sense for a download count, but looks just as broken as using periods in an English locale.

@Hirse
@sandy081
I would lean towards using the specific locale, I used English as the default given the prior discussion
with @Tyriar & @rebornix
on simplicity.
I will change according to what the team wants.

Verified de uses '.' and en/ko uses ','

Was this page helpful?
0 / 5 - 0 ratings