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.
Why?
We can solve a few issues when we ask end-developers to specify the locale in
setupIntl()
:en-us
after upgrade to ember-intl v6 #1789 (a bug report).Solution?
When I removed lines 123 and 126, I saw that only the tests where I hadn't specified the locale would fail. This led me to conclude that the two lines had been introduced in the past, just so that we could write
setupIntl(hooks)
(type as few characters as possible).After removing the two lines, I confirmed that
locales
no longer lists'en-us'
by default.By requiring the locale in
setupIntl()
, I was able to refactor code and simplify the fileaddon-test-support/setup-intl.ts
. There will be a separate pull request, whereaddTranslations()
will also require the locale.Notes
I traced when we had begun to implicitly set
'en-us'
in theintl
's service to b75fd17 and b05b510. Furthermore, the bug in #1789 seemed to have appeared after #1530 (when theintl
service had been rewritten as a native class).