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: i18n init done fires even with lang load error #2650

Merged
merged 1 commit into from Oct 9, 2023
Merged

Conversation

SgtPooki
Copy link
Member

@SgtPooki SgtPooki commented Oct 5, 2023

i18next has some auto-magical loading of translation files that kicks
off loading multiple languages (e.g. 'en', 'en-US', 'en-UK', etc.) but
we don't have all of those files for IPFS-Desktop. i18next.init
will fire an error if any of those files fail to load, even if one
succeeds.

This fix ensures that i18n.initDone is set on context even if we see
an error.

fixes #2627

i18next has some auto-magical loading of translation files that kicks
off loading multiple languages (e.g. 'en', 'en-US', 'en-UK', etc.) but
we don't have all of those files for IPFS-Desktop. i18next.init
will fire an error if any of those files fail to load, even if one
succeeds.

This fix ensures that `i18n.initDone` is set on context even if we see
an error.

fixes #2627
@SgtPooki SgtPooki requested review from whizzzkid and a team as code owners October 5, 2023 00:31
@SgtPooki SgtPooki changed the title fix: init done fires even with lng load error fix: i18n init done fires even with lang load error Oct 5, 2023
Comment on lines +40 to +41
logger.error('[i18n] init error')
logger.error(err)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the actual Error was not being logged for some reason... error files and logging patterns need a serious look

@SgtPooki SgtPooki merged commit 8de6a08 into main Oct 9, 2023
4 of 5 checks passed
@SgtPooki SgtPooki deleted the fix/2627-i18n branch October 9, 2023 04:42
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.

Taskbar icon not working
2 participants