import type { TranslationPreset } from 'fumadocs-core/i18n';
import type { Translations as UITranslations } from 'fumadocs-ui/i18n';
import type { Translations as OpenAPITranslations } from 'fumadocs-openapi/i18n';
import type { Translations as AsyncAPITranslations } from '@fumadocs/asyncapi/i18n';
import type { Translations as StoryTranslations } from '@fumadocs/story/i18n';
import type { Translations as APIDocsTranslations } from '@fumadocs/api-docs/i18n';

type Translations = UITranslations &
  OpenAPITranslations &
  AsyncAPITranslations &
  StoryTranslations &
  APIDocsTranslations;

const translations = {
  displayName: '繁體中文',
  // fumadocs-ui
  'Ask AI(AI chat button)': '詢問 AI',
  'Back to Home(404 not found page)': '返回首頁',
  'Choose a language(language switcher)': '選擇語言',
  'Choose a language(language switcher)(aria-label)': '選擇語言',
  'Close Banner(banner)(aria-label)': '關閉橫幅',
  'Close Search(search dialog)(aria-label)': '關閉搜尋',
  'Close Sidebar(aria-label)': '關閉側邊欄',
  'Close Sidebar(sidebar)(aria-label)': '關閉側邊欄',
  'Collapse Sidebar(sidebar)(aria-label)': '收合側邊欄',
  'Copied Text(code block)(aria-label)': '已複製文字',
  'Copy Anchor Link(heading anchor)(aria-label)': '複製錨點連結',
  'Copy Link(accordion)(aria-label)': '複製連結',
  'Copy Markdown(page actions)': '複製 Markdown',
  'Copy Text(code block)(aria-label)': '複製文字',
  'Dark(theme switcher)(aria-label)': '深色',
  'Default(type table)': '預設值',
  'Edit on GitHub(edit page)': '在 GitHub 上編輯',
  'Hide Sidebar(sidebar)': '隱藏側邊欄',
  'Last updated on(page footer)': '最後更新於',
  'Layout Tab(layout tab trigger)': '版面標籤',
  'Light(theme switcher)(aria-label)': '淺色',
  'Next Page(pagination)': '下一頁',
  'No Headings(table of contents)': '沒有標題',
  'No results found(search dialog)': '找不到結果',
  'On this page(table of contents)': '本頁目錄',
  'Open Search(search trigger)(aria-label)': '開啟搜尋',
  'Open Sidebar(aria-label)': '開啟側邊欄',
  'Open Sidebar(sidebar)(aria-label)': '開啟側邊欄',
  'Open in ChatGPT(page actions)': '在 ChatGPT 中開啟',
  'Open in Claude(page actions)': '在 Claude 中開啟',
  'Open in Cursor(page actions)': '在 Cursor 中開啟',
  'Open in GitHub(page actions)': '在 GitHub 中開啟',
  'Open in Scira AI(page actions)': '在 Scira AI 中開啟',
  'Open(page actions)': '開啟',
  'Page Not Found(404 not found page)': '找不到頁面',
  'Parameters(type table)': '參數',
  'Previous Page(pagination)': '上一頁',
  'Prop(type table)': '屬性',
  'Read {url}, I want to ask questions about it.(page actions)': '閱讀 {url}，我想詢問相關問題。',
  'Returns(type table)': '回傳值',
  'Search(search dialog)': '搜尋',
  'Search(search trigger)': '搜尋',
  'Show Sidebar(sidebar)': '顯示側邊欄',
  'System(theme switcher)(aria-label)': '系統',
  'Table of Contents(inline table of contents)': '目錄',
  'The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.(404 not found page)':
    '你要尋找的頁面可能已被移除、名稱已變更，或暫時無法使用。',
  'Toggle Menu(home layout header)(aria-label)': '切換選單',
  'Toggle Theme(theme switcher)(aria-label)': '切換主題',
  'Type(type table)': '型別',
  'View as Markdown(page actions)': '以 Markdown 檢視',

  // @fumadocs/api-docs
  'Default(schema UI)': '預設',
  'Deprecated(schema UI)': '已棄用',
  'Enter Property Name(playground)': '輸入屬性名稱',
  'Enter value(playground)': '輸入值',
  'Example(schema UI)': '範例',
  'Filter Properties(schema UI)': '篩選屬性',
  'Format(schema UI)': '格式',
  'Items(schema UI)': '項目',
  'Length(schema UI)': '長度',
  'Match(schema UI)': '符合',
  'Multiple Of(schema UI)': '倍數',
  'New Item(playground)': '新增項目',
  'New(playground)': '新增',
  'No property matching(schema UI)': '沒有符合的屬性',
  'Properties(schema UI)': '屬性',
  'Range(schema UI)': '範圍',
  'Remove Item(playground)(aria-label)': '移除項目',
  'Select(playground)': '選擇',
  'Selected(playground)': '已選取',
  'Show Property(playground)': '顯示屬性',
  'Unset(playground)': '無',
  'Upload(playground)': '上傳',
  'Value in(schema UI)': '值於',

  // fumadocs-openapi
  'Access Token(playground)': '存取權杖',
  'Authenticate using username and password.(OAuth dialog)': '使用使用者名稱和密碼進行驗證。',
  'Authenticate with 3rd party services(OAuth dialog)': '透過第三方服務進行驗證',
  'Authenticate with device.(OAuth dialog)': '使用裝置進行驗證。',
  'Authorization code(OAuth dialog)': '授權碼',
  'Authorization(OAuth dialog)': '授權',
  'Authorization(operation page)': '授權',
  'Authorization(playground)': '授權',
  'Authorization(security scheme)': '授權',
  'Authorize(playground)': '授權',
  'Bad Request(playground status info)': '錯誤的請求',
  'Basic <token>(security scheme)': 'Basic <token>',
  'Bearer <token>(security scheme)': 'Bearer <token>',
  'Binary response body, {length} bytes(playground result display)':
    '二進位回應主體，{length} 位元組',
  'Body(playground)': '主體',
  'Callbacks(operation page)': '回呼',
  'Client Credentials(OAuth dialog)': '用戶端憑證',
  'Client Error(playground result display)': '用戶端錯誤',
  'Client ID(OAuth dialog)': '用戶端 ID',
  'Client Secret(OAuth dialog)': '用戶端密鑰',
  'Close JSON Editor(playground)': '關閉 JSON 編輯器',
  'Close(playground result display)': '關閉',
  'Cookie Parameters(operation page)': 'Cookie 參數',
  'Cookies(playground)': 'Cookie',
  'Copy(TypeScript definitions)': '複製',
  'Default(operation page)': '預設',
  'Deprecated(operation page)': '已棄用',
  'Deprecated(security scheme)': '已棄用',
  'Device Authorization(OAuth dialog)': '裝置授權',
  'Empty(operation page)': '空白',
  'Enter Value(playground server select)': '輸入值',
  'Enter value(OAuth dialog)': '輸入值',
  'Error(playground status info)': '錯誤',
  'Example Requests(operation page)': '範例請求',
  'Example {key}(operation page)': '範例 {key}',
  'Example(operation page)': '範例',
  'Failed to fetch token(playground)': '無法取得權杖',
  'Fetching token...(playground)': '正在取得權杖...',
  'Forbidden(playground status info)': '禁止存取',
  'Header Parameters(operation page)': '標頭參數',
  'Header(playground)': '標頭',
  'Implicit(OAuth dialog)': '隱含式',
  'In(security scheme)': '位置',
  'Intended for the server-to-server authentication.(OAuth dialog)': '適用於伺服器對伺服器驗證。',
  'Internal Server Error(playground status info)': '內部伺服器錯誤',
  'Not Found(playground status info)': '找不到',
  'Obtain the access token for API.(OAuth dialog)': '取得 API 的存取權杖。',
  'Open JSON Editor(playground)': '開啟 JSON 編輯器',
  'OpenID Connect is not supported at the moment, you can still set an access token here.(playground)':
    '目前不支援 OpenID Connect，你仍可在此設定存取權杖。',
  'OpenID Connect(security scheme)': 'OpenID Connect',
  'Password(OAuth dialog)': '密碼',
  'Path Parameters(operation page)': '路徑參數',
  'Path(playground)': '路徑',
  'Query Parameters(operation page)': '查詢參數',
  'Query(playground)': '查詢',
  'Request Body(operation page)': '請求主體',
  'Resource Owner Password Flow(OAuth dialog)': '資源擁有者密碼流程',
  'Response Body(operation page)': '回應主體',
  'Retrieve the access token directly.(OAuth dialog)': '直接取得存取權杖。',
  'Scope(security scheme)': '範圍',
  'Select a flow(OAuth dialog)': '選擇流程',
  'Send(playground)': '傳送',
  'Server URL(playground server select)': '伺服器 URL',
  'Submit(OAuth dialog)': '送出',
  'Successful(playground status info)': '成功',
  'Test(scalar API client)': '測試',
  'The base URL of your API endpoint.(playground server select)': '你的 API 端點基礎 URL。',
  'The client ID of your OAuth application.(OAuth dialog)': '你的 OAuth 應用程式用戶端 ID。',
  'The client secret of your OAuth application.(OAuth dialog)': '你的 OAuth 應用程式用戶端密鑰。',
  'TypeScript Definitions(TypeScript definitions)': 'TypeScript 定義',
  'Unauthorized(playground status info)': '未授權',
  'Unsupported(OAuth dialog)': '不支援',
  'Use the {name} type in TypeScript.(TypeScript definitions)':
    '在 TypeScript 中使用 {name} 型別。',
  'Username(OAuth dialog)': '使用者名稱',
  'loading...(playground server select)': '載入中...',

  // @fumadocs/asyncapi
  'Address(asyncapi channel section)': '位址',
  Bindings: '繫結',
  'Bindings(operation page)': '繫結',
  'Correlation ID(operation page)': '關聯 ID',
  'Description(asyncapi channel section)': '描述',
  Headers: '標頭',
  'Headers(operation page)': '標頭',
  'Message Example(asyncapi message example)': '訊息範例',
  'Messages(operation page)': '訊息',
  'No additional configuration for this binding.(bindings)': '此繫結沒有額外設定。',
  'Parameters(operation page)': '參數',
  Payload: '承載內容',
  'Payload(operation page)': '承載內容',
  'Reply(operation page)': '回覆',

  // @fumadocs/story
  'Encountered error when rendering the component.(story error boundary)': '渲染元件時發生錯誤。',
  'Enter bigint(story arguments form)': '輸入 bigint',
  'Enter date(story arguments form)': '輸入日期',
  'Enter number(story arguments form)': '輸入數字',
  'Enter text(story arguments form)': '輸入文字',
  'False(story arguments form)': '否',
  'New Item(story arguments form)': '新增項目',
  'No Variant(story controls)': '沒有變體',
  'Props(story controls)': '屬性',
  'Remove Item(story arguments form)(aria-label)': '移除項目',
  'Reset(story error boundary)': '重設',
  'True(story arguments form)': '是',
  'Unset(story arguments form)': '無',
} satisfies Translations;

/**
 * Traditional Chinese
 */
export function zhTW(): TranslationPreset<keyof Translations> {
  return {
    name: 'zh-TW',
    value: translations,
  };
}
