/* Kole UI 文档站国际化 (i18n)
*
* 设计取舍:以「中文源串」作为字典键,英文为值。
* 理由:中文是规范原文语言(组件1~10.txt),也是 app.js 里现有的字面量;
* 以源串为键意味着未收录的文案自动回退中文,不会出现空白或 key 泄漏。
* 纯前端、零依赖,与整站零运行时依赖的约束一致。
*
* 用法:T('组件总览') → zh 模式下返回原文,en 模式下返回 'Components'
* 当前语言存 localStorage['kole-lang'],切换后整站重渲染。
*/
(function () {
'use strict';
var EN = {
/* ---------- 快速开始 · npm 安装 ---------- */
'了解如何在本项目中使用 Kole UI 组件:从 npm 私有源安装、引入设计令牌、按端取用组件源码、以及目录与命名约定。':
'Understand how to use Kole UI components: install from the private npm registry, import design tokens, take component sources per stack, plus directory and naming conventions.',
'安装(npm 私有源)':
'Install (private npm registry)',
'本设计系统已发布到自建 Gitea 的 npm registry,匿名可读、无需登录。在项目 .npmrc 写一行,让 @root 作用域的包走私有源,其余依赖仍走公共源:':
'This design system is published to a self-hosted Gitea npm registry — anonymous read, no login needed. One line in your project .npmrc routes the @root scope to the private registry while every other dependency still resolves from the public one:',
'也可用非 scoped 别名 chunyu-ui(内容完全相同),但必须显式指定源——@名字:registry= 这种写法只对 scoped 包名生效:':
'The non-scoped alias chunyu-ui works too (identical content) but needs the registry given explicitly — the @name:registry= form only applies to scoped package names:',
'按端引入(令牌必须先引)':
'Import per stack (tokens first)',
'79 个组件里有 78 个的样式引用 var(--kole-*) 令牌。漏引令牌不会报错,但会出现「组件渲染出来了、颜色和间距却全丢」——这是接入时最常见的坑。':
'78 of the 79 components reference var(--kole-*) tokens in their styles. Skipping the token import raises no error but leaves components rendered with no colours or spacing — the most common pitfall when wiring this up.',
'Vue 2 用 @root/ui/vue2,需构建链具备 SFC 编译能力(vue-loader 15+ 或 vue-template-compiler)。组件以 .vue / .jsx 源码形式发布,由你项目的构建链编译;react 与 vue 是 peerDependencies,按用到的端安装即可,本包不捆绑框架。':
'For Vue 2 use @root/ui/vue2, which needs SFC compilation in your build chain (vue-loader 15+ or vue-template-compiler). Components ship as .vue / .jsx sources compiled by your own build chain; react and vue are peerDependencies — install only the stack you use, no framework is bundled.',
'所有组件都基于同一份 CSS 变量令牌。用 npm 安装时令牌路径是 @root/ui/tokens/tokens.css;不用 npm 时直接引仓库文件:':
'Every component builds on the same CSS variable tokens. With npm the token path is @root/ui/tokens/tokens.css; without npm, link the repository file directly:',
'按端使用组件(不用 npm)':
'Use components per stack (without npm)',
/* ---------- 顶栏 / 导航 ---------- */
'组件库': 'Components',
'搜索组件…': 'Search…',
'框架': 'Stack',
'技术栈': 'Stack',
'选择技术栈': 'Choose a stack',
/* 平台入口(PC 文档站 ↔ 移动端文档站,2026-09-20 两轴模型) */
'平台': 'Platforms',
'当前': 'Now',
'PC 端组件': 'Web (PC) components',
'移动端组件': 'Mobile components',
'打开移动端组件文档': 'Open the mobile component docs',
'移动端组件文档(独立站)': 'Mobile component docs (separate site)',
'79 个中后台组件 · 5 端': '79 back-office components · 5 ends',
'5 个组件 · 6 端 · 含 uni-app': '5 components · 6 ends · incl. uni-app',
'首页': 'Home',
'组件': 'Components',
'快速开始': 'Getting Started',
'设计规范': 'Design Tokens',
'更新日志': 'Changelog',
'选择你的技术栈,文档将只展示对应框架的内容': 'Pick your stack — the docs will only show files for it',
'搜索组件(中文 / 英文 / slug)': 'Search components (name / slug)',
'界面语言': 'Interface language',
'选择语言': 'Select language',
/* ---------- 版本切换(版本清单见 site/versions.json) ---------- */
'选择版本': 'Select version',
'文档版本': 'Documentation version',
'最新版': 'Latest',
'当前浏览': 'Viewing',
'打开导航菜单': 'Open navigation menu',
'↑↓ 选择': '↑↓ Navigate',
'Enter 跳转': 'Enter Open',
'Esc 关闭': 'Esc Close',
/* ---------- 侧边栏 / 分类 ---------- */
'组件总览': 'All Components',
'通用': 'General',
'导航': 'Navigation',
'数据录入': 'Data Entry',
'数据展示': 'Data Display',
'反馈': 'Feedback',
'工具与系统': 'System',
'未分类': 'Uncategorized',
'本页目录': 'On This Page',
/* ---------- 批次 ---------- */
'核心规范': 'Core',
'第': 'Batch ',
'批': '',
'核心组件': 'Core',
'扩展组件': 'Extension',
'规格批次': 'Spec Batch',
/* ---------- 首页 ---------- */
'Kole UI 组件库': 'Kole UI',
'理性、高效、克制的 B 端中后台设计系统——信息密度适中,层级清晰,交互反馈即时。':
'A rational, efficient and restrained design system for B2B admin panels — moderate information density, clear hierarchy, immediate feedback.',
'浏览组件 →': 'Browse components →',
'场景示范': 'Live Scenario',
'测试总览': 'Test Overview',
'个大类': 'categories',
'端实现': 'platforms',
'份规范': 'spec docs',
'测试页': 'test pages',
'大类': 'Categories',
' 大类。基于 Kole UI 设计系统规范构建,提供 H5 / React / Vue 2 / Vue 3 四端实现。':
' categories. Built on the Kole UI specification with H5 / React / Vue 2 / Vue 3 implementations.',
'核心规范组件': 'Core',
'设计令牌': 'Design Tokens',
'通过率 ': 'Pass rate ',
'headless 回归 ': 'headless regression, ',
'断言通过': 'assertions passed',
'设计原则': 'Design Principles',
'一致优先': 'Consistency First',
'同类组件使用相同的尺寸、颜色与间距,跨页面保持一致体验。':
'Same sizes, colors and spacing across similar components, so the experience holds from page to page.',
'清晰高效': 'Clarity & Efficiency',
'信息层级明确,操作路径最短,避免过度装饰。':
'Explicit hierarchy, shortest path to the action, no decoration for its own sake.',
'反馈及时': 'Immediate Feedback',
'所有操作都有加载、成功、失败三类状态反馈。':
'Every action carries loading, success and failure feedback.',
'无障碍': 'Accessibility',
'满足键盘操作与焦点管理,正文对比度 ≥ 4.5:1。':
'Full keyboard operation with focus management; body text contrast ≥ 4.5:1.',
'定位到本组件的规格原文章节': 'Jump to this component’s spec section',
/* ---------- 总览 ---------- */
'个组件(核心': ' components (core ',
' · 扩展': ' · extension ',
'),覆盖 ': '), covering ',
'。基于 Kole UI 设计系统规范构建,提供 H5 / React / Vue 2 / Vue 3 四端实现。':
'. Built on the Kole UI specification with H5 / React / Vue 2 / Vue 3 implementations.',
'预览': 'Preview',
'加载预览…': 'Loading preview…',
'无匹配组件': 'No matching components',
'无匹配组件(已尝试模糊匹配)': 'No matching components (fuzzy match tried)',
'全部': 'All',
'过滤组件…': 'Filter components…',
/* ---------- 快速开始 ---------- */
'了解如何在本项目中使用 Kole UI 组件:引入设计令牌、按端取用组件源码、以及目录与命名约定。':
'How to use Kole UI in your project: import the tokens, pick component sources per platform, and follow the directory and naming conventions.',
'引入设计令牌': 'Import Design Tokens',
'所有组件都基于同一份 CSS 变量令牌。在使用任何组件前,先在页面中引入令牌文件:':
'Every component shares one set of CSS variable tokens. Import the token file before using any component:',
'如需结构化的令牌数据(供工具消费),可读取同目录的 css.json;聚合组件样式见 components.css。':
'For structured token data (tool consumption), read css.json in the same directory; aggregated component styles live in components.css.',
'按端使用组件': 'Use Components per Platform',
'每个组件在 frameworks/ 下有五种形态(H5 / CSS / React / Vue 2 / Vue 3),按你的技术栈取用:':
'Each component ships in five forms under frameworks/ (H5 / CSS / React / Vue 2 / Vue 3). Take the one matching your stack:',
'端': 'Platform',
'文件': 'File',
'使用方式': 'How to use',
'直接在浏览器打开即为完整演示页;将结构与内联样式拷贝进你的页面':
'Opens as a complete demo page in the browser; copy the markup and inline styles into your page',
'将 JSX 与 CSS 拷入工程,按需改造数据绑定': 'Copy the JSX and CSS into your project, adapt the data binding as needed',
'Options API 单文件组件,直接注册使用': 'Options API single-file component, register and use directly',
'