F9-2j: 前端 LocalizeMenu 傳 project_id 套課程 glossary#77
Merged
Conversation
把 F9-2i 落地的選填 project_id 接上前端在地化入口: - LocalizeMenu 新增 projectId prop,呼叫 /localization/translate 時有作用中 課程才帶 project_id,讓後端套該課 glossary 固定譯名、術語前後一致。 - 影片任務卡(TaskCard):esJobToTask 補帶 rec.project_id(F9-2g 已落 JobRecord.project_id),LocalizeMenu 收該 job 自己所屬的課。 - 視覺成品卡(VisualCard):VisualStation 透傳作用中課程 projectId。 route 欄位選填=沒作用中課程沿用現行行為、零破壞(fail-soft 在後端); 不碰 review gate / 狀態機(只影響術語怎麼譯)。純前端,npm run build 通過。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
做什麼
把 F9-2i 已落地的選填
project_id(POST /localization/translate接受、給了就套該課 glossary 的固定譯名)接上前端在地化入口,讓「一鍵在地化」真的用上課程術語表。LocalizeMenu新增projectIdprop;呼叫/localization/translate時有作用中課程才帶project_id(...(projectId ? { project_id: projectId } : {}))。TaskCard):esJobToTask補帶rec.project_id(F9-2g 已落JobRecord.project_id),LocalizeMenu收task.project_id= 該 job 自己所屬的課(最精準)。VisualCard):VisualStation把作用中課程projectId透傳下去。為什麼
F9-2(per-course glossary)後端已全接好——schema→儲存→API→翻譯橋接(
to_translation_rules)→TTS 讀音透傳——但前端在地化入口從沒傳project_id,所以課程固定譯名實際上套不到「一鍵在地化」。F9-2i 收尾時把這個前端 slice 標為「後續」,本 PR 補上。F9-2 連同前端在地化入口至此端到端到齊。怎麼測
server/core/schemas/runner(route F9-2i 已落地且有tests/test_localization_glossary.py9 測涵蓋project_id行為與 fail-soft),故不需跑 pytest。npm run build(vite, node22)編譯通過。Reviewer 決策點
project_id為選填=沒作用中課程時前端不帶,後端 fail-soft,沿用現行行為、零破壞。VisualCard)目前渲染的是 demoVISUAL_OUTPUTS,套的是作用中課程;影片卡套的是該 job 自己的課——兩者來源不同是刻意的(job 有自己的project_id,視覺成品尚未綁 job)。Generated by Claude Code