Skip to content

fix(simulation): translate Chinese IPC error strings (#29 A3)#38

Open
PRATHAMESH75 wants to merge 1 commit into
mainfrom
fix/29-translate-ipc-error-strings
Open

fix(simulation): translate Chinese IPC error strings (#29 A3)#38
PRATHAMESH75 wants to merge 1 commit into
mainfrom
fix/29-translate-ipc-error-strings

Conversation

@PRATHAMESH75

Copy link
Copy Markdown
Owner

Summary

Part of #29 (A3) — injection failures were leaking raw Chinese error text (e.g. 没有成功的采访) through the OASIS/IPC layer all the way to the public /campaign/<id>/inject API response, which isn't acceptable for an English public launch.

  • _interview_single_platform: "{platform}平台不可用""{platform} platform is unavailable"
  • handle_interview (no env at all): "没有可用的模拟环境""No simulation environment is available"
  • handle_interview (all platforms failed) fallback: "未知错误""unknown error"
  • handle_batch_interview (empty results): "没有成功的采访""No interviews succeeded"
  • process_commands (unknown command type): "未知命令类型: {command_type}""Unknown command type: {command_type}"

Internal print(...) console/log-only statements (simulation.log) are left in Chinese — only strings that flow into send_response(..., error=...) and can reach the API were translated.

Test plan

  • uv run pytest — 119 passed (backend)
  • New test_parallel_simulation_error_strings.py: static regression guard asserting no CJK characters appear in any error=... argument in run_parallel_simulation.py, plus behavioral checks that the batch-interview-failure and platform-unavailable messages are the new English strings

🤖 Generated with Claude Code

…A3)

Injection failures were surfacing raw Chinese error text (e.g.
"没有成功的采访") through the OASIS/IPC layer all the way to the public
/campaign/<id>/inject API response — not acceptable for an English public
launch. Translates the IPC-facing error strings in run_parallel_simulation.py
(platform unavailable, no simulation environment available, no interviews
succeeded, unknown command type). Internal console/log-only print()
statements are left as-is.
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.

1 participant