Flow.Launcher
Flow.Launcher copied to clipboard
Localize startup messages about missing Python/NodeJS
Fixes #1292, closes PR #1392.
Issue
On startup, Flow was waiting until plugins are loaded before loading any localization files. If there are Python/Node plugins installed without the Python/Node runtime specified in settings, it would show a hard-coded message in English (and a few other hard-coded messages).
Changes
What I did:
- Moved internationalization initialization higher, above loading plugins
- Extracted the hard-coded messages from above into
en.xaml
- Since now it doesn't wait for plugins to load first, and those directories are now unknown at the time of initialization, removed adding plugins' translation directories from
Internationalization
constructor - Made
PluginManager
callAddPluginLanguageDirectories
andChangeLanguage
after the plugins have been loaded.
Testing
- [x] The startup messages are now localized
- [x] Flow launches and seems to work correctly
Summary by CodeRabbit
-
New Features
- Enhanced internationalization support with new message prompts and translations for better language consistency.
-
Bug Fixes
- Improved handling of failed plugin initialization with detailed internationalized error messages.
-
Refactor
- Refined message prompt constructions and formatting for better readability and maintainability.
- Reordered settings and language assignments for smoother plugin loading.
-
Localization
- Added new translation strings for English and Russian language files related to plugin prompts and error messages.