thai-interpreter
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseThai Interpreter
泰语解读器
Interpret Thai user intent with two explicit modes while preserving meaning.
Use this mode selector first:
- :
Literal Translation- Translate Thai to natural English with high fidelity.
- Preserve tone, nuance, and intent.
- Do not compress unless requested.
- :
Execution Translation- Translate Thai to compact, execution-ready English.
- Optimize for fewer tokens and direct agent action.
- Keep wording concise; do not force a fixed response template.
Default to unless the user asks for direct/literal translation.
Execution TranslationUse this workflow:
- Extract user intent from Thai text.
- Select translation mode based on user instruction.
- Preserve key Thai domain terms, names, and literals exactly.
- Produce English output in the chosen mode.
- Validate any file write path for UTF-8 safety before finalizing.
通过两种明确的模式解读泰语用户意图,同时保留原意。
请先使用以下模式选择器:
- (直译模式):
Literal Translation- 将泰语高保真地翻译成自然流畅的英语。
- 保留语气、细微差别和意图。
- 除非用户要求,否则不要压缩内容。
- (执行导向翻译模式):
Execution Translation- 将泰语翻译成简洁、可直接执行的英语。
- 优化以减少token使用,便于Agent直接执行操作。
- 措辞保持简洁;不要强制使用固定的响应模板。
除非用户要求直接/直译,否则默认使用模式。
Execution Translation请遵循以下工作流程:
- 从泰语文本中提取用户意图。
- 根据用户指令选择翻译模式。
- 完全保留泰语领域术语、名称和字面内容。
- 生成所选模式的英语输出。
- 在最终确定前,验证所有文件写入路径的UTF-8安全性。
Prompt Compression Rules
提示词压缩规则
Apply these rules for :
Execution Translation- Convert long Thai narrative into concise, actionable instructions.
- Remove repetition, filler phrases, and polite particles that do not affect behavior.
- Preserve non-negotiable requirements exactly as written.
- Keep dates, numbers, IDs, file paths, and code literals unchanged.
- Keep the compressed instruction under 8 lines when possible.
针对模式应用以下规则:
Execution Translation- 将冗长的泰语叙述转换为简洁、可执行的指令。
- 删除不影响操作的重复内容、填充语和礼貌用语助词。
- 完全保留不可协商的要求。
- 日期、数字、ID、文件路径和代码字面内容保持不变。
- 尽可能将压缩后的指令控制在8行以内。
Literal Translation Rules
直译规则
Apply these rules for :
Literal Translation- Keep sentence-level meaning and pragmatic intent faithful to Thai source.
- Preserve ambiguity if the original Thai is ambiguous.
- Preserve names, domain terms, and quoted literals exactly.
- Do not add implementation assumptions unless requested.
- Keep formatting close to the source when practical.
针对模式应用以下规则:
Literal Translation- 忠实于泰语原文的句子层面含义和语用意图。
- 如果原文泰语存在歧义,保留歧义。
- 完全保留名称、领域术语和引用的字面内容。
- 除非用户要求,否则不要添加实现假设。
- 尽可能保持与原文相近的格式。
Thai Text Safety Rules
泰语文本安全规则
Always protect Thai text writes:
- Use UTF-8 explicitly when creating or updating files.
- Detect suspicious replacement characters (U+FFFD) before and after writing.
- If corruption appears, stop and rewrite from clean source text.
- Avoid lossy encoding conversions (for example ANSI/Windows-1252 fallback).
- Re-open written files and verify expected Thai snippets.
For deep checks and command recipes, read:
references/encoding-playbook.mdreferences/translation-rules.md
For automated checks and safe writes, use:
scripts/check-thai-encoding.ps1scripts/write-utf8.ps1
始终保护泰语文本的写入操作:
- 创建或更新文件时明确使用UTF-8编码。
- 在写入前后检测可疑的替换字符(U+FFFD)。
- 如果出现损坏,停止操作并从干净的源文本重新写入。
- 避免有损编码转换(例如ANSI/Windows-1252降级)。
- 重新打开已写入的文件,验证预期的泰语片段是否正常。
如需深入检查和命令参考,请阅读:
references/encoding-playbook.mdreferences/translation-rules.md
如需自动检查和安全写入,请使用:
scripts/check-thai-encoding.ps1scripts/write-utf8.ps1
Output Contract
输出约定
When handling Thai requests, produce:
- English translation in the selected mode.
- Natural, user-facing phrasing by default (no forced mode label or fixed headings).
- Only use explicit sections (for example ,
Goal,Inputs,Constraints) when the user asks for that format.Output - The implementation result (if execution is requested).
- A brief encoding safety confirmation when files were changed.
处理泰语请求时,需生成:
- 所选模式的英语翻译结果。
- 默认使用自然、面向用户的措辞(无需强制添加模式标签或固定标题)。
- 仅当用户要求时,才使用明确的章节(例如、
Goal、Inputs、Constraints)。Output - 实现结果(如果用户请求执行操作)。
- 当文件被修改时,提供简短的编码安全确认。