Skip to content

Commit f18bdaa

Browse files
committed
docs: add Turkish (tr) localization to documentation site
1 parent 5c60007 commit f18bdaa

18 files changed

Lines changed: 1070 additions & 157 deletions

‎docs-site/astro.config.mjs‎

Lines changed: 50 additions & 49 deletions
Large diffs are not rendered by default.

‎docs-site/src/components/FrontierBoards.astro‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import data from "../data/frontier-benchmarks.json";
1010
import { FRONTIER_STRINGS } from "../data/frontier-i18n";
1111
1212
interface Props {
13-
locale?: "en" | "ko" | "zh-cn" | "ru" | "ja";
13+
locale?: "en" | "ko" | "zh-cn" | "ru" | "ja" | "tr";
1414
/** Comma-separated board ids to render; omit for all boards. */
1515
boards?: string;
1616
/** Show the page-level subtitle (overview pages only). */
@@ -19,14 +19,14 @@ interface Props {
1919
2020
const { locale = "en", boards: boardsProp, intro = false } = Astro.props;
2121
const include = boardsProp ? new Set(boardsProp.split(",").map(s => s.trim()).filter(Boolean)) : null;
22-
const strings = FRONTIER_STRINGS[locale] as Record<string, string>;
22+
const strings = (FRONTIER_STRINGS[locale] ?? FRONTIER_STRINGS.en) as Record<string, string>;
2323
const fallback = FRONTIER_STRINGS.en as Record<string, string>;
2424
const t = (key: string): string => strings[key] ?? fallback[key] ?? key;
2525
const fill = (key: string, vars: Record<string, string>): string =>
2626
Object.entries(vars).reduce((acc, [k, v]) => acc.replace(`{${k}}`, v), t(key));
2727
2828
// The PR i18n has no column-header key for "score" — keep a tiny local map.
29-
const SCORE_HEADER: Record<string, string> = { en: "Score", ko: "점수", "zh-cn": "得分", ru: "Балл", ja: "スコア" };
29+
const SCORE_HEADER: Record<string, string> = { en: "Score", ko: "점수", "zh-cn": "得分", ru: "Балл", ja: "スコア", tr: "Puan" };
3030
/** Dataset tags are kebab-case; i18n keys are camelCase (cheap-subagent → cheapSubagent). */
3131
const tagKey = (tag: string): string => tag.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
3232

‎docs-site/src/components/Header.astro‎

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,17 @@ const prefix = locale ? `${base}${locale}/` : base;
1919
type NavLink = { label: string; href: string };
2020
type NavGroup = { label: string; links: NavLink[] };
2121
22-
const t = (en: string, ko: string, zh: string, ru: string, ja: string) =>
23-
locale === 'ko' ? ko : locale === 'zh-cn' ? zh : locale === 'ru' ? ru : locale === 'ja' ? ja : en;
22+
const t = (en: string, ko: string, zh: string, ru: string, ja: string, tr?: string) =>
23+
locale === 'ko' ? ko : locale === 'zh-cn' ? zh : locale === 'ru' ? ru : locale === 'ja' ? ja : locale === 'tr' ? (tr ?? en) : en;
2424
25-
type LanguageOption = { code: 'root' | 'ko' | 'zh-cn' | 'ru' | 'ja'; label: string };
25+
type LanguageOption = { code: 'root' | 'ko' | 'zh-cn' | 'ru' | 'ja' | 'tr'; label: string };
2626
const languages: LanguageOption[] = [
2727
{ code: 'root', label: 'English' },
2828
{ code: 'ko', label: '한국어' },
2929
{ code: 'zh-cn', label: '简体中文' },
3030
{ code: 'ru', label: 'Русский' },
3131
{ code: 'ja', label: '日本語' },
32+
{ code: 'tr', label: 'Türkçe' },
3233
];
3334
const currentLanguage = languages.find(({ code }) => code === (locale ?? 'root')) ?? languages[0];
3435
@@ -42,60 +43,61 @@ const languageHref = (code: LanguageOption['code']) =>
4243
`${code === 'root' ? base : `${base}${code}/`}${routeSuffix}`;
4344
4445
const themeLabels = {
45-
auto: t('Auto', '자동', '自动', 'Авто', '自動'),
46-
light: t('Light', '라이트', '浅色', 'Светлая', 'ライト'),
47-
dark: t('Dark', '다크', '深色', 'Тёмная', 'ダーク'),
46+
auto: t('Auto', '자동', '自动', 'Авто', '自動', 'Otomatik'),
47+
light: t('Light', '라이트', '浅色', 'Светлая', 'ライト', 'Açık'),
48+
dark: t('Dark', '다크', '深色', 'Тёмная', 'ダーク', 'Koyu'),
4849
};
49-
const themeName = t('Theme', '테마', '主题', 'Тема', 'テーマ');
50+
const themeName = t('Theme', '테마', '主题', 'Тема', 'テーマ', 'Tema');
5051
const themeCycleHint = t(
5152
'Click to use the next theme',
5253
'클릭하여 다음 테마로 전환',
5354
'点击切换到下一个主题',
5455
'Нажмите, чтобы включить следующую тему',
5556
'クリックして次のテーマに切り替え',
57+
'Sonraki temaya geçmek için tıklayın',
5658
);
5759
5860
const groups: NavGroup[] = [
5961
{
60-
label: t('Getting Started', '시작하기', '开始使用', 'Начало работы', 'はじめに'),
62+
label: t('Getting Started', '시작하기', '开始使用', 'Начало работы', 'はじめに', 'Başlangıç'),
6163
links: [
62-
{ label: t('Installation', '설치', '安装', 'Установка', 'インストール'), href: `${prefix}getting-started/installation/` },
63-
{ label: t('Quickstart', '빠른 시작', '快速开始', 'Быстрый старт', 'クイックスタート'), href: `${prefix}getting-started/quickstart/` },
64-
{ label: t('How It Works', '동작 원리', '工作原理', 'Как это работает', '仕組み'), href: `${prefix}getting-started/how-it-works/` },
65-
{ label: t('Agent Quickstart', '에이전트 퀵스타트', 'Agent 快速上手', 'Быстрый старт для агентов', 'エージェント向けクイックスタート'), href: `${prefix}getting-started/for-agents/` },
64+
{ label: t('Installation', '설치', '安装', 'Установка', 'インストール', 'Kurulum'), href: `${prefix}getting-started/installation/` },
65+
{ label: t('Quickstart', '빠른 시작', '快速开始', 'Быстрый старт', 'クイックスタート', 'Hızlı Başlangıç'), href: `${prefix}getting-started/quickstart/` },
66+
{ label: t('How It Works', '동작 원리', '工作原理', 'Как это работает', '仕組み', 'Nasıl Çalışır'), href: `${prefix}getting-started/how-it-works/` },
67+
{ label: t('Agent Quickstart', '에이전트 퀵스타트', 'Agent 快速上手', 'Быстрый старт для агентов', 'エージェント向けクイックスタート', 'Ajanlar İçin Hızlı Başlangıç'), href: `${prefix}getting-started/for-agents/` },
6668
],
6769
},
6870
{
69-
label: t('Guides', '가이드', '指南', 'Руководства', 'ガイド'),
71+
label: t('Guides', '가이드', '指南', 'Руководства', 'ガイド', 'Kılavuzlar'),
7072
links: [
71-
{ label: t('Providers', '프로바이더', '提供商', 'Провайдеры', 'プロバイダー'), href: `${prefix}guides/providers/` },
72-
{ label: t('Model Routing', '모델 라우팅', '模型路由', 'Маршрутизация моделей', 'モデルルーティング'), href: `${prefix}guides/model-routing/` },
73-
{ label: t('Combos', '콤보', '组合', 'Комбо', 'コンボ'), href: `${prefix}guides/combos/` },
74-
{ label: t('Codex Integration', 'Codex 통합', 'Codex 集成', 'Интеграция с Codex', 'Codex 連携'), href: `${prefix}guides/codex-integration/` },
75-
{ label: t('Codex App Model Picker', 'Codex App 모델 선택기', 'Codex App 模型选择器', 'Селектор моделей Codex App', 'Codex App モデルピッカー'), href: `${prefix}guides/codex-app-models/` },
73+
{ label: t('Providers', '프로바이더', '提供商', 'Провайдеры', 'プロバイダー', 'Sağlayıcılar'), href: `${prefix}guides/providers/` },
74+
{ label: t('Model Routing', '모델 라우팅', '模型路由', 'Маршрутизация моделей', 'モデルルーティング', 'Model Yönlendirme'), href: `${prefix}guides/model-routing/` },
75+
{ label: t('Combos', '콤보', '组合', 'Комбо', 'コンボ', 'Kombolar'), href: `${prefix}guides/combos/` },
76+
{ label: t('Codex Integration', 'Codex 통합', 'Codex 集成', 'Интеграция с Codex', 'Codex 連携', 'Codex Entegrasyonu'), href: `${prefix}guides/codex-integration/` },
77+
{ label: t('Codex App Model Picker', 'Codex App 모델 선택기', 'Codex App 模型选择器', 'Селектор моделей Codex App', 'Codex App モデルピッカー', 'Codex App Model Seçici'), href: `${prefix}guides/codex-app-models/` },
7678
{ label: 'Claude Code', href: `${prefix}guides/claude-code/` },
77-
{ label: t('Sidecars: Search & Vision', '사이드카: 검색 & 비전', '边车:搜索与视觉', 'Сайдкары: поиск и зрение', 'サイドカー: 検索 & ビジョン'), href: `${prefix}guides/sidecars/` },
78-
{ label: t('Image Bridge', '이미지 브릿지', '图像桥接', 'Image Bridge', '画像ブリッジ'), href: `${prefix}guides/image-bridge/` },
79-
{ label: t('Video Bridge', '비디오 브릿지', '视频桥接', 'Video Bridge', '動画ブリッジ'), href: `${prefix}guides/video-bridge/` },
80-
{ label: t('Web Dashboard', '웹 대시보드', '网页控制台', 'Веб-дашборд', 'ウェブダッシュボード'), href: `${prefix}guides/web-dashboard/` },
81-
{ label: t('Sub-agent Surface', '서브에이전트 서피스', '子代理界面', 'Интерфейс подагентов', 'サブエージェントサーフェス'), href: `${prefix}guides/sub-agent-surface/` },
79+
{ label: t('Sidecars: Search & Vision', '사이드카: 검색 & 비전', '边车:搜索与视觉', 'Сайдкары: поиск и зрение', 'サイドカー: 検索 & ビジョン', "Sidecar'lar: Arama & Görme"), href: `${prefix}guides/sidecars/` },
80+
{ label: t('Image Bridge', '이미지 브릿지', '图像桥接', 'Image Bridge', '画像ブリッジ', 'Image Bridge'), href: `${prefix}guides/image-bridge/` },
81+
{ label: t('Video Bridge', '비디오 브릿지', '视频桥接', 'Video Bridge', '動画ブリッジ', 'Video Bridge'), href: `${prefix}guides/video-bridge/` },
82+
{ label: t('Web Dashboard', '웹 대시보드', '网页控制台', 'Веб-дашборд', 'ウェブダッシュボード', 'Web Kontrol Paneli'), href: `${prefix}guides/web-dashboard/` },
83+
{ label: t('Sub-agent Surface', '서브에이전트 서피스', '子代理界面', 'Интерфейс подагентов', 'サブエージェントサーフェス', 'Alt Ajan Arayüzü'), href: `${prefix}guides/sub-agent-surface/` },
8284
],
8385
},
8486
{
85-
label: t('Reference', '레퍼런스', '参考', 'Справочник', 'リファレンス'),
87+
label: t('Reference', '레퍼런스', '参考', 'Справочник', 'リファレンス', 'Referans'),
8688
links: [
8789
{ label: 'CLI', href: `${prefix}reference/cli/` },
88-
{ label: t('Configuration', '설정', '配置', 'Конфигурация', '設定'), href: `${prefix}reference/configuration/` },
89-
{ label: t('Adapters', '어댑터', '适配器', 'Адаптеры', 'アダプター'), href: `${prefix}reference/adapters/` },
90-
{ label: t('Architecture', '아키텍처', '架构', 'Архитектура', 'アーキテクチャ'), href: `${prefix}reference/architecture/` },
91-
{ label: t('Proxy API Formats', '프록시 API 형식', '代理 API 格式', 'Форматы API прокси', 'プロキシAPI形式'), href: `${prefix}reference/proxy-formats/` },
92-
{ label: t('Management API', '관리 API', '管理 API', 'API управления', '管理API'), href: `${prefix}reference/management-api/` },
90+
{ label: t('Configuration', '설정', '配置', 'Конфигурация', '設定', 'Yapılandırma'), href: `${prefix}reference/configuration/` },
91+
{ label: t('Adapters', '어댑터', '适配器', 'Адаптеры', 'アダプター', 'Adaptörler'), href: `${prefix}reference/adapters/` },
92+
{ label: t('Architecture', '아키텍처', '架构', 'Архитектура', 'アーキテクチャ', 'Mimari'), href: `${prefix}reference/architecture/` },
93+
{ label: t('Proxy API Formats', '프록시 API 형식', '代理 API 格式', 'Форматы API прокси', 'プロキシAPI形式', 'Proxy API Formatları'), href: `${prefix}reference/proxy-formats/` },
94+
{ label: t('Management API', '관리 API', '管理 API', 'API управления', '管理API', "Yönetim API'si"), href: `${prefix}reference/management-api/` },
9395
],
9496
},
9597
];
9698
9799
const contributing: NavLink = {
98-
label: t('Contributing', '기여하기', '贡献', 'Участие в проекте', 'コントリビュート'),
100+
label: t('Contributing', '기여하기', '贡献', 'Участие в проекте', 'コントリビュート', 'Katkıda Bulunma'),
99101
href: `${prefix}contributing/`,
100102
};
101103
---
@@ -104,7 +106,7 @@ const contributing: NavLink = {
104106
<div class="title-wrapper sl-flex">
105107
<SiteTitle />
106108
</div>
107-
<nav class="glass-nav print:hidden" aria-label={t('Main', '주 메뉴', '主导航', 'Основная навигация', 'メイン')}>
109+
<nav class="glass-nav print:hidden" aria-label={t('Main', '주 메뉴', '主导航', 'Основная навигация', 'メイン', 'Ana Menü')}>
108110
<ul>
109111
{
110112
groups.map((group, i) => (
@@ -174,7 +176,7 @@ const contributing: NavLink = {
174176
aria-haspopup="menu"
175177
aria-expanded="false"
176178
aria-controls="language-menu"
177-
aria-label={t('Select language', '언어 선택', '选择语言', 'Выбрать язык', '言語を選択')}
179+
aria-label={t('Select language', '언어 선택', '选择语言', 'Выбрать язык', '言語を選択', 'Dil seçin')}
178180
>
179181
<Icon name="translate" class="preference-icon" />
180182
<span>{currentLanguage.label}</span>
@@ -206,7 +208,7 @@ const contributing: NavLink = {
206208
aria-haspopup="true"
207209
aria-expanded="false"
208210
aria-controls="lp-menu-panel"
209-
aria-label={t('Menu', '메뉴', '菜单', 'Меню', 'メニュー')}
211+
aria-label={t('Menu', '메뉴', '菜单', 'Меню', 'メニュー', 'Menü')}
210212
>
211213
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true">
212214
<path d="M4 6h16M4 12h16M4 18h16" />

0 commit comments

Comments
 (0)