-
-
Notifications
You must be signed in to change notification settings - Fork 449
Localize startup messages about missing Python/NodeJS #2769
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR contains a TODO statement. Please check to see if they should be removed.
🥷 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering we've implemented MessageboxEx so maybe it's better to use it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.xaml
Internationalization
constructorPluginManager
callAddPluginLanguageDirectories
andChangeLanguage
after the plugins have been loaded.Testing
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Localization