Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fallback locale #103

Merged
merged 3 commits into from
Mar 2, 2023
Merged

Fix fallback locale #103

merged 3 commits into from
Mar 2, 2023

Conversation

lenssoft
Copy link
Contributor

Fix for Issue 87: FallbackLocale not working

fallback locale is loaded first (in browser mode)
if active message has no value or the value equals with the key then use fallback locale translation

@xiCO2k
Copy link
Owner

xiCO2k commented Feb 25, 2023

Thanks for the contribution, can you please add a test to make sure it works?

@lenssoft
Copy link
Contributor Author

Updated the tests and added some to cover the usecase. I had to introduce a new plugin option "fallbackMissingTranslations" in order to keep existing funtionality unchanged and prevent existsing tests from failing.

If accepted readme file should be updated with the new option.
Thanks

@lenssoft
Copy link
Contributor Author

lenssoft commented Mar 2, 2023

@xiCO2k any update on this?

@xiCO2k xiCO2k merged commit 7f2d329 into xiCO2k:main Mar 2, 2023
@xiCO2k
Copy link
Owner

xiCO2k commented Mar 2, 2023

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants