-
Notifications
You must be signed in to change notification settings - Fork 2.7k
docs: Add Chinese translation for documents #1878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Introduces 'cn' (Simplified Chinese) as a supported locale in mkdocs.yml, updates translation script to handle Chinese, and excludes Chinese docs from the update-docs workflow trigger. This enables building and navigation of documentation in Simplified Chinese.
Added new Chinese documentation files: agents.md, index.md, quickstart.md, tools.md, and usage.md under docs/cn/. These files provide comprehensive guides and API references for using the OpenAI Agents SDK, including agent configuration, quickstart instructions, tool integration, usage tracking, and advanced features.
Corrected and improved several Chinese translations in the eng_to_non_eng_mapping dictionary, replacing Japanese terms and refining phrasing for clarity and accuracy.
Added new Chinese documentation files covering examples, guardrails, handoffs, multi-agent orchestration, results, running agents, and sessions. Updated tools.md for improved clarity in tool parameter description extraction and usage.
Added new Chinese documentation files: config.md, context.md, mcp.md, and streaming.md under docs/cn/. These files provide localized guides for SDK configuration, context management, Model Context Protocol (MCP) integration, and streaming features for agents.
Added new Chinese documentation files: release.md, repl.md, and tracing.md. Updated usage.md with improved Chinese translation and terminology for usage tracking. These changes enhance the SDK's documentation for Chinese-speaking users.
Added new Chinese documentation files covering models usage, LiteLLM integration, realtime agent guide and quickstart, and agent visualization. These docs provide localized guidance for OpenAI Agents SDK features, including model selection, realtime voice agents, and graph-based visualization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
languages = { | ||
"ja": "Japanese", | ||
"ko": "Korean", | ||
"zh": "Chinese", | ||
# Add more languages here, e.g., "fr": "French" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align Chinese locale code in translation script
The translation script registers Chinese under the locale key "zh"
, but the new docs live under docs/cn/
and MkDocs is configured for the cn
locale. When translate_docs.py
runs it will generate output in docs/zh
and will not update docs/cn
; worse, docs/cn
will be treated as a source directory and re‑translated, producing duplicated translations. This makes the Chinese docs unmaintainable because the automation and the build config disagree on the directory name.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we'd like to consistently use the lang code "zh" like we already do for TS project: https://openai.github.io/openai-agents-js/zh/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sending this PR! We're happy to have Chinese translation. Can you check the two things?
- consistently use "zh" over "cn"
- investigate partial Japanese translation in your outputs
languages = { | ||
"ja": "Japanese", | ||
"ko": "Korean", | ||
"zh": "Chinese", | ||
# Add more languages here, e.g., "fr": "French" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we'd like to consistently use the lang code "zh" like we already do for TS project: https://openai.github.io/openai-agents-js/zh/
"Build your first agent in minutes.": "단 몇 분 만에 첫 에이전트를 만들 수 있습니다", | ||
"Let's build": "시작하기", | ||
}, | ||
"cn": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you use lang code "zh" instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I will change the docs/cn
to docs/zh
) | ||
``` | ||
|
||
- `StopAtTools(stop_at_tool_names=[...])`: 指定したツールのいずれかが呼び出された場合に停止し、その出力を最終応答として使用します。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't checked the cause but this part is somehow written in Japanese. Tweak in the prompt in generator script may be necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, this mistake caused I forgot to commit this change to git, as I translate docs based cp from japanese, I will fix it now.
No description provided.