Merged
Conversation
- Task A: translation_view.py log_view 灰色圖塊修復(已套用至 main) - Task B: FTB Quest 抽取驗證報告 - 706 .snbt Quest 本體檔案 0 keys 抽取(待修復 extract_quest_file) - 格式檢查 ALL CLEAR - lang keys 13066 筆(100% 覆蓋)
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
ListView.__init__() 在 Flet 0.28.3 不支援 bgcolor; 父層 Container 已有 bgcolor='#1e1e1e',ListView 這行多餘且造成 TypeError: got an unexpected keyword argument 'bgcolor'.
styled_card 是白底卡片,content_container 透明, 無法讓深色背景正確顯示。 改用獨立的 ft.Container(bgcolor=#1e1e1e, border, border_radius) 直接作為日誌區,移除 styled_card 的白色遮罩。
…value instead of str()
JS 檔案中的中文(例如 client_scripts/tooltips.js 的中文 tooltips) 不再被 skip,改為保留並參與三語合併比對。 JSON lang 檔案的處理邏輯不變(直接 extract,不走 should_skip_text)。
不翻譯純視覺裝飾字元,修復 client_scripts 中█████████被錯誤抽取的問題。
…lues client_scripts/*.json 的 extracted 值是簡體中文,在寫入 pending/ 之前須先做 OpenCC s2tw 轉換為繁體中文,確保: 1. 進入翻譯流程時是繁體(非簡體冒充英文) 2. 輸出結果與遊戲 zh_tw 格式一致
Problem: client_scripts pending JSON contains zh_tw text (after OpenCC conversion in step1). Sending these to LM wastes API budget. Solution: before LM translation, check if source_text is already zh_tw using OpenCC s2tw conversion (if convert(text)==text, it's already TW). Items already in TW are moved to cache_hit, not sent to LM. Changes: - Add _is_tw_text() and _split_off_tw_items() helpers - Apply in both pre-scan loop and main processing loop Verified: 64/65 pending items skipped as cache hit, only 1 English item remains for translation.
- restore 'import threading' in translation_view.py (removed by ruff --fix but needed by test) - apply ruff format to 6 files flagged by CI lint - test: 1119 passed
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.
PR10 — 翻譯視圖日誌修復 + FTB Quest 抽取驗證
Task A:翻譯視圖日誌灰色圖塊修復
app/views/translation_view.pylog_viewListView 的bgcolor未設定,透明背景透出下層灰色bgcolor="#1e1e1e"(與 Container 背景一致)870f5a5Task B:FTB Quest 抽取格式驗證
workspace/pr10_ftbquest_validation_report.md發現
重大發現:Quest 本體未抽取
ftb_quests.json全為 0 keysextract_quest_file函式的欄位匹配邏輯與實際 SNBT 結構不符translation_tool/plugins/ftbquests/ftbquests_snbt_extractor.py待辦(後續 PR)
extract_quest_file邏輯,正確匹配 SNBT 結構中的 title/subtitle/description 欄位