-
-
Notifications
You must be signed in to change notification settings - Fork 548
Fix translation issue #4256
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
Fix translation issue #4256
Conversation
Count the number of plugins using each language to decide setup flow and provide more informative runtime prompts by including the plugin count in user messages.
|
🥷 Code experts: no user but you matched threshold 10 Jack251970 has most 👩💻 activity in the files. See details
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. |
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.
No issues found across 1 file
📝 WalkthroughWalkthroughThis change refactors Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
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 fixes a translation bug where the Language property (e.g., "Python") was being incorrectly passed as the plugin count parameter to a translation string, resulting in incorrect messages like "Python个插件" in Chinese translations. The fix calculates the actual plugin count and passes it to the translation function instead.
Changes:
- Calculate plugin count before checking if any plugins use the language
- Pass plugin count instead of language name to the translation function
- Update return statements to use modern collection expression syntax
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jjw24
left a comment
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.
The issue is with translation I believe.
English version:
'Flow detected you have installed {Python/TypeScript} plugins, which will require {Python/Node.js} to run. Would you like to download {Python/Node.js}?'
Changing to count requires update to the message to read better:
'Flow detected you have installed {5} plugins that will require {Python/Node.js} to run. Would you like to download {Python/Node.js}?'
Oh, yeah. I will fix this translation in Crowdin. |
Use the number for translation:
Resolve #4255
Summary by cubic
Fixes the runtime prompt translation and improves setup by counting how many plugins use each language, then showing that count in the message. Skips setup when none need the environment.
Written for commit 517293a. Summary will update on new commits.