#1097 Remove i18nMap and switch to regex based invalid key check #1130
+3,567
−4,869
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.
Contributor checklist
Description
This PR addresses development and performance issues introduced by the
i18nMap
object by replacing it with a method that's more suitable for the project. Note that the i18n-check project has gotten this change in parallel.Issues with the
i18nMap
include:i18nMap
to most frontend files, we will doubtless experience some performance issues in that we'll have a JSON object with 1,000s of keys being loaded into most components and pagesThe solution to the above issues is twofold:
i18n.
r"\"i18n\.[_\S\.]+?\""
and similar patternsWith this the i18n process for the project is set. Further updates to this will come after i18n-check has been released via a version update over here :)
Related issue