Ensure all strings are updated when switching language - #504
Conversation
This is needed to reload the app menu when switching language to reflect translations.
|
NOTE: This is not happening switching to other languages. ( eg from French to Spanish and back to French ) |
Good catch @kozer ! For English, we don't provide translations as we use the default strings set in the code. I thought that passing an undefined value to the |
| } else { | ||
| // In case we don't find translations, we reset the locale data to | ||
| // fallback to the default translations. | ||
| defaultI18n.resetLocaleData(); |
There was a problem hiding this comment.
Should we remove that, as we do it via ipc?
There was a problem hiding this comment.
There was a problem hiding this comment.
As far as I've tested we need both. The object defaultI18n object is created globally so we need to update it for each process, the main and renderer.
|
@fluiddot left a comment! |
|
I removed it myself in 21ddf81 |
This reverts commit 21ddf81.
reverted! |
sejas
left a comment
There was a problem hiding this comment.
Looks good to me.
Thanks for adding the support for the menu items ✨


Related to #476 (comment).
Proposed Changes
useI18nDatahook. This way the menu items will reflect the proper translations when opening the app and switching languages.Testing Instructions
Warning
Languagein the Settings popup is not translated because it's not included yet in the translation files.Pre-merge Checklist