This repository was archived by the owner on Sep 19, 2021. It is now read-only.
[WIP] Deprecate src/config/locales/i18n.js#1876
Closed
christopherhuii wants to merge 1 commit intodevelopfrom
Closed
[WIP] Deprecate src/config/locales/i18n.js#1876christopherhuii wants to merge 1 commit intodevelopfrom
christopherhuii wants to merge 1 commit intodevelopfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1876 +/- ##
===========================================
- Coverage 86.14% 86.09% -0.05%
===========================================
Files 899 899
Lines 20569 20569
Branches 3155 3157 +2
===========================================
- Hits 17718 17708 -10
- Misses 2173 2181 +8
- Partials 678 680 +2
Continue to review full report at Codecov.
|
Contributor
|
Replaced with PR #1886 – not quite ready to say I'll never look into this yet. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
i18nlocated 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
i18nimports toutil/i18nhas 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.jsxstill uses the oldi18nimport. It's not as straight forward because it appears the error adds additional markup that should not be present.The new
i18nmethod 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 unreadablei18nkey. 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.jsChecklist for Reviewer
More details about this can be found in docs/review.md