Skip to content

Commit 8271b4d

Browse files
Korean translations (#527)
Co-authored-by: Kazuhiro Sera <[email protected]>
1 parent 74a6ca3 commit 8271b4d

File tree

2 files changed

+85
-2
lines changed

2 files changed

+85
-2
lines changed

docs/astro.config.mjs

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const plugins = [
8787
paths: ['api/**'],
8888
},
8989
],
90-
exclude: ['ja/**', 'zh/**'],
90+
exclude: ['ja/**', 'zh/**', 'ko/**'],
9191
}),
9292
];
9393

@@ -98,6 +98,7 @@ const sidebar = [
9898
translations: {
9999
ja: '概要',
100100
zh: '概述',
101+
ko: '개요',
101102
},
102103
},
103104
{
@@ -106,13 +107,15 @@ const sidebar = [
106107
translations: {
107108
ja: 'クイックスタート',
108109
zh: '快速开始',
110+
ko: '빠른 시작',
109111
},
110112
},
111113
{
112114
label: 'Guides',
113115
translations: {
114116
ja: 'ガイド',
115117
zh: '指南',
118+
ko: '가이드',
116119
},
117120
items: [
118121
{
@@ -121,6 +124,7 @@ const sidebar = [
121124
translations: {
122125
ja: 'エージェント',
123126
zh: '智能体',
127+
ko: '에이전트',
124128
},
125129
},
126130
{
@@ -129,6 +133,7 @@ const sidebar = [
129133
translations: {
130134
ja: 'エージェントの実行',
131135
zh: '运行智能体',
136+
ko: '에이전트 실행',
132137
},
133138
},
134139
{
@@ -137,6 +142,7 @@ const sidebar = [
137142
translations: {
138143
ja: 'エージェントの実行結果',
139144
zh: '执行结果',
145+
ko: '실행 결과',
140146
},
141147
},
142148
{
@@ -145,6 +151,7 @@ const sidebar = [
145151
translations: {
146152
ja: 'ツール',
147153
zh: '工具',
154+
ko: '도구',
148155
},
149156
},
150157
{
@@ -153,6 +160,7 @@ const sidebar = [
153160
translations: {
154161
ja: 'マルチエージェント',
155162
zh: '多智能体编排',
163+
ko: '멀티 에이전트 오케스트레이션',
156164
},
157165
},
158166
{
@@ -161,6 +169,7 @@ const sidebar = [
161169
translations: {
162170
ja: 'ハンドオフ',
163171
zh: '交接',
172+
ko: '핸드오프',
164173
},
165174
},
166175
{
@@ -169,6 +178,7 @@ const sidebar = [
169178
translations: {
170179
ja: 'コンテキスト管理',
171180
zh: '上下文管理',
181+
ko: '컨텍스트 관리',
172182
},
173183
},
174184
{
@@ -177,6 +187,7 @@ const sidebar = [
177187
translations: {
178188
ja: 'モデル',
179189
zh: '模型',
190+
ko: '모델',
180191
},
181192
},
182193
{
@@ -185,6 +196,7 @@ const sidebar = [
185196
translations: {
186197
ja: 'ガードレール',
187198
zh: '护栏',
199+
ko: '가드레일',
188200
},
189201
},
190202
{
@@ -193,6 +205,7 @@ const sidebar = [
193205
translations: {
194206
ja: 'ストリーミング',
195207
zh: '流式传输',
208+
ko: '스트리밍',
196209
},
197210
},
198211
{
@@ -201,6 +214,7 @@ const sidebar = [
201214
translations: {
202215
ja: '人間の介入(HITL)',
203216
zh: '人机协作',
217+
ko: '휴먼 인 더 루프 (HITL)',
204218
},
205219
},
206220
{
@@ -209,6 +223,7 @@ const sidebar = [
209223
translations: {
210224
ja: 'MCP 連携',
211225
zh: 'MCP 集成',
226+
ko: '모델 컨텍스트 프로토콜 (MCP)',
212227
},
213228
},
214229
{
@@ -217,6 +232,7 @@ const sidebar = [
217232
translations: {
218233
ja: 'トレーシング',
219234
zh: '追踪',
235+
ko: '트레이싱',
220236
},
221237
},
222238
{
@@ -225,6 +241,7 @@ const sidebar = [
225241
translations: {
226242
ja: 'SDK の設定',
227243
zh: 'SDK 配置',
244+
ko: 'SDK 설정',
228245
},
229246
},
230247
{
@@ -233,6 +250,7 @@ const sidebar = [
233250
translations: {
234251
ja: 'トラブルシューティング',
235252
zh: '故障排除',
253+
ko: '문제 해결',
236254
},
237255
},
238256
{
@@ -241,6 +259,7 @@ const sidebar = [
241259
translations: {
242260
ja: 'リリースプロセス',
243261
zh: '发布流程',
262+
ko: '릴리스 프로세스',
244263
},
245264
},
246265
],
@@ -250,6 +269,7 @@ const sidebar = [
250269
translations: {
251270
ja: '音声エージェント',
252271
zh: '语音智能体',
272+
ko: '음성 에이전트',
253273
},
254274
items: [
255275
{
@@ -258,6 +278,7 @@ const sidebar = [
258278
translations: {
259279
ja: '音声エージェントの概要',
260280
zh: '语音智能体概述',
281+
ko: '음성 에이전트 개요',
261282
},
262283
},
263284
{
@@ -266,6 +287,7 @@ const sidebar = [
266287
translations: {
267288
ja: 'クイックスタート',
268289
zh: '快速开始',
290+
ko: '빠른 시작',
269291
},
270292
},
271293
{
@@ -274,6 +296,7 @@ const sidebar = [
274296
translations: {
275297
ja: '音声エージェントの構築',
276298
zh: '构建语音智能体',
299+
ko: '음성 에이전트 구축',
277300
},
278301
},
279302
{
@@ -282,6 +305,7 @@ const sidebar = [
282305
translations: {
283306
ja: 'リアルタイムトランスポート',
284307
zh: '传输机制',
308+
ko: '전송 방식',
285309
},
286310
},
287311
],
@@ -291,6 +315,7 @@ const sidebar = [
291315
translations: {
292316
ja: '拡張機能',
293317
zh: '扩展',
318+
ko: '확장 기능',
294319
},
295320
items: [
296321
{
@@ -299,6 +324,7 @@ const sidebar = [
299324
translations: {
300325
ja: 'AI SDK で任意モデルを指定',
301326
zh: '使用 AI SDK 指定任意模型',
327+
ko: 'AI SDK로 어떤 모델이든 사용',
302328
},
303329
},
304330
{
@@ -307,6 +333,7 @@ const sidebar = [
307333
translations: {
308334
ja: 'Realtime Agent を Twilio に接続',
309335
zh: '将实时智能体连接到 Twilio',
336+
ko: 'Realtime 에이전트를 Twilio에 연결',
310337
},
311338
},
312339
{
@@ -315,6 +342,7 @@ const sidebar = [
315342
translations: {
316343
ja: 'Cloudflare Workers 用トランスポート',
317344
zh: 'Cloudflare Workers 传输',
345+
ko: 'Cloudflare Workers 전송',
318346
},
319347
},
320348
],
@@ -324,6 +352,7 @@ const sidebar = [
324352
translations: {
325353
ja: 'APIリファレンス',
326354
zh: 'API 参考',
355+
ko: 'API 레퍼런스',
327356
},
328357
collapsed: false,
329358
items: [
@@ -390,6 +419,10 @@ export default defineConfig({
390419
label: '中文',
391420
lang: 'zh',
392421
},
422+
ko: {
423+
label: '한국어',
424+
lang: 'ko',
425+
},
393426
},
394427
social: [
395428
{

docs/src/scripts/translate.ts

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export async function extractSidebarTranslations(
123123
const sourceDir = path.resolve(__dirname, '../../src/content/docs');
124124
const languages: Record<string, string> = {
125125
ja: 'Japanese',
126+
ko: 'Korean',
126127
zh: 'Chinese',
127128
// Add more languages here
128129
};
@@ -213,6 +214,40 @@ const engToNonEngMapping: Record<string, Record<string, string>> = {
213214
Overview: '概述',
214215
Quickstart: '快速上手',
215216
},
217+
ko: {
218+
agents: '에이전트',
219+
'computer use': '컴퓨터 사용',
220+
'OAI hosted tools': 'OpenAI 호스트하는 도구',
221+
'well formed data': '적절한 형식의 데이터',
222+
guardrail: '가드레일',
223+
handoffs: '핸드오프',
224+
'function tools': '함수 도구',
225+
'function calling': '함수 호출',
226+
tracing: '트레이싱',
227+
'code examples': '코드 예제',
228+
'vector store': '벡터 스토어',
229+
'deep research': '딥 리서치',
230+
category: '카테고리',
231+
user: '사용자',
232+
parameter: '매개변수',
233+
processor: '프로세서',
234+
'orchestrating multiple agents': '멀티 에이전트 오케스트레이션',
235+
server: '서버',
236+
'web search': '웹 검색',
237+
'file search': '파일 검색',
238+
streaming: '스트리밍',
239+
'system prompt': '시스템 프롬프트',
240+
interruption: '인터럽션(중단 처리)',
241+
'TypeScript-first': 'TypeScript 우선',
242+
'Human in the loop': '휴먼인더루프 (HITL)',
243+
'Hosted tool': '호스티드 툴',
244+
'Hosted MCP server tools': '호스티드 MCP 서버 도구',
245+
raw: '원문',
246+
'Realtime Agents': '실시간 에이전트',
247+
'Build your first agent in minutes.':
248+
'단 몇 분 만에 첫 에이전트를 만들 수 있습니다',
249+
"Let's build": '시작하기',
250+
},
216251
};
217252

218253
const engToNonEngInstructions: Record<string, string[]> = {
@@ -234,6 +269,12 @@ const engToNonEngInstructions: Record<string, string[]> = {
234269
'* Use Chinese punctuation marks appropriately (。,;:""\'\'())',
235270
'* When translating code-related content, maintain consistency with established Chinese programming terminology',
236271
],
272+
ko: [
273+
'* 공손하고 중립적인 문체(합니다/입니다체)를 일관되게 사용하세요.',
274+
'* 개발자를 위한 페이지이므로 보통 개발자 문서 형식으로 번역하세요',
275+
"* 'instructions', 'tools'와 같은 API 매개변수 이름과 temperature, top_p, max_tokens, presence_penalty, frequency_penalty 등은 영문 그대로 유지하세요.",
276+
'* 문장이 아닌 불릿 항목 끝에는 마침표를 찍지 마세요.',
277+
],
237278
};
238279

239280
async function ensureDir(dir: string) {
@@ -305,6 +346,10 @@ You must return **only** the translated markdown. Do not include any commentary,
305346
- Use simplified Chinese characters consistently
306347
- Follow Chinese grammar and sentence structure patterns
307348
349+
*(applies only when ${targetLanguage} = Korean)*
350+
- 영문 식별자, 코드, 약어 주변의 공백은 원문을 유지하고 임의로 추가하거나 삭제하지 마세요.
351+
- 마크다운 강조 표식 주변에 불필요한 공백을 넣지 마세요: `**굵게**` (good) vs `** 굵게 **` (bad).
352+
308353
#########################
309354
## DO NOT TRANSLATE ##
310355
#########################
@@ -439,6 +484,10 @@ You must return **only** the translated markdown. Do not include any commentary,
439484
- Use simplified Chinese characters consistently
440485
- Follow Chinese grammar and sentence structure patterns Review this rule again before returning the translated text.
441486
487+
*(applies only when ${targetLanguage} = Korean)*
488+
- 영문 식별자, 코드, 약어 주변의 공백은 원문을 유지하고 임의로 추가하거나 삭제하지 마세요.
489+
- 마크다운 강조 표식 주변에 불필요한 공백을 넣지 마세요: `**굵게**` (good) vs `** 굵게 **` (bad).
490+
442491
#########################
443492
## DO NOT TRANSLATE ##
444493
#########################
@@ -675,7 +724,8 @@ function shouldSkipFile(filePath: string): boolean {
675724
const rel = path.relative(sourceDir, filePath);
676725
if (
677726
rel.startsWith('ja/') ||
678-
rel.startsWith('fr/') ||
727+
rel.startsWith('ko/') ||
728+
rel.startsWith('zh/') ||
679729
(!filePath.endsWith('.md') && !filePath.endsWith('.mdx'))
680730
) {
681731
return true;

0 commit comments

Comments
 (0)