This repository has been archived by the owner on Sep 19, 2021. It is now read-only.
[WIP] Deprecate src/config/locales/i18n.js #1876
Closed
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.
Description
This PR deprecates the homegrown implementation if
i18n
located insrc/config/locales/i18n.js
. Instead of the homegrown version, we have started replacing it with open source software. This new implementation is initialized insrc/util/i18n.js
.Migrating all
i18n
imports toutil/i18n
has started, but has not fully deprecated the old method.WIP
99% of instances have been committed, but there is still one outstanding area that needs to be visited.
src/components/Form/Field/Field.jsx
still uses the oldi18n
import. It's not as straight forward because it appears the error adds additional markup that should not be present.The new
i18n
method also doesn't like the fact that there are missing keys in the locale files. If there's a missing key, it will display the unreadablei18n
key. The easy, but tedious way to alleviate this is to ensure that all keys are in the locale files, but it's not sustainable in the long run. Be sure to click through the application, trigger validations/errors, in order to find all the missing keys.It breaks snapshots and should be reviewed a little more closely before deprecating
src/config/locales/i18n.js
Checklist for Reviewer
More details about this can be found in docs/review.md