Localize startup messages about missing Python/NodeJS#2769
Conversation
I think internationalization requires loading plugin (for loading plugin resources). Maybe that needs to be changed |
Yes, which is why I only load Flow's language first (so plugin loading code could display localized errors) and then let PluginManager class add plugins' languages to resources after all plugins have been loaded. |
This comment has been minimized.
This comment has been minimized.
|
|
||
|
|
||
| private void AddPluginLanguageDirectories() | ||
| internal void AddPluginLanguageDirectories() |
There was a problem hiding this comment.
what do you think about making this method accepting a IEnumerable or something similar instead of referencing back to the PluginManager?
There was a problem hiding this comment.
And pass it from PluginManager like this? Seems logical to me.
InternationalizationManager.Instance.AddPluginLanguageDirectories(GetPluginsForInterface<IPluginI18n>());
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
WalkthroughThe recent updates enhance the internationalization capability of the Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
|
🥷 Code experts: jjw24, VictoriousRaptor jjw24, VictoriousRaptor have most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame: To learn more about /:\ gitStream - Visit our Docs |
|
This PR is 65.93406593406593% new code. |
|
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
This comment has been minimized.
This comment has been minimized.
The PR does not contain a todo
| { | ||
| MessageBox.Show( | ||
| $"Unable to set {Language} executable path, please try from Flow's settings (scroll down to the bottom)."); | ||
| MessageBox.Show(string.Format(InternationalizationManager.Instance.GetTranslation("runtimePluginUnableToSetExecutablePath"), Language)); |
There was a problem hiding this comment.
Considering we've implemented MessageboxEx so maybe it's better to use it here.
There was a problem hiding this comment.
It's implemented in Flow.Launcher project while this file is in Flow.Launcher.Core. I don't know of a way to do that (besides moving MessageBoxEx to a different project) without introducing a circular dependency, and moving MessageBoxEx to a different project would be beyond the scope of this PR.
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.
See ❌ Event descriptions for more information. If the flagged items are 🤯 false positivesIf items relate to a ...
|
| xmlns:system="clr-namespace:System;assembly=mscorlib"> | ||
| <!-- Startup --> | ||
| <system:String x:Key="runtimePluginInstalledChooseRuntimePrompt"> | ||
| Flow определил, что вы установили {0} плагины, которым требуется {1} для работы. Скачать {1}? |
There was a problem hiding this comment.
Just fyi, if this language update hasn't been added to Crowdin, pretty sure they will get reverted back to English or overridden with updates coming from Crowdin.
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:
en.xamlInternationalizationconstructorPluginManagercallAddPluginLanguageDirectoriesandChangeLanguageafter the plugins have been loaded.Testing
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Localization