Flow.Launcher icon indicating copy to clipboard operation
Flow.Launcher copied to clipboard

Localize startup messages about missing Python/NodeJS

Open Yusyuriv opened this issue 8 months ago • 12 comments

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:

  1. Moved internationalization initialization higher, above loading plugins
  2. Extracted the hard-coded messages from above into en.xaml
  3. 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
  4. Made PluginManager call AddPluginLanguageDirectories and ChangeLanguage 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.

Yusyuriv avatar Jun 09 '24 13:06 Yusyuriv