load translation override using backend #4324
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.
What this PR does
I decided to break commit #4227 into smaller parts since something like
eslint
will take a long time to completely configure. The basic idea is described in #4280 (comment)Adds an option for overriding the translation files from TerriaMap. This provides the user with the ability to
config
file.wwwroot/Language/{{lng}}/languageOverrides.json
,{{lng}}
is a short name for the language. If the language that user is looking for is not officially supported by Terria, he should specify also create atranslation.json
to avoid404 not found
error in console. Reason for this is in i18next backend default behaviour to try to load every namespace that is not already loaded.i18.js
fromprerequisites.js
. Tests now usecimode
language option which returns the translation key, it is defined to runbeforeEach
test so it is not necessary to call it for all tests.global internationalization track in #3785
Checklist