Skip to content

feat(interview): 支持面试问题按需中文翻译 - #347

Merged
Scorbunny2 merged 1 commit into
1024XEngineer:devfrom
Scorbunny2:codex/issue-346-interview-question-translation
Aug 5, 2026
Merged

feat(interview): 支持面试问题按需中文翻译#347
Scorbunny2 merged 1 commit into
1024XEngineer:devfrom
Scorbunny2:codex/issue-346-interview-question-translation

Conversation

@Scorbunny2

Copy link
Copy Markdown

功能描述

  • 在沉浸式面试的面试官问题中,为“朗读”旁增加“翻译”按钮
  • 点击后按需生成简体中文翻译,并在英文问题下方展示
  • 再次点击可收起;同一页面再次展开复用按问题 ID 缓存的结果
  • 翻译失败时允许重试,不产生对话消息、回答、轮数或评分记录

实现思路

  • 新增只读接口 GET /v1/voice-questions/{question_id}/translation
  • 服务端校验问题归属和会话类型,仅允许 INTERVIEW 场景
  • 通过现有文本生成能力输出纯简体中文翻译,不写数据库
  • Flutter 端仅在面试场景的助手问题上提供入口,并在页面内缓存结果

验证方式

  • make check-api
  • make check-go
  • cd mobile && flutter test --no-pub(774 项通过)
  • cd mobile && flutter test --no-pub test/practice/immersive_roleplay_test.dart
  • cd mobile && flutter test --no-pub test/practice/wire_practice_client_test.dart test/agent/agent_message_bubble_test.dart

Closes #346

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found in this review.

Verification:

  • go test ./internal/practice/voice/... ./internal/bootstrap/... passed from server/.
  • git diff --check 7078c7843aa45fa0578d46aa803157994457b806...ad7d91d489714eed7b76ced21c2c626240db2059 passed.
  • Mobile Flutter tests were not run because flutter and dart are not installed in this sandbox.

Note: gh pr view reports mergeStateStatus: DIRTY, so this PR may need conflict resolution against dev before merge.

@Scorbunny2
Scorbunny2 force-pushed the codex/issue-346-interview-question-translation branch from ad7d91d to a88425f Compare August 5, 2026 02:56
@Scorbunny2
Scorbunny2 force-pushed the codex/issue-346-interview-question-translation branch from a88425f to 90f0b4c Compare August 5, 2026 03:26
@jyqin0203
jyqin0203 requested a review from Lq0412 August 5, 2026 03:40
@Scorbunny2
Scorbunny2 merged commit d2ddd23 into 1024XEngineer:dev Aug 5, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants