-
-
Notifications
You must be signed in to change notification settings - Fork 445
Add Translations for All Messages and Message Boxes #3849
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
🥷 Code experts: jjw24 Jack251970 has 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:
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:
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:
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: ✨ Comment |
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
Warning Rate limit exceeded@Jack251970 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 37 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis update systematically replaces hardcoded English error and notification messages with localized string lookups throughout core and plugin components. It also standardizes error message display by switching from generic message dialogs to dedicated error dialogs. Several files now cache the public API instance for efficiency, and new translation keys are added to language resource files. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI
participant API
participant Translation
participant Logger
User->>UI: Triggers action (e.g., copy, delete, run command)
UI->>API: Perform action
alt Success
API-->>UI: Action result
else Exception occurs
API->>Translation: Get localized error string
API->>Logger: Log exception
API->>UI: ShowMsgError(localized message)
end
Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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.
Actionable comments posted: 3
🧹 Nitpick comments (1)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs (1)
226-227
: LGTM! Improved error handling with proper localization.The changes effectively improve error handling by:
- Using
ShowMsgError
instead ofShowMsg
for proper error categorization- Implementing localization through the translation key
flowlauncher_plugin_browserbookmark_copy_failed
These changes align well with the PR objectives for standardizing error displays and supporting translations.
Consider using a consistent approach for the log message as well:
- _context.API.LogException(ClassName, "Failed to set url in clipboard", e); + _context.API.LogException(ClassName, _context.API.GetTranslation("flowlauncher_plugin_browserbookmark_copy_failed"), e);This would maintain consistency between user-facing messages and log entries.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.
Pull Request Overview
This PR implements comprehensive internationalization (i18n) for Flow Launcher by replacing hardcoded string constants with translatable string resources and improving error message presentation.
- Replace hardcoded error messages with translatable resources across plugins and core components
- Convert regular message displays to error-specific message displays for better user experience
- Add new translation keys to language resource files for all newly internationalized messages
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
Plugins/Flow.Launcher.Plugin.Url/Main.cs | Use ShowMsgError instead of ShowMsg for URL opening failures |
Plugins/Flow.Launcher.Plugin.Shell/Main.cs | Replace hardcoded error messages with translations and add exception handling |
Plugins/Flow.Launcher.Plugin.Shell/Languages/en.xaml | Add translation keys for shell command errors |
Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs | Remove unused empty string parameter from ShowMsgError call |
Plugins/Flow.Launcher.Plugin.Program/Main.cs | Fix duplicate string formatting and use ShowMsgError |
Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml | Add translation keys for explorer operation errors |
Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs | Replace hardcoded error messages with translations |
Plugins/Flow.Launcher.Plugin.Calculator/Main.cs | Use translation for copy failure message |
Plugins/Flow.Launcher.Plugin.Calculator/Languages/en.xaml | Add translation key for copy failure |
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs | Replace hardcoded error message with translation |
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml | Add translation key for bookmark copy failure |
Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs | Use ShowMsgError and add translations for Korean IME settings |
Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs | Use ShowMsgError for startup configuration errors |
Flow.Launcher/Languages/en.xaml | Add extensive translation keys for various error scenarios |
Flow.Launcher/App.xaml.cs | Use ShowMsgError for auto-startup failures |
Flow.Launcher.Infrastructure/Http/Http.cs | Replace hardcoded HTTP proxy error with translations |
Flow.Launcher.Core/Updater.cs | Use ShowMsgError for update failures |
Flow.Launcher.Core/Resource/Internationalization.cs | Use API property instead of direct service access |
Flow.Launcher.Core/Plugin/PluginsLoader.cs | Replace hardcoded plugin error messages with translations |
Flow.Launcher.Core/Plugin/PluginManager.cs | Use ShowMsgError for plugin uninstallation failures |
Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs | Use API property instead of direct service access |
Flow.Launcher.Core/Configuration/Portable.cs | Replace hardcoded portable mode messages with translations |
Comments suppressed due to low confidence (2)
Flow.Launcher.Infrastructure/Http/Http.cs:24
- [nitpick] The field name 'api' should follow C# naming conventions and be capitalized as '_api' or use a more descriptive name like '_apiInstance' to match the pattern used in other files.
private static IPublicAPI api = null;
Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs:26
- [nitpick] The field name 'api' should follow C# naming conventions and be capitalized as '_api' or use a more descriptive name like '_apiInstance' to match the pattern used in other files.
private static IPublicAPI api = null;
Add Translations for All Messages and Message Boxes
CHANGES