Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just realized Lingui offers convenience methods for language-aware number and date-time formatting via
i18n.number()
andi18n.date()
respectively.This pull request switches most of our formatting to use that, except for the
ago
function, I'll touch on that in a separate pull request (haven't figured out how to make unit formatting for months and minutes to not be the samem
suffix, I think we might need a separate logic for English, unfortunately)This seems like the better approach because currently we're very inconsistent as to how we're dealing with localized formatting. Here's how we've been doing it so far:
undefined
as the localeexpo-localization
en-US
localeI've removed the
formatCountShortOnly
function as it's only used in the drawer, I'm not sure why it should be using a different formatting than the one in<Metrics>
component, but we can add that back if necessary.