Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Update newtab stats to have locale-aware formatting #5888

Merged
merged 1 commit into from
Nov 29, 2016
Merged

Update newtab stats to have locale-aware formatting #5888

merged 1 commit into from
Nov 29, 2016

Conversation

bsclifton
Copy link
Member

@bsclifton bsclifton commented Nov 29, 2016

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

Fixes #5827

Auditors: @cezaraugusto, @jkup

Test Plan

  1. Launch Brave and open a new tab
  2. View the stats and ensure it looks correct
  3. Go to Preferences and change your locale
  4. Quit and go back to step 1 for as many locales as you wish to test

Screenshots

English (en-US)
screen shot 2016-11-28 at 5 19 19 pm

French (fr-FR)
screen shot 2016-11-28 at 5 19 59 pm

Japanese (ja-JP)
screen shot 2016-11-28 at 5 20 36 pm

Spanish (es) - NOTE: looks like translations are missing
screen shot 2016-11-28 at 5 21 17 pm

Fixes #5827

Auditors: @cezaraugusto, @jkup

Test Plan:
1. Launch Brave and open a new tab
2. View the stats and ensure it looks correct
3. Go to Preferences and change your locale
4. Quit and go back to step 1 for as many locales as you wish to test
@bsclifton
Copy link
Member Author

I'll create a follow up issue here for short-hand notation...
ex: 214k instead of 214,000

@bsclifton
Copy link
Member Author

issue created to track abbreviation:
#5889

@jkup
Copy link
Contributor

jkup commented Nov 29, 2016

++ any benefit to using moment.js for this instead? I recall some talk of .toLocaleString being problematic?

@bbondy bbondy merged commit 57cecb9 into brave:master Nov 29, 2016
@luixxiul
Copy link
Contributor

luixxiul commented Nov 29, 2016

In Japanese the comma is unnecessary. Neither whitespace nor comma should exist.

Still, as long as .toLocaleString() works like that, it should be like that...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants