Repository navigation
refactor: simplify translate action by removing dual language selector - #12343
Conversation
|
去掉了智能翻译,原因是? |
|
Note This comment was translated by Claude.
Some users reported that the translation feature was not working correctly. They thought the left side was the source language and the right side was the target language, leading them to believe the translation had failed. Actually, the right side was an alternative language. This was more confusing in the UI. Original Content
有一些用户反馈翻译功能翻译不正确,他们以为左侧是选择的语言,右侧是目标语言。从而认为翻译失败了。实际上右侧是备选语言 这个在界面上更容易让人感到困惑 |
|
Note This comment was translated by Claude. Many users are also accustomed to using this feature. Rather than removing it directly, it would be better to consider how to reduce the possibility of misunderstanding in the UI. Original Content也有很多用户习惯使用该功能。比起直接删除掉,不如考虑一下怎么在UI上减少误解的可能性。 |
|
Note This comment was translated by Claude. I will submit another PR with UI improvements. Original Content
|
|
Note This comment was translated by Claude.
Original Content
1、咱不能为了省事,把本应该在交互和UI上的努力,变成干脆把功能砍掉 |
…ettings dropdown - Added state management for detected and actual target languages. - Implemented a settings dropdown for selecting preferred and alternate languages. - Updated UI to display detected language and integrated new settings for language selection. - Refactored language change handling to improve user experience and maintain state consistency.
44d814c to
1a0b973
Compare
|
Note This comment was translated by Claude. The alternative language has been moved to the settings dropdown options. Original Content备选语言移动到了设置下拉选项里面了 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
…ructure - Introduced LeftGroup for better alignment of detected language, target language selector, and settings dropdown. - Removed unnecessary Spacer component to streamline the layout. - Enhanced styling for improved visual consistency and user experience.
…guage - Removed loading spinner and adjusted the display for the detected language during the detection process to enhance clarity and reduce visual clutter.
What this PR does
Before this PR:
🌐 → [Target] ← [Alternative] ❓) that implied a source-to-target translation flowAfter this PR:
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Root cause: The dual-selector UI naturally leads users to expect "from Language A to Language B" flow (like Google Translate), but the actual behavior was different. This cognitive mismatch caused confusion.
Breaking changes
translate:bidirectional:pairtotranslate:target:languageSpecial notes for your reviewer
The removed code included:
alterLanguagestate and related logicdetectLanguage) for auto-switchingtranslate.alter_language,selection.action.translate.smart_translate_tips)Checklist
Release note
Note
Modernizes the translate selection window and related translations.
LanguageSelectand adds a settingsDropdownto configurepreferred_targetandalter_languagetranslate.detected_source,translate.detecting) and tracksdetectedLanguage/actualTargetLanguagestatedb.settingson change; adds direct target change handlercreateGlobalStyle), and menu components; removes spacer and adjusts layoutlanguage_settings,preferred_target,detected_source,detectingWritten by Cursor Bugbot for commit 2c449d3. This will update automatically on new commits. Configure here.