lichess-org / mobile

Lichess mobile app v2
GNU General Public License v3.0
1.35k stars 196 forks source link

Date and number formatting applied only after app restart #1127

Open julien4215 opened 2 weeks ago

julien4215 commented 2 weeks ago

What is the problem?

When a user changes the language, the formatting of dates and numbers is only applied after restarting the app.

Steps to reproduce the bug

  1. Go on the elo chart of a player
  2. Look at the date formatting locale
  3. Change the language in the settings
  4. Go back to the elo chart of a player
  5. Check that the date formatting locale did not change

App version

0.12.5

Device Info

Android 11

Additional information

This can be done like in this commit but setting the Intl.defaultLocale value when the user changes the language is probably the right way to do it.