Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include relative time polyfill locale data #8896

Merged
merged 1 commit into from
Jul 3, 2020

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Jul 2, 2020

We were including the polyfill for the Intl.RelativeTimeFormat API, but we weren't including any locale data. This polyfill doesn't work without the locale data for whichever locale you're formatting.

The data for all locales we support is now included. The locale data is loaded from disk as-needed (during app startup, and upon each change in locale).

@Gudahtt Gudahtt force-pushed the include-relative-time-polyfill-for-all-locales branch 2 times, most recently from 3913b5c to c44413e Compare July 2, 2020 23:26
@metamaskbot
Copy link
Collaborator

Builds ready [c44413e]
Page Load Metrics (641 ± 15 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint307942157
domContentLoaded5837036403215
load5857046413215
domInteractive5837036393215

We were including the polyfill for the `Intl.RelativeTimeFormat` API,
but we weren't including any locale data. This polyfill doesn't work
without the locale data for whichever locale you're formatting.

The data for all locales we support is now included. The locale data
is loaded from disk as-needed (during app startup, and upon each change
in locale).
@Gudahtt Gudahtt force-pushed the include-relative-time-polyfill-for-all-locales branch from c44413e to 75fd1a1 Compare July 2, 2020 23:54
@Gudahtt Gudahtt changed the title Include relative time polyfill for all locales Include relative time polyfill locale data Jul 2, 2020
@Gudahtt
Copy link
Member Author

Gudahtt commented Jul 2, 2020

This has been tested to work on Firefox v60.0, which is the same version we saw the Sentry error report from. I've tested it with the en locale, as well as a variety of others (including a few with underscores in the locale code, to ensure that worked).

@Gudahtt Gudahtt marked this pull request as ready for review July 2, 2020 23:56
@Gudahtt Gudahtt requested review from kumavis and a team as code owners July 2, 2020 23:56
@metamaskbot
Copy link
Collaborator

Builds ready [75fd1a1]
Page Load Metrics (1055 ± 55 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint51148733115
domContentLoaded5781156105311555
load5801158105511555
domInteractive5781155105311555

@Gudahtt
Copy link
Member Author

Gudahtt commented Jul 3, 2020

For reference, this API was introduced in #8774

Copy link
Contributor

@whymarrh whymarrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Gudahtt Gudahtt merged commit f5d4ab1 into develop Jul 3, 2020
@Gudahtt Gudahtt deleted the include-relative-time-polyfill-for-all-locales branch July 3, 2020 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants