fix(simulation): translate Chinese IPC error strings (#29 A3)#38
Open
PRATHAMESH75 wants to merge 1 commit into
Open
fix(simulation): translate Chinese IPC error strings (#29 A3)#38PRATHAMESH75 wants to merge 1 commit into
PRATHAMESH75 wants to merge 1 commit into
Conversation
…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.
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.
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>/injectAPI 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 intosend_response(..., error=...)and can reach the API were translated.Test plan
uv run pytest— 119 passed (backend)test_parallel_simulation_error_strings.py: static regression guard asserting no CJK characters appear in anyerror=...argument inrun_parallel_simulation.py, plus behavioral checks that the batch-interview-failure and platform-unavailable messages are the new English strings🤖 Generated with Claude Code