Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

feat: let each device choose Simplified or Traditional Chinese (#201)

ForwardXua2b528073581
diff --git a/apps/android/app/src/main/assets/zh-Hans.json b/apps/android/app/src/main/assets/zh-Hans.json
new file mode 100644
index 00000000..ddcc1d6e
--- /dev/null
+++ b/apps/android/app/src/main/assets/zh-Hans.json
@@ -0,0 +1,1165 @@
+{
+ "About usage analytics": "关于用量分析",
+ "Access": "访问",
+ "Account": "账户",
+ "Add Widget": "添加小组件",
+ "Add a Codync widget": "添加 Codync 小组件",
+ "Add a widget": "添加小组件",
+ "Add account": "添加账户",
+ "Appearance": "外观",
+ "App language": "应用语言",
+ "App language…": "应用语言…",
+ "App version": "应用版本",
+ "Apple": "Apple",
+ "Apple speech on this iPhone, or OpenAI and Gemini on your own API key, kept on the computer.": "用这台 iPhone 上的苹果语音,或你自己的 OpenAI、Gemini 密钥。密钥留在电脑上。",
+ "Applies to Usage in the app and in widgets.": "应用内的用量和小组件都会跟着变。",
+ "Approved for an earlier install of Codync. Revoke it, then ask again.": "这是更早一次安装的授权。先撤销,再重新申请。",
+ "Ask again": "再申请一次",
+ "Ask for access": "申请访问",
+ "Ask one of your account's computers for access, or pair one with its code.": "向账户里的一台电脑申请访问,或用配对码配对。",
+ "Auto: Wi-Fi or Tailscale, then Cloudflare": "自动:先 Wi-Fi 或 Tailscale,再 Cloudflare",
+ "Back": "返回",
+ "Bots": "机器人",
+ "Can't reach": "连不上",
+ "Cancel": "取消",
+ "Cancel request": "取消申请",
+ "Character": "角色",
+ "Check again": "再检查一次",
+ "Check for updates": "检查更新",
+ "Checking": "正在检查",
+ "Checking your widgets…": "正在检查小组件…",
+ "Choose": "选择",
+ "Choose the look": "选择样子",
+ "Choose your widget": "选择小组件",
+ "Clear search": "清除搜索",
+ "Close": "关闭",
+ "Cloudflare, then Wi-Fi or Tailscale": "先 Cloudflare,再 Wi-Fi 或 Tailscale",
+ "Code": "配对码",
+ "Collapse": "收起",
+ "Collapsed": "已收起",
+ "Color": "颜色",
+ "Compact sidebar": "紧凑侧栏",
+ "Complete": "完成",
+ "Computers": "电脑",
+ "Computers & devices": "电脑和设备",
+ "Computers & settings": "电脑与设置",
+ "Computer access": "电脑访问",
+ "Computers in your account need your OK on the computer before this iPhone can use them.": "账户里的电脑要先在电脑上同意,这台 iPhone 才能使用。",
+ "Computers in your account need your OK on the computer before this phone can use them.": "账户里的电脑要先在电脑上同意,这台手机才能使用。",
+ "Connect a computer": "连接一台电脑",
+ "Connects on Wi-Fi, over Tailscale, or from anywhere through Cloudflare, on its own. End-to-end encrypted.": "会自己走 Wi-Fi、Tailscale,或经 Cloudflare 从任何地方连接。端到端加密。",
+ "Connecting": "正在连接",
+ "Connecting…": "正在连接…",
+ "Connection": "连接",
+ "Continue": "继续",
+ "Continue with Apple": "通过 Apple 继续",
+ "Continue with Google": "通过 Google 继续",
+ "Copied": "已复制",
+ "Copy": "复制",
+ "Create a bot for each kind of work — a reviewer, a fixer, a docs writer — and point it at a project.": "按工作各建一个 Bot,比如审查、修 bug、写文档,并指定一个项目。",
+ "Create your first bot": "创建第一个 Bot",
+ "Customize": "自定义",
+ "Delete": "删除",
+ "Delete bot and its conversation": "删除 Bot 和它的对话",
+ "Delete group chat": "删除群聊",
+ "Details of this bot…": "这个 Bot 的详情…",
+ "Done": "完成",
+ "Each bot runs on its own computer. Sign in to see the computers in your account.": "每个 Bot 都在自己的电脑上运行。登录后可以看到账户里的电脑。",
+ "Edit": "编辑",
+ "Edit group": "编辑群聊",
+ "Edit profile": "编辑资料",
+ "English": "English",
+ "Error": "出错",
+ "Every install option": "全部安装方式",
+ "Expand": "展开",
+ "Expanded": "已展开",
+ "Extensions": "扩展",
+ "Extensions: agents, connectors, skills…": "扩展:智能体、连接器和技能…",
+ "Files": "文件",
+ "Files it changed on your computer stay as they are.": "它在电脑上改过的文件会保留。",
+ "Follow system": "跟随系统",
+ "General": "通用",
+ "Get a result summary, a request for input, or a failure notice. Notification previews follow your iOS settings.": "会收到结果摘要、需要你处理的请求,或失败通知。通知预览跟随 iOS 设置。",
+ "Get set up": "开始设置",
+ "Get started": "开始使用",
+ "Give each one a name and a project. They work on your computer while you're away.": "给每个 Bot 起名并指定项目。你不在时,它们在电脑上继续工作。",
+ "Go to": "前往",
+ "Google": "Google",
+ "Hidden bots": "已隐藏的 Bot",
+ "Hide from list": "从列表隐藏",
+ "In your account": "在你的账户里",
+ "Install with Homebrew": "用 Homebrew 安装",
+ "Its bots and conversations stay on that computer. You can pair again any time.": "Bot 和对话仍留在那台电脑上。随时可以重新配对。",
+ "Its bots and their own chats stay.": "里面的 Bot 和各自的对话会保留。",
+ "Keys": "按键",
+ "Know when a bot is done or needs you.": "Bot 完成或需要你时会通知你。",
+ "Language": "语言",
+ "Large": "大",
+ "Linux": "Linux",
+ "Live Activities are turned off in iOS Settings.": "iOS 设置里已关闭实时活动。",
+ "Live Activity": "实时活动",
+ "Loading": "正在加载",
+ "Local pairing": "本机配对",
+ "Mac": "Mac",
+ "Mark as read": "标为已读",
+ "Medium": "中",
+ "Memory of this bot…": "这个 Bot 的记忆…",
+ "Needs update": "需要更新",
+ "Needs you": "需要你",
+ "New": "新建",
+ "New bot": "新建 Bot",
+ "New bot…": "新建 Bot…",
+ "New group chat": "新建群聊",
+ "Name your group": "给群聊起个名字",
+ "Sign in so bots can use it": "登录后 Bot 才能使用",
+ "Remove {name}?": "移除 {name}?",
+ "Bots lose this connector, and the keys saved for it are deleted.": "Bot 会失去这个连接器,为它保存的密钥也会删除。",
+ "Bots stop using this skill.": "Bot 将不再使用这个技能。",
+ "Nothing installed": "还没有安装",
+ "Connectors and skills you add show up here.": "你添加的连接器和技能会显示在这里。",
+ "Install": "安装",
+ "Runs the official installer on {name}.": "在 {name} 上运行官方安装程序。",
+ "Installed on {name}.": "已安装在 {name} 上。",
+ "Checking with {name}… The first check can download it.": "正在向 {name} 确认…第一次确认时可能会下载。",
+ "Checking…": "正在确认…",
+ "Signed in.": "已登录。",
+ "Add Node.js first.": "请先添加 Node.js。",
+ "Not signed in yet.": "尚未登录。",
+ "Couldn't tell. Skip this if you've already signed in on {name}.": "无法判断。如果已经在 {name} 上登录过,可以跳过。",
+ "{name} runs on Node.js. Codync adds its own copy.": "{name} 运行需要 Node.js。Codync 会单独为它准备一份。",
+ "Added on {name}.": "已添加到 {name}。",
+ "In a terminal on {name}. Links open here.": "在 {name} 的终端里进行。链接会在这里打开。",
+ "In a terminal on {name}.": "在 {name} 的终端里进行。",
+ "Saved on {name} only.": "只保存在 {name} 上。",
+ "Finish signing in in the browser on {name}…": "请在 {name} 的浏览器里完成登录…",
+ "Opens a browser on {name}.": "会在 {name} 上打开浏览器。",
+ "Browser sign-ins open on {name} itself. Away from it? Use Remote screen to finish there.": "浏览器登录会在 {name} 本机打开。人不在旁边的话,用远程屏幕在那里完成。",
+ "This sign-in needs a newer app. Sign in on {name} for now.": "这种登录方式需要更新的应用。请先在 {name} 上登录。",
+ "Agent marketplace with 174+ AI capabilities. Browse, invoke, and pay for agent services settled in USDC on Base L2.": "智能体市场,提供 170 多种 AI 能力。可以浏览、调用,并用 Base L2 上的 USDC 结算。",
+ "ACP wrapper for Amp - the frontier coding agent": "Amp 的 ACP 封装,前沿编程智能体",
+ "Google’s AI coding agent": "Google 的 AI 编程智能体",
+ "Augment Code's powerful software agent, backed by industry-leading context engine": "Augment Code 的软件智能体,背后是业界领先的上下文引擎",
+ "Autohand Code - AI coding agent powered by Autohand AI": "Autohand Code,由 Autohand AI 驱动的编程智能体",
+ "IBM Bob is your AI-Powered Development Partner": "IBM Bob,你的 AI 开发伙伴",
+ "ACP wrapper for Anthropic's Claude": "Anthropic Claude 的 ACP 封装",
+ "Autonomous coding agent CLI - capable of creating/editing files, running commands, using the browser, and more": "自主编程智能体命令行,可以创建和编辑文件、运行命令、使用浏览器等",
+ "Tencent Cloud's official intelligent coding tool": "腾讯云官方的智能编程工具",
+ "ACP adapter for OpenAI's coding assistant": "OpenAI 编程助手的 ACP 适配器",
+ "Snowflake's Cortex Code coding agent": "Snowflake 的 Cortex Code 编程智能体",
+ "Co-building with a seasoned Rust partner.": "和一位资深 Rust 搭档一起写代码。",
+ "Minimal ACP Native Coding Agent": "精简的原生 ACP 编程智能体",
+ "Cursor's coding agent": "Cursor 的编程智能体",
+ "Batteries-included AI coding and general purpose agent powered by LangChain.": "开箱即用的 AI 编程和通用智能体,由 LangChain 驱动。",
+ "Devin CLI coding agent by Cognition": "Cognition 的 Devin CLI 编程智能体",
+ "A coding agent that puts leading models at your command.": "把领先模型交给你调用的编程智能体。",
+ "Reduces API costs by more than 50%, produces better and faster work. Uses Hash anchored parallel edits, AST manipulation and a whole lot of neat optimizations. Fully Open Source.": "API 成本可以降低一半以上,工作更快也更好。使用哈希锚定的并行编辑、AST 操作和一系列优化。完全开源。",
+ "Factory Droid - AI coding agent powered by Factory AI": "Factory Droid,由 Factory AI 驱动的编程智能体",
+ "Code and build agents with comprehensive multi-provider support": "编写和构建智能体,支持多家模型服务",
+ "Google's official CLI for Gemini": "Google 官方的 Gemini 命令行",
+ "GitHub's AI pair programmer": "GitHub 的 AI 结对程序员",
+ "ACP agent powered by Zhipu AI's GLM Coding Plan models (glm-5.1, glm-5-turbo, glm-4.7, glm-4.5-air). Supports streaming, tool calls, mid-session model switching, image input via Z.AI Coding Plan Vision MCP, and session load/fork/resume with on-disk persistence.": "智谱 GLM Coding Plan 模型驱动的 ACP 智能体(glm-5.1、glm-5-turbo、glm-4.7、glm-4.5-air)。支持流式输出、工具调用、会话中切换模型、通过 Z.AI Coding Plan Vision MCP 输入图片,以及把会话保存、分叉和恢复到磁盘。",
+ "A local, extensible, open source AI agent that automates engineering tasks": "本地、可扩展的开源 AI 智能体,用来自动完成工程任务",
+ "xAI's coding agent and CLI": "xAI 的编程智能体和命令行",
+ "Harn runs .harn agent pipelines as a native ACP coding agent over stdio.": "Harn 把 .harn 智能体流水线作为原生 ACP 编程智能体,通过标准输入输出运行。",
+ "AI Coding Agent by JetBrains": "JetBrains 的 AI 编程智能体",
+ "The open source coding agent": "开源编程智能体",
+ "Coding agent powered by multi-model orchestration": "由多模型编排驱动的编程智能体",
+ "Moonshot AI's coding assistant": "月之暗面的编程助手",
+ "MiniMax Code is an AI coding agent with Agent Client Protocol support.": "MiniMax Code,支持 Agent Client Protocol 的 AI 编程智能体。",
+ "An enhanced AI code assistant built on the Minion framework with rich development tools": "基于 Minion 框架的增强型 AI 编程助手,带有丰富的开发工具",
+ "Mistral's open-source coding assistant": "Mistral 的开源编程助手",
+ "Nova by Compass AI - a fully-fledged software engineer at your command": "Compass AI 的 Nova,一位听你调遣的软件工程师",
+ "The open source coding agent, version 2": "开源编程智能体,第 2 版",
+ "ACP adapter for pi coding agent": "pi 编程智能体的 ACP 适配器",
+ "Poolside's coding agent": "Poolside 的编程智能体",
+ "AI coding assistant with agentic capabilities": "具备智能体能力的 AI 编程助手",
+ "Alibaba's Qwen coding assistant": "阿里巴巴的 Qwen 编程助手",
+ "Local-first coding agent. Runs entirely on your machine with optional on-device LLM inference via Onde.": "本地优先的编程智能体。完全在你的电脑上运行,也可以通过 Onde 在本机推理模型。",
+ "Open-source DevOps agent in Rust with enterprise-grade security": "用 Rust 编写的开源 DevOps 智能体,具备企业级安全能力",
+ "An open-source coding agent with LLM-native code understanding and robust shell safety. Supports multiple LLM providers with automatic failover and efficient context management.": "开源编程智能体,能按模型的方式理解代码,并对 shell 做严格的安全控制。支持多家模型服务,可以自动切换,并高效管理上下文。",
+ "New group chat…": "新建群聊…",
+ "No bots yet": "还没有 Bot",
+ "No computer yet": "还没有电脑",
+ "No usage yet": "还没有用量",
+ "Not complete": "未完成",
+ "Not paired": "未配对",
+ "Not signed in": "未登录",
+ "Nothing matches": "没有匹配项",
+ "Notifications": "通知",
+ "OK": "好",
+ "Off": "关",
+ "Off in Settings": "在设置中关闭",
+ "Offline": "离线",
+ "On": "开",
+ "Online": "在线",
+ "Open Codync and it sets up the host on its own.": "打开 Codync,它会自己装好 host。",
+ "Open at login": "登录时打开",
+ "Open iOS Settings": "打开 iOS 设置",
+ "Original": "原图标",
+ "Original icon": "原图标",
+ "Pair": "配对",
+ "Pair a computer": "配对一台电脑",
+ "Pair a computer later from Computers & settings.": "稍后可以在「电脑与设置」里配对。",
+ "Pair a phone…": "配对 iPhone…",
+ "Pause": "暂停",
+ "Personal": "个人",
+ "Photos": "照片",
+ "Pin": "置顶",
+ "Play": "播放",
+ "Please wait…": "请稍候…",
+ "Preview": "预览",
+ "Push notifications": "推送通知",
+ "Reach your computers from anywhere": "随时使用你的电脑",
+ "Refresh agents": "刷新 agent",
+ "Remove": "移除",
+ "Remove from account": "从账户移除",
+ "Revoke": "撤销",
+ "Revoke this iPhone's access": "撤销这台 iPhone 的访问",
+ "Run the installer": "运行安装器",
+ "Sample data": "示例数据",
+ "Scan a computer's code": "扫描电脑上的配对码",
+ "Scan the pairing code": "扫描配对码",
+ "Screen": "屏幕",
+ "Search": "搜索",
+ "Search Widgets": "搜索小组件",
+ "Sending": "正在发送",
+ "Share usage analytics": "共享用量分析",
+ "Show Live Activities": "显示实时活动",
+ "Show in Dock": "在程序坞中显示",
+ "Show in Dynamic Island": "在灵动岛中显示",
+ "Sign in to reach your computers from anywhere": "登录后可以随时使用你的电脑",
+ "Sign in to see the computers in your account.": "登录后可以看到账户里的电脑。",
+ "Sign out": "退出登录",
+ "Signed in": "已登录",
+ "Signing in": "正在登录",
+ "Skip": "跳过",
+ "Small": "小",
+ "Something went wrong": "出了点问题",
+ "Source": "来源",
+ "Source code": "源代码",
+ "Start over": "重新开始",
+ "Start over?": "重新开始?",
+ "State": "状态",
+ "Step": "步骤",
+ "Switch account": "切换账户",
+ "System": "系统",
+ "System language is Chinese. \"Follow system\" matches the iPhone. You can switch this app to English.": "系统语言是中文。选「跟随系统」时界面和 iPhone 一致,也可以改成英文。",
+ "System language is Chinese. \"Follow system\" matches the phone. You can switch this app to English.": "系统语言是中文。选「跟随系统」时界面和手机一致,也可以改成英文。",
+ "System language is Chinese. \"Follow system\" matches this computer. You can switch this app to English.": "系统语言是中文。选「跟随系统」时界面和这台电脑一致,也可以改成英文。",
+ "System language is English. \"Follow system\" matches the iPhone. You can switch this app to Simplified or Traditional Chinese.": "系统语言是英文。选「跟随系统」时界面和 iPhone 一致,也可以改成简体中文或繁体中文。",
+ "System language is English. \"Follow system\" matches the phone. You can switch this app to Simplified or Traditional Chinese.": "系统语言是英文。选「跟随系统」时界面和手机一致,也可以改成简体中文或繁体中文。",
+ "System language is English. \"Follow system\" matches this computer. You can switch this app to Simplified or Traditional Chinese.": "系统语言是英文。选「跟随系统」时界面和这台电脑一致,也可以改成简体中文或繁体中文。",
+ "System language is Simplified Chinese. \"Follow system\" matches the iPhone. You can switch this app to Traditional Chinese or English.": "系统语言是简体中文。选「跟随系统」时界面和 iPhone 一致,也可以改成繁体中文或英文。",
+ "System language is Simplified Chinese. \"Follow system\" matches the phone. You can switch this app to Traditional Chinese or English.": "系统语言是简体中文。选「跟随系统」时界面和手机一致,也可以改成繁体中文或英文。",
+ "System language is Simplified Chinese. \"Follow system\" matches this computer. You can switch this app to Traditional Chinese or English.": "系统语言是简体中文。选「跟随系统」时界面和这台电脑一致,也可以改成繁体中文或英文。",
+ "System language is Traditional Chinese. \"Follow system\" matches the iPhone. You can switch this app to Simplified Chinese or English.": "系统语言是繁体中文。选「跟随系统」时界面和 iPhone 一致,也可以改成简体中文或英文。",
+ "System language is Traditional Chinese. \"Follow system\" matches the phone. You can switch this app to Simplified Chinese or English.": "系统语言是繁体中文。选「跟随系统」时界面和手机一致,也可以改成简体中文或英文。",
+ "System language is Traditional Chinese. \"Follow system\" matches this computer. You can switch this app to Simplified Chinese or English.": "系统语言是繁体中文。选「跟随系统」时界面和这台电脑一致,也可以改成简体中文或英文。",
+ "Text size": "文字大小",
+ "This Mac": "这台 Mac",
+ "This computer": "这台电脑",
+ "This iPhone forgets the account's computers. Your bots stay on them.": "这台 iPhone 会忘掉账户里的电脑。Bot 仍留在那些电脑上。",
+ "Through Cloudflare": "经 Cloudflare",
+ "Try again": "再试一次",
+ "Turn on": "打开",
+ "Turn on notifications": "打开通知",
+ "Turn on notifications in Settings": "在设置中打开通知",
+ "Unable to check": "无法检查",
+ "Unhide": "取消隐藏",
+ "Unpin": "取消置顶",
+ "Update delayed": "更新延迟",
+ "Updated": "已更新",
+ "Updates": "更新",
+ "Usage": "用量",
+ "Usage icons": "用量图标",
+ "Usage limits": "用量上限",
+ "Usage shows up once a computer is connected.": "连上电脑后会显示用量。",
+ "Voice and API keys": "语音和 API 密钥",
+ "Voice chat": "语音",
+ "Voice keys are kept by This Mac's host, which isn't running.": "语音密钥由这台 Mac 的 host 保存,而 host 没在运行。",
+ "Waiting for approval…": "等待电脑同意…",
+ "Waiting for computer": "等待电脑",
+ "Watch the demo": "看演示",
+ "Which features you use, never your messages, code or files. Helps us spot bugs sooner and make Codync better for you.": "只记录你用了哪些功能,不包括消息、代码或文件。便于更快发现 bug,把 Codync 做得更好。",
+ "Wi-Fi or Tailscale": "Wi-Fi 或 Tailscale",
+ "Wi-Fi or Tailscale only, never Cloudflare": "只用 Wi-Fi 或 Tailscale,不走 Cloudflare",
+ "Widget": "小组件",
+ "Working": "正在工作",
+ "Working…": "正在工作…",
+ "Resuming session…": "正在恢复会话…",
+ "Starting agent…": "正在启动 Agent…",
+ "Thinking…": "思考中…",
+ "Continuing…": "正在继续…",
+ "Couldn't start": "无法启动",
+ "Writing a reply…": "正在写回复…",
+ "Typing…": "正在输入…",
+ "Installing…": "正在安装…",
+ "Downloading {name}…": "正在下载 {name}…",
+ "Installing {name}…": "正在安装 {name}…",
+ "Needs approval: {title}": "需要批准:{title}",
+ "Summarizing the earlier conversation…": "正在总结更早的对话…",
+ "Picking up where it left off…": "正在接着上次继续…",
+ "You can ask for access again; the computer will show a new code to confirm.": "可以再次申请。电脑会显示一个新的配对码供你确认。",
+ "Your bots run there. This iPhone is how you talk to them.": "Bot 在那台电脑上运行。这台 iPhone 用来和它们对话。",
+ "Your computer": "你的电脑",
+ "Your computer reads the limits from Claude Code and Codex.": "电脑会从 Claude Code 和 Codex 读取用量上限。",
+ "or download the Mac app": "或下载 Mac 应用",
+ "or install with Homebrew": "或用 Homebrew 安装",
+ "search bots": "搜索 Bot",
+ "ACTIONS": "操作",
+ "Android speech on this phone, or OpenAI and Gemini on your own API key, kept on the computer.": "用这台手机上的 Android 语音,或你自己的 OpenAI、Gemini 密钥。密钥留在电脑上。",
+ "It's this computer under an earlier identity and can't be reached anymore. Removing it only cleans up your account.": "这是同一台电脑更早的身份,已经连不上了。移除只会清理你的账户。",
+ "Signs out of every account and forgets every computer on this iPhone, then shows the welcome again. Your computers keep their bots and chats; pair again to use them.": "会退出所有账户,并忘掉这台 iPhone 上的每台电脑,然后重新显示欢迎页。电脑上的 Bot 和对话都还在,配对后可以继续用。",
+ "Signs out of every account and forgets every computer on this phone, then shows the welcome again. Your computers keep their bots and chats; pair again to use them.": "会退出所有账户,并忘掉这台手机上的每台电脑,然后重新显示欢迎页。电脑上的 Bot 和对话都还在,配对后可以继续用。",
+ "Remove the older computer?": "移除更早的那台电脑?",
+ "On your Mac, click Codync in the menu bar, then Pair iPhone.": "在 Mac 上点菜单栏的 Codync,然后选配对 iPhone。",
+ "On your Mac, click Codync in the menu bar, then Pair iPhone. The same code pairs this phone.": "在 Mac 上点菜单栏的 Codync,然后选配对 iPhone。同一个码也能配这台手机。",
+ "On your computer, run this in a terminal:": "在电脑上的终端里运行:",
+ "Or paste a {scheme}://pair link": "或粘贴 {scheme}://pair 链接",
+ "Find nearby barcodes.": "寻找附近的条形码。",
+ "Camera not available. Paste the link below.": "相机不可用。请把链接粘贴在下面。",
+ "Codync, at a glance.": "一眼看到 Codync。",
+ "Your bots and usage, on every surface.": "Bot 和用量,出现在各个界面上。",
+ "Approve only if the computer shows exactly this code. If it doesn't, deny it there: someone may be trying to get in.": "只有电脑上显示的码和这里完全一致时才同意。不一致就在电脑上拒绝:可能有人想进入。",
+ "Install Codync\non your computer": "在电脑上\n安装 Codync",
+ "Check that this iPhone and the computer are on the same Wi-Fi or both on Tailscale, or that “Reach from anywhere” is on in Codync on the computer.": "确认这台 iPhone 和电脑在同一个 Wi-Fi,或都开了 Tailscale,或电脑上的 Codync 已打开「随处访问」。",
+ "Check that this phone and the computer are on the same Wi-Fi or both on Tailscale, or that “Reach from anywhere” is on in Codync on the computer.": "确认这台手机和电脑在同一个 Wi-Fi,或都开了 Tailscale,或电脑上的 Codync 已打开「随处访问」。",
+ "Tailscale is on: Codync connects over it directly.": "Tailscale 已打开:Codync 会直接通过它连接。",
+ "Use Tailscale? Direct and faster away from home.": "使用 Tailscale?离家时更直接,也更快。",
+ "Your coding agents,\nas teammates.": "你的编程助手,\n像队友一样。",
+ "Fix the flaky login test": "修一下不稳定的登录测试",
+ "Done. It raced the session refresh; tests pass on fix/login.": "好了。它和会话刷新撞在一起了;fix/login 上测试已通过。",
+ "Couldn't check your widgets. You can still add one using the steps below.": "暂时检查不了小组件。你仍可以按下面的步骤添加。",
+ "Keep tasks in view": "让任务保持可见",
+ "Lock Screen widgets": "锁定屏幕小组件",
+ "Widgets show the latest report. Open Codync for live updates and approvals.": "小组件显示最近一次报告。打开 Codync 看实时更新和待处理的请求。",
+ "How to add the Codync widget": "如何添加 Codync 小组件",
+ "See who needs you and who's still working.": "看谁需要你、谁还在工作。",
+ "QR pairing only in this build": "这个版本只能用二维码配对",
+ "Move up": "上移",
+ "Move down": "下移",
+ "Sample task": "示例任务",
+ "iOS chooses the presentation based on your device and other active tasks. These previews don't start a Live Activity. Approvals are handled inside Codync.": "iOS 会按设备和正在进行的其他任务决定怎么显示。这些预览不会真的启动实时活动。同意操作在 Codync 里完成。",
+ "Touch and hold your Lock Screen → Customize → Lock Screen. Tap the widget area and choose Codync. Inline widgets go in the date row above the clock.": "按住锁定屏幕 → 自定义 → 锁定屏幕。点小组件区域,选择 Codync。行内小组件放在时钟上方的日期那一行。",
+ "Choose Bots for task status or Usage limits for the highest reported limit. iOS applies your Lock Screen's color and style.": "选「机器人」看任务状态,或选「用量上限」看报得最高的额度。颜色和样式由 iOS 锁定屏幕决定。",
+ "Dismiss": "关闭",
+ "Computer": "电脑",
+ "No bots yet. Create a bot first.": "还没有 Bot。请先创建一个。",
+ "Everyone answers in turn unless you @mention someone.": "大家轮流回复,除非你 @ 某一个人。",
+ "Create": "创建",
+ "All computers": "全部电脑",
+ "Show only": "只显示",
+ "Reconnect": "重新连接",
+ "Manage computers": "管理电脑",
+ "Model": "模型",
+ "This agent doesn't advertise a model list. Leave Default or enter a model ID.": "这个 agent 没有提供模型列表。留着「默认」,或自己填一个模型 ID。",
+ "Changing the model starts a new agent session. Chat history is kept.": "更换模型会新开一个 agent 会话。聊天记录会保留。",
+ "Loading available models": "正在加载可用模型",
+ "Notes": "笔记",
+ "Longer notes, one topic each. The bot reads one when its topic comes up.": "较长的笔记,一条一个主题。聊到相关主题时,Bot 会读那一条。",
+ "Loading…": "正在加载…",
+ "Switch back": "换回来",
+ "No fallbacks yet.": "还没有备用 agent。",
+ "Personal workspace": "个人工作区",
+ "Fast mode": "快速模式",
+ "Faster replies for more usage, on models that offer it.": "回复更快,用量也更高。仅部分模型支持。",
+ "Faster replies for more usage, on models that offer it (Claude Code, Codex)": "回复更快,用量也更高。仅部分模型支持(Claude Code、Codex)。",
+ "Turn on for faster replies and more usage": "打开后回复更快,用量也更高",
+ "Turn off and return to standard speed": "关闭,回到正常速度",
+ "Turn on for every bot here: faster replies and more usage": "给这里的每个 Bot 打开:回复更快,用量也更高",
+ "Turn off for every bot here and return to standard speed": "给这里的每个 Bot 关闭,回到正常速度",
+ "Let the bot change its fallbacks": "让 Bot 自己改备用列表",
+ "It can set this list itself, for example when you ask it to.": "它可以自己改这份列表,比如你让它改的时候。",
+ "Let the bot change its fallbacks: it can set this list itself, for example when you ask it to.": "让 Bot 自己改备用列表:它可以自己改这份列表,比如你让它改的时候。",
+ "Use the computer": "使用电脑",
+ "Use computer": "使用电脑",
+ "On that computer, open Codync → Settings → Computer access to set it up first.": "先在那台电脑上打开 Codync → 设置 → 电脑访问,完成设置。",
+ "Set up on the computer: Codync → Settings → Computer access": "在电脑上设置:Codync → 设置 → 电脑访问",
+ "No routines yet. Ask the bot for one, or set it up yourself with +.": "还没有例行任务。让 Bot 建一个,或点 + 自己设置。",
+ "Loading routines…": "正在加载例行任务…",
+ "No routines. c asks the bot for one; n sets one up here.": "还没有例行任务。按 c 让 Bot 建一个;按 n 在这里设置。",
+ "Close routines": "关闭例行任务",
+ "Choose project folder…": "选择项目文件夹…",
+ "If {agent} runs out of usage or can't answer, the bot carries on with the next one. Chat, memory and workspace carry over.": "如果 {agent} 用量用完或无法回答,Bot 会交给下一个继续。对话、记忆和工作区都会带过去。",
+ "{agent} in {path}": "{agent},在 {path}",
+ "{size} pt (Default)": "{size} pt(默认)",
+ "Show in notch": "在屏幕顶部显示",
+ "Show at top of screen": "在屏幕顶部显示",
+ "Privacy": "隐私",
+ "Full conversation": "完整对话",
+ "Settings": "设置",
+ "New session": "新会话",
+ "Delete bot": "删除 Bot",
+ "Delete group": "删除群聊",
+ "Memory": "记忆",
+ "About you": "关于你",
+ "This bot": "这个 Bot",
+ "Dreams": "梦境",
+ "No dreams yet.": "还没有梦境。",
+ "Load earlier messages": "加载更早的消息",
+ "Today": "今天",
+ "Yesterday": "昨天",
+ "Instructions": "指令",
+ "Standing instructions": "常驻指令",
+ "Rules that always apply. Put task-specific requests in the chat instead.": "一直生效的规则。针对某次任务的要求,写在对话里。",
+ "e.g. Reviews PRs. Never pushes without asking.": "例如:审阅 PR。未经询问不推送。",
+ "Agent": "智能体",
+ "Manage the team": "管理团队",
+ "Manage team": "管理团队",
+ "Let this bot create bots and change any bot's setup, its own included. The bots it creates can too.": "让这个 Bot 创建 Bot,并修改任何 Bot 的设置,包括它自己。它创建的 Bot 也可以。",
+ "Let this bot see the screen and use the mouse and keyboard. You can watch and take over from your phone.": "让这个 Bot 看屏幕,并用鼠标和键盘。你可以在手机上观看和接管。",
+ "Let this bot see the screen and use the mouse and keyboard.": "让这个 Bot 看屏幕,并用鼠标和键盘。",
+ "Let this bot see the screen and use the mouse and keyboard. On that computer, open Codync → Settings → Computer access to set up permissions first.": "让这个 Bot 看屏幕,并用鼠标和键盘。先在那台电脑上打开 Codync → 设置 → 电脑访问,完成权限设置。",
+ "Let this bot use apps. On that computer, open Codync → Settings → Computer access to set up permissions first.": "让这个 Bot 使用应用。先在那台电脑上打开 Codync → 设置 → 电脑访问,完成权限设置。",
+ "Connectors": "连接器",
+ "No connectors yet. Add GitHub, Linear, Notion and more from Extensions.": "还没有连接器。到「扩展」里添加 GitHub、Linear、Notion 等。",
+ "Skills": "技能",
+ "No skills yet. Get some from Extensions, or write your own.": "还没有技能。到「扩展」里找,或自己写。",
+ "Your coding agents, as teammates.": "你的编程智能体,像队友一样。",
+ "Pick a bot, or create one for each kind of work and point it at a project.": "选一个 Bot,或为每种工作新建一个,并指向一个项目。",
+ "Mark as Read": "标为已读",
+ "Edit Profile…": "编辑资料…",
+ "Copy conversation ID": "复制对话 ID",
+ "Hide from sidebar": "从侧边栏隐藏",
+ "The host isn't running": "Host 没有在运行",
+ "The background service didn't start. macOS couldn't load {path}.": "后台服务没有启动。macOS 无法加载 {path}。",
+ "The background service didn't start.": "后台服务没有启动。",
+ "Starting the host…": "正在启动 Host…",
+ "This takes a few seconds.": "需要几秒钟。",
+ "The host isn't responding. See the log for details.": "Host 没有响应。详情见日志。",
+ "Restart the manually started development host in its terminal.": "请在终端里重启手动启动的开发版 Host。",
+ "Another build of the host is running, not this app's. Try again to replace it.": "正在运行的是另一个版本的 Host,不是这个应用自带的。再试一次即可换上。",
+ "Your computer is ready": "这台电脑已就绪",
+ "Work in your apps with a bot, or access your screen from your phone. You choose which bots can use this computer.": "让 Bot 在你的应用里工作,或从手机查看屏幕。哪些 Bot 能用这台电脑,由你决定。",
+ "Let a bot work in your apps. You choose which bots can use this computer.": "让 Bot 在你的应用里工作。哪些 Bot 能用这台电脑,由你决定。",
+ "Waiting for your computer": "等待你的电脑",
+ "Start or restart the host from Codync’s menu to continue. We’ll check again automatically.": "从 Codync 的菜单启动或重启 Host 后继续。我们会自动再检查。",
+ "Codync Screen is missing": "找不到 Codync Screen",
+ "Install the full Codync desktop app to finish setup.": "安装完整的 Codync 桌面版以完成设置。",
+ "Couldn’t finish setup": "设置没有完成",
+ "All set": "全部就绪",
+ "{done} of {total} ready": "已就绪 {done} / {total}",
+ "Runs in the background to share your screen and connect your controls.": "在后台运行,用来共享屏幕并连接键鼠。",
+ "Needs approval": "需要批准",
+ "Starting…": "正在启动…",
+ "Start again": "重新启动",
+ "Enable Codync Screen": "启用 Codync Screen",
+ "Allow Codync to run in the background in Login Items.": "在「登录项」里允许 Codync 在后台运行。",
+ "Open Login Items": "打开登录项",
+ "Screen recording": "屏幕录制",
+ "Lets Codync see your screen, including anything visible in your apps.": "允许 Codync 看到你的屏幕,包括应用里正在显示的内容。",
+ "Allow screen recording": "允许屏幕录制",
+ "Control apps": "控制应用",
+ "Lets Codync click, type and interact with apps on your behalf.": "允许 Codync 代你点击、输入,并操作应用。",
+ "Allow computer control": "允许控制电脑",
+ "Screen sharing & control": "屏幕共享和控制",
+ "Choose a screen and allow mouse and keyboard access. You can stop sharing at any time.": "选择一块屏幕,并允许鼠标和键盘访问。你可以随时停止共享。",
+ "Choose screen and allow control": "选择屏幕并允许控制",
+ "Availability": "可用性",
+ "Computer control": "电脑控制",
+ "Bots can use apps on this computer. Remote screen viewing from your phone isn’t available on Windows yet.": "Bot 可以在这台电脑上使用应用。从手机远程看屏幕在 Windows 上还不可用。",
+ "Waiting for permission…": "正在等待权限…",
+ "In System Settings, look for": "在系统设置里找到",
+ "It may be listed under Device Control and Data Access or Accessibility.": "它可能列在「设备控制和数据访问」或「辅助功能」下面。",
+ "Return here after granting access; if asked, allow the helper to restart.": "授权后回到这里;如果询问,允许助手重新启动。",
+ "Open System Settings": "打开系统设置",
+ "Permissions stay on this computer. You can change them later in Settings → Computer access.": "权限只留在这台电脑上。之后可以在「设置 → 电脑访问」里修改。",
+ "Permissions stay on this computer. Your other computers keep their own permissions.": "权限只留在这台电脑上。其他电脑各自保留自己的权限。",
+ "On iPhone, connect with a QR code or Ask Access. No SSH setup needed.": "在 iPhone 上,用二维码或「请求访问」连接。不需要设置 SSH。",
+ "Set up later": "稍后设置",
+ "Needs access": "需要访问权限",
+ "Waiting": "等待中",
+ "Computer access setup": "电脑访问设置",
+ "Profile": "资料",
+ "Avatar": "头像",
+ "Name": "名称",
+ "Workspace": "工作区",
+ "Permissions": "权限",
+ "Ask me": "每次询问",
+ "Approve automatically": "自动批准",
+ "Activity": "活动",
+ "Get notified when this bot finishes or needs you": "这个 Bot 做完或需要你时通知你",
+ "This bot has its own space for files. It can work in other folders when you ask.": "这个 Bot 有自己的文件空间。你让它去别的文件夹时,它也能工作。",
+ "This project is the default starting folder. The bot can work elsewhere when you ask.": "这个项目是默认的起始文件夹。你让它去别处时,它也能工作。",
+ "Tool requests are approved automatically. Your agent's own settings (like Claude Code's permission rules) still apply.": "工具请求会自动批准。Agent 自己的设置(比如 Claude Code 的权限规则)仍然有效。",
+ "You'll get an approval card and a notification whenever the agent asks.": "Agent 每次请求时,你会收到一张批准卡片和一条通知。",
+ "What this bot learned about you.": "这个 Bot 了解到的关于你的事。",
+ "What this bot learned about you": "这个 Bot 了解到的关于你的事",
+ "What this bot learned about you. {used} of {cap} in use. To change it, tell the bot.": "这个 Bot 了解到的关于你的事。已用 {used} / {cap}。想改的话,告诉 Bot。",
+ "Your name, time zone, people and lasting preferences, shared by your bots. {used} of {cap} in use. To change it, tell the bot.": "你的名字、时区、重要的人和长期偏好,所有 Bot 共用。已用 {used} / {cap}。想改的话,告诉 Bot。",
+ "Nothing yet. What this bot learns about you shows up here.": "还没有。这个 Bot 了解到的关于你会显示在这里。",
+ "Nothing shared yet.": "还没有共享的内容。",
+ "Nothing shared yet. Facts every bot should know (your name, time zone, people) go here.": "还没有共享的内容。所有 Bot 该知道的事(你的名字、时区、重要的人)会在这里。",
+ "Said": "说了",
+ "Reply": "回复",
+ "Stopped.": "已停止。",
+ "Ask {name}": "问 {name}",
+ "Queue a message for {name}": "给 {name} 排一条消息",
+ "Ask everyone · @ to ask one bot": "问所有人 · 用 @ 问其中一个 Bot",
+ "Reply…": "回复…",
+ "Connected through Cloudflare": "经 Cloudflare 连接",
+ "Connected over Wi-Fi or Tailscale": "通过 Wi-Fi 或 Tailscale 连接",
+ "What this bot learned about you · {harness}'s own memory on · m turns it off": "这个 Bot 了解到的关于你的事 · {harness} 自己的记忆开着 · 按 m 关掉",
+ "What this bot learned about you · {harness}'s own memory off · m turns it on": "这个 Bot 了解到的关于你的事 · {harness} 自己的记忆关着 · 按 m 打开",
+ "Shared by your bots · s stops this bot using it": "所有 Bot 共用 · 按 s 让这个 Bot 停用",
+ "This bot doesn't use what your bots share · s turns it on": "这个 Bot 不用大家共享的内容 · 按 s 打开",
+ "Fallbacks": "备用",
+ "About fallbacks": "关于备用",
+ "Add fallback": "添加备用",
+ "In use": "使用中",
+ "Add": "添加",
+ "When this bot's agent runs out of usage, is rate limited, signed out or won't start, the next agent here carries on in the same chat, with the same memory and workspace. The bot goes back to its own agent when it recovers. A fallback that uses an API key costs money. To fall back between one agent's models, set that in the agent itself (Claude Code's fallbackModel).": "这个 Bot 的 agent 用量用完、被限速、退出登录或无法启动时,下一个 agent 会在同一个对话里接着做,记忆和工作区都不变。原来的 agent 恢复后,Bot 会回到它。用 API 密钥的备用会花钱。如果只是同一个 agent 的不同模型互相备用,请在 agent 自己里面设置(Claude Code 的 fallbackModel)。",
+ "Create template": "创建模板",
+ "Close details": "关闭详情",
+ "Using the computer": "正在使用电脑",
+ "Loading memory…": "正在加载记忆…",
+ "Between chats the bot tidies its memory from your own words.": "对话之间,Bot 会根据你自己的话整理记忆。",
+ "About dreaming": "关于整理记忆",
+ "Claude Code's own notes, read-only here.": "Claude Code 自己的笔记,这里只能看。",
+ "Save": "保存",
+ "Members": "成员",
+ "Add Member": "添加成员",
+ "Copy this bot’s settings to reuse as a template. Conversation history and conversation ID are excluded.": "复制这个 Bot 的设置,做成可复用的模板。不包括对话记录和对话 ID。",
+ "Includes workspace preferences and agent configuration.": "包括工作区偏好和智能体配置。",
+ "Edit Bot avatar": "编辑 Bot 头像",
+ "Saved securely on this computer. The bot types it into the sign-in page but never sees it.": "安全地存在这台电脑上。Bot 会把它填进登录页,但自己看不到内容。",
+ "Saved securely on this computer. Never added to the conversation.": "安全地存在这台电脑上。不会写进对话。",
+ "Encrypted on the connected computer.": "加密保存在已连接的电脑上。",
+ "Storage": "存储",
+ "Keychain": "钥匙串",
+ "Secret Service": "密钥服务",
+ "System credential store": "系统凭证库",
+ "Saved connections": "已保存的连接",
+ "Sign-ins": "登录",
+ "Website or app": "网站或应用",
+ "Username or email": "用户名或邮箱",
+ "Password": "密码",
+ "Password or op:// reference": "密码或 op:// 引用",
+ "Bots type these into the matching website or app and never see the password. You can use an op:// reference.": "Bot 会在对应的网站或应用里填入这些内容,看不到密码。也可以用 op:// 引用。",
+ "Connect a shared vault": "连接共享保险库",
+ "Service account token": "服务账号令牌",
+ "Paste": "粘贴",
+ "Paste your token": "粘贴令牌",
+ "Use a service account with read access only to a dedicated shared vault. The 1Password CLI must be installed on the computer.": "使用只读权限访问专用共享保险库的服务账号。电脑上需要安装 1Password CLI。",
+ "Composio API key": "Composio API 密钥",
+ "Get a key from Composio": "从 Composio 获取密钥",
+ "Composio signs you in to apps like Gmail and Slack and runs their tools for your bots. The key stays on {name}.": "Composio 帮你登录 Gmail、Slack 等应用,并替 Bot 运行它们的工具。密钥只留在 {name} 上。",
+ "Saved (paste to replace)": "已保存(粘贴以替换)",
+ "Bots lose the apps you connected until you add a key again.": "在重新添加密钥之前,Bot 会失去已连接的应用。",
+ "New skill": "新建技能",
+ "When to use it": "何时使用",
+ "The bot sees the name and when to use it, and reads the instructions only when a task fits.": "Bot 能看到名称和何时使用,只在任务合适时才读取指令。",
+ "Step by step, in plain words…": "用白话一步步写…",
+ "Command": "命令",
+ "Config": "配置",
+ "Runs": "运行方式",
+ "Add connector": "添加连接器",
+ "Hosted by {name}": "由 {name} 托管",
+ "On {name} ({kind})": "在 {name} 上({kind})",
+ "Setup": "设置",
+ "No setup needed.": "无需设置。",
+ "Keys are saved on {name} only.": "密钥只保存在 {name} 上。",
+ "No keys needed here. If {name} wants you to sign in, its sign-in page opens next.": "这里不需要密钥。如果 {name} 要求登录,接下来会打开它的登录页。",
+ " (optional)": "(可选)",
+ "Finish signing in to {name} in the browser…": "请在浏览器里完成 {name} 的登录…",
+ "Adding {name}…": "正在添加 {name}…",
+ "Runs on {name} in the bot's project folder. Quotes work like in a shell.": "在 {name} 上、Bot 的项目文件夹里运行。引号用法和 shell 一样。",
+ "A remote MCP server, streamable HTTP or SSE.": "远程 MCP 服务器,支持 streamable HTTP 或 SSE。",
+ "Paste the MCP config from a README or another app (Claude, Cursor, VS Code). Every server in it is added. Saved on {name} only.": "粘贴 README 或其他应用(Claude、Cursor、VS Code)里的 MCP 配置。里面的每个服务器都会添加。只保存在 {name} 上。",
+ "Paste the MCP config from a README or another app (Claude, Cursor, VS Code). Every server in it is added.": "粘贴 README 或其他应用(Claude、Cursor、VS Code)里的 MCP 配置。里面的每个服务器都会添加。",
+ "Headers": "请求头",
+ "Optional, one Name: value per line. Leave empty if the service has you sign in. Saved on {name} only.": "可选,每行一个 Name: value。如果服务会让你登录,就留空。只保存在 {name} 上。",
+ "Environment": "环境变量",
+ "One KEY=value per line. Saved on {name} only.": "每行一个 KEY=value。只保存在 {name} 上。",
+ "Enter only the values you want to replace. You can use an op:// reference.": "只填写要替换的内容。也可以用 op:// 引用。",
+ "No saved connection credentials yet.": "还没有保存的连接凭证。",
+ "Values stay hidden. Select a connection to replace its credentials.": "内容保持隐藏。选一个连接来更换它的凭证。",
+ "Connect": "连接",
+ "Disconnect": "断开",
+ "Use op://vault/item/field in a connector's credential field. Codync retrieves the value when the connector runs.": "在连接器的凭证栏填 op://vault/item/field。连接器运行时,Codync 会去取这个值。",
+ "Save sign-in": "保存登录",
+ "Save credentials": "保存凭证",
+ "Load more apps": "加载更多应用",
+ "Composio settings": "Composio 设置",
+ "Remove key": "移除密钥",
+ "Connected": "已连接",
+ "Open the sign-in page": "打开登录页",
+ "Waiting for you to finish signing in…": "等你完成登录…",
+ "Asking Composio…": "正在询问 Composio…",
+ "Some agents need it to run. Codync can add a copy just for them.": "有些智能体需要它才能运行。Codync 可以只为它们装一份。",
+ "Add Node.js": "添加 Node.js",
+ "Remove saved keys": "移除已保存的密钥",
+ "Added": "已添加",
+ "No instructions.": "没有说明。",
+ "Load more agents": "加载更多智能体",
+ "Credentials": "凭证",
+ "Connectors & skills": "连接器和技能",
+ "Search agents, connectors and skills": "搜索智能体、连接器和技能",
+ "Apps": "应用",
+ "Agents": "智能体",
+ "Gmail, Slack, GitHub, Notion and 1,000 more apps": "Gmail、Slack、GitHub、Notion 等 1,000 多个应用",
+ "Set up": "设置",
+ "Installed": "已安装",
+ "Not installed": "未安装",
+ "Needs Node.js": "需要 Node.js",
+ "Sets up on first use": "首次使用时设置",
+ "Agents matching “{query}”": "匹配“{query}”的智能体",
+ "Couldn't load connectors.": "无法加载连接器。",
+ "No connectors match “{query}”.": "没有匹配“{query}”的连接器。",
+ "Couldn't load apps.": "无法加载应用。",
+ "No apps match “{query}”.": "没有匹配“{query}”的应用。",
+ "Load more connectors": "加载更多连接器",
+ "Make your own": "自己添加",
+ "Custom connector": "自定义连接器",
+ "Any MCP server: a command or a URL": "任意 MCP 服务器:一条命令或一个网址",
+ "Your own skill": "自己的技能",
+ "Write instructions a bot can follow": "写一段 Bot 可以遵循的指令",
+ "{count} installed": "已安装 {count} 个",
+ "Connectors come from the official MCP Registry, apps through Composio, skills from Anthropic, agents from the ACP registry. Everything installs on {name}.": "连接器来自官方 MCP Registry,应用通过 Composio,技能来自 Anthropic,智能体来自 ACP registry。全部安装在 {name} 上。",
+ "Connectors come from the official MCP Registry, skills from Anthropic, agents from the ACP registry. Everything installs on {name}.": "连接器来自官方 MCP Registry,技能来自 Anthropic,智能体来自 ACP registry。全部安装在 {name} 上。",
+ "Node.js isn't on {name}": "{name} 上没有 Node.js",
+ "Couldn't load more connectors.": "无法加载更多连接器。",
+ "Couldn't load skills.": "无法加载技能。",
+ "Switch computer": "切换电脑",
+ "Computer: {name}": "电脑:{name}",
+ "not installed": "未安装",
+ "needs Node.js": "需要 Node.js",
+ "signed in": "已登录",
+ "not signed in": "未登录",
+ "installed": "已安装",
+ "sets up on first use": "首次使用时设置",
+ "↵ sign in": "↵ 登录",
+ "filter": "筛选",
+ "search the MCP registry": "搜索 MCP Registry",
+ "↵ searches the registry": "按 ↵ 搜索注册表",
+ "Some agents need it to run. Codync adds a copy just for them.": "有些智能体需要它才能运行。Codync 会只为它们添加一份。",
+ "Paste any MCP server's config": "粘贴任意 MCP 服务器的配置",
+ "Loading the registry…": "正在加载注册表…",
+ "tab switch · ↵ install / sign in · ^r refresh · esc close": "Tab 切换 · ↵ 安装 / 登录 · ^r 刷新 · Esc 关闭",
+ "tab switch · ↵ add / sign in · ^x remove · ^r refresh · esc": "Tab 切换 · ↵ 添加 / 登录 · ^x 移除 · ^r 刷新 · Esc",
+ "tab switch · ↵ details · ^x remove · esc close": "Tab 切换 · ↵ 详情 · ^x 移除 · Esc 关闭",
+ "Sign in": "登录",
+ "No matching time zones": "没有匹配的时区",
+ "e.g. Morning summary": "例如:早晨摘要",
+ "Describe what this bot should do each time it runs.": "写下这个 Bot 每次运行时要做的事。",
+ "Loading schedule…": "正在加载日程…",
+ "Run settings": "运行设置",
+ "A run is stopped after this long. 1 second to 24 hours.": "运行超过这个时间会被停下。1 秒到 24 小时。",
+ "Runs each time something is posted to its URL. Save to get the URL and key.": "每次有人向它的网址提交内容时运行。保存后会得到网址和密钥。",
+ "Set up by the bot. Pick Schedule or Webhook to replace it.": "由 Bot 设置。选「日程」或「Webhook」来替换。",
+ "minute hour day month weekday": "分 时 日 月 星期",
+ "Check schedule again": "重新检查日程",
+ "Retry loading schedule": "重试加载日程",
+ "Connect to this computer to save your routine.": "先连上这台电脑,才能保存例行任务。",
+ "Enter a name and instruction above to save.": "先在上面填写名称和说明,再保存。",
+ "Delete routine": "删除例行任务",
+ "Routines": "例行任务",
+ "Set up a routine": "设置例行任务",
+ "Ask the bot for a routine": "让 Bot 设置例行任务",
+ "Replace key": "更换密钥",
+ "Loading webhook…": "正在加载 Webhook…",
+ "End call": "结束通话",
+ "Key saved": "密钥已保存",
+ "Test key": "测试密钥",
+ "Add it in Codync on that computer: Computers & devices, then Voice chat.": "在那台电脑的 Codync 里添加:电脑和设备,然后是语音。",
+ "Rotate": "轮换",
+ "Fit screen": "适应屏幕",
+ "Displays": "显示器",
+ "Clipboard": "剪贴板",
+ "View only. To allow control, open Codync → Settings → Computer access on the computer.": "目前只能看。要允许控制,在电脑上打开 Codync → 设置 → 电脑访问。",
+ "Refreshing": "正在刷新",
+ "Everyone answers in turn. @mention a bot to ask just that one.": "大家轮流回复。@ 某个 Bot 就只问那一个。",
+ "Tell it what you need. You'll get a notification when it's done or needs you.": "告诉它你要做什么。完成或需要你时会收到通知。",
+ "Loading earlier messages": "正在加载更早的消息",
+ "Details": "详情",
+ "Jump to latest": "跳到最新",
+ "Cancel reply": "取消回复",
+ "Add files": "添加文件",
+ "Sending…": "正在发送…",
+ "Failed to send": "发送失败",
+ "Resend": "重新发送",
+ "Not sent — stopped": "未发送 — 已停止",
+ "Waiting for the computer to come online": "等待电脑上线",
+ "Don't send": "不发送",
+ "Delivered to the computer": "已送到电脑",
+ "Add a fallback": "添加备用",
+ "Nothing yet.": "还没有内容。",
+ "Thinking": "思考中",
+ "Plan": "计划",
+ "No messages yet.": "还没有消息。",
+ "What it carries": "它带着什么",
+ "Keep this conversation": "保留这个对话",
+ "Edit what it carries": "编辑它带着的内容",
+ "Review": "查看",
+ "Dynamic Island": "灵动岛",
+ "Lock Screen": "锁定屏幕",
+ "Compact": "紧凑",
+ "Minimal": "最小",
+ "The Dynamic Island shows the same Live Activity as the Lock Screen, so this switch turns off both.": "灵动岛和锁定屏幕用的是同一个实时活动,所以这个开关会同时关掉两边。",
+ "Starts when you send a task from this iPhone. Follow its progress, then open the conversation when your bot needs you.": "从这台 iPhone 发出任务时开始。可以看进度,Bot 需要你时再打开对话。",
+ "The bot in its mood, its current step in the state's color, the running time and a thinking orb. When the bot needs you, Review opens the request.": "显示 Bot 的状态、当前步骤(颜色跟着状态走)、已运行时间和一个思考球。需要你时,点「查看」打开请求。",
+ "The bot and a thinking orb beside the camera, outlined in the state's color. The orb becomes a check or warning when the task ends.": "摄像头旁边是 Bot 和一个思考球,描边颜色跟着状态走。任务结束时,球会变成对勾或警告。",
+ "Just the orb when iOS displays multiple Live Activities.": "iOS 同时显示多个实时活动时,只留下这个球。",
+ "Touch and hold the Dynamic Island for the current step and the running time, or Review when the bot needs you. Tap to open the conversation.": "按住灵动岛可看当前步骤和已运行时间。Bot 需要你时会显示「查看」。点一下打开对话。",
+ "Running the test suite.": "正在运行测试。",
+ "Review the proposed changes.": "查看提议的修改。",
+ "Failed": "失败",
+ "Waiting for update": "等待更新",
+ "Need you": "需要你",
+ "All quiet": "都很安静",
+ "No access": "没有访问权限",
+ "%d connected": "%d 台已连接",
+ "%d/%d connected": "%d/%d 台已连接",
+ "%d offline": "%d 台离线",
+ "Use what your bots share": "使用 Bot 共享的内容",
+ "Provider usage": "服务用量",
+ "Team": "团队",
+ "Small widget": "小号小组件",
+ "Medium widget": "中号小组件",
+ "Large widget": "大号小组件",
+ "Small shows the tightest limit. Medium shows two windows. Large adds a summary and up to four limits.": "小号显示最紧的额度。中号显示两个窗口。大号再加上摘要,最多四个额度。",
+ "Four bots as characters with a dot for each one at work. Touch and hold the widget, then Edit Widget to choose who sits in each spot; empty spots show the bots that need you first.": "四个 Bot 显示成角色,正在工作的旁边有个点。按住小组件,点编辑小组件,选每个位置放谁;空位会优先显示需要你的 Bot。",
+ "See who needs you and who's still working. Large shows up to six bots.": "看谁需要你、谁还在工作。大号最多显示六个 Bot。",
+ "Default": "默认",
+ "Couldn't sign in. Check your connection and try again.": "登录失败。检查网络后再试一次。",
+ "Couldn't sign out. Check your connection and try again.": "退出失败。检查网络后再试一次。",
+ "Couldn't switch accounts. Check your connection or sign in again.": "切换账户失败。检查网络,或重新登录。",
+ "Couldn't finish signing in. Please try again.": "登录没有完成。请再试一次。",
+ "Sign-in setup isn't finished yet. You can continue using local pairing.": "登录还没配置好。你可以继续用本机配对。",
+ "Apple sign-in needs additional verification. Your account is not signed in yet.": "Apple 登录还需要额外验证。账户还没有登录。",
+ "Google sign-in needs additional verification. Your account is not signed in yet.": "Google 登录还需要额外验证。账户还没有登录。",
+ "Apple sign-up needs additional account information. Your account is not signed in yet.": "Apple 注册还需要补充账户信息。账户还没有登录。",
+ "Google sign-up needs additional account information. Your account is not signed in yet.": "Google 注册还需要补充账户信息。账户还没有登录。",
+ "Sign in again to reach your account.": "重新登录后才能使用账户。",
+ "Codync account": "Codync 账户",
+ "Usage analytics": "用量分析",
+ "Features you use": "你使用的功能",
+ "Opening the app and its screens, setting up and pairing (and whether you allow notifications), creating or deleting a bot, sending a message (how many attachments, never the files), running a routine or a voice call, installing a connector. Each comes with the app version, the platform, and the bot's agent and model.": "打开应用和各个页面、设置和配对(以及你是否允许通知)、创建或删除 Bot、发送消息(附件有几个,不包括文件本身)、运行例行任务或语音通话、安装连接器。每条都会带上应用版本、平台,以及 Bot 的 agent 和模型。",
+ "Crashes and errors": "崩溃和错误",
+ "When Codync crashes or an agent fails to answer: the kind of error and where in Codync's own code it happened. Never the error's message; file paths are cut down to Codync's own files.": "Codync 崩溃,或 agent 无法回答时:错误的种类,以及发生在 Codync 自己代码的哪里。不包括错误信息本身;文件路径会缩短到只剩 Codync 自己的文件。",
+ "Approximate location": "大致位置",
+ "Country and city, looked up from your IP address. The IP address itself is never stored.": "根据 IP 地址查出的国家和城市。IP 地址本身不会保存。",
+ "Who it belongs to": "属于谁",
+ "Your Codync account when you're signed in, otherwise a random ID made on this device.": "已登录时是你的 Codync 账户,否则是这台设备上生成的一个随机 ID。",
+ "Never shared": "绝不会共享",
+ "Your messages, prompts, code, files, file names or paths, bot names, credentials, or anything your agents produce.": "你的消息、提示词、代码、文件、文件名或路径、Bot 名称、凭证,以及 agent 生成的任何内容。",
+ "How it's used": "如何使用",
+ "Only to spot bugs sooner and see which features work and where people get stuck. Never sold, never used for ads or to track you across other apps and websites.": "只用来更快发现 bug,以及看哪些功能有用、人们在哪里卡住。不会出售,不会用于广告,也不会用来在其他应用和网站上跟踪你。",
+ "Your choice": "由你决定",
+ "Each iPhone and each computer has its own switch. Turning it off stops sending right away and drops anything not sent yet.": "每台 iPhone 和每台电脑各有自己的开关。关掉后会立刻停止发送,还没发出去的也会丢掉。",
+ "Each phone and each computer has its own switch. Turning it off stops sending right away and drops anything not sent yet.": "每台手机和每台电脑各有自己的开关。关掉后会立刻停止发送,还没发出去的也会丢掉。",
+ "See the Privacy Policy for details.": "详情见隐私政策。",
+ "Privacy Policy": "隐私政策",
+ "See the": "详情见",
+ "for details.": "。",
+ "Touch and hold an empty spot on the Home Screen": "按住主屏幕的空白处",
+ "Tap Edit, then Add Widget": "点「编辑」,然后点「添加小组件」",
+ "Find Codync in the list": "在列表里找到 Codync",
+ "Tap Add Widget": "点「添加小组件」",
+ "Tap Done": "点「完成」",
+ "Batteries": "电池",
+ "Calendar": "日历",
+ "Fitness": "健身",
+ "Weather": "天气",
+ "See the Privacy Policy for details: ": "详情见隐私政策:",
+ "Steps check themselves as you finish them.": "做完一步,这里会自己打勾。",
+ "Session": "会话",
+ "Weekly": "每周",
+ "highest usage": "用量最高",
+ "Open Codync to connect a computer and check {provider} usage.": "打开 Codync,连接一台电脑后即可查看 {provider} 用量。",
+ "Open Codync to pair with your computer.": "打开 Codync,与你的电脑配对。",
+ "No usage reported yet.": "还没有用量报告。",
+ "resets": "重置于",
+ "Usage reported by your computer": "用量由你的电脑报告",
+ "after reset": "后重置",
+ "day unit": "天",
+ "hour unit": "小时",
+ "minute unit": "分",
+ "Resets": "重置",
+ "5-hour": "5 小时",
+ "Ready": "就绪",
+ "Review changes": "审阅改动",
+ "Running tests": "正在跑测试",
+ "Reviewer": "审阅",
+ "Builder": "构建",
+ "Docs": "文档",
+ "codync-host install keeps it running in the background.": "codync-host install 会让它在后台一直运行。",
+ "{name} isn't set up on this computer. {hint}": "{name} 还没有在这台电脑上设置好。{hint}",
+ "Check that it's installed on this computer.": "请确认它已经安装在这台电脑上。",
+ "Codync installs it automatically. Sign in to {name} on this computer first if it needs an account.": "Codync 会自动安装。如果需要账号,请先在这台电脑上登录 {name}。",
+ "Install Claude Code and run `claude auth login`.": "安装 Claude Code,然后运行 `claude auth login`。",
+ "Install Codex CLI and run `codex login --device-auth`.": "安装 Codex CLI,然后运行 `codex login --device-auth`。",
+ "Install Cursor CLI (curl https://cursor.com/install -fsS | bash) and run `cursor-agent login`.": "安装 Cursor CLI(curl https://cursor.com/install -fsS | bash),然后运行 `cursor-agent login`。",
+ "Install pi (npm install -g @earendil-works/pi-coding-agent), run `pi` and type /login.": "安装 pi(npm install -g @earendil-works/pi-coding-agent),运行 `pi`,然后输入 /login。",
+ "Install oh-my-pi (curl -fsSL https://omp.sh/install | sh -s -- --binary) and run `omp login`.": "安装 oh-my-pi(curl -fsSL https://omp.sh/install | sh -s -- --binary),然后运行 `omp login`。",
+ "Install OpenCode (curl -fsSL https://opencode.ai/install | bash) and run `opencode auth login`.": "安装 OpenCode(curl -fsSL https://opencode.ai/install | bash),然后运行 `opencode auth login`。",
+ "Install Grok Build (curl -fsSL https://x.ai/cli/install.sh | bash) and run `grok login --device-auth`.": "安装 Grok Build(curl -fsSL https://x.ai/cli/install.sh | bash),然后运行 `grok login --device-auth`。",
+ "Install Gemini CLI (npm install -g @google/gemini-cli) and run `gemini` to sign in with Google.": "安装 Gemini CLI(npm install -g @google/gemini-cli),然后运行 `gemini`,用 Google 登录。",
+ "Install Copilot CLI (curl -fsSL https://gh.io/copilot-install | bash) and run `copilot login`.": "安装 Copilot CLI(curl -fsSL https://gh.io/copilot-install | bash),然后运行 `copilot login`。",
+ "Install Qwen Code (its standalone installer), run `qwen` and type /auth.": "安装 Qwen Code(它的独立安装程序),运行 `qwen`,然后输入 /auth。",
+ "Install goose and run `goose configure`.": "安装 goose,然后运行 `goose configure`。",
+ "Install Kimi Code (curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash) and run `kimi login`.": "安装 Kimi Code(curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash),然后运行 `kimi login`。",
+ "Install Droid (curl -fsSL https://app.factory.ai/cli | sh) and sign in with `droid`.": "安装 Droid(curl -fsSL https://app.factory.ai/cli | sh),然后用 `droid` 登录。",
+ "Install Amp (curl -fsSL https://ampcode.com/install.sh | bash) and run `amp login`.": "安装 Amp(curl -fsSL https://ampcode.com/install.sh | bash),然后运行 `amp login`。",
+ "Install Kilo CLI (npm install -g @kilocode/cli) and run `kilo auth login`.": "安装 Kilo CLI(npm install -g @kilocode/cli),然后运行 `kilo auth login`。",
+ "Install Cline CLI (npm install -g cline) and run `cline auth`.": "安装 Cline CLI(npm install -g cline),然后运行 `cline auth`。",
+ "Install Auggie (npm install -g @augmentcode/auggie) and run `auggie login`.": "安装 Auggie(npm install -g @augmentcode/auggie),然后运行 `auggie login`。",
+ "Install Mistral Vibe (curl -LsSf https://mistral.ai/vibe/install.sh | bash) and run `vibe --setup`.": "安装 Mistral Vibe(curl -LsSf https://mistral.ai/vibe/install.sh | bash),然后运行 `vibe --setup`。",
+ "Install Kiro CLI (curl -fsSL https://cli.kiro.dev/install | bash) and run `kiro-cli login`.": "安装 Kiro CLI(curl -fsSL https://cli.kiro.dev/install | bash),然后运行 `kiro-cli login`。",
+ "Install the Devin CLI (curl -fsSL https://cli.devin.ai/install.sh | bash) and run `devin auth login`.": "安装 Devin CLI(curl -fsSL https://cli.devin.ai/install.sh | bash),然后运行 `devin auth login`。",
+ "Install Qoder CLI (curl -fsSL https://qoder.com/install | bash) and run `qodercli login`.": "安装 Qoder CLI(curl -fsSL https://qoder.com/install | bash),然后运行 `qodercli login`。",
+ "Install CodeBuddy Code (npm install -g @tencent-ai/codebuddy-code) and sign in with `codebuddy`.": "安装 CodeBuddy Code(npm install -g @tencent-ai/codebuddy-code),然后用 `codebuddy` 登录。",
+ "Install MiniMax Code (npm install -g @minimax-ai/code) and run `mcode login`.": "安装 MiniMax Code(npm install -g @minimax-ai/code),然后运行 `mcode login`。",
+ "Install Junie (curl -fsSL https://junie.jetbrains.com/install.sh | bash) and sign in with `junie`.": "安装 Junie(curl -fsSL https://junie.jetbrains.com/install.sh | bash),然后用 `junie` 登录。",
+ "Install the Antigravity CLI (curl -fsSL https://antigravity.google/cli/install.sh | bash) and sign in with `agy`.": "安装 Antigravity CLI(curl -fsSL https://antigravity.google/cli/install.sh | bash),然后用 `agy` 登录。",
+ "Install Cortex Code (curl -LsS https://ai.snowflake.com/static/cc-scripts/install.sh | sh) and set up a connection with `cortex`.": "安装 Cortex Code(curl -LsS https://ai.snowflake.com/static/cc-scripts/install.sh | sh),然后用 `cortex` 设置连接。",
+ "Install Poolside (curl -fsSL https://downloads.poolside.ai/pool/install.sh | sh) and run `pool login`.": "安装 Poolside(curl -fsSL https://downloads.poolside.ai/pool/install.sh | sh),然后运行 `pool login`。",
+ "Couldn't load models: {error}": "无法加载模型:{error}",
+ "A memory of its own": "它自己的记忆",
+ "Remembered twice": "记了两次",
+ "Forgetting": "忘记",
+ "Where to see it": "在哪里看",
+ "{name} keeps notes apart from Codync's memory. It's off by default, so this bot has one memory and you see all of it here.": "{name} 的笔记和 Codync 的记忆是分开的。默认关闭,所以这个 Bot 只有一份记忆,你在这里能全部看到。",
+ "With both on, the bot may save the same thing twice, and the two can disagree after something changes.": "两个都开着时,Bot 可能把同一件事存两遍,之后有变动时两边还会对不上。",
+ "What the bot forgets in Codync stays in {name}'s notes. Codync can't change them.": "Bot 在 Codync 里忘掉的内容,仍留在 {name} 的笔记里。Codync 改不了那些笔记。",
+ "Its notes show read-only under the {name} tab.": "它的笔记在 {name} 标签下只读显示。",
+ "Codync can't show it; look in {name} itself.": "Codync 显示不了,请到 {name} 自己里面看。",
+ "Dreaming": "梦境",
+ "{name}'s own memory": "{name} 自己的记忆",
+ "About {name}'s own memory": "关于 {name} 自己的记忆",
+ "Turn on {name}'s own memory?": "打开 {name} 自己的记忆?",
+ "Tidying between chats": "对话之间整理",
+ "Adds and takes out": "添加和删去",
+ "Only your words": "只取你的原话",
+ "Kept apart": "单独进行",
+ "A record": "一份记录",
+ "After five quiet minutes or eight messages, the bot reads what you said since its last run and updates its memory.": "安静五分钟,或再过八条消息之后,Bot 会读上一次以来你说过的话,并更新记忆。",
+ "Green lines are memories it added. Red lines are ones it took out because they went out of date or moved into a note. It can also add a line to a note.": "绿行是它添加的记忆。红行是它删掉的,因为过时了,或移进了一条笔记。它也可以往笔记里加一行。",
+ "What it adds quotes something you typed yourself; pasted text, the bot's replies and other bots don't count. It never changes what you wrote. It may also put a passed date in the past tense, or move a detail into a note when memory is full.": "它添加的内容引用你亲手打出来的话;粘贴的文字、Bot 的回复和其他 Bot 都不算。它不会改你写过的内容。日期过了,它也可能改成过去时,或者在记忆满了的时候把一条细节移进笔记。",
+ "It runs in its own session, away from the chat, and fixed checks decide what it may save.": "它在自己的会话里运行,离开当前对话,由固定的检查决定可以保存什么。",
+ "This tab only shows what it did. To change a memory, tell the bot.": "这个标签只显示它做了什么。要改一条记忆,直接告诉 Bot。",
+ "Your bots run there. This phone is how you talk to them.": "你的 Bot 在那里运行。这台手机是你和它们说话的地方。",
+ "Saved (type to replace)": "已保存(输入以替换)",
+ "Next {when}": "下次 {when}",
+ "The terminal couldn't load. Update Android System WebView, then try again.": "终端加载不了。请更新 Android System WebView,然后再试。",
+ "The Codync cloud is off, so only this computer can send to it.": "Codync 云已关闭,所以只有这台电脑能向它发送。",
+ "POST with Authorization: Bearer <key>. For GitHub, use content type application/json and the key as the secret. Deliveries wait up to 72 hours while this computer is off. They pass through the Codync cloud, which can read them.": "用 POST,请求头为 Authorization: Bearer <key>。GitHub 请把内容类型设为 application/json,并把密钥当作 secret。这台电脑关机时,投递最多等待 72 小时。它们会经过 Codync 云,云端可以读到内容。",
+ "↑↓ move · ↵ run · esc back": "↑↓ 移动 · ↵ 执行 · esc 返回",
+ "A bot has an update.": "有 Bot 更新了。",
+ "A group has no memory of its own": "群聊没有自己的记忆",
+ "A group has no session of its own": "群聊没有自己的会话",
+ "ACP command, e.g. my-agent --acp": "ACP 命令,例如 my-agent --acp",
+ "API key": "API 密钥",
+ "Access request": "访问请求",
+ "Account menu": "账户菜单",
+ "Add SSH computer": "添加 SSH 电脑",
+ "Add memory": "添加记忆",
+ "Add reaction": "添加回应",
+ "Add to Home Screen": "添加到主屏幕",
+ "Agent setup terminal": "智能体设置终端",
+ "Agents refreshed": "智能体已刷新",
+ "Allow camera": "允许相机",
+ "Android chooses how Live updates appear based on your device and other tasks. These previews don't start one. Approvals are handled inside Codync.": "Android 会按你的设备和正在做的事决定实时更新怎么显示。这些预览不会真的发起一个。批准在 Codync 里处理。",
+ "Automatically check for updates": "自动检查更新",
+ "Automatically download and install": "自动下载并安装",
+ "Bot conversations are read-only": "Bot 之间的对话是只读的",
+ "Call settings": "通话设置",
+ "Camera settings": "相机设置",
+ "Checking for a saved account…": "正在查找已保存的账户…",
+ "Choose a bot": "选择一个 Bot",
+ "Choose key file": "选择密钥文件",
+ "Claude Code and Codex limits show up here once a bot has used them.": "Bot 用过之后,Claude Code 和 Codex 的限额会显示在这里。",
+ "Codync Screen": "Codync Screen",
+ "Codync is free and open source. A star on GitHub is how other people find it.": "Codync 免费且开源。在 GitHub 上加一颗星,别人就能找到它。",
+ "Codync opens an SSH tunnel to codync-host on that computer's loopback. It uses your SSH config and ssh-agent; agent forwarding stays off.": "Codync 通过 SSH 隧道连到那台电脑本机的 codync-host。它使用你的 SSH 配置和 ssh-agent,不会开启代理转发。",
+ "Connect this computer to create the bot.": "先连上这台电脑,才能创建 Bot。",
+ "Connection request updated": "连接请求已更新",
+ "Conversation details": "对话详情",
+ "Copied the last reply": "已复制上一条回复",
+ "Copy install command": "复制安装命令",
+ "Copy pairing link": "复制配对链接",
+ "Copy selection": "复制选中内容",
+ "Create your first bot in Codync.": "在 Codync 里创建你的第一个 Bot。",
+ "Credential or op:// reference": "凭证或 op:// 引用",
+ "Custom command": "自定义命令",
+ "Delete routine?": "删除例行任务?",
+ "Download cancelled · f retries": "下载已取消 · f 重试",
+ "Downloading… · f cancels": "正在下载… · f 取消",
+ "Edit the handoff": "编辑交接",
+ "Enjoying Codync?": "喜欢 Codync 吗?",
+ "Finish in the browser, then ^r refreshes": "在浏览器里完成后,按 ^r 刷新",
+ "Finish signing in in the browser on this computer": "在这台电脑的浏览器里完成登录",
+ "Forgetting something in Codync doesn't reach it.": "在 Codync 里忘掉的内容,到不了那里。",
+ "Get Codync for mobile": "获取手机版 Codync",
+ "Get a key": "获取密钥",
+ "Group chat": "群聊",
+ "Help & documentation": "帮助与文档",
+ "Host installed; connecting…": "Host 已安装,正在连接…",
+ "Installing the host…": "正在安装 Host…",
+ "Installing the skill…": "正在安装技能…",
+ "It may store things twice; the two memories can disagree.": "它可能存两遍,两份记忆会对不上。",
+ "It stops running.": "它会停止运行。",
+ "Let account devices in without a code?": "允许账户里的设备不输入验证码就进入?",
+ "Live updates on your Lock Screen": "在锁屏上显示实时更新",
+ "Loading history…": "正在加载历史…",
+ "Longer leaves time to think mid-sentence.": "长一点,方便你在句子中间想一想。",
+ "Memory history": "记忆历史",
+ "Message a bot": "给 Bot 发消息",
+ "More message actions": "更多消息操作",
+ "Name your bot": "给你的 Bot 起个名字",
+ "New code": "新验证码",
+ "No failed routine run to try again here": "这里没有失败的例行任务可以重试",
+ "No files on that message": "那条消息没有文件",
+ "No matching bots": "没有匹配的 Bot",
+ "No message to reply to yet": "还没有可以回复的消息",
+ "No other computers in your account yet.": "你的账户里还没有其他电脑。",
+ "No pending connection request here": "这里没有待处理的连接请求",
+ "No reply to copy": "没有可以复制的回复",
+ "No usage information yet.": "还没有用量信息。",
+ "No usage yet.": "还没有用量。",
+ "No usage yet. Open Codync to refresh.": "还没有用量。打开 Codync 刷新。",
+ "None yet. Pair an iPhone, or approve one from your account.": "还没有。配对一台 iPhone,或从账户里批准一台。",
+ "Not now": "暂时不要",
+ "Not working right now": "现在不可用",
+ "Nothing running right now.": "现在没有在运行的。",
+ "Nothing yet. Claude Code's notes show up here once it saves some.": "还没有。Claude Code 存了笔记之后,会显示在这里。",
+ "Older versions": "更早的版本",
+ "On device": "在本机",
+ "On this Android version a task shows as an ongoing notification. Live updates and the status bar chip need Android 16 QPR1.": "在这个 Android 版本上,任务显示为一条持续通知。实时更新和状态栏标记需要 Android 16 QPR1。",
+ "Only a routine that runs on a webhook has a URL and key": "只有通过 webhook 运行的例行任务才有网址和密钥",
+ "Only messages take replies": "只有消息可以回复",
+ "Open Android settings": "打开 Android 设置",
+ "Open Codync": "打开 Codync",
+ "Open account menu for Account": "打开账户菜单",
+ "Open conversation": "打开对话",
+ "Opening the terminal…": "正在打开终端…",
+ "Other computers in your account": "账户里的其他电脑",
+ "Other sign-in options": "其他登录方式",
+ "Over SSH": "通过 SSH",
+ "Pair iPhone": "配对 iPhone",
+ "Push isn't set up in this build. Bots and chats still update while Codync is open.": "这个版本没有设置推送。Codync 打开时,Bot 和对话仍会更新。",
+ "Reach from anywhere": "随时随地连接",
+ "Reconnect to this computer to save settings.": "重新连接这台电脑后才能保存设置。",
+ "Replace the key?": "更换密钥?",
+ "Report an issue": "报告问题",
+ "Reset all data?": "重置全部数据?",
+ "Reset everything": "全部重置",
+ "Revoke access": "撤销访问",
+ "Routines belong to a bot, not a group": "例行任务属于 Bot,不属于群聊",
+ "Runs each time something is posted to its URL.": "每次有内容发到它的网址时运行。",
+ "Saved securely; never added to chat. Esc closes.": "安全保存,不会写进对话。Esc 关闭。",
+ "Saving…": "正在保存…",
+ "Search bots": "搜索 Bot",
+ "Search widgets": "搜索小组件",
+ "Senders using the current key stop working until they get the new one.": "还在用当前密钥的发送方会失效,直到它们拿到新密钥。",
+ "Senders using the current key stop working.": "还在用当前密钥的发送方会失效。",
+ "Sending… Your draft stays here until delivered.": "正在发送…送达之前,草稿会留在这里。",
+ "Session timeline": "会话时间线",
+ "Set by bot": "由 Bot 设置",
+ "Show what it did": "显示它做了什么",
+ "Sign in on the page that opened. This updates by itself when you're done.": "在打开的页面上登录。完成后这里会自己更新。",
+ "Sign in to see the other computers in your account.": "登录后才能看到账户里的其他电脑。",
+ "Sign-in link copied: open it on this computer, then ^r refreshes": "登录链接已复制:在这台电脑上打开,然后按 ^r 刷新",
+ "Skip the 6-digit check": "跳过 6 位验证码",
+ "Skip the check": "跳过验证",
+ "Star Codync on GitHub": "在 GitHub 上给 Codync 加星",
+ "Star on GitHub": "在 GitHub 上加星",
+ "Start a new session?": "开始新会话?",
+ "Starting the sign-in…": "正在开始登录…",
+ "Stopping…": "正在停止…",
+ "That choice isn't offered; use 1–9": "没有这个选项,请用 1–9",
+ "That computer isn't in your account.": "那台电脑不在你的账户里。",
+ "The agent forgets this conversation's context.": "智能体会忘掉这段对话的上下文。",
+ "The conversation stays here, but the agent starts with a fresh context.": "对话还在,但智能体会从一个新的上下文开始。",
+ "The host is missing": "找不到 Host",
+ "The host is up to date.": "Host 已是最新。",
+ "The language you speak in calls.": "你在通话里说的语言。",
+ "The new one is copied in a curl command.": "新的密钥已经放进一条 curl 命令里。",
+ "The transcript stays here.": "记录会留在这里。",
+ "This connection request needs a newer app.": "这个连接请求需要更新的应用。",
+ "This deletes the routine and stops its future runs. This can't be undone.": "这会删除这个例行任务,并停掉以后的运行。无法撤销。",
+ "Time zone": "时区",
+ "Time zones": "时区",
+ "Timeout in seconds": "超时(秒)",
+ "Trust and connect": "信任并连接",
+ "Try again on this computer": "在这台电脑上再试一次",
+ "Trying it again": "正在重试",
+ "Use + to create a bot.": "用 + 创建一个 Bot。",
+ "Use ssh-agent": "使用 ssh-agent",
+ "View conversation details": "查看对话详情",
+ "What it already posted stays in the chat.": "它已经发出去的内容会留在对话里。",
+ "What the new conversation should know": "新对话需要知道的事",
+ "What this group works on": "这个群聊在做什么",
+ "When to run": "何时运行",
+ "Your bots will appear once a computer is connected.": "连上一台电脑之后,你的 Bot 会显示在这里。",
+ "Your launcher couldn't add it. Add it from the Home Screen instead.": "启动器加不了。请改从主屏幕添加。",
+ "Your next message starts a fresh conversation that begins with this.": "你的下一条消息会开始一段新对话,并以这段话开头。",
+ "Your next message starts a fresh conversation that begins with this. ⇧↵ new line, ↵ saves.": "你的下一条消息会开始一段新对话,并以这段话开头。⇧↵ 换行,↵ 保存。",
+ "esc then s stops the bot": "先按 esc,再按 s 停止 Bot",
+ "q quits": "q 退出",
+ "· now": "· 现在",
+ "Install Codync Dev on {name} and open it once. On Linux, install the development host as ~/.local/bin/codync-dev-host.": "在 {name} 上安装 Codync Dev 并打开一次。Linux 上请把开发用的 host 装成 ~/.local/bin/codync-dev-host。",
+ "codync-host isn't installed on {name}. Install it there:": "{name} 上还没有安装 codync-host。请在那里安装:",
+ "Version {version} is available: run codync-host update": "已有 {version}:请运行 codync-host update",
+ "Download failed: {error}": "下载失败:{error}",
+ "{error} Draft kept; Enter retries, Ctrl+C clears text.": "{error} 草稿还在;Enter 重试,Ctrl+C 清空文字。",
+ "1 s": "1 秒",
+ "1.5 s": "1.5 秒",
+ "2.5 s": "2.5 秒",
+ "At minute": "在这一分钟",
+ "Reading speed": "朗读速度",
+ "Send after a pause of": "停顿这么久之后发送",
+ "Created by": "创建者",
+ "Devices that were approved through the account lose access. Devices paired with a QR code keep it.": "通过账户批准的设备会失去访问。用二维码配对的设备仍然保留。",
+ "It disconnects right away and has to pair or ask again.": "它会立刻断开,之后必须重新配对或再次请求。",
+ "Authorization: Bearer …": "Authorization: Bearer …",
+ "API_KEY=…": "API_KEY=…",
+ "Claude Subscription": "Claude 订阅",
+ "Use Claude subscription": "使用 Claude 订阅",
+ "Anthropic Console": "Anthropic 控制台",
+ "Use Anthropic Console (API usage billing)": "使用 Anthropic 控制台(按 API 用量计费)",
+ "Log in with Claude": "使用 Claude 登录",
+ "Run `claude /login` in the terminal": "在终端里运行 `claude /login`",
+ "API Key": "API 密钥",
+ "Use an API key to authenticate": "使用 API 密钥登录",
+ "Use ChatGPT to authenticate": "使用 ChatGPT 登录",
+ "ChatGPT (device code)": "ChatGPT(设备码)",
+ "Sign in to ChatGPT by opening a verification page and entering a one-time code": "打开验证页面,输入一次性验证码,以登录 ChatGPT",
+ "Support": "支持",
+ "Voice": "语音",
+ "Engine": "引擎",
+ "Normal": "正常",
+ "Slower": "较慢",
+ "Faster": "较快",
+ "Realtime": "实时",
+ "Speech": "语音识别",
+ "Mode": "模式",
+ "Version": "版本",
+ "this Mac": "这台 Mac",
+ "this computer": "这台电脑",
+ "On-device speech, on this computer. Applies from the next call.": "使用这台电脑上的本机语音。下次通话起生效。",
+ "Apple speech, on this device. Applies from the next call.": "使用这台设备上的 Apple 语音。下次通话起生效。",
+ "Android speech, on this device. Applies from the next call.": "使用这台设备上的 Android 语音。下次通话起生效。",
+ "Your own {name} key, billed by {name}. Applies from the next call.": "使用你自己的 {name} 密钥,由 {name} 计费。下次通话起生效。",
+ "Reachable from anywhere through Cloudflare (encrypted).": "通过 Cloudflare 随时随地连接(已加密)。",
+ "Off: only Wi-Fi and Tailscale reach it, nothing goes through Cloudflare.": "关闭:只有 Wi-Fi 和 Tailscale 能连上,不会经过 Cloudflare。",
+ "Connecting to Cloudflare…": "正在连接 Cloudflare…",
+ "Sign in to add it to your account": "登录后把它加入你的账户",
+ "Not in your account": "不在你的账户里",
+ "In {name} account": "在 {name} 的账户里",
+ "another": "另一个",
+ "Add to account": "加入账户",
+ "Adding…": "正在添加…",
+ "Devices on your account get in on their own.": "你账户里的设备会自己进入。",
+ "Each new device shows a code you approve here.": "每台新设备都会显示一个验证码,由你在这里批准。",
+ "Devices that can use {name}": "可以使用 {name} 的设备",
+ "Paired with a QR code": "通过二维码配对",
+ "Paired with a QR code · seen {when}": "通过二维码配对 · {when} 见过",
+ "Paired with a QR code · connected": "通过二维码配对 · 已连接",
+ "Approved through the account": "通过账户批准",
+ "Approved through the account · seen {when}": "通过账户批准 · {when} 见过",
+ "Approved through the account · connected": "通过账户批准 · 已连接",
+ "connected": "已连接",
+ "Offline · seen {when}": "离线 · {when} 见过",
+ "Older copy": "较早的副本",
+ "Older copy · last seen {when}": "较早的副本 · 上次出现 {when}",
+ "Older copy of this computer": "这台电脑较早的副本",
+ "Older copy of this computer · last seen {when}": "这台电脑较早的副本 · 上次出现 {when}",
+ "Older copy of this computer · {status}": "这台电脑较早的副本 · {status}",
+ "Updates are available in release builds.": "正式版才会提供更新。",
+ "Last checked {when}": "上次检查 {when}",
+ "Run bots on another computer you reach with SSH. It needs codync-host installed; your SSH keys stay on {name}.": "在另一台你能用 SSH 连上的电脑上运行 Bot。那台电脑需要安装 codync-host;SSH 密钥留在{name}。",
+ "Sent when you pause, replies read aloud.": "你停顿后发送,回复会朗读出来。",
+ "A live conversation. Talk over replies.": "实时对话。可以在回复时插话。",
+ "Remove {name} from the account?": "从账户移除 {name}?",
+ "Revoke {name}?": "撤销 {name} 的访问?",
+ "Remove the older {name}?": "移除较早的 {name}?",
+ "It's an earlier identity of {name} and can't be reached anymore. Removing it only cleans up your account.": "这是 {name} 较早的身份,已经连不上了。移除它只是清理你的账户。",
+ "Any device signed in to your account gets full control of {name}: its files, terminals and bots, with no check here. If someone gets into your account, or Codync's cloud is ever compromised, they could add their own device and you'd have no chance to stop it. Devices paired with a QR code aren't affected.": "登录了你账户的任何设备都能完全控制 {name}:它的文件、终端和 Bot,这里不会再核对。如果有人进入你的账户,或 Codync 的云被攻破,对方可以自己加一台设备,你没有机会拦住。用二维码配对的设备不受影响。",
+ "Pair iPhone with {name}": "让 iPhone 与 {name} 配对",
+ "Waiting for your OK on the computer · {code}": "等你在电脑上确认 · {code}",
+ "Online · A request is waiting": "在线 · 有一个请求在等待",
+ "Offline · A request is waiting": "离线 · 有一个请求在等待",
+ "Online · In your account": "在线 · 在你的账户里",
+ "Offline · In your account": "离线 · 在你的账户里",
+ "Open {name}": "打开 {name}",
+ "Quit {name}": "退出 {name}",
+ "Pair iPhone…": "配对 iPhone…",
+ "Remote screen": "远程屏幕",
+ "Version {version}": "版本 {version}",
+ "Text Size": "文字大小",
+ "Restart host": "重启 Host",
+ "Open log": "打开日志",
+ "Uninstall host service": "卸载 Host 服务",
+ "Reset all data…": "重置全部数据…",
+ "Host not found": "找不到 Host",
+ "Host not installed": "Host 未安装",
+ "Host problem": "Host 出了问题",
+ "Rebuild Codync Dev with its development host.": "请用开发版 Host 重新编译 Codync Dev。",
+ "Reinstall Codync or install the host with Homebrew.": "请重新安装 Codync,或用 Homebrew 安装 Host。",
+ "Copy host install command": "复制 Host 安装命令",
+ "Install host": "安装 Host",
+ "Review access request from {name}…": "查看来自 {name} 的访问请求…",
+ "Stop task": "停止任务",
+ "Enable remote screen": "启用远程屏幕",
+ "Set up computer access…": "设置电脑访问…",
+ "Restarting…": "正在重启…",
+ "Restart to update": "重启以更新",
+ "Downloading… {percent}%": "正在下载… {percent}%",
+ "Update to {version}": "更新到 {version}",
+ "Retry installing update": "重试安装更新",
+ "{count} bot working": "{count} 个 Bot 正在工作",
+ "{count} bots working": "{count} 个 Bot 正在工作",
+ "Needs your response": "需要你回复",
+ "A bot needs you": "有 Bot 需要你",
+ "A device asks for access": "有设备请求访问",
+ "Control this Mac from your iPhone": "从 iPhone 控制这台 Mac",
+ "Control this computer from your iPhone": "从 iPhone 控制这台电脑",
+ "Needs approval in System Settings": "需要在系统设置里批准",
+ "Starting Codync Screen…": "正在启动 Codync Screen…",
+ "Needs permission": "需要权限",
+ "Your phone is viewing": "你的手机正在查看",
+ "{count} viewers": "{count} 人正在查看",
+ "{name} is using it": "{name} 正在使用",
+ "Ready · {display}": "就绪 · {display}",
+ "Computer access is ready.": "电脑访问已就绪。",
+ "Connecting to the screen…": "正在连接屏幕…",
+ "Reconnecting…": "正在重新连接…",
+ "This computer is offline.": "这台电脑离线了。",
+ "Update Codync on your computer to use its screen from here.": "请先更新电脑上的 Codync,才能在这里使用它的屏幕。",
+ "Set up Computer access in Codync on the computer.": "请先在电脑上的 Codync 里设置电脑访问。",
+ "On the computer, open Codync → Settings → Computer access. Permissions are set separately on each computer.": "在电脑上打开 Codync → 设置 → 电脑访问。每台电脑的权限要单独设置。",
+ "Remote screen is off. {setup}": "远程屏幕已关闭。{setup}",
+ "Codync Screen is not running. {setup}": "Codync Screen 没有在运行。{setup}",
+ "Choose a screen and allow control in the system sharing dialog. {setup}": "在系统共享对话框里选择屏幕并允许控制。{setup}",
+ "Allow screen recording for {name}. {setup}": "请允许 {name} 进行屏幕录制。{setup}",
+ "Allow computer control for {name}. macOS may call this Device Control and Data Access or Accessibility. {setup}": "请允许 {name} 控制电脑。macOS 可能把它叫作“设备控制和数据访问”或“辅助功能”。{setup}",
+ "Remote screen viewing is not available on Windows yet. Bots can still use apps on that computer.": "从手机远程看屏幕在 Windows 上还不可用。Bot 仍然可以在那台电脑上使用应用。",
+ "listing skills on GitHub: {error}": "无法列出 GitHub 上的技能:{error}",
+ "{url} answered {status}": "{url} 返回了 {status}",
+ "Theme": "主题",
+ "Light": "浅色",
+ "Dark": "深色",
+ "Only changes appearance on this device.": "只改变这台设备的外观。",
+ "Continue on this Mac": "在这台 Mac 上继续",
+ "Continue on this computer": "在这台电脑上继续",
+ "Sign-in isn't configured in this build. You can still use Codync on this Mac.": "这个版本没有配置登录。你仍可以在这台 Mac 上使用 Codync。",
+ "Sign-in isn't configured in this build. You can still use Codync on this computer.": "这个版本没有配置登录。你仍可以在这台电脑上使用 Codync。",
+ "Show in Notch": "在屏幕顶部显示",
+ "Voice input shortcut": "语音输入快捷键",
+ "Talk to a bot from any app, then tap the key once more to send.": "在任何应用里对 Bot 说话,再按一次这个键就发送。",
+ "Right ⌘ twice": "右 ⌘ 两次",
+ "Left ⌘ twice": "左 ⌘ 两次",
+ "Tip: double-tap {key} to talk from any app, then tap it once to send.": "提示:连按两次{key},就能在任何应用里说话,再按一次就发送。",
+ "the right ⌘": "右侧 ⌘",
+ "the left ⌘": "左侧 ⌘",
+ "{name} (not installed)": "{name}(未安装)",
+ "Copy template": "复制模板",
+ "Siri and Dictation are disabled": "Siri 和听写已关闭",
+ "the Codync cloud refused ({status} {code}): {message}": "Codync 云拒绝了({status} {code}):{message}",
+ "forbidden": "禁止",
+ "Sign in on the computer to use remote screen relay.": "请先在电脑上登录,才能使用远程屏幕中继。",
+ "Remote screen relay is not configured on this cloud.": "这台云没有配置远程屏幕中继。",
+ "Remote screen relay is temporarily unavailable. Try again shortly.": "远程屏幕中继暂时不可用。请稍后再试。",
+ "Too many screen connections. Try again in a minute.": "屏幕连接太多了。请过一分钟再试。"
+}
diff --git a/apps/android/app/src/main/assets/zh-Hant.json b/apps/android/app/src/main/assets/zh-Hant.json
new file mode 100644
index 00000000..9360b89a
--- /dev/null
+++ b/apps/android/app/src/main/assets/zh-Hant.json
@@ -0,0 +1,1165 @@
+{
+ "About usage analytics": "關於用量分析",
+ "Access": "訪問",
+ "Account": "賬戶",
+ "Add Widget": "新增小元件",
+ "Add a Codync widget": "新增 Codync 小元件",
+ "Add a widget": "新增小元件",
+ "Add account": "新增賬戶",
+ "Appearance": "外觀",
+ "App language": "應用語言",
+ "App language…": "應用語言…",
+ "App version": "應用版本",
+ "Apple": "Apple",
+ "Apple speech on this iPhone, or OpenAI and Gemini on your own API key, kept on the computer.": "用這臺 iPhone 上的蘋果語音,或你自己的 OpenAI、Gemini 金鑰。金鑰留在電腦上。",
+ "Applies to Usage in the app and in widgets.": "應用內的用量和小元件都會跟著變。",
+ "Approved for an earlier install of Codync. Revoke it, then ask again.": "這是更早一次安裝的授權。先撤銷,再重新申請。",
+ "Ask again": "再申請一次",
+ "Ask for access": "申請訪問",
+ "Ask one of your account's computers for access, or pair one with its code.": "向賬戶裡的一臺電腦申請訪問,或用配對碼配對。",
+ "Auto: Wi-Fi or Tailscale, then Cloudflare": "自動:先 Wi-Fi 或 Tailscale,再 Cloudflare",
+ "Back": "返回",
+ "Bots": "機器人",
+ "Can't reach": "連不上",
+ "Cancel": "取消",
+ "Cancel request": "取消申請",
+ "Character": "角色",
+ "Check again": "再檢查一次",
+ "Check for updates": "檢查更新",
+ "Checking": "正在檢查",
+ "Checking your widgets…": "正在檢查小元件…",
+ "Choose": "選擇",
+ "Choose the look": "選擇樣子",
+ "Choose your widget": "選擇小元件",
+ "Clear search": "清除搜尋",
+ "Close": "關閉",
+ "Cloudflare, then Wi-Fi or Tailscale": "先 Cloudflare,再 Wi-Fi 或 Tailscale",
+ "Code": "配對碼",
+ "Collapse": "收起",
+ "Collapsed": "已收起",
+ "Color": "顏色",
+ "Compact sidebar": "緊湊側欄",
+ "Complete": "完成",
+ "Computers": "電腦",
+ "Computers & devices": "電腦和裝置",
+ "Computers & settings": "電腦與設定",
+ "Computer access": "電腦訪問",
+ "Computers in your account need your OK on the computer before this iPhone can use them.": "賬戶裡的電腦要先在電腦上同意,這臺 iPhone 才能使用。",
+ "Computers in your account need your OK on the computer before this phone can use them.": "賬戶裡的電腦要先在電腦上同意,這臺手機才能使用。",
+ "Connect a computer": "連線一臺電腦",
+ "Connects on Wi-Fi, over Tailscale, or from anywhere through Cloudflare, on its own. End-to-end encrypted.": "會自己走 Wi-Fi、Tailscale,或經 Cloudflare 從任何地方連線。端到端加密。",
+ "Connecting": "正在連線",
+ "Connecting…": "正在連線…",
+ "Connection": "連線",
+ "Continue": "繼續",
+ "Continue with Apple": "透過 Apple 繼續",
+ "Continue with Google": "透過 Google 繼續",
+ "Copied": "已複製",
+ "Copy": "複製",
+ "Create a bot for each kind of work — a reviewer, a fixer, a docs writer — and point it at a project.": "按工作各建一個 Bot,比如審查、修 bug、寫文件,並指定一個專案。",
+ "Create your first bot": "建立第一個 Bot",
+ "Customize": "自定義",
+ "Delete": "刪除",
+ "Delete bot and its conversation": "刪除 Bot 和它的對話",
+ "Delete group chat": "刪除群聊",
+ "Details of this bot…": "這個 Bot 的詳情…",
+ "Done": "完成",
+ "Each bot runs on its own computer. Sign in to see the computers in your account.": "每個 Bot 都在自己的電腦上執行。登入後可以看到賬戶裡的電腦。",
+ "Edit": "編輯",
+ "Edit group": "編輯群聊",
+ "Edit profile": "編輯資料",
+ "English": "English",
+ "Error": "出錯",
+ "Every install option": "全部安裝方式",
+ "Expand": "展開",
+ "Expanded": "已展開",
+ "Extensions": "擴充套件",
+ "Extensions: agents, connectors, skills…": "擴充套件:智慧體、聯結器和技能…",
+ "Files": "檔案",
+ "Files it changed on your computer stay as they are.": "它在電腦上改過的檔案會保留。",
+ "Follow system": "跟隨系統",
+ "General": "通用",
+ "Get a result summary, a request for input, or a failure notice. Notification previews follow your iOS settings.": "會收到結果摘要、需要你處理的請求,或失敗通知。通知預覽跟隨 iOS 設定。",
+ "Get set up": "開始設定",
+ "Get started": "開始使用",
+ "Give each one a name and a project. They work on your computer while you're away.": "給每個 Bot 起名並指定專案。你不在時,它們在電腦上繼續工作。",
+ "Go to": "前往",
+ "Google": "Google",
+ "Hidden bots": "已隱藏的 Bot",
+ "Hide from list": "從列表隱藏",
+ "In your account": "在你的賬戶裡",
+ "Install with Homebrew": "用 Homebrew 安裝",
+ "Its bots and conversations stay on that computer. You can pair again any time.": "Bot 和對話仍留在那臺電腦上。隨時可以重新配對。",
+ "Its bots and their own chats stay.": "裡面的 Bot 和各自的對話會保留。",
+ "Keys": "按鍵",
+ "Know when a bot is done or needs you.": "Bot 完成或需要你時會通知你。",
+ "Language": "語言",
+ "Large": "大",
+ "Linux": "Linux",
+ "Live Activities are turned off in iOS Settings.": "iOS 設定裡已關閉實時活動。",
+ "Live Activity": "實時活動",
+ "Loading": "正在載入",
+ "Local pairing": "本機配對",
+ "Mac": "Mac",
+ "Mark as read": "標為已讀",
+ "Medium": "中",
+ "Memory of this bot…": "這個 Bot 的記憶…",
+ "Needs update": "需要更新",
+ "Needs you": "需要你",
+ "New": "新建",
+ "New bot": "新建 Bot",
+ "New bot…": "新建 Bot…",
+ "New group chat": "新建群聊",
+ "Name your group": "給群聊起個名字",
+ "Sign in so bots can use it": "登入後 Bot 才能使用",
+ "Remove {name}?": "移除 {name}?",
+ "Bots lose this connector, and the keys saved for it are deleted.": "Bot 會失去這個聯結器,為它儲存的金鑰也會刪除。",
+ "Bots stop using this skill.": "Bot 將不再使用這個技能。",
+ "Nothing installed": "還沒有安裝",
+ "Connectors and skills you add show up here.": "你新增的聯結器和技能會顯示在這裡。",
+ "Install": "安裝",
+ "Runs the official installer on {name}.": "在 {name} 上執行官方安裝程式。",
+ "Installed on {name}.": "已安裝在 {name} 上。",
+ "Checking with {name}… The first check can download it.": "正在向 {name} 確認…第一次確認時可能會下載。",
+ "Checking…": "正在確認…",
+ "Signed in.": "已登入。",
+ "Add Node.js first.": "請先新增 Node.js。",
+ "Not signed in yet.": "尚未登入。",
+ "Couldn't tell. Skip this if you've already signed in on {name}.": "無法判斷。如果已經在 {name} 上登入過,可以跳過。",
+ "{name} runs on Node.js. Codync adds its own copy.": "{name} 執行需要 Node.js。Codync 會單獨為它準備一份。",
+ "Added on {name}.": "已新增到 {name}。",
+ "In a terminal on {name}. Links open here.": "在 {name} 的終端裡進行。連結會在這裡開啟。",
+ "In a terminal on {name}.": "在 {name} 的終端裡進行。",
+ "Saved on {name} only.": "只儲存在 {name} 上。",
+ "Finish signing in in the browser on {name}…": "請在 {name} 的瀏覽器裡完成登入…",
+ "Opens a browser on {name}.": "會在 {name} 上開啟瀏覽器。",
+ "Browser sign-ins open on {name} itself. Away from it? Use Remote screen to finish there.": "瀏覽器登入會在 {name} 本機開啟。人不在旁邊的話,用遠端螢幕在那裡完成。",
+ "This sign-in needs a newer app. Sign in on {name} for now.": "這種登入方式需要更新的應用。請先在 {name} 上登入。",
+ "Agent marketplace with 174+ AI capabilities. Browse, invoke, and pay for agent services settled in USDC on Base L2.": "智慧體市場,提供 170 多種 AI 能力。可以瀏覽、呼叫,並用 Base L2 上的 USDC 結算。",
+ "ACP wrapper for Amp - the frontier coding agent": "Amp 的 ACP 封裝,前沿程式設計智慧體",
+ "Google’s AI coding agent": "Google 的 AI 程式設計智慧體",
+ "Augment Code's powerful software agent, backed by industry-leading context engine": "Augment Code 的軟體智慧體,背後是業界領先的上下文引擎",
+ "Autohand Code - AI coding agent powered by Autohand AI": "Autohand Code,由 Autohand AI 驅動的程式設計智慧體",
+ "IBM Bob is your AI-Powered Development Partner": "IBM Bob,你的 AI 開發夥伴",
+ "ACP wrapper for Anthropic's Claude": "Anthropic Claude 的 ACP 封裝",
+ "Autonomous coding agent CLI - capable of creating/editing files, running commands, using the browser, and more": "自主程式設計智慧體命令列,可以建立和編輯檔案、執行命令、使用瀏覽器等",
+ "Tencent Cloud's official intelligent coding tool": "騰訊雲官方的智慧程式設計工具",
+ "ACP adapter for OpenAI's coding assistant": "OpenAI 程式設計助手的 ACP 介面卡",
+ "Snowflake's Cortex Code coding agent": "Snowflake 的 Cortex Code 程式設計智慧體",
+ "Co-building with a seasoned Rust partner.": "和一位資深 Rust 搭檔一起寫程式碼。",
+ "Minimal ACP Native Coding Agent": "精簡的原生 ACP 程式設計智慧體",
+ "Cursor's coding agent": "Cursor 的程式設計智慧體",
+ "Batteries-included AI coding and general purpose agent powered by LangChain.": "開箱即用的 AI 程式設計和通用智慧體,由 LangChain 驅動。",
+ "Devin CLI coding agent by Cognition": "Cognition 的 Devin CLI 程式設計智慧體",
+ "A coding agent that puts leading models at your command.": "把領先模型交給你呼叫的程式設計智慧體。",
+ "Reduces API costs by more than 50%, produces better and faster work. Uses Hash anchored parallel edits, AST manipulation and a whole lot of neat optimizations. Fully Open Source.": "API 成本可以降低一半以上,工作更快也更好。使用雜湊錨定的並行編輯、AST 操作和一系列最佳化。完全開源。",
+ "Factory Droid - AI coding agent powered by Factory AI": "Factory Droid,由 Factory AI 驅動的程式設計智慧體",
+ "Code and build agents with comprehensive multi-provider support": "編寫和構建智慧體,支援多家模型服務",
+ "Google's official CLI for Gemini": "Google 官方的 Gemini 命令列",
+ "GitHub's AI pair programmer": "GitHub 的 AI 結對程式設計師",
+ "ACP agent powered by Zhipu AI's GLM Coding Plan models (glm-5.1, glm-5-turbo, glm-4.7, glm-4.5-air). Supports streaming, tool calls, mid-session model switching, image input via Z.AI Coding Plan Vision MCP, and session load/fork/resume with on-disk persistence.": "智譜 GLM Coding Plan 模型驅動的 ACP 智慧體(glm-5.1、glm-5-turbo、glm-4.7、glm-4.5-air)。支援流式輸出、工具呼叫、會話中切換模型、透過 Z.AI Coding Plan Vision MCP 輸入圖片,以及把會話儲存、分叉和恢復到磁碟。",
+ "A local, extensible, open source AI agent that automates engineering tasks": "本地、可擴充套件的開源 AI 智慧體,用來自動完成工程任務",
+ "xAI's coding agent and CLI": "xAI 的程式設計智慧體和命令列",
+ "Harn runs .harn agent pipelines as a native ACP coding agent over stdio.": "Harn 把 .harn 智慧體流水線作為原生 ACP 程式設計智慧體,透過標準輸入輸出執行。",
+ "AI Coding Agent by JetBrains": "JetBrains 的 AI 程式設計智慧體",
+ "The open source coding agent": "開源程式設計智慧體",
+ "Coding agent powered by multi-model orchestration": "由多模型編排驅動的程式設計智慧體",
+ "Moonshot AI's coding assistant": "月之暗面的程式設計助手",
+ "MiniMax Code is an AI coding agent with Agent Client Protocol support.": "MiniMax Code,支援 Agent Client Protocol 的 AI 程式設計智慧體。",
+ "An enhanced AI code assistant built on the Minion framework with rich development tools": "基於 Minion 框架的增強型 AI 程式設計助手,帶有豐富的開發工具",
+ "Mistral's open-source coding assistant": "Mistral 的開源程式設計助手",
+ "Nova by Compass AI - a fully-fledged software engineer at your command": "Compass AI 的 Nova,一位聽你調遣的軟體工程師",
+ "The open source coding agent, version 2": "開源程式設計智慧體,第 2 版",
+ "ACP adapter for pi coding agent": "pi 程式設計智慧體的 ACP 介面卡",
+ "Poolside's coding agent": "Poolside 的程式設計智慧體",
+ "AI coding assistant with agentic capabilities": "具備智慧體能力的 AI 程式設計助手",
+ "Alibaba's Qwen coding assistant": "阿里巴巴的 Qwen 程式設計助手",
+ "Local-first coding agent. Runs entirely on your machine with optional on-device LLM inference via Onde.": "本地優先的程式設計智慧體。完全在你的電腦上執行,也可以透過 Onde 在本機推理模型。",
+ "Open-source DevOps agent in Rust with enterprise-grade security": "用 Rust 編寫的開源 DevOps 智慧體,具備企業級安全能力",
+ "An open-source coding agent with LLM-native code understanding and robust shell safety. Supports multiple LLM providers with automatic failover and efficient context management.": "開源程式設計智慧體,能按模型的方式理解程式碼,並對 shell 做嚴格的安全控制。支援多家模型服務,可以自動切換,並高效管理上下文。",
+ "New group chat…": "新建群聊…",
+ "No bots yet": "還沒有 Bot",
+ "No computer yet": "還沒有電腦",
+ "No usage yet": "還沒有用量",
+ "Not complete": "未完成",
+ "Not paired": "未配對",
+ "Not signed in": "未登入",
+ "Nothing matches": "沒有匹配項",
+ "Notifications": "通知",
+ "OK": "好",
+ "Off": "關",
+ "Off in Settings": "在設定中關閉",
+ "Offline": "離線",
+ "On": "開",
+ "Online": "線上",
+ "Open Codync and it sets up the host on its own.": "開啟 Codync,它會自己裝好 host。",
+ "Open at login": "登入時開啟",
+ "Open iOS Settings": "開啟 iOS 設定",
+ "Original": "原圖示",
+ "Original icon": "原圖示",
+ "Pair": "配對",
+ "Pair a computer": "配對一臺電腦",
+ "Pair a computer later from Computers & settings.": "稍後可以在「電腦與設定」裡配對。",
+ "Pair a phone…": "配對 iPhone…",
+ "Pause": "暫停",
+ "Personal": "個人",
+ "Photos": "照片",
+ "Pin": "置頂",
+ "Play": "播放",
+ "Please wait…": "請稍候…",
+ "Preview": "預覽",
+ "Push notifications": "推送通知",
+ "Reach your computers from anywhere": "隨時使用你的電腦",
+ "Refresh agents": "重新整理 agent",
+ "Remove": "移除",
+ "Remove from account": "從賬戶移除",
+ "Revoke": "撤銷",
+ "Revoke this iPhone's access": "撤銷這臺 iPhone 的訪問",
+ "Run the installer": "執行安裝器",
+ "Sample data": "示例資料",
+ "Scan a computer's code": "掃描電腦上的配對碼",
+ "Scan the pairing code": "掃描配對碼",
+ "Screen": "螢幕",
+ "Search": "搜尋",
+ "Search Widgets": "搜尋小元件",
+ "Sending": "正在傳送",
+ "Share usage analytics": "共享用量分析",
+ "Show Live Activities": "顯示實時活動",
+ "Show in Dock": "在程式塢中顯示",
+ "Show in Dynamic Island": "在靈動島中顯示",
+ "Sign in to reach your computers from anywhere": "登入後可以隨時使用你的電腦",
+ "Sign in to see the computers in your account.": "登入後可以看到賬戶裡的電腦。",
+ "Sign out": "退出登入",
+ "Signed in": "已登入",
+ "Signing in": "正在登入",
+ "Skip": "跳過",
+ "Small": "小",
+ "Something went wrong": "出了點問題",
+ "Source": "來源",
+ "Source code": "原始碼",
+ "Start over": "重新開始",
+ "Start over?": "重新開始?",
+ "State": "狀態",
+ "Step": "步驟",
+ "Switch account": "切換賬戶",
+ "System": "系統",
+ "System language is Chinese. \"Follow system\" matches the iPhone. You can switch this app to English.": "系統語言是中文。選「跟隨系統」時介面和 iPhone 一致,也可以改成英文。",
+ "System language is Chinese. \"Follow system\" matches the phone. You can switch this app to English.": "系統語言是中文。選「跟隨系統」時介面和手機一致,也可以改成英文。",
+ "System language is Chinese. \"Follow system\" matches this computer. You can switch this app to English.": "系統語言是中文。選「跟隨系統」時介面和這臺電腦一致,也可以改成英文。",
+ "System language is English. \"Follow system\" matches the iPhone. You can switch this app to Simplified or Traditional Chinese.": "系統語言是英文。選「跟隨系統」時介面和 iPhone 一致,也可以改成簡體中文或繁體中文。",
+ "System language is English. \"Follow system\" matches the phone. You can switch this app to Simplified or Traditional Chinese.": "系統語言是英文。選「跟隨系統」時介面和手機一致,也可以改成簡體中文或繁體中文。",
+ "System language is English. \"Follow system\" matches this computer. You can switch this app to Simplified or Traditional Chinese.": "系統語言是英文。選「跟隨系統」時介面和這臺電腦一致,也可以改成簡體中文或繁體中文。",
+ "System language is Simplified Chinese. \"Follow system\" matches the iPhone. You can switch this app to Traditional Chinese or English.": "系統語言是簡體中文。選「跟隨系統」時介面和 iPhone 一致,也可以改成繁體中文或英文。",
+ "System language is Simplified Chinese. \"Follow system\" matches the phone. You can switch this app to Traditional Chinese or English.": "系統語言是簡體中文。選「跟隨系統」時介面和手機一致,也可以改成繁體中文或英文。",
+ "System language is Simplified Chinese. \"Follow system\" matches this computer. You can switch this app to Traditional Chinese or English.": "系統語言是簡體中文。選「跟隨系統」時介面和這臺電腦一致,也可以改成繁體中文或英文。",
+ "System language is Traditional Chinese. \"Follow system\" matches the iPhone. You can switch this app to Simplified Chinese or English.": "系統語言是繁體中文。選「跟隨系統」時介面和 iPhone 一致,也可以改成簡體中文或英文。",
+ "System language is Traditional Chinese. \"Follow system\" matches the phone. You can switch this app to Simplified Chinese or English.": "系統語言是繁體中文。選「跟隨系統」時介面和手機一致,也可以改成簡體中文或英文。",
+ "System language is Traditional Chinese. \"Follow system\" matches this computer. You can switch this app to Simplified Chinese or English.": "系統語言是繁體中文。選「跟隨系統」時介面和這臺電腦一致,也可以改成簡體中文或英文。",
+ "Text size": "文字大小",
+ "This Mac": "這臺 Mac",
+ "This computer": "這臺電腦",
+ "This iPhone forgets the account's computers. Your bots stay on them.": "這臺 iPhone 會忘掉賬戶裡的電腦。Bot 仍留在那些電腦上。",
+ "Through Cloudflare": "經 Cloudflare",
+ "Try again": "再試一次",
+ "Turn on": "開啟",
+ "Turn on notifications": "開啟通知",
+ "Turn on notifications in Settings": "在設定中開啟通知",
+ "Unable to check": "無法檢查",
+ "Unhide": "取消隱藏",
+ "Unpin": "取消置頂",
+ "Update delayed": "更新延遲",
+ "Updated": "已更新",
+ "Updates": "更新",
+ "Usage": "用量",
+ "Usage icons": "用量圖示",
+ "Usage limits": "用量上限",
+ "Usage shows up once a computer is connected.": "連上電腦後會顯示用量。",
+ "Voice and API keys": "語音和 API 金鑰",
+ "Voice chat": "語音",
+ "Voice keys are kept by This Mac's host, which isn't running.": "語音金鑰由這臺 Mac 的 host 儲存,而 host 沒在執行。",
+ "Waiting for approval…": "等待電腦同意…",
+ "Waiting for computer": "等待電腦",
+ "Watch the demo": "看演示",
+ "Which features you use, never your messages, code or files. Helps us spot bugs sooner and make Codync better for you.": "只記錄你用了哪些功能,不包括訊息、程式碼或檔案。便於更快發現 bug,把 Codync 做得更好。",
+ "Wi-Fi or Tailscale": "Wi-Fi 或 Tailscale",
+ "Wi-Fi or Tailscale only, never Cloudflare": "只用 Wi-Fi 或 Tailscale,不走 Cloudflare",
+ "Widget": "小元件",
+ "Working": "正在工作",
+ "Working…": "正在工作…",
+ "Resuming session…": "正在恢復會話…",
+ "Starting agent…": "正在啟動 Agent…",
+ "Thinking…": "思考中…",
+ "Continuing…": "正在繼續…",
+ "Couldn't start": "無法啟動",
+ "Writing a reply…": "正在寫回復…",
+ "Typing…": "正在輸入…",
+ "Installing…": "正在安裝…",
+ "Downloading {name}…": "正在下載 {name}…",
+ "Installing {name}…": "正在安裝 {name}…",
+ "Needs approval: {title}": "需要批准:{title}",
+ "Summarizing the earlier conversation…": "正在總結更早的對話…",
+ "Picking up where it left off…": "正在接著上次繼續…",
+ "You can ask for access again; the computer will show a new code to confirm.": "可以再次申請。電腦會顯示一個新的配對碼供你確認。",
+ "Your bots run there. This iPhone is how you talk to them.": "Bot 在那臺電腦上執行。這臺 iPhone 用來和它們對話。",
+ "Your computer": "你的電腦",
+ "Your computer reads the limits from Claude Code and Codex.": "電腦會從 Claude Code 和 Codex 讀取用量上限。",
+ "or download the Mac app": "或下載 Mac 應用",
+ "or install with Homebrew": "或用 Homebrew 安裝",
+ "search bots": "搜尋 Bot",
+ "ACTIONS": "操作",
+ "Android speech on this phone, or OpenAI and Gemini on your own API key, kept on the computer.": "用這臺手機上的 Android 語音,或你自己的 OpenAI、Gemini 金鑰。金鑰留在電腦上。",
+ "It's this computer under an earlier identity and can't be reached anymore. Removing it only cleans up your account.": "這是同一臺電腦更早的身份,已經連不上了。移除只會清理你的賬戶。",
+ "Signs out of every account and forgets every computer on this iPhone, then shows the welcome again. Your computers keep their bots and chats; pair again to use them.": "會退出所有賬戶,並忘掉這臺 iPhone 上的每臺電腦,然後重新顯示歡迎頁。電腦上的 Bot 和對話都還在,配對後可以繼續用。",
+ "Signs out of every account and forgets every computer on this phone, then shows the welcome again. Your computers keep their bots and chats; pair again to use them.": "會退出所有賬戶,並忘掉這臺手機上的每臺電腦,然後重新顯示歡迎頁。電腦上的 Bot 和對話都還在,配對後可以繼續用。",
+ "Remove the older computer?": "移除更早的那臺電腦?",
+ "On your Mac, click Codync in the menu bar, then Pair iPhone.": "在 Mac 上點選單欄的 Codync,然後選配對 iPhone。",
+ "On your Mac, click Codync in the menu bar, then Pair iPhone. The same code pairs this phone.": "在 Mac 上點選單欄的 Codync,然後選配對 iPhone。同一個碼也能配這臺手機。",
+ "On your computer, run this in a terminal:": "在電腦上的終端裡執行:",
+ "Or paste a {scheme}://pair link": "或貼上 {scheme}://pair 連結",
+ "Find nearby barcodes.": "尋找附近的條形碼。",
+ "Camera not available. Paste the link below.": "相機不可用。請把連結貼上在下面。",
+ "Codync, at a glance.": "一眼看到 Codync。",
+ "Your bots and usage, on every surface.": "Bot 和用量,出現在各個介面上。",
+ "Approve only if the computer shows exactly this code. If it doesn't, deny it there: someone may be trying to get in.": "只有電腦上顯示的碼和這裡完全一致時才同意。不一致就在電腦上拒絕:可能有人想進入。",
+ "Install Codync\non your computer": "在電腦上\n安裝 Codync",
+ "Check that this iPhone and the computer are on the same Wi-Fi or both on Tailscale, or that “Reach from anywhere” is on in Codync on the computer.": "確認這臺 iPhone 和電腦在同一個 Wi-Fi,或都開了 Tailscale,或電腦上的 Codync 已開啟「隨處訪問」。",
+ "Check that this phone and the computer are on the same Wi-Fi or both on Tailscale, or that “Reach from anywhere” is on in Codync on the computer.": "確認這臺手機和電腦在同一個 Wi-Fi,或都開了 Tailscale,或電腦上的 Codync 已開啟「隨處訪問」。",
+ "Tailscale is on: Codync connects over it directly.": "Tailscale 已開啟:Codync 會直接透過它連線。",
+ "Use Tailscale? Direct and faster away from home.": "使用 Tailscale?離家時更直接,也更快。",
+ "Your coding agents,\nas teammates.": "你的程式設計助手,\n像隊友一樣。",
+ "Fix the flaky login test": "修一下不穩定的登入測試",
+ "Done. It raced the session refresh; tests pass on fix/login.": "好了。它和會話重新整理撞在一起了;fix/login 上測試已透過。",
+ "Couldn't check your widgets. You can still add one using the steps below.": "暫時檢查不了小元件。你仍可以按下面的步驟新增。",
+ "Keep tasks in view": "讓任務保持可見",
+ "Lock Screen widgets": "鎖定螢幕小元件",
+ "Widgets show the latest report. Open Codync for live updates and approvals.": "小元件顯示最近一次報告。開啟 Codync 看實時更新和待處理的請求。",
+ "How to add the Codync widget": "如何新增 Codync 小元件",
+ "See who needs you and who's still working.": "看誰需要你、誰還在工作。",
+ "QR pairing only in this build": "這個版本只能用二維碼配對",
+ "Move up": "上移",
+ "Move down": "下移",
+ "Sample task": "示例任務",
+ "iOS chooses the presentation based on your device and other active tasks. These previews don't start a Live Activity. Approvals are handled inside Codync.": "iOS 會按裝置和正在進行的其他任務決定怎麼顯示。這些預覽不會真的啟動實時活動。同意操作在 Codync 裡完成。",
+ "Touch and hold your Lock Screen → Customize → Lock Screen. Tap the widget area and choose Codync. Inline widgets go in the date row above the clock.": "按住鎖定螢幕 → 自定義 → 鎖定螢幕。點小元件區域,選擇 Codync。行內小元件放在時鐘上方的日期那一行。",
+ "Choose Bots for task status or Usage limits for the highest reported limit. iOS applies your Lock Screen's color and style.": "選「機器人」看任務狀態,或選「用量上限」看報得最高的額度。顏色和樣式由 iOS 鎖定螢幕決定。",
+ "Dismiss": "關閉",
+ "Computer": "電腦",
+ "No bots yet. Create a bot first.": "還沒有 Bot。請先建立一個。",
+ "Everyone answers in turn unless you @mention someone.": "大家輪流回復,除非你 @ 某一個人。",
+ "Create": "建立",
+ "All computers": "全部電腦",
+ "Show only": "只顯示",
+ "Reconnect": "重新連線",
+ "Manage computers": "管理電腦",
+ "Model": "模型",
+ "This agent doesn't advertise a model list. Leave Default or enter a model ID.": "這個 agent 沒有提供模型列表。留著「預設」,或自己填一個模型 ID。",
+ "Changing the model starts a new agent session. Chat history is kept.": "更換模型會新開一個 agent 會話。聊天記錄會保留。",
+ "Loading available models": "正在載入可用模型",
+ "Notes": "筆記",
+ "Longer notes, one topic each. The bot reads one when its topic comes up.": "較長的筆記,一條一個主題。聊到相關主題時,Bot 會讀那一條。",
+ "Loading…": "正在載入…",
+ "Switch back": "換回來",
+ "No fallbacks yet.": "還沒有備用 agent。",
+ "Personal workspace": "個人工作區",
+ "Fast mode": "快速模式",
+ "Faster replies for more usage, on models that offer it.": "回覆更快,用量也更高。僅部分模型支援。",
+ "Faster replies for more usage, on models that offer it (Claude Code, Codex)": "回覆更快,用量也更高。僅部分模型支援(Claude Code、Codex)。",
+ "Turn on for faster replies and more usage": "開啟後回覆更快,用量也更高",
+ "Turn off and return to standard speed": "關閉,回到正常速度",
+ "Turn on for every bot here: faster replies and more usage": "給這裡的每個 Bot 開啟:回覆更快,用量也更高",
+ "Turn off for every bot here and return to standard speed": "給這裡的每個 Bot 關閉,回到正常速度",
+ "Let the bot change its fallbacks": "讓 Bot 自己改備用列表",
+ "It can set this list itself, for example when you ask it to.": "它可以自己改這份列表,比如你讓它改的時候。",
+ "Let the bot change its fallbacks: it can set this list itself, for example when you ask it to.": "讓 Bot 自己改備用列表:它可以自己改這份列表,比如你讓它改的時候。",
+ "Use the computer": "使用電腦",
+ "Use computer": "使用電腦",
+ "On that computer, open Codync → Settings → Computer access to set it up first.": "先在那臺電腦上開啟 Codync → 設定 → 電腦訪問,完成設定。",
+ "Set up on the computer: Codync → Settings → Computer access": "在電腦上設定:Codync → 設定 → 電腦訪問",
+ "No routines yet. Ask the bot for one, or set it up yourself with +.": "還沒有例行任務。讓 Bot 建一個,或點 + 自己設定。",
+ "Loading routines…": "正在載入例行任務…",
+ "No routines. c asks the bot for one; n sets one up here.": "還沒有例行任務。按 c 讓 Bot 建一個;按 n 在這裡設定。",
+ "Close routines": "關閉例行任務",
+ "Choose project folder…": "選擇專案資料夾…",
+ "If {agent} runs out of usage or can't answer, the bot carries on with the next one. Chat, memory and workspace carry over.": "如果 {agent} 用量用完或無法回答,Bot 會交給下一個繼續。對話、記憶和工作區都會帶過去。",
+ "{agent} in {path}": "{agent},在 {path}",
+ "{size} pt (Default)": "{size} pt(預設)",
+ "Show in notch": "在螢幕頂部顯示",
+ "Show at top of screen": "在螢幕頂部顯示",
+ "Privacy": "隱私",
+ "Full conversation": "完整對話",
+ "Settings": "設定",
+ "New session": "新會話",
+ "Delete bot": "刪除 Bot",
+ "Delete group": "刪除群聊",
+ "Memory": "記憶",
+ "About you": "關於你",
+ "This bot": "這個 Bot",
+ "Dreams": "夢境",
+ "No dreams yet.": "還沒有夢境。",
+ "Load earlier messages": "載入更早的訊息",
+ "Today": "今天",
+ "Yesterday": "昨天",
+ "Instructions": "指令",
+ "Standing instructions": "常駐指令",
+ "Rules that always apply. Put task-specific requests in the chat instead.": "一直生效的規則。針對某次任務的要求,寫在對話裡。",
+ "e.g. Reviews PRs. Never pushes without asking.": "例如:審閱 PR。未經詢問不推送。",
+ "Agent": "智慧體",
+ "Manage the team": "管理團隊",
+ "Manage team": "管理團隊",
+ "Let this bot create bots and change any bot's setup, its own included. The bots it creates can too.": "讓這個 Bot 建立 Bot,並修改任何 Bot 的設定,包括它自己。它建立的 Bot 也可以。",
+ "Let this bot see the screen and use the mouse and keyboard. You can watch and take over from your phone.": "讓這個 Bot 看螢幕,並用滑鼠和鍵盤。你可以在手機上觀看和接管。",
+ "Let this bot see the screen and use the mouse and keyboard.": "讓這個 Bot 看螢幕,並用滑鼠和鍵盤。",
+ "Let this bot see the screen and use the mouse and keyboard. On that computer, open Codync → Settings → Computer access to set up permissions first.": "讓這個 Bot 看螢幕,並用滑鼠和鍵盤。先在那臺電腦上開啟 Codync → 設定 → 電腦訪問,完成許可權設定。",
+ "Let this bot use apps. On that computer, open Codync → Settings → Computer access to set up permissions first.": "讓這個 Bot 使用應用。先在那臺電腦上開啟 Codync → 設定 → 電腦訪問,完成許可權設定。",
+ "Connectors": "聯結器",
+ "No connectors yet. Add GitHub, Linear, Notion and more from Extensions.": "還沒有聯結器。到「擴充套件」裡新增 GitHub、Linear、Notion 等。",
+ "Skills": "技能",
+ "No skills yet. Get some from Extensions, or write your own.": "還沒有技能。到「擴充套件」裡找,或自己寫。",
+ "Your coding agents, as teammates.": "你的程式設計智慧體,像隊友一樣。",
+ "Pick a bot, or create one for each kind of work and point it at a project.": "選一個 Bot,或為每種工作新建一個,並指向一個專案。",
+ "Mark as Read": "標為已讀",
+ "Edit Profile…": "編輯資料…",
+ "Copy conversation ID": "複製對話 ID",
+ "Hide from sidebar": "從側邊欄隱藏",
+ "The host isn't running": "Host 沒有在執行",
+ "The background service didn't start. macOS couldn't load {path}.": "後臺服務沒有啟動。macOS 無法載入 {path}。",
+ "The background service didn't start.": "後臺服務沒有啟動。",
+ "Starting the host…": "正在啟動 Host…",
+ "This takes a few seconds.": "需要幾秒鐘。",
+ "The host isn't responding. See the log for details.": "Host 沒有響應。詳情見日誌。",
+ "Restart the manually started development host in its terminal.": "請在終端裡重啟手動啟動的開發版 Host。",
+ "Another build of the host is running, not this app's. Try again to replace it.": "正在執行的是另一個版本的 Host,不是這個應用自帶的。再試一次即可換上。",
+ "Your computer is ready": "這臺電腦已就緒",
+ "Work in your apps with a bot, or access your screen from your phone. You choose which bots can use this computer.": "讓 Bot 在你的應用裡工作,或從手機檢視螢幕。哪些 Bot 能用這臺電腦,由你決定。",
+ "Let a bot work in your apps. You choose which bots can use this computer.": "讓 Bot 在你的應用裡工作。哪些 Bot 能用這臺電腦,由你決定。",
+ "Waiting for your computer": "等待你的電腦",
+ "Start or restart the host from Codync’s menu to continue. We’ll check again automatically.": "從 Codync 的選單啟動或重啟 Host 後繼續。我們會自動再檢查。",
+ "Codync Screen is missing": "找不到 Codync Screen",
+ "Install the full Codync desktop app to finish setup.": "安裝完整的 Codync 桌面版以完成設定。",
+ "Couldn’t finish setup": "設定沒有完成",
+ "All set": "全部就緒",
+ "{done} of {total} ready": "已就緒 {done} / {total}",
+ "Runs in the background to share your screen and connect your controls.": "在後臺執行,用來共享螢幕並連線鍵鼠。",
+ "Needs approval": "需要批准",
+ "Starting…": "正在啟動…",
+ "Start again": "重新啟動",
+ "Enable Codync Screen": "啟用 Codync Screen",
+ "Allow Codync to run in the background in Login Items.": "在「登入項」裡允許 Codync 在後臺執行。",
+ "Open Login Items": "開啟登入項",
+ "Screen recording": "螢幕錄製",
+ "Lets Codync see your screen, including anything visible in your apps.": "允許 Codync 看到你的螢幕,包括應用里正在顯示的內容。",
+ "Allow screen recording": "允許螢幕錄製",
+ "Control apps": "控制應用",
+ "Lets Codync click, type and interact with apps on your behalf.": "允許 Codync 代你點選、輸入,並操作應用。",
+ "Allow computer control": "允許控制電腦",
+ "Screen sharing & control": "螢幕共享和控制",
+ "Choose a screen and allow mouse and keyboard access. You can stop sharing at any time.": "選擇一塊螢幕,並允許滑鼠和鍵盤訪問。你可以隨時停止共享。",
+ "Choose screen and allow control": "選擇螢幕並允許控制",
+ "Availability": "可用性",
+ "Computer control": "電腦控制",
+ "Bots can use apps on this computer. Remote screen viewing from your phone isn’t available on Windows yet.": "Bot 可以在這臺電腦上使用應用。從手機遠端看螢幕在 Windows 上還不可用。",
+ "Waiting for permission…": "正在等待許可權…",
+ "In System Settings, look for": "在系統設定裡找到",
+ "It may be listed under Device Control and Data Access or Accessibility.": "它可能列在「裝置控制和資料訪問」或「輔助功能」下面。",
+ "Return here after granting access; if asked, allow the helper to restart.": "授權後回到這裡;如果詢問,允許助手重新啟動。",
+ "Open System Settings": "開啟系統設定",
+ "Permissions stay on this computer. You can change them later in Settings → Computer access.": "許可權只留在這臺電腦上。之後可以在「設定 → 電腦訪問」裡修改。",
+ "Permissions stay on this computer. Your other computers keep their own permissions.": "許可權只留在這臺電腦上。其他電腦各自保留自己的許可權。",
+ "On iPhone, connect with a QR code or Ask Access. No SSH setup needed.": "在 iPhone 上,用二維碼或「請求訪問」連線。不需要設定 SSH。",
+ "Set up later": "稍後設定",
+ "Needs access": "需要訪問許可權",
+ "Waiting": "等待中",
+ "Computer access setup": "電腦訪問設定",
+ "Profile": "資料",
+ "Avatar": "頭像",
+ "Name": "名稱",
+ "Workspace": "工作區",
+ "Permissions": "許可權",
+ "Ask me": "每次詢問",
+ "Approve automatically": "自動批准",
+ "Activity": "活動",
+ "Get notified when this bot finishes or needs you": "這個 Bot 做完或需要你時通知你",
+ "This bot has its own space for files. It can work in other folders when you ask.": "這個 Bot 有自己的檔案空間。你讓它去別的資料夾時,它也能工作。",
+ "This project is the default starting folder. The bot can work elsewhere when you ask.": "這個專案是預設的起始資料夾。你讓它去別處時,它也能工作。",
+ "Tool requests are approved automatically. Your agent's own settings (like Claude Code's permission rules) still apply.": "工具請求會自動批准。Agent 自己的設定(比如 Claude Code 的許可權規則)仍然有效。",
+ "You'll get an approval card and a notification whenever the agent asks.": "Agent 每次請求時,你會收到一張批准卡片和一條通知。",
+ "What this bot learned about you.": "這個 Bot 瞭解到的關於你的事。",
+ "What this bot learned about you": "這個 Bot 瞭解到的關於你的事",
+ "What this bot learned about you. {used} of {cap} in use. To change it, tell the bot.": "這個 Bot 瞭解到的關於你的事。已用 {used} / {cap}。想改的話,告訴 Bot。",
+ "Your name, time zone, people and lasting preferences, shared by your bots. {used} of {cap} in use. To change it, tell the bot.": "你的名字、時區、重要的人和長期偏好,所有 Bot 共用。已用 {used} / {cap}。想改的話,告訴 Bot。",
+ "Nothing yet. What this bot learns about you shows up here.": "還沒有。這個 Bot 瞭解到的關於你會顯示在這裡。",
+ "Nothing shared yet.": "還沒有共享的內容。",
+ "Nothing shared yet. Facts every bot should know (your name, time zone, people) go here.": "還沒有共享的內容。所有 Bot 該知道的事(你的名字、時區、重要的人)會在這裡。",
+ "Said": "說了",
+ "Reply": "回覆",
+ "Stopped.": "已停止。",
+ "Ask {name}": "問 {name}",
+ "Queue a message for {name}": "給 {name} 排一條訊息",
+ "Ask everyone · @ to ask one bot": "問所有人 · 用 @ 問其中一個 Bot",
+ "Reply…": "回覆…",
+ "Connected through Cloudflare": "經 Cloudflare 連線",
+ "Connected over Wi-Fi or Tailscale": "透過 Wi-Fi 或 Tailscale 連線",
+ "What this bot learned about you · {harness}'s own memory on · m turns it off": "這個 Bot 瞭解到的關於你的事 · {harness} 自己的記憶開著 · 按 m 關掉",
+ "What this bot learned about you · {harness}'s own memory off · m turns it on": "這個 Bot 瞭解到的關於你的事 · {harness} 自己的記憶關著 · 按 m 開啟",
+ "Shared by your bots · s stops this bot using it": "所有 Bot 共用 · 按 s 讓這個 Bot 停用",
+ "This bot doesn't use what your bots share · s turns it on": "這個 Bot 不用大家共享的內容 · 按 s 開啟",
+ "Fallbacks": "備用",
+ "About fallbacks": "關於備用",
+ "Add fallback": "新增備用",
+ "In use": "使用中",
+ "Add": "新增",
+ "When this bot's agent runs out of usage, is rate limited, signed out or won't start, the next agent here carries on in the same chat, with the same memory and workspace. The bot goes back to its own agent when it recovers. A fallback that uses an API key costs money. To fall back between one agent's models, set that in the agent itself (Claude Code's fallbackModel).": "這個 Bot 的 agent 用量用完、被限速、退出登入或無法啟動時,下一個 agent 會在同一個對話裡接著做,記憶和工作區都不變。原來的 agent 恢復後,Bot 會回到它。用 API 金鑰的備用會花錢。如果只是同一個 agent 的不同模型互相備用,請在 agent 自己裡面設定(Claude Code 的 fallbackModel)。",
+ "Create template": "建立模板",
+ "Close details": "關閉詳情",
+ "Using the computer": "正在使用電腦",
+ "Loading memory…": "正在載入記憶…",
+ "Between chats the bot tidies its memory from your own words.": "對話之間,Bot 會根據你自己的話整理記憶。",
+ "About dreaming": "關於整理記憶",
+ "Claude Code's own notes, read-only here.": "Claude Code 自己的筆記,這裡只能看。",
+ "Save": "儲存",
+ "Members": "成員",
+ "Add Member": "新增成員",
+ "Copy this bot’s settings to reuse as a template. Conversation history and conversation ID are excluded.": "複製這個 Bot 的設定,做成可複用的模板。不包括對話記錄和對話 ID。",
+ "Includes workspace preferences and agent configuration.": "包括工作區偏好和智慧體配置。",
+ "Edit Bot avatar": "編輯 Bot 頭像",
+ "Saved securely on this computer. The bot types it into the sign-in page but never sees it.": "安全地存在這臺電腦上。Bot 會把它填進登入頁,但自己看不到內容。",
+ "Saved securely on this computer. Never added to the conversation.": "安全地存在這臺電腦上。不會寫進對話。",
+ "Encrypted on the connected computer.": "加密儲存在已連線的電腦上。",
+ "Storage": "儲存",
+ "Keychain": "鑰匙串",
+ "Secret Service": "金鑰服務",
+ "System credential store": "系統憑證庫",
+ "Saved connections": "已儲存的連線",
+ "Sign-ins": "登入",
+ "Website or app": "網站或應用",
+ "Username or email": "使用者名稱或郵箱",
+ "Password": "密碼",
+ "Password or op:// reference": "密碼或 op:// 引用",
+ "Bots type these into the matching website or app and never see the password. You can use an op:// reference.": "Bot 會在對應的網站或應用裡填入這些內容,看不到密碼。也可以用 op:// 引用。",
+ "Connect a shared vault": "連線共享保險庫",
+ "Service account token": "服務賬號令牌",
+ "Paste": "貼上",
+ "Paste your token": "貼上令牌",
+ "Use a service account with read access only to a dedicated shared vault. The 1Password CLI must be installed on the computer.": "使用只讀許可權訪問專用共享保險庫的服務賬號。電腦上需要安裝 1Password CLI。",
+ "Composio API key": "Composio API 金鑰",
+ "Get a key from Composio": "從 Composio 獲取金鑰",
+ "Composio signs you in to apps like Gmail and Slack and runs their tools for your bots. The key stays on {name}.": "Composio 幫你登入 Gmail、Slack 等應用,並替 Bot 執行它們的工具。金鑰只留在 {name} 上。",
+ "Saved (paste to replace)": "已儲存(貼上以替換)",
+ "Bots lose the apps you connected until you add a key again.": "在重新新增金鑰之前,Bot 會失去已連線的應用。",
+ "New skill": "新建技能",
+ "When to use it": "何時使用",
+ "The bot sees the name and when to use it, and reads the instructions only when a task fits.": "Bot 能看到名稱和何時使用,只在任務合適時才讀取指令。",
+ "Step by step, in plain words…": "用白話一步步寫…",
+ "Command": "命令",
+ "Config": "配置",
+ "Runs": "執行方式",
+ "Add connector": "新增聯結器",
+ "Hosted by {name}": "由 {name} 託管",
+ "On {name} ({kind})": "在 {name} 上({kind})",
+ "Setup": "設定",
+ "No setup needed.": "無需設定。",
+ "Keys are saved on {name} only.": "金鑰只儲存在 {name} 上。",
+ "No keys needed here. If {name} wants you to sign in, its sign-in page opens next.": "這裡不需要金鑰。如果 {name} 要求登入,接下來會開啟它的登入頁。",
+ " (optional)": "(可選)",
+ "Finish signing in to {name} in the browser…": "請在瀏覽器裡完成 {name} 的登入…",
+ "Adding {name}…": "正在新增 {name}…",
+ "Runs on {name} in the bot's project folder. Quotes work like in a shell.": "在 {name} 上、Bot 的專案資料夾裡執行。引號用法和 shell 一樣。",
+ "A remote MCP server, streamable HTTP or SSE.": "遠端 MCP 伺服器,支援 streamable HTTP 或 SSE。",
+ "Paste the MCP config from a README or another app (Claude, Cursor, VS Code). Every server in it is added. Saved on {name} only.": "貼上 README 或其他應用(Claude、Cursor、VS Code)裡的 MCP 配置。裡面的每個伺服器都會新增。只儲存在 {name} 上。",
+ "Paste the MCP config from a README or another app (Claude, Cursor, VS Code). Every server in it is added.": "貼上 README 或其他應用(Claude、Cursor、VS Code)裡的 MCP 配置。裡面的每個伺服器都會新增。",
+ "Headers": "請求頭",
+ "Optional, one Name: value per line. Leave empty if the service has you sign in. Saved on {name} only.": "可選,每行一個 Name: value。如果服務會讓你登入,就留空。只儲存在 {name} 上。",
+ "Environment": "環境變數",
+ "One KEY=value per line. Saved on {name} only.": "每行一個 KEY=value。只儲存在 {name} 上。",
+ "Enter only the values you want to replace. You can use an op:// reference.": "只填寫要替換的內容。也可以用 op:// 引用。",
+ "No saved connection credentials yet.": "還沒有儲存的連線憑證。",
+ "Values stay hidden. Select a connection to replace its credentials.": "內容保持隱藏。選一個連線來更換它的憑證。",
+ "Connect": "連線",
+ "Disconnect": "斷開",
+ "Use op://vault/item/field in a connector's credential field. Codync retrieves the value when the connector runs.": "在聯結器的憑證欄填 op://vault/item/field。聯結器執行時,Codync 會去取這個值。",
+ "Save sign-in": "儲存登入",
+ "Save credentials": "儲存憑證",
+ "Load more apps": "載入更多應用",
+ "Composio settings": "Composio 設定",
+ "Remove key": "移除金鑰",
+ "Connected": "已連線",
+ "Open the sign-in page": "開啟登入頁",
+ "Waiting for you to finish signing in…": "等你完成登入…",
+ "Asking Composio…": "正在詢問 Composio…",
+ "Some agents need it to run. Codync can add a copy just for them.": "有些智慧體需要它才能執行。Codync 可以只為它們裝一份。",
+ "Add Node.js": "新增 Node.js",
+ "Remove saved keys": "移除已儲存的金鑰",
+ "Added": "已新增",
+ "No instructions.": "沒有說明。",
+ "Load more agents": "載入更多智慧體",
+ "Credentials": "憑證",
+ "Connectors & skills": "聯結器和技能",
+ "Search agents, connectors and skills": "搜尋智慧體、聯結器和技能",
+ "Apps": "應用",
+ "Agents": "智慧體",
+ "Gmail, Slack, GitHub, Notion and 1,000 more apps": "Gmail、Slack、GitHub、Notion 等 1,000 多個應用",
+ "Set up": "設定",
+ "Installed": "已安裝",
+ "Not installed": "未安裝",
+ "Needs Node.js": "需要 Node.js",
+ "Sets up on first use": "首次使用時設定",
+ "Agents matching “{query}”": "匹配“{query}”的智慧體",
+ "Couldn't load connectors.": "無法載入聯結器。",
+ "No connectors match “{query}”.": "沒有匹配“{query}”的聯結器。",
+ "Couldn't load apps.": "無法載入應用。",
+ "No apps match “{query}”.": "沒有匹配“{query}”的應用。",
+ "Load more connectors": "載入更多聯結器",
+ "Make your own": "自己新增",
+ "Custom connector": "自定義聯結器",
+ "Any MCP server: a command or a URL": "任意 MCP 伺服器:一條命令或一個網址",
+ "Your own skill": "自己的技能",
+ "Write instructions a bot can follow": "寫一段 Bot 可以遵循的指令",
+ "{count} installed": "已安裝 {count} 個",
+ "Connectors come from the official MCP Registry, apps through Composio, skills from Anthropic, agents from the ACP registry. Everything installs on {name}.": "聯結器來自官方 MCP Registry,應用透過 Composio,技能來自 Anthropic,智慧體來自 ACP registry。全部安裝在 {name} 上。",
+ "Connectors come from the official MCP Registry, skills from Anthropic, agents from the ACP registry. Everything installs on {name}.": "聯結器來自官方 MCP Registry,技能來自 Anthropic,智慧體來自 ACP registry。全部安裝在 {name} 上。",
+ "Node.js isn't on {name}": "{name} 上沒有 Node.js",
+ "Couldn't load more connectors.": "無法載入更多聯結器。",
+ "Couldn't load skills.": "無法載入技能。",
+ "Switch computer": "切換電腦",
+ "Computer: {name}": "電腦:{name}",
+ "not installed": "未安裝",
+ "needs Node.js": "需要 Node.js",
+ "signed in": "已登入",
+ "not signed in": "未登入",
+ "installed": "已安裝",
+ "sets up on first use": "首次使用時設定",
+ "↵ sign in": "↵ 登入",
+ "filter": "篩選",
+ "search the MCP registry": "搜尋 MCP Registry",
+ "↵ searches the registry": "按 ↵ 搜尋登錄檔",
+ "Some agents need it to run. Codync adds a copy just for them.": "有些智慧體需要它才能執行。Codync 會只為它們新增一份。",
+ "Paste any MCP server's config": "貼上任意 MCP 伺服器的配置",
+ "Loading the registry…": "正在載入登錄檔…",
+ "tab switch · ↵ install / sign in · ^r refresh · esc close": "Tab 切換 · ↵ 安裝 / 登入 · ^r 重新整理 · Esc 關閉",
+ "tab switch · ↵ add / sign in · ^x remove · ^r refresh · esc": "Tab 切換 · ↵ 新增 / 登入 · ^x 移除 · ^r 重新整理 · Esc",
+ "tab switch · ↵ details · ^x remove · esc close": "Tab 切換 · ↵ 詳情 · ^x 移除 · Esc 關閉",
+ "Sign in": "登入",
+ "No matching time zones": "沒有匹配的時區",
+ "e.g. Morning summary": "例如:早晨摘要",
+ "Describe what this bot should do each time it runs.": "寫下這個 Bot 每次執行時要做的事。",
+ "Loading schedule…": "正在載入日程…",
+ "Run settings": "執行設定",
+ "A run is stopped after this long. 1 second to 24 hours.": "執行超過這個時間會被停下。1 秒到 24 小時。",
+ "Runs each time something is posted to its URL. Save to get the URL and key.": "每次有人向它的網址提交內容時執行。儲存後會得到網址和金鑰。",
+ "Set up by the bot. Pick Schedule or Webhook to replace it.": "由 Bot 設定。選「日程」或「Webhook」來替換。",
+ "minute hour day month weekday": "分 時 日 月 星期",
+ "Check schedule again": "重新檢查日程",
+ "Retry loading schedule": "重試載入日程",
+ "Connect to this computer to save your routine.": "先連上這臺電腦,才能儲存例行任務。",
+ "Enter a name and instruction above to save.": "先在上面填寫名稱和說明,再儲存。",
+ "Delete routine": "刪除例行任務",
+ "Routines": "例行任務",
+ "Set up a routine": "設定例行任務",
+ "Ask the bot for a routine": "讓 Bot 設定例行任務",
+ "Replace key": "更換金鑰",
+ "Loading webhook…": "正在載入 Webhook…",
+ "End call": "結束通話",
+ "Key saved": "金鑰已儲存",
+ "Test key": "測試金鑰",
+ "Add it in Codync on that computer: Computers & devices, then Voice chat.": "在那臺電腦的 Codync 裡新增:電腦和裝置,然後是語音。",
+ "Rotate": "輪換",
+ "Fit screen": "適應螢幕",
+ "Displays": "顯示器",
+ "Clipboard": "剪貼簿",
+ "View only. To allow control, open Codync → Settings → Computer access on the computer.": "目前只能看。要允許控制,在電腦上開啟 Codync → 設定 → 電腦訪問。",
+ "Refreshing": "正在重新整理",
+ "Everyone answers in turn. @mention a bot to ask just that one.": "大家輪流回復。@ 某個 Bot 就只問那一個。",
+ "Tell it what you need. You'll get a notification when it's done or needs you.": "告訴它你要做什麼。完成或需要你時會收到通知。",
+ "Loading earlier messages": "正在載入更早的訊息",
+ "Details": "詳情",
+ "Jump to latest": "跳到最新",
+ "Cancel reply": "取消回覆",
+ "Add files": "新增檔案",
+ "Sending…": "正在傳送…",
+ "Failed to send": "傳送失敗",
+ "Resend": "重新傳送",
+ "Not sent — stopped": "未傳送 — 已停止",
+ "Waiting for the computer to come online": "等待電腦上線",
+ "Don't send": "不傳送",
+ "Delivered to the computer": "已送到電腦",
+ "Add a fallback": "新增備用",
+ "Nothing yet.": "還沒有內容。",
+ "Thinking": "思考中",
+ "Plan": "計劃",
+ "No messages yet.": "還沒有訊息。",
+ "What it carries": "它帶著什麼",
+ "Keep this conversation": "保留這個對話",
+ "Edit what it carries": "編輯它帶著的內容",
+ "Review": "檢視",
+ "Dynamic Island": "靈動島",
+ "Lock Screen": "鎖定螢幕",
+ "Compact": "緊湊",
+ "Minimal": "最小",
+ "The Dynamic Island shows the same Live Activity as the Lock Screen, so this switch turns off both.": "靈動島和鎖定螢幕用的是同一個實時活動,所以這個開關會同時關掉兩邊。",
+ "Starts when you send a task from this iPhone. Follow its progress, then open the conversation when your bot needs you.": "從這臺 iPhone 發出任務時開始。可以看進度,Bot 需要你時再開啟對話。",
+ "The bot in its mood, its current step in the state's color, the running time and a thinking orb. When the bot needs you, Review opens the request.": "顯示 Bot 的狀態、當前步驟(顏色跟著狀態走)、已執行時間和一個思考球。需要你時,點「檢視」開啟請求。",
+ "The bot and a thinking orb beside the camera, outlined in the state's color. The orb becomes a check or warning when the task ends.": "攝像頭旁邊是 Bot 和一個思考球,描邊顏色跟著狀態走。任務結束時,球會變成對勾或警告。",
+ "Just the orb when iOS displays multiple Live Activities.": "iOS 同時顯示多個實時活動時,只留下這個球。",
+ "Touch and hold the Dynamic Island for the current step and the running time, or Review when the bot needs you. Tap to open the conversation.": "按住靈動島可看當前步驟和已執行時間。Bot 需要你時會顯示「檢視」。點一下開啟對話。",
+ "Running the test suite.": "正在執行測試。",
+ "Review the proposed changes.": "檢視提議的修改。",
+ "Failed": "失敗",
+ "Waiting for update": "等待更新",
+ "Need you": "需要你",
+ "All quiet": "都很安靜",
+ "No access": "沒有訪問許可權",
+ "%d connected": "%d 臺已連線",
+ "%d/%d connected": "%d/%d 臺已連線",
+ "%d offline": "%d 臺離線",
+ "Use what your bots share": "使用 Bot 共享的內容",
+ "Provider usage": "服務用量",
+ "Team": "團隊",
+ "Small widget": "小號小元件",
+ "Medium widget": "中號小元件",
+ "Large widget": "大號小元件",
+ "Small shows the tightest limit. Medium shows two windows. Large adds a summary and up to four limits.": "小號顯示最緊的額度。中號顯示兩個視窗。大號再加上摘要,最多四個額度。",
+ "Four bots as characters with a dot for each one at work. Touch and hold the widget, then Edit Widget to choose who sits in each spot; empty spots show the bots that need you first.": "四個 Bot 顯示成角色,正在工作的旁邊有個點。按住小元件,點編輯小元件,選每個位置放誰;空位會優先顯示需要你的 Bot。",
+ "See who needs you and who's still working. Large shows up to six bots.": "看誰需要你、誰還在工作。大號最多顯示六個 Bot。",
+ "Default": "預設",
+ "Couldn't sign in. Check your connection and try again.": "登入失敗。檢查網路後再試一次。",
+ "Couldn't sign out. Check your connection and try again.": "退出失敗。檢查網路後再試一次。",
+ "Couldn't switch accounts. Check your connection or sign in again.": "切換賬戶失敗。檢查網路,或重新登入。",
+ "Couldn't finish signing in. Please try again.": "登入沒有完成。請再試一次。",
+ "Sign-in setup isn't finished yet. You can continue using local pairing.": "登入還沒配置好。你可以繼續用本機配對。",
+ "Apple sign-in needs additional verification. Your account is not signed in yet.": "Apple 登入還需要額外驗證。賬戶還沒有登入。",
+ "Google sign-in needs additional verification. Your account is not signed in yet.": "Google 登入還需要額外驗證。賬戶還沒有登入。",
+ "Apple sign-up needs additional account information. Your account is not signed in yet.": "Apple 註冊還需要補充賬戶資訊。賬戶還沒有登入。",
+ "Google sign-up needs additional account information. Your account is not signed in yet.": "Google 註冊還需要補充賬戶資訊。賬戶還沒有登入。",
+ "Sign in again to reach your account.": "重新登入後才能使用賬戶。",
+ "Codync account": "Codync 賬戶",
+ "Usage analytics": "用量分析",
+ "Features you use": "你使用的功能",
+ "Opening the app and its screens, setting up and pairing (and whether you allow notifications), creating or deleting a bot, sending a message (how many attachments, never the files), running a routine or a voice call, installing a connector. Each comes with the app version, the platform, and the bot's agent and model.": "開啟應用和各個頁面、設定和配對(以及你是否允許通知)、建立或刪除 Bot、傳送訊息(附件有幾個,不包括檔案本身)、執行例行任務或語音通話、安裝聯結器。每條都會帶上應用版本、平臺,以及 Bot 的 agent 和模型。",
+ "Crashes and errors": "崩潰和錯誤",
+ "When Codync crashes or an agent fails to answer: the kind of error and where in Codync's own code it happened. Never the error's message; file paths are cut down to Codync's own files.": "Codync 崩潰,或 agent 無法回答時:錯誤的種類,以及發生在 Codync 自己程式碼的哪裡。不包括錯誤資訊本身;檔案路徑會縮短到只剩 Codync 自己的檔案。",
+ "Approximate location": "大致位置",
+ "Country and city, looked up from your IP address. The IP address itself is never stored.": "根據 IP 地址查出的國家和城市。IP 地址本身不會儲存。",
+ "Who it belongs to": "屬於誰",
+ "Your Codync account when you're signed in, otherwise a random ID made on this device.": "已登入時是你的 Codync 賬戶,否則是這臺裝置上生成的一個隨機 ID。",
+ "Never shared": "絕不會共享",
+ "Your messages, prompts, code, files, file names or paths, bot names, credentials, or anything your agents produce.": "你的訊息、提示詞、程式碼、檔案、檔名或路徑、Bot 名稱、憑證,以及 agent 生成的任何內容。",
+ "How it's used": "如何使用",
+ "Only to spot bugs sooner and see which features work and where people get stuck. Never sold, never used for ads or to track you across other apps and websites.": "只用來更快發現 bug,以及看哪些功能有用、人們在哪裡卡住。不會出售,不會用於廣告,也不會用來在其他應用和網站上跟蹤你。",
+ "Your choice": "由你決定",
+ "Each iPhone and each computer has its own switch. Turning it off stops sending right away and drops anything not sent yet.": "每臺 iPhone 和每臺電腦各有自己的開關。關掉後會立刻停止傳送,還沒發出去的也會丟掉。",
+ "Each phone and each computer has its own switch. Turning it off stops sending right away and drops anything not sent yet.": "每臺手機和每臺電腦各有自己的開關。關掉後會立刻停止傳送,還沒發出去的也會丟掉。",
+ "See the Privacy Policy for details.": "詳情見隱私政策。",
+ "Privacy Policy": "隱私政策",
+ "See the": "詳情見",
+ "for details.": "。",
+ "Touch and hold an empty spot on the Home Screen": "按住主螢幕的空白處",
+ "Tap Edit, then Add Widget": "點「編輯」,然後點「新增小元件」",
+ "Find Codync in the list": "在列表裡找到 Codync",
+ "Tap Add Widget": "點「新增小元件」",
+ "Tap Done": "點「完成」",
+ "Batteries": "電池",
+ "Calendar": "日曆",
+ "Fitness": "健身",
+ "Weather": "天氣",
+ "See the Privacy Policy for details: ": "詳情見隱私政策:",
+ "Steps check themselves as you finish them.": "做完一步,這裡會自己打勾。",
+ "Session": "會話",
+ "Weekly": "每週",
+ "highest usage": "用量最高",
+ "Open Codync to connect a computer and check {provider} usage.": "開啟 Codync,連線一臺電腦後即可檢視 {provider} 用量。",
+ "Open Codync to pair with your computer.": "開啟 Codync,與你的電腦配對。",
+ "No usage reported yet.": "還沒有用量報告。",
+ "resets": "重置於",
+ "Usage reported by your computer": "用量由你的電腦報告",
+ "after reset": "後重置",
+ "day unit": "天",
+ "hour unit": "小時",
+ "minute unit": "分",
+ "Resets": "重置",
+ "5-hour": "5 小時",
+ "Ready": "就緒",
+ "Review changes": "審閱改動",
+ "Running tests": "正在跑測試",
+ "Reviewer": "審閱",
+ "Builder": "構建",
+ "Docs": "文件",
+ "codync-host install keeps it running in the background.": "codync-host install 會讓它在後臺一直執行。",
+ "{name} isn't set up on this computer. {hint}": "{name} 還沒有在這臺電腦上設定好。{hint}",
+ "Check that it's installed on this computer.": "請確認它已經安裝在這臺電腦上。",
+ "Codync installs it automatically. Sign in to {name} on this computer first if it needs an account.": "Codync 會自動安裝。如果需要賬號,請先在這臺電腦上登入 {name}。",
+ "Install Claude Code and run `claude auth login`.": "安裝 Claude Code,然後執行 `claude auth login`。",
+ "Install Codex CLI and run `codex login --device-auth`.": "安裝 Codex CLI,然後執行 `codex login --device-auth`。",
+ "Install Cursor CLI (curl https://cursor.com/install -fsS | bash) and run `cursor-agent login`.": "安裝 Cursor CLI(curl https://cursor.com/install -fsS | bash),然後執行 `cursor-agent login`。",
+ "Install pi (npm install -g @earendil-works/pi-coding-agent), run `pi` and type /login.": "安裝 pi(npm install -g @earendil-works/pi-coding-agent),執行 `pi`,然後輸入 /login。",
+ "Install oh-my-pi (curl -fsSL https://omp.sh/install | sh -s -- --binary) and run `omp login`.": "安裝 oh-my-pi(curl -fsSL https://omp.sh/install | sh -s -- --binary),然後執行 `omp login`。",
+ "Install OpenCode (curl -fsSL https://opencode.ai/install | bash) and run `opencode auth login`.": "安裝 OpenCode(curl -fsSL https://opencode.ai/install | bash),然後執行 `opencode auth login`。",
+ "Install Grok Build (curl -fsSL https://x.ai/cli/install.sh | bash) and run `grok login --device-auth`.": "安裝 Grok Build(curl -fsSL https://x.ai/cli/install.sh | bash),然後執行 `grok login --device-auth`。",
+ "Install Gemini CLI (npm install -g @google/gemini-cli) and run `gemini` to sign in with Google.": "安裝 Gemini CLI(npm install -g @google/gemini-cli),然後執行 `gemini`,用 Google 登入。",
+ "Install Copilot CLI (curl -fsSL https://gh.io/copilot-install | bash) and run `copilot login`.": "安裝 Copilot CLI(curl -fsSL https://gh.io/copilot-install | bash),然後執行 `copilot login`。",
+ "Install Qwen Code (its standalone installer), run `qwen` and type /auth.": "安裝 Qwen Code(它的獨立安裝程式),執行 `qwen`,然後輸入 /auth。",
+ "Install goose and run `goose configure`.": "安裝 goose,然後執行 `goose configure`。",
+ "Install Kimi Code (curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash) and run `kimi login`.": "安裝 Kimi Code(curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash),然後執行 `kimi login`。",
+ "Install Droid (curl -fsSL https://app.factory.ai/cli | sh) and sign in with `droid`.": "安裝 Droid(curl -fsSL https://app.factory.ai/cli | sh),然後用 `droid` 登入。",
+ "Install Amp (curl -fsSL https://ampcode.com/install.sh | bash) and run `amp login`.": "安裝 Amp(curl -fsSL https://ampcode.com/install.sh | bash),然後執行 `amp login`。",
+ "Install Kilo CLI (npm install -g @kilocode/cli) and run `kilo auth login`.": "安裝 Kilo CLI(npm install -g @kilocode/cli),然後執行 `kilo auth login`。",
+ "Install Cline CLI (npm install -g cline) and run `cline auth`.": "安裝 Cline CLI(npm install -g cline),然後執行 `cline auth`。",
+ "Install Auggie (npm install -g @augmentcode/auggie) and run `auggie login`.": "安裝 Auggie(npm install -g @augmentcode/auggie),然後執行 `auggie login`。",
+ "Install Mistral Vibe (curl -LsSf https://mistral.ai/vibe/install.sh | bash) and run `vibe --setup`.": "安裝 Mistral Vibe(curl -LsSf https://mistral.ai/vibe/install.sh | bash),然後執行 `vibe --setup`。",
+ "Install Kiro CLI (curl -fsSL https://cli.kiro.dev/install | bash) and run `kiro-cli login`.": "安裝 Kiro CLI(curl -fsSL https://cli.kiro.dev/install | bash),然後執行 `kiro-cli login`。",
+ "Install the Devin CLI (curl -fsSL https://cli.devin.ai/install.sh | bash) and run `devin auth login`.": "安裝 Devin CLI(curl -fsSL https://cli.devin.ai/install.sh | bash),然後執行 `devin auth login`。",
+ "Install Qoder CLI (curl -fsSL https://qoder.com/install | bash) and run `qodercli login`.": "安裝 Qoder CLI(curl -fsSL https://qoder.com/install | bash),然後執行 `qodercli login`。",
+ "Install CodeBuddy Code (npm install -g @tencent-ai/codebuddy-code) and sign in with `codebuddy`.": "安裝 CodeBuddy Code(npm install -g @tencent-ai/codebuddy-code),然後用 `codebuddy` 登入。",
+ "Install MiniMax Code (npm install -g @minimax-ai/code) and run `mcode login`.": "安裝 MiniMax Code(npm install -g @minimax-ai/code),然後執行 `mcode login`。",
+ "Install Junie (curl -fsSL https://junie.jetbrains.com/install.sh | bash) and sign in with `junie`.": "安裝 Junie(curl -fsSL https://junie.jetbrains.com/install.sh | bash),然後用 `junie` 登入。",
+ "Install the Antigravity CLI (curl -fsSL https://antigravity.google/cli/install.sh | bash) and sign in with `agy`.": "安裝 Antigravity CLI(curl -fsSL https://antigravity.google/cli/install.sh | bash),然後用 `agy` 登入。",
+ "Install Cortex Code (curl -LsS https://ai.snowflake.com/static/cc-scripts/install.sh | sh) and set up a connection with `cortex`.": "安裝 Cortex Code(curl -LsS https://ai.snowflake.com/static/cc-scripts/install.sh | sh),然後用 `cortex` 設定連線。",
+ "Install Poolside (curl -fsSL https://downloads.poolside.ai/pool/install.sh | sh) and run `pool login`.": "安裝 Poolside(curl -fsSL https://downloads.poolside.ai/pool/install.sh | sh),然後執行 `pool login`。",
+ "Couldn't load models: {error}": "無法載入模型:{error}",
+ "A memory of its own": "它自己的記憶",
+ "Remembered twice": "記了兩次",
+ "Forgetting": "忘記",
+ "Where to see it": "在哪裡看",
+ "{name} keeps notes apart from Codync's memory. It's off by default, so this bot has one memory and you see all of it here.": "{name} 的筆記和 Codync 的記憶是分開的。預設關閉,所以這個 Bot 只有一份記憶,你在這裡能全部看到。",
+ "With both on, the bot may save the same thing twice, and the two can disagree after something changes.": "兩個都開著時,Bot 可能把同一件事存兩遍,之後有變動時兩邊還會對不上。",
+ "What the bot forgets in Codync stays in {name}'s notes. Codync can't change them.": "Bot 在 Codync 裡忘掉的內容,仍留在 {name} 的筆記裡。Codync 改不了那些筆記。",
+ "Its notes show read-only under the {name} tab.": "它的筆記在 {name} 標籤下只讀顯示。",
+ "Codync can't show it; look in {name} itself.": "Codync 顯示不了,請到 {name} 自己裡面看。",
+ "Dreaming": "夢境",
+ "{name}'s own memory": "{name} 自己的記憶",
+ "About {name}'s own memory": "關於 {name} 自己的記憶",
+ "Turn on {name}'s own memory?": "開啟 {name} 自己的記憶?",
+ "Tidying between chats": "對話之間整理",
+ "Adds and takes out": "新增和刪去",
+ "Only your words": "只取你的原話",
+ "Kept apart": "單獨進行",
+ "A record": "一份記錄",
+ "After five quiet minutes or eight messages, the bot reads what you said since its last run and updates its memory.": "安靜五分鐘,或再過八條訊息之後,Bot 會讀上一次以來你說過的話,並更新記憶。",
+ "Green lines are memories it added. Red lines are ones it took out because they went out of date or moved into a note. It can also add a line to a note.": "綠行是它新增的記憶。紅行是它刪掉的,因為過時了,或移進了一條筆記。它也可以往筆記里加一行。",
+ "What it adds quotes something you typed yourself; pasted text, the bot's replies and other bots don't count. It never changes what you wrote. It may also put a passed date in the past tense, or move a detail into a note when memory is full.": "它新增的內容引用你親手打出來的話;貼上的文字、Bot 的回覆和其他 Bot 都不算。它不會改你寫過的內容。日期過了,它也可能改成過去時,或者在記憶滿了的時候把一條細節移進筆記。",
+ "It runs in its own session, away from the chat, and fixed checks decide what it may save.": "它在自己的會話裡執行,離開當前對話,由固定的檢查決定可以儲存什麼。",
+ "This tab only shows what it did. To change a memory, tell the bot.": "這個標籤只顯示它做了什麼。要改一條記憶,直接告訴 Bot。",
+ "Your bots run there. This phone is how you talk to them.": "你的 Bot 在那裡執行。這臺手機是你和它們說話的地方。",
+ "Saved (type to replace)": "已儲存(輸入以替換)",
+ "Next {when}": "下次 {when}",
+ "The terminal couldn't load. Update Android System WebView, then try again.": "終端載入不了。請更新 Android System WebView,然後再試。",
+ "The Codync cloud is off, so only this computer can send to it.": "Codync 雲已關閉,所以只有這臺電腦能向它傳送。",
+ "POST with Authorization: Bearer <key>. For GitHub, use content type application/json and the key as the secret. Deliveries wait up to 72 hours while this computer is off. They pass through the Codync cloud, which can read them.": "用 POST,請求頭為 Authorization: Bearer <key>。GitHub 請把內容型別設為 application/json,並把金鑰當作 secret。這臺電腦關機時,投遞最多等待 72 小時。它們會經過 Codync 雲,雲端可以讀到內容。",
+ "↑↓ move · ↵ run · esc back": "↑↓ 移動 · ↵ 執行 · esc 返回",
+ "A bot has an update.": "有 Bot 更新了。",
+ "A group has no memory of its own": "群聊沒有自己的記憶",
+ "A group has no session of its own": "群聊沒有自己的會話",
+ "ACP command, e.g. my-agent --acp": "ACP 命令,例如 my-agent --acp",
+ "API key": "API 金鑰",
+ "Access request": "訪問請求",
+ "Account menu": "賬戶選單",
+ "Add SSH computer": "新增 SSH 電腦",
+ "Add memory": "新增記憶",
+ "Add reaction": "新增回應",
+ "Add to Home Screen": "新增到主螢幕",
+ "Agent setup terminal": "智慧體設定終端",
+ "Agents refreshed": "智慧體已重新整理",
+ "Allow camera": "允許相機",
+ "Android chooses how Live updates appear based on your device and other tasks. These previews don't start one. Approvals are handled inside Codync.": "Android 會按你的裝置和正在做的事決定實時更新怎麼顯示。這些預覽不會真的發起一個。批准在 Codync 裡處理。",
+ "Automatically check for updates": "自動檢查更新",
+ "Automatically download and install": "自動下載並安裝",
+ "Bot conversations are read-only": "Bot 之間的對話是隻讀的",
+ "Call settings": "通話設定",
+ "Camera settings": "相機設定",
+ "Checking for a saved account…": "正在查詢已儲存的賬戶…",
+ "Choose a bot": "選擇一個 Bot",
+ "Choose key file": "選擇金鑰檔案",
+ "Claude Code and Codex limits show up here once a bot has used them.": "Bot 用過之後,Claude Code 和 Codex 的限額會顯示在這裡。",
+ "Codync Screen": "Codync Screen",
+ "Codync is free and open source. A star on GitHub is how other people find it.": "Codync 免費且開源。在 GitHub 上加一顆星,別人就能找到它。",
+ "Codync opens an SSH tunnel to codync-host on that computer's loopback. It uses your SSH config and ssh-agent; agent forwarding stays off.": "Codync 透過 SSH 隧道連到那臺電腦本機的 codync-host。它使用你的 SSH 配置和 ssh-agent,不會開啟代理轉發。",
+ "Connect this computer to create the bot.": "先連上這臺電腦,才能建立 Bot。",
+ "Connection request updated": "連線請求已更新",
+ "Conversation details": "對話詳情",
+ "Copied the last reply": "已複製上一條回覆",
+ "Copy install command": "複製安裝命令",
+ "Copy pairing link": "複製配對連結",
+ "Copy selection": "複製選中內容",
+ "Create your first bot in Codync.": "在 Codync 裡建立你的第一個 Bot。",
+ "Credential or op:// reference": "憑證或 op:// 引用",
+ "Custom command": "自定義命令",
+ "Delete routine?": "刪除例行任務?",
+ "Download cancelled · f retries": "下載已取消 · f 重試",
+ "Downloading… · f cancels": "正在下載… · f 取消",
+ "Edit the handoff": "編輯交接",
+ "Enjoying Codync?": "喜歡 Codync 嗎?",
+ "Finish in the browser, then ^r refreshes": "在瀏覽器裡完成後,按 ^r 重新整理",
+ "Finish signing in in the browser on this computer": "在這臺電腦的瀏覽器裡完成登入",
+ "Forgetting something in Codync doesn't reach it.": "在 Codync 裡忘掉的內容,到不了那裡。",
+ "Get Codync for mobile": "獲取手機版 Codync",
+ "Get a key": "獲取金鑰",
+ "Group chat": "群聊",
+ "Help & documentation": "幫助與文件",
+ "Host installed; connecting…": "Host 已安裝,正在連線…",
+ "Installing the host…": "正在安裝 Host…",
+ "Installing the skill…": "正在安裝技能…",
+ "It may store things twice; the two memories can disagree.": "它可能存兩遍,兩份記憶會對不上。",
+ "It stops running.": "它會停止執行。",
+ "Let account devices in without a code?": "允許賬戶裡的裝置不輸入驗證碼就進入?",
+ "Live updates on your Lock Screen": "在鎖屏上顯示實時更新",
+ "Loading history…": "正在載入歷史…",
+ "Longer leaves time to think mid-sentence.": "長一點,方便你在句子中間想一想。",
+ "Memory history": "記憶歷史",
+ "Message a bot": "給 Bot 發訊息",
+ "More message actions": "更多訊息操作",
+ "Name your bot": "給你的 Bot 起個名字",
+ "New code": "新驗證碼",
+ "No failed routine run to try again here": "這裡沒有失敗的例行任務可以重試",
+ "No files on that message": "那條訊息沒有檔案",
+ "No matching bots": "沒有匹配的 Bot",
+ "No message to reply to yet": "還沒有可以回覆的訊息",
+ "No other computers in your account yet.": "你的賬戶裡還沒有其他電腦。",
+ "No pending connection request here": "這裡沒有待處理的連線請求",
+ "No reply to copy": "沒有可以複製的回覆",
+ "No usage information yet.": "還沒有用量資訊。",
+ "No usage yet.": "還沒有用量。",
+ "No usage yet. Open Codync to refresh.": "還沒有用量。開啟 Codync 重新整理。",
+ "None yet. Pair an iPhone, or approve one from your account.": "還沒有。配對一臺 iPhone,或從賬戶裡批准一臺。",
+ "Not now": "暫時不要",
+ "Not working right now": "現在不可用",
+ "Nothing running right now.": "現在沒有在執行的。",
+ "Nothing yet. Claude Code's notes show up here once it saves some.": "還沒有。Claude Code 存了筆記之後,會顯示在這裡。",
+ "Older versions": "更早的版本",
+ "On device": "在本機",
+ "On this Android version a task shows as an ongoing notification. Live updates and the status bar chip need Android 16 QPR1.": "在這個 Android 版本上,任務顯示為一條持續通知。實時更新和狀態列標記需要 Android 16 QPR1。",
+ "Only a routine that runs on a webhook has a URL and key": "只有透過 webhook 執行的例行任務才有網址和金鑰",
+ "Only messages take replies": "只有訊息可以回覆",
+ "Open Android settings": "開啟 Android 設定",
+ "Open Codync": "開啟 Codync",
+ "Open account menu for Account": "開啟賬戶選單",
+ "Open conversation": "開啟對話",
+ "Opening the terminal…": "正在開啟終端…",
+ "Other computers in your account": "賬戶裡的其他電腦",
+ "Other sign-in options": "其他登入方式",
+ "Over SSH": "透過 SSH",
+ "Pair iPhone": "配對 iPhone",
+ "Push isn't set up in this build. Bots and chats still update while Codync is open.": "這個版本沒有設定推送。Codync 開啟時,Bot 和對話仍會更新。",
+ "Reach from anywhere": "隨時隨地連線",
+ "Reconnect to this computer to save settings.": "重新連線這臺電腦後才能儲存設定。",
+ "Replace the key?": "更換金鑰?",
+ "Report an issue": "報告問題",
+ "Reset all data?": "重置全部資料?",
+ "Reset everything": "全部重置",
+ "Revoke access": "撤銷訪問",
+ "Routines belong to a bot, not a group": "例行任務屬於 Bot,不屬於群聊",
+ "Runs each time something is posted to its URL.": "每次有內容發到它的網址時執行。",
+ "Saved securely; never added to chat. Esc closes.": "安全儲存,不會寫進對話。Esc 關閉。",
+ "Saving…": "正在儲存…",
+ "Search bots": "搜尋 Bot",
+ "Search widgets": "搜尋小元件",
+ "Senders using the current key stop working until they get the new one.": "還在用當前金鑰的傳送方會失效,直到它們拿到新金鑰。",
+ "Senders using the current key stop working.": "還在用當前金鑰的傳送方會失效。",
+ "Sending… Your draft stays here until delivered.": "正在傳送…送達之前,草稿會留在這裡。",
+ "Session timeline": "會話時間線",
+ "Set by bot": "由 Bot 設定",
+ "Show what it did": "顯示它做了什麼",
+ "Sign in on the page that opened. This updates by itself when you're done.": "在開啟的頁面上登入。完成後這裡會自己更新。",
+ "Sign in to see the other computers in your account.": "登入後才能看到賬戶裡的其他電腦。",
+ "Sign-in link copied: open it on this computer, then ^r refreshes": "登入連結已複製:在這臺電腦上開啟,然後按 ^r 重新整理",
+ "Skip the 6-digit check": "跳過 6 位驗證碼",
+ "Skip the check": "跳過驗證",
+ "Star Codync on GitHub": "在 GitHub 上給 Codync 加星",
+ "Star on GitHub": "在 GitHub 上加星",
+ "Start a new session?": "開始新會話?",
+ "Starting the sign-in…": "正在開始登入…",
+ "Stopping…": "正在停止…",
+ "That choice isn't offered; use 1–9": "沒有這個選項,請用 1–9",
+ "That computer isn't in your account.": "那臺電腦不在你的賬戶裡。",
+ "The agent forgets this conversation's context.": "智慧體會忘掉這段對話的上下文。",
+ "The conversation stays here, but the agent starts with a fresh context.": "對話還在,但智慧體會從一個新的上下文開始。",
+ "The host is missing": "找不到 Host",
+ "The host is up to date.": "Host 已是最新。",
+ "The language you speak in calls.": "你在通話裡說的語言。",
+ "The new one is copied in a curl command.": "新的金鑰已經放進一條 curl 命令裡。",
+ "The transcript stays here.": "記錄會留在這裡。",
+ "This connection request needs a newer app.": "這個連線請求需要更新的應用。",
+ "This deletes the routine and stops its future runs. This can't be undone.": "這會刪除這個例行任務,並停掉以後的執行。無法撤銷。",
+ "Time zone": "時區",
+ "Time zones": "時區",
+ "Timeout in seconds": "超時(秒)",
+ "Trust and connect": "信任並連線",
+ "Try again on this computer": "在這臺電腦上再試一次",
+ "Trying it again": "正在重試",
+ "Use + to create a bot.": "用 + 建立一個 Bot。",
+ "Use ssh-agent": "使用 ssh-agent",
+ "View conversation details": "檢視對話詳情",
+ "What it already posted stays in the chat.": "它已經發出去的內容會留在對話裡。",
+ "What the new conversation should know": "新對話需要知道的事",
+ "What this group works on": "這個群聊在做什麼",
+ "When to run": "何時執行",
+ "Your bots will appear once a computer is connected.": "連上一臺電腦之後,你的 Bot 會顯示在這裡。",
+ "Your launcher couldn't add it. Add it from the Home Screen instead.": "啟動器加不了。請改從主螢幕新增。",
+ "Your next message starts a fresh conversation that begins with this.": "你的下一條訊息會開始一段新對話,並以這段話開頭。",
+ "Your next message starts a fresh conversation that begins with this. ⇧↵ new line, ↵ saves.": "你的下一條訊息會開始一段新對話,並以這段話開頭。⇧↵ 換行,↵ 儲存。",
+ "esc then s stops the bot": "先按 esc,再按 s 停止 Bot",
+ "q quits": "q 退出",
+ "· now": "· 現在",
+ "Install Codync Dev on {name} and open it once. On Linux, install the development host as ~/.local/bin/codync-dev-host.": "在 {name} 上安裝 Codync Dev 並開啟一次。Linux 上請把開發用的 host 裝成 ~/.local/bin/codync-dev-host。",
+ "codync-host isn't installed on {name}. Install it there:": "{name} 上還沒有安裝 codync-host。請在那裡安裝:",
+ "Version {version} is available: run codync-host update": "已有 {version}:請執行 codync-host update",
+ "Download failed: {error}": "下載失敗:{error}",
+ "{error} Draft kept; Enter retries, Ctrl+C clears text.": "{error} 草稿還在;Enter 重試,Ctrl+C 清空文字。",
+ "1 s": "1 秒",
+ "1.5 s": "1.5 秒",
+ "2.5 s": "2.5 秒",
+ "At minute": "在這一分鐘",
+ "Reading speed": "朗讀速度",
+ "Send after a pause of": "停頓這麼久之後傳送",
+ "Created by": "建立者",
+ "Devices that were approved through the account lose access. Devices paired with a QR code keep it.": "透過賬戶批准的裝置會失去訪問。用二維碼配對的裝置仍然保留。",
+ "It disconnects right away and has to pair or ask again.": "它會立刻斷開,之後必須重新配對或再次請求。",
+ "Authorization: Bearer …": "Authorization: Bearer …",
+ "API_KEY=…": "API_KEY=…",
+ "Claude Subscription": "Claude 訂閱",
+ "Use Claude subscription": "使用 Claude 訂閱",
+ "Anthropic Console": "Anthropic 控制檯",
+ "Use Anthropic Console (API usage billing)": "使用 Anthropic 控制檯(按 API 用量計費)",
+ "Log in with Claude": "使用 Claude 登入",
+ "Run `claude /login` in the terminal": "在終端裡執行 `claude /login`",
+ "API Key": "API 金鑰",
+ "Use an API key to authenticate": "使用 API 金鑰登入",
+ "Use ChatGPT to authenticate": "使用 ChatGPT 登入",
+ "ChatGPT (device code)": "ChatGPT(裝置碼)",
+ "Sign in to ChatGPT by opening a verification page and entering a one-time code": "開啟驗證頁面,輸入一次性驗證碼,以登入 ChatGPT",
+ "Support": "支援",
+ "Voice": "語音",
+ "Engine": "引擎",
+ "Normal": "正常",
+ "Slower": "較慢",
+ "Faster": "較快",
+ "Realtime": "實時",
+ "Speech": "語音識別",
+ "Mode": "模式",
+ "Version": "版本",
+ "this Mac": "這臺 Mac",
+ "this computer": "這臺電腦",
+ "On-device speech, on this computer. Applies from the next call.": "使用這臺電腦上的本機語音。下次通話起生效。",
+ "Apple speech, on this device. Applies from the next call.": "使用這臺裝置上的 Apple 語音。下次通話起生效。",
+ "Android speech, on this device. Applies from the next call.": "使用這臺裝置上的 Android 語音。下次通話起生效。",
+ "Your own {name} key, billed by {name}. Applies from the next call.": "使用你自己的 {name} 金鑰,由 {name} 計費。下次通話起生效。",
+ "Reachable from anywhere through Cloudflare (encrypted).": "透過 Cloudflare 隨時隨地連線(已加密)。",
+ "Off: only Wi-Fi and Tailscale reach it, nothing goes through Cloudflare.": "關閉:只有 Wi-Fi 和 Tailscale 能連上,不會經過 Cloudflare。",
+ "Connecting to Cloudflare…": "正在連線 Cloudflare…",
+ "Sign in to add it to your account": "登入後把它加入你的賬戶",
+ "Not in your account": "不在你的賬戶裡",
+ "In {name} account": "在 {name} 的賬戶裡",
+ "another": "另一個",
+ "Add to account": "加入賬戶",
+ "Adding…": "正在新增…",
+ "Devices on your account get in on their own.": "你賬戶裡的裝置會自己進入。",
+ "Each new device shows a code you approve here.": "每臺新裝置都會顯示一個驗證碼,由你在這裡批准。",
+ "Devices that can use {name}": "可以使用 {name} 的裝置",
+ "Paired with a QR code": "透過二維碼配對",
+ "Paired with a QR code · seen {when}": "透過二維碼配對 · {when} 見過",
+ "Paired with a QR code · connected": "透過二維碼配對 · 已連線",
+ "Approved through the account": "透過賬戶批准",
+ "Approved through the account · seen {when}": "透過賬戶批准 · {when} 見過",
+ "Approved through the account · connected": "透過賬戶批准 · 已連線",
+ "connected": "已連線",
+ "Offline · seen {when}": "離線 · {when} 見過",
+ "Older copy": "較早的副本",
+ "Older copy · last seen {when}": "較早的副本 · 上次出現 {when}",
+ "Older copy of this computer": "這臺電腦較早的副本",
+ "Older copy of this computer · last seen {when}": "這臺電腦較早的副本 · 上次出現 {when}",
+ "Older copy of this computer · {status}": "這臺電腦較早的副本 · {status}",
+ "Updates are available in release builds.": "正式版才會提供更新。",
+ "Last checked {when}": "上次檢查 {when}",
+ "Run bots on another computer you reach with SSH. It needs codync-host installed; your SSH keys stay on {name}.": "在另一臺你能用 SSH 連上的電腦上執行 Bot。那臺電腦需要安裝 codync-host;SSH 金鑰留在{name}。",
+ "Sent when you pause, replies read aloud.": "你停頓後傳送,回覆會朗讀出來。",
+ "A live conversation. Talk over replies.": "實時對話。可以在回覆時插話。",
+ "Remove {name} from the account?": "從賬戶移除 {name}?",
+ "Revoke {name}?": "撤銷 {name} 的訪問?",
+ "Remove the older {name}?": "移除較早的 {name}?",
+ "It's an earlier identity of {name} and can't be reached anymore. Removing it only cleans up your account.": "這是 {name} 較早的身份,已經連不上了。移除它只是清理你的賬戶。",
+ "Any device signed in to your account gets full control of {name}: its files, terminals and bots, with no check here. If someone gets into your account, or Codync's cloud is ever compromised, they could add their own device and you'd have no chance to stop it. Devices paired with a QR code aren't affected.": "登入了你賬戶的任何裝置都能完全控制 {name}:它的檔案、終端和 Bot,這裡不會再核對。如果有人進入你的賬戶,或 Codync 的雲被攻破,對方可以自己加一臺裝置,你沒有機會攔住。用二維碼配對的裝置不受影響。",
+ "Pair iPhone with {name}": "讓 iPhone 與 {name} 配對",
+ "Waiting for your OK on the computer · {code}": "等你在電腦上確認 · {code}",
+ "Online · A request is waiting": "線上 · 有一個請求在等待",
+ "Offline · A request is waiting": "離線 · 有一個請求在等待",
+ "Online · In your account": "線上 · 在你的賬戶裡",
+ "Offline · In your account": "離線 · 在你的賬戶裡",
+ "Open {name}": "開啟 {name}",
+ "Quit {name}": "退出 {name}",
+ "Pair iPhone…": "配對 iPhone…",
+ "Remote screen": "遠端螢幕",
+ "Version {version}": "版本 {version}",
+ "Text Size": "文字大小",
+ "Restart host": "重啟 Host",
+ "Open log": "開啟日誌",
+ "Uninstall host service": "解除安裝 Host 服務",
+ "Reset all data…": "重置全部資料…",
+ "Host not found": "找不到 Host",
+ "Host not installed": "Host 未安裝",
+ "Host problem": "Host 出了問題",
+ "Rebuild Codync Dev with its development host.": "請用開發版 Host 重新編譯 Codync Dev。",
+ "Reinstall Codync or install the host with Homebrew.": "請重新安裝 Codync,或用 Homebrew 安裝 Host。",
+ "Copy host install command": "複製 Host 安裝命令",
+ "Install host": "安裝 Host",
+ "Review access request from {name}…": "檢視來自 {name} 的訪問請求…",
+ "Stop task": "停止任務",
+ "Enable remote screen": "啟用遠端螢幕",
+ "Set up computer access…": "設定電腦訪問…",
+ "Restarting…": "正在重啟…",
+ "Restart to update": "重啟以更新",
+ "Downloading… {percent}%": "正在下載… {percent}%",
+ "Update to {version}": "更新到 {version}",
+ "Retry installing update": "重試安裝更新",
+ "{count} bot working": "{count} 個 Bot 正在工作",
+ "{count} bots working": "{count} 個 Bot 正在工作",
+ "Needs your response": "需要你回覆",
+ "A bot needs you": "有 Bot 需要你",
+ "A device asks for access": "有裝置請求訪問",
+ "Control this Mac from your iPhone": "從 iPhone 控制這臺 Mac",
+ "Control this computer from your iPhone": "從 iPhone 控制這臺電腦",
+ "Needs approval in System Settings": "需要在系統設定裡批准",
+ "Starting Codync Screen…": "正在啟動 Codync Screen…",
+ "Needs permission": "需要許可權",
+ "Your phone is viewing": "你的手機正在檢視",
+ "{count} viewers": "{count} 人正在檢視",
+ "{name} is using it": "{name} 正在使用",
+ "Ready · {display}": "就緒 · {display}",
+ "Computer access is ready.": "電腦訪問已就緒。",
+ "Connecting to the screen…": "正在連線螢幕…",
+ "Reconnecting…": "正在重新連線…",
+ "This computer is offline.": "這臺電腦離線了。",
+ "Update Codync on your computer to use its screen from here.": "請先更新電腦上的 Codync,才能在這裡使用它的螢幕。",
+ "Set up Computer access in Codync on the computer.": "請先在電腦上的 Codync 裡設定電腦訪問。",
+ "On the computer, open Codync → Settings → Computer access. Permissions are set separately on each computer.": "在電腦上開啟 Codync → 設定 → 電腦訪問。每臺電腦的許可權要單獨設定。",
+ "Remote screen is off. {setup}": "遠端螢幕已關閉。{setup}",
+ "Codync Screen is not running. {setup}": "Codync Screen 沒有在執行。{setup}",
+ "Choose a screen and allow control in the system sharing dialog. {setup}": "在系統共享對話方塊裡選擇螢幕並允許控制。{setup}",
+ "Allow screen recording for {name}. {setup}": "請允許 {name} 進行螢幕錄製。{setup}",
+ "Allow computer control for {name}. macOS may call this Device Control and Data Access or Accessibility. {setup}": "請允許 {name} 控制電腦。macOS 可能把它叫作“裝置控制和資料訪問”或“輔助功能”。{setup}",
+ "Remote screen viewing is not available on Windows yet. Bots can still use apps on that computer.": "從手機遠端看螢幕在 Windows 上還不可用。Bot 仍然可以在那臺電腦上使用應用。",
+ "listing skills on GitHub: {error}": "無法列出 GitHub 上的技能:{error}",
+ "{url} answered {status}": "{url} 返回了 {status}",
+ "Theme": "主題",
+ "Light": "淺色",
+ "Dark": "深色",
+ "Only changes appearance on this device.": "只改變這臺裝置的外觀。",
+ "Continue on this Mac": "在這臺 Mac 上繼續",
+ "Continue on this computer": "在這臺電腦上繼續",
+ "Sign-in isn't configured in this build. You can still use Codync on this Mac.": "這個版本沒有配置登入。你仍可以在這臺 Mac 上使用 Codync。",
+ "Sign-in isn't configured in this build. You can still use Codync on this computer.": "這個版本沒有配置登入。你仍可以在這臺電腦上使用 Codync。",
+ "Show in Notch": "在螢幕頂部顯示",
+ "Voice input shortcut": "語音輸入快捷鍵",
+ "Talk to a bot from any app, then tap the key once more to send.": "在任何應用裡對 Bot 說話,再按一次這個鍵就傳送。",
+ "Right ⌘ twice": "右 ⌘ 兩次",
+ "Left ⌘ twice": "左 ⌘ 兩次",
+ "Tip: double-tap {key} to talk from any app, then tap it once to send.": "提示:連按兩次{key},就能在任何應用裡說話,再按一次就傳送。",
+ "the right ⌘": "右側 ⌘",
+ "the left ⌘": "左側 ⌘",
+ "{name} (not installed)": "{name}(未安裝)",
+ "Copy template": "複製模板",
+ "Siri and Dictation are disabled": "Siri 和聽寫已關閉",
+ "the Codync cloud refused ({status} {code}): {message}": "Codync 雲拒絕了({status} {code}):{message}",
+ "forbidden": "禁止",
+ "Sign in on the computer to use remote screen relay.": "請先在電腦上登入,才能使用遠端螢幕中繼。",
+ "Remote screen relay is not configured on this cloud.": "這臺雲沒有配置遠端螢幕中繼。",
+ "Remote screen relay is temporarily unavailable. Try again shortly.": "遠端螢幕中繼暫時不可用。請稍後再試。",
+ "Too many screen connections. Try again in a minute.": "螢幕連線太多了。請過一分鐘再試。"
+}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/AgentSheet.kt b/apps/android/app/src/main/kotlin/com/codync/android/AgentSheet.kt
index 582ccc6b..1eb14730 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/AgentSheet.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/AgentSheet.kt
@@ -118,7 +118,7 @@ internal fun agentRegistry(state: AppState, agent: String) = agentBackends(state
Column(verticalArrangement = Arrangement.spacedBy(2.dp)) {
Text(backend.name, style = Type.title3.semibold, color = Palette.text)
backend.description?.takeIf(String::isNotEmpty)?.let {
- Text(it, style = Type.subheadline, color = Palette.secondary, maxLines = 3, overflow = TextOverflow.Ellipsis)
+ Text(tr(it), style = Type.subheadline, color = Palette.secondary, maxLines = 3, overflow = TextOverflow.Ellipsis)
}
}
}
@@ -186,8 +186,8 @@ private fun statusText(backend: AgentBackend, auth: AgentAuth?, signedIn: Boolea
horizontalArrangement = Arrangement.spacedBy(12.dp)) {
Box(Modifier.width(26.dp), contentAlignment = Alignment.Center) { Symbol(icon, size = 20.dp, tint = Palette.secondary) }
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text(title, style = Type.body.medium, color = Palette.text)
- Text(detail, style = Type.subheadline, color = Palette.secondary, maxLines = 3, overflow = TextOverflow.Ellipsis)
+ Text(tr(title), style = Type.body.medium, color = Palette.text)
+ Text(tr(detail), style = Type.subheadline, color = Palette.secondary, maxLines = 3, overflow = TextOverflow.Ellipsis)
}
if (busy) ThinkingOrb(size = 16.dp, color = Palette.secondary) else Symbol("chevron.right", size = 13.dp, tint = Palette.tertiary)
}
@@ -195,18 +195,19 @@ private fun statusText(backend: AgentBackend, auth: AgentAuth?, signedIn: Boolea
/** A numbered setup step: done shows a check; an action sits on the right. */
@Composable private fun SetupStepRow(number: Int, title: String, detail: String, done: Boolean, action: Pair<String, () -> Unit>?) {
- Row(Modifier.padding(vertical = 4.dp).semantics(mergeDescendants = true) { stateDescription = if (done) "Done" else "" },
+ val doneLabel = tr("Done")
+ Row(Modifier.padding(vertical = 4.dp).semantics(mergeDescendants = true) { stateDescription = if (done) doneLabel else "" },
verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) {
Box(Modifier.size(26.dp).clip(Capsule()).background(if (done) Palette.accentFill else Palette.bubbleAgent), contentAlignment = Alignment.Center) {
if (done) Symbol("checkmark", size = 13.dp, tint = Palette.onAccent)
else Text("$number", style = Type.caption.semibold, color = Palette.secondary)
}
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text(title, style = Type.body.medium, color = Palette.text)
- Text(detail, style = Type.subheadline, color = Palette.secondary)
+ Text(tr(title), style = Type.body.medium, color = Palette.text)
+ Text(tr(detail), style = Type.subheadline, color = Palette.secondary)
}
action?.let { (label, run) ->
- Text(label, Modifier.clip(Capsule()).background(Palette.bubbleAgent).plainButton(action = run).padding(horizontal = 14.dp, vertical = 7.dp),
+ Text(tr(label), Modifier.clip(Capsule()).background(Palette.bubbleAgent).plainButton(action = run).padding(horizontal = 14.dp, vertical = 7.dp),
style = Type.subheadline.semibold, color = Palette.text)
}
}
@@ -230,7 +231,7 @@ private fun statusText(backend: AgentBackend, auth: AgentAuth?, signedIn: Boolea
}
val savedHere = method.vars.any { it.name in saved }
Column(Modifier.fillMaxSize().background(Palette.background)) {
- ScreenHeader({ BackButton(back) }, { Text(method.name, style = Type.body.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis) }) {
+ ScreenHeader({ BackButton(back) }, { Text(tr(method.name), style = Type.body.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis) }) {
if (saving) Box(Modifier.size(36.dp), contentAlignment = Alignment.Center) { Spinner() }
else IconButton("Save", "checkmark", enabled = method.complete(values, saved)) { save(values.filterValues(String::isNotEmpty)) }
}
@@ -239,11 +240,11 @@ private fun statusText(backend: AgentBackend, auth: AgentAuth?, signedIn: Boolea
CardSection(method.name) {
for (v in method.vars) row {
NotedInput(values[v.name].orEmpty(), { values = values + (v.name to it) }, if (v.name in saved) "Saved (type to replace)" else v.name,
- v.label + if (v.optional) " (optional)" else "", secret = v.secret)
+ tr(v.label) + if (v.optional) tr(" (optional)") else "", secret = v.secret)
}
}
Column(Modifier.padding(horizontal = 4.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) {
- method.description?.let { Text(it, style = Type.caption, color = Palette.tertiary) }
+ method.description?.let { Text(tr(it), style = Type.caption, color = Palette.tertiary) }
Text("Saved on ${state.hostName} only and given to ${backend.name} when it starts.", style = Type.caption, color = Palette.tertiary)
method.link?.let { WebLink("Get a key", it, Type.caption) }
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/AnalyticsSheet.kt b/apps/android/app/src/main/kotlin/com/codync/android/AnalyticsSheet.kt
index 5235528b..3ff0771e 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/AnalyticsSheet.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/AnalyticsSheet.kt
@@ -37,17 +37,17 @@ private val DETAILS = listOf(
Row(horizontalArrangement = Arrangement.spacedBy(12.dp)) {
Box(Modifier.width(22.dp).padding(top = 1.dp), contentAlignment = Alignment.Center) { Symbol(icon, size = 18.dp, tint = Palette.secondary) }
Column(verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text(title, style = Type.body, color = Palette.text)
- Text(detail, style = Type.footnote, color = Palette.secondary)
+ Text(tr(title), style = Type.body, color = Palette.text)
+ Text(tr(detail), style = Type.footnote, color = Palette.secondary)
}
}
}
}
Row(Modifier.padding(horizontal = 2.dp), horizontalArrangement = Arrangement.spacedBy(4.dp)) {
- Text("See the", style = Type.caption, color = Palette.secondary)
+ Text(tr("See the"), style = Type.caption, color = Palette.secondary)
LinkButton("Privacy Policy", style = Type.caption.copy(textDecoration = androidx.compose.ui.text.style.TextDecoration.Underline),
color = Palette.text) { uri.open("https://codync.dev/privacy", OutboundLink.Privacy) }
- Text("for details.", style = Type.caption, color = Palette.secondary)
+ Text(tr("for details."), style = Type.caption, color = Palette.secondary)
}
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/AppLanguageStore.kt b/apps/android/app/src/main/kotlin/com/codync/android/AppLanguageStore.kt
new file mode 100644
index 00000000..a8aef3f3
--- /dev/null
+++ b/apps/android/app/src/main/kotlin/com/codync/android/AppLanguageStore.kt
@@ -0,0 +1,59 @@
+package com.codync.android
+
+import android.content.Context
+import com.codync.android.design.AppLanguage
+import com.codync.android.design.ChineseScript
+import kotlinx.serialization.json.Json
+import kotlinx.serialization.json.jsonObject
+import kotlinx.serialization.json.jsonPrimitive
+
+/** This phone's interface language. The phrase tables are the same files the iPhone app ships. */
+internal object AppLanguageStore {
+ private const val KEY = "appLanguage"
+ private val phraseLock = Any()
+
+ @Volatile private var hans: Map<String, String>? = null
+ @Volatile private var hant: Map<String, String>? = null
+ @Volatile private var hantView: Map<String, String>? = null
+
+ private fun prefs(context: Context) = context.getSharedPreferences("codync-language", Context.MODE_PRIVATE)
+
+ fun get(context: Context): AppLanguage = AppLanguage.fromStored(prefs(context).getString(KEY, null))
+
+ fun set(context: Context, language: AppLanguage) {
+ prefs(context).edit().putString(KEY, AppLanguage.stored(language)).apply()
+ }
+
+ /** The table for this choice. A Traditional line missing from its table keeps the Simplified one. */
+ fun phrases(context: Context, language: AppLanguage = get(context), systemTag: String = java.util.Locale.getDefault().toLanguageTag()): Map<String, String> {
+ val simplified = load(context, ChineseScript.Hans)
+ if (language.resolvedScript(systemTag) != ChineseScript.Hant) return simplified
+ hantView?.let { return it }
+ synchronized(phraseLock) {
+ hantView?.let { return it }
+ val merged = simplified + load(context, ChineseScript.Hant)
+ hantView = merged
+ return merged
+ }
+ }
+
+ /** A missing or malformed table is logged and left empty so the next call can try again. */
+ private fun load(context: Context, script: ChineseScript): Map<String, String> {
+ val cached = if (script == ChineseScript.Hant) hant else hans
+ cached?.let { return it }
+ synchronized(phraseLock) {
+ val again = if (script == ChineseScript.Hant) hant else hans
+ again?.let { return it }
+ val name = if (script == ChineseScript.Hant) "zh-Hant.json" else "zh-Hans.json"
+ return try {
+ val text = context.assets.open(name).bufferedReader().use { it.readText() }
+ val parsed = Json.parseToJsonElement(text).jsonObject.mapValues { (_, value) -> value.jsonPrimitive.content }
+ if (script == ChineseScript.Hant) hant = parsed else hans = parsed
+ parsed
+ } catch (error: Exception) {
+ android.util.Log.e("Codync", "$name phrases failed to load", error)
+ emptyMap()
+ }
+ }
+ }
+}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/BotConversation.kt b/apps/android/app/src/main/kotlin/com/codync/android/BotConversation.kt
index 8c8ea88f..007d970c 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/BotConversation.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/BotConversation.kt
@@ -84,7 +84,7 @@ private fun AppState.authorName(id: String): String = bots.firstOrNull { it.id =
LazyColumn(Modifier.fillMaxSize(), state = list, contentPadding = PaddingValues(start = 16.dp, end = 16.dp, bottom = 12.dp),
verticalArrangement = Arrangement.spacedBy(4.dp)) {
if (error != null || rows.isEmpty() && fetched != null) item("empty") {
- Text(error ?: "No messages yet.", Modifier.fillMaxWidth().padding(top = 24.dp), style = Type.footnote,
+ Text(tr(error ?: "No messages yet."), Modifier.fillMaxWidth().padding(top = 24.dp), style = Type.footnote,
color = if (error != null) Palette.danger else Palette.tertiary, textAlign = TextAlign.Center)
}
items(rows, key = { it.id }) { row ->
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/BotEditor.kt b/apps/android/app/src/main/kotlin/com/codync/android/BotEditor.kt
index 5e0175fd..93a12926 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/BotEditor.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/BotEditor.kt
@@ -152,7 +152,7 @@ internal val JsonObject.curated get() = this["curated"]?.jsonPrimitive?.booleanO
) }, label = "Workspace") {
Row(Modifier.outline().pill(androidx.compose.ui.graphics.Color.Transparent), verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(6.dp)) {
- Text(if (draft.cwd.isEmpty()) "Personal" else draft.cwd.trimEnd('/').substringAfterLast('/').ifEmpty { "/" },
+ Text(if (draft.cwd.isEmpty()) tr("Personal") else draft.cwd.trimEnd('/').substringAfterLast('/').ifEmpty { "/" },
style = Type.body, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
Symbol("chevron.down", size = 13.dp, tint = Palette.secondary)
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/BotListView.kt b/apps/android/app/src/main/kotlin/com/codync/android/BotListView.kt
index dde93782..89152de7 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/BotListView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/BotListView.kt
@@ -195,7 +195,7 @@ internal fun moved(roster: List<Bot>, id: String, offset: Int): List<String>? {
overflow = TextOverflow.Ellipsis)
}
Spacer(Modifier.width(8.dp))
- if (bot.lastAt > 0) Text(RelativeTime.day(bot.lastAt), style = Type.subheadline,
+ if (bot.lastAt > 0) Text(RelativeTime.day(bot.lastAt, yesterday = tr("Yesterday")), style = Type.subheadline,
color = if (bot.unread > 0) Palette.text else Palette.tertiary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) {
@@ -214,16 +214,16 @@ internal fun moved(roster: List<Bot>, id: String, offset: Int): List<String>? {
when {
bot.status == "needsInput" -> Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) {
ThinkingOrb(ThinkingOrbState.Listening, 16.dp, Palette.warning)
- Text(bot.activity.ifEmpty { "Needs your approval" }, style = Type.subheadline, color = Palette.warning, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(tr(bot.activity.ifEmpty { "Needs your approval" }), style = Type.subheadline, color = Palette.warning, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
bot.status == "working" -> Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) {
ThinkingOrb(size = 13.dp, color = Palette.secondary)
- Text(bot.activity.ifEmpty { "Working…" }, style = Type.subheadline, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(tr(bot.activity.ifEmpty { "Working…" }), style = Type.subheadline, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
bot.status == "error" -> Text(messagePreview(bot.lastMessage ?: "Something went wrong"), style = Type.subheadline, color = Palette.danger,
maxLines = 1, overflow = TextOverflow.Ellipsis)
else -> Text(messagePreview(bot.lastMessage ?: if (bot.kind == "group") "${bot.members.size} bots"
- else "${backendName(state, bot.backend)} · ${if (bot.managedWorkspace) "Personal workspace" else bot.cwd.trimEnd('/').substringAfterLast('/')}"),
+ else "${backendName(state, bot.backend)} · ${if (bot.managedWorkspace) tr("Personal workspace") else bot.cwd.trimEnd('/').substringAfterLast('/')}"),
style = Type.subheadline, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt b/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt
index 83c66f82..eff57e8d 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt
@@ -100,7 +100,7 @@ internal fun chatItems(entries: List<Entry>, pending: List<PendingSend>): List<C
/** A chat's time separator: Today 3:27 AM. */
@Composable internal fun TimeSeparator(at: Long) {
- Text(RelativeTime.separator(at), Modifier.fillMaxWidth().padding(top = 18.dp, bottom = 6.dp), style = Type.footnote,
+ Text(RelativeTime.separator(at, tr("Today"), tr("Yesterday")), Modifier.fillMaxWidth().padding(top = 18.dp, bottom = 6.dp), style = Type.footnote,
color = Palette.tertiary, textAlign = TextAlign.Center)
}
@@ -364,7 +364,7 @@ internal val Entry.botReactions: Map<String, List<String>> get() =
.padding(horizontal = 16.dp, vertical = 12.dp),
verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
ThinkingOrb(if (needs) ThinkingOrbState.Listening else ThinkingOrbState.Working, 16.dp, if (needs) Palette.warning else Palette.secondary)
- Text(bot.activity.ifEmpty { "Working…" }, Modifier.weight(1f, fill = false), style = Type.subheadline,
+ Text(tr(bot.activity.ifEmpty { "Working…" }), Modifier.weight(1f, fill = false), style = Type.subheadline,
color = if (needs) Palette.warning else Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
bot.startedAt?.let { Elapsed(it) }
}
@@ -390,7 +390,8 @@ internal val Entry.botReactions: Map<String, List<String>> get() =
val lines = if (bot.kind == "group") listOfNotNull(
members.joinToString(" · ") { it.name }.takeIf { bot.name != members.joinToString(", ") { it.name } },
bot.description.ifEmpty { null }) else listOfNotNull(
- if (bot.managedWorkspace) "${backendName(state, bot.backend)} · Personal workspace" else "${backendName(state, bot.backend)} in ${bot.cwd}",
+ if (bot.managedWorkspace) "${backendName(state, bot.backend)} · ${tr("Personal workspace")}"
+ else tr("{agent} in {path}").replace("{agent}", backendName(state, bot.backend)).replace("{path}", bot.cwd),
bot.description.ifEmpty { null })
for (line in lines) Text(line, style = Type.subheadline, color = Palette.secondary, textAlign = TextAlign.Center)
Text(if (bot.kind == "group") "Everyone answers in turn. @mention a bot to ask just that one."
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt b/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt
index 2744553b..04419c37 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt
@@ -156,8 +156,9 @@ import com.kyant.shapes.Capsule
Symbol("chevron.left", size = 32.dp, tint = Palette.text)
}
val host = state.computers.firstOrNull()?.name.orEmpty()
+ val connected = tr(connectionLabel(state))
DropdownMenu({ buildList {
- add(MenuItem("$host · ${connectionLabel(state)}", enabled = false))
+ add(MenuItem("$host · $connected", enabled = false))
add(MenuItem("Reconnect", icon = "arrow.clockwise") { store.reconnect() })
add(MenuItem("Details", icon = "info.circle", divider = true) { edit(bot) })
add(MenuItem("Full conversation", icon = "list.bullet.rectangle", action = trace))
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/CodyncWidgets.kt b/apps/android/app/src/main/kotlin/com/codync/android/CodyncWidgets.kt
index 9a3f6ce0..e61fc32d 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/CodyncWidgets.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/CodyncWidgets.kt
@@ -26,6 +26,7 @@ import androidx.glance.GlanceModifier
import androidx.glance.Image
import androidx.glance.ImageProvider
import androidx.glance.LocalContext
+import com.codync.android.design.translate
import androidx.glance.LocalSize
import androidx.glance.action.clickable
import androidx.glance.appwidget.GlanceAppWidget
@@ -165,11 +166,11 @@ private fun dark(context: Context) = context.resources.configuration.uiMode and
highlight = if (provider.id == "claude") 0xFFD97757.toInt() else null)
Spacer(GlanceModifier.width(7.dp))
Text(provider.name, GlanceModifier.defaultWeight(), style = style(13f, ink, FontWeight.Medium), maxLines = 1)
- if (layout != ProviderLayout.Small) Text("Usage", style = style(10f, secondary, FontWeight.Medium))
+ if (layout != ProviderLayout.Small) Text(phrase("Usage"), style = style(10f, secondary, FontWeight.Medium))
}
if (layout == ProviderLayout.Small && top != null) {
Spacer(GlanceModifier.defaultWeight())
- Text(top.title, style = style(11f, secondary), maxLines = 1)
+ Text(phrase(top.title), style = style(11f, secondary), maxLines = 1)
Row(verticalAlignment = Alignment.Bottom) {
val color = if ((top.percent ?: 0.0) >= 90) danger else ink
Text("${(top.percent ?: 0.0).roundToInt()}", style = style(32f, color, FontWeight.Medium))
@@ -177,14 +178,14 @@ private fun dark(context: Context) = context.resources.configuration.uiMode and
}
Ticks(context, top.percent ?: 0.0, tint, 13.dp)
Spacer(GlanceModifier.height(6.dp))
- Text(top.resetsShort() ?: "Usage reported by your computer", style = style(9f, secondary), maxLines = 1)
+ Text(top.resetsShort()?.let { resetSpoken(it) } ?: phrase("Usage reported by your computer"), style = style(9f, secondary), maxLines = 1)
} else {
Spacer(GlanceModifier.height(8.dp))
if (layout == ProviderLayout.Large && top != null) {
Row(GlanceModifier.padding(vertical = 4.dp), verticalAlignment = Alignment.Bottom) {
Text("${(top.percent ?: 0.0).roundToInt()}%", style = style(36f, if ((top.percent ?: 0.0) >= 90) danger else ink, FontWeight.Medium))
Spacer(GlanceModifier.width(8.dp))
- Text("${top.title} · highest usage", GlanceModifier.padding(bottom = 6.dp), style = style(11f, secondary), maxLines = 2)
+ Text("${phrase(top.title)} · ${phrase("highest usage")}", GlanceModifier.padding(bottom = 6.dp), style = style(11f, secondary), maxLines = 2)
}
}
for (window in provider.windows.take(if (layout == ProviderLayout.Large) 4 else 2)) WindowRow(context, window, tint)
@@ -195,12 +196,12 @@ private fun dark(context: Context) = context.resources.configuration.uiMode and
@Composable private fun WindowRow(context: Context, window: UsageWindow, tint: Int) {
Column(GlanceModifier.fillMaxWidth().padding(bottom = 6.dp)) {
Row(GlanceModifier.fillMaxWidth()) {
- Text(window.title, GlanceModifier.defaultWeight(), style = style(11f, secondary, FontWeight.Medium), maxLines = 1)
+ Text(phrase(window.title), GlanceModifier.defaultWeight(), style = style(11f, secondary, FontWeight.Medium), maxLines = 1)
Text("${(window.percent ?: 0.0).roundToInt()}%", style = style(13f, if ((window.percent ?: 0.0) >= 90) danger else ink, FontWeight.Medium))
}
Spacer(GlanceModifier.height(3.dp))
Ticks(context, window.percent ?: 0.0, tint, 12.dp)
- window.resetsShort()?.let { Text(it, GlanceModifier.fillMaxWidth(), style = TextStyle(secondary, 9.sp, textAlign = TextAlign.End), maxLines = 1) }
+ window.resetsShort()?.let { Text(resetSpoken(it), GlanceModifier.fillMaxWidth(), style = TextStyle(secondary, 9.sp, textAlign = TextAlign.End), maxLines = 1) }
}
}
@@ -212,7 +213,7 @@ private fun dark(context: Context) = context.resources.configuration.uiMode and
Column(GlanceModifier.fillMaxSize()) {
Face(context, "blob", "gray", 26.dp)
Spacer(GlanceModifier.defaultWeight())
- Text(if (feed.computerId == null && !sample) "Open Codync to pair with your computer." else "No usage reported yet.",
+ Text(phrase(if (feed.computerId == null && !sample) "Open Codync to pair with your computer." else "No usage reported yet."),
style = style(12f, secondary), maxLines = 3)
}
return
@@ -240,9 +241,9 @@ private fun dark(context: Context) = context.resources.configuration.uiMode and
@Composable private fun LimitHero(limit: ProviderLimit) {
val percent = limit.window.percent ?: 0.0
Column {
- Text("${limit.provider} · ${limit.window.label}", style = style(12f, secondary), maxLines = 1)
+ Text("${limit.provider} · ${phrase(limit.window.title)}", style = style(12f, secondary), maxLines = 1)
Text("${percent.roundToInt()}%", style = style(34f, if (percent >= 90) danger else ink, FontWeight.Medium), maxLines = 1)
- Text(limit.window.resetsShort() ?: " ", style = style(11f, tertiary), maxLines = 1)
+ Text(limit.window.resetsShort()?.let { resetSpoken(it) } ?: " ", style = style(11f, tertiary), maxLines = 1)
}
}
@@ -250,7 +251,7 @@ private fun dark(context: Context) = context.resources.configuration.uiMode and
val percent = limit.window.percent ?: 0.0
Column(GlanceModifier.fillMaxWidth()) {
Row(GlanceModifier.fillMaxWidth()) {
- Text("${limit.provider} ${limit.window.label}", GlanceModifier.defaultWeight(), style = style(11f, secondary), maxLines = 1)
+ Text("${limit.provider} ${phrase(limit.window.title)}", GlanceModifier.defaultWeight(), style = style(11f, secondary), maxLines = 1)
Text("${percent.roundToInt()}%", style = style(11f, secondary))
}
Spacer(GlanceModifier.height(4.dp))
@@ -261,6 +262,21 @@ private fun dark(context: Context) = context.resources.configuration.uiMode and
private const val WARNING = 0xFFF0A030.toInt()
+@Composable private fun phrase(text: String): String {
+ val context = LocalContext.current
+ val language = AppLanguageStore.get(context)
+ val table = AppLanguageStore.phrases(context, language)
+ return translate(text, language, java.util.Locale.getDefault().language == "zh", table)
+}
+
+@Composable private fun resetSpoken(raw: String): String {
+ val context = LocalContext.current
+ val language = AppLanguageStore.get(context)
+ val table = AppLanguageStore.phrases(context, language)
+ val systemChinese = java.util.Locale.getDefault().language == "zh"
+ return spokenReset(raw, language.usesChinese(systemChinese)) { translate(it, language, systemChinese, table) }
+}
+
/** Fine, separated ticks (iOS `UsageTicks`), as a bitmap: widgets can't draw. */
@Composable private fun Ticks(context: Context, percent: Double, tint: Int, height: Dp) {
val red = danger.getColor(context).toArgb()
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ConnectorSheets.kt b/apps/android/app/src/main/kotlin/com/codync/android/ConnectorSheets.kt
index 7f9fcfe3..4489a402 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/ConnectorSheets.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/ConnectorSheets.kt
@@ -77,22 +77,27 @@ import kotlinx.coroutines.launch
}
if (item.options.size > 1) CardSection("Runs") {
row {
- ChoiceList(optionId, item.options.map { Triple(it.id, if (it.kind == "remote") "Hosted by ${item.title}" else "On ${state.hostName} (${it.kind})", null) },
+ val hosted = tr("Hosted by {name}")
+ val onComputer = tr("On {name} ({kind})")
+ ChoiceList(optionId, item.options.map {
+ Triple(it.id, if (it.kind == "remote") hosted.replace("{name}", item.title)
+ else onComputer.replace("{name}", state.hostName).replace("{kind}", it.kind), null)
+ },
{ optionId = it; values = emptyMap() })
}
}
- if (option != null) CardSection("Setup", "Keys are saved on ${state.hostName} only.") {
+ if (option != null) CardSection("Setup", tr("Keys are saved on {name} only.").replace("{name}", state.hostName)) {
if (option.inputs.isEmpty()) row {
- Text(if (option.kind == "remote") "No keys needed here. If ${item.title} wants you to sign in, its sign-in page opens next." else "No setup needed.",
+ Text(if (option.kind == "remote") tr("No keys needed here. If {name} wants you to sign in, its sign-in page opens next.").replace("{name}", item.title) else tr("No setup needed."),
style = Type.body, color = Palette.secondary)
}
for (input in option.inputs) row {
NotedInput(values[input.name].orEmpty(), { values = values + (input.name to it) },
if (input.secret) input.name else input.defaultValue ?: input.placeholder ?: input.name,
- input.description?.let { it + if (input.required) "" else " (optional)" }, secret = input.secret)
+ input.description?.let { it + if (input.required) "" else tr(" (optional)") }, secret = input.secret)
}
}
- if (signingIn) CardSection { row { Waiting("Finish signing in to ${item.title} in the browser…") } }
+ if (signingIn) CardSection { row { Waiting(tr("Finish signing in to {name} in the browser…").replace("{name}", item.title)) } }
error?.let { CardSection { row { ErrorRow(it) } } }
}
}
@@ -149,9 +154,9 @@ private enum class CustomMode { Command, Url, Config }
}
CardForm(Modifier.weight(1f)) {
CardSection(footer = when (mode) {
- CustomMode.Command -> "Runs on $host in the bot's project folder. Quotes work like in a shell."
+ CustomMode.Command -> tr("Runs on {name} in the bot's project folder. Quotes work like in a shell.").replace("{name}", host)
CustomMode.Url -> "A remote MCP server, streamable HTTP or SSE."
- CustomMode.Config -> "Paste the MCP config from a README or another app (Claude, Cursor, VS Code). Every server in it is added. Saved on $host only."
+ CustomMode.Config -> tr("Paste the MCP config from a README or another app (Claude, Cursor, VS Code). Every server in it is added. Saved on {name} only.").replace("{name}", host)
}) {
row { SegmentedChoice(mode, listOf(CustomMode.Command to "Command", CustomMode.Url to "URL", CustomMode.Config to "Config"), { mode = it }) }
if (mode == CustomMode.Config) row {
@@ -161,9 +166,9 @@ private enum class CustomMode { Command, Url, Config }
row { PlainInput(target, { target = it }, if (mode == CustomMode.Url) "https://example.com/mcp" else "npx -y @scope/server", style = Type.callout.monospaced) }
}
}
- if (mode == CustomMode.Url) CardSection("Headers", "Optional, one Name: value per line. Leave empty if the service has you sign in. Saved on $host only.") {
+ if (mode == CustomMode.Url) CardSection("Headers", tr("Optional, one Name: value per line. Leave empty if the service has you sign in. Saved on {name} only.").replace("{name}", host)) {
row { PlainInput(envText, { envText = it }, "Authorization: Bearer …", style = Type.callout.monospaced, minLines = 2, maxLines = 6) }
- } else if (mode == CustomMode.Command) CardSection("Environment", "One KEY=value per line. Saved on $host only.") {
+ } else if (mode == CustomMode.Command) CardSection("Environment", tr("One KEY=value per line. Saved on {name} only.").replace("{name}", host)) {
row { PlainInput(envText, { envText = it }, "API_KEY=…", style = Type.callout.monospaced, minLines = 2, maxLines = 6) }
}
error?.let { CardSection { row { ErrorRow(it) } } }
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/CredentialsView.kt b/apps/android/app/src/main/kotlin/com/codync/android/CredentialsView.kt
index 99b2cbb6..d795c00d 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/CredentialsView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/CredentialsView.kt
@@ -54,8 +54,8 @@ import kotlinx.coroutines.launch
ModalHeader("Credentials")
CardForm(Modifier.weight(1f)) {
CardSection("Storage") {
- row { Text(status?.provider ?: "System credential store", style = Type.body, color = Palette.text) }
- row { Text("Encrypted on the connected computer.", style = Type.body, color = Palette.secondary) }
+ row { Text(tr(status?.provider ?: "System credential store"), style = Type.body, color = Palette.text) }
+ row { Text(tr("Encrypted on the connected computer."), style = Type.body, color = Palette.secondary) }
}
CardSection("Saved connections") {
for (connector in saved) row {
@@ -64,12 +64,12 @@ import kotlinx.coroutines.launch
Symbol("chevron.right", size = 13.dp, tint = Palette.tertiary)
}
}
- if (saved.isEmpty()) row { Text("No saved connection credentials yet.", style = Type.caption, color = Palette.secondary) }
- row { Text("Values stay hidden. Select a connection to replace its credentials.", style = Type.caption, color = Palette.secondary) }
+ if (saved.isEmpty()) row { Text(tr("No saved connection credentials yet."), style = Type.caption, color = Palette.secondary) }
+ row { Text(tr("Values stay hidden. Select a connection to replace its credentials."), style = Type.caption, color = Palette.secondary) }
}
LoginsSection(store)
CardSection("1Password", "Use a service account with read access only to a dedicated shared vault. The 1Password CLI must be installed on the computer.") {
- row { Text(if (status?.onePasswordConnected == true) "Connected" else "Connect a shared vault", style = Type.body, color = Palette.text) }
+ row { Text(tr(if (status?.onePasswordConnected == true) "Connected" else "Connect a shared vault"), style = Type.body, color = Palette.text) }
row { FieldRow("Service account token") { PlainInput(token, { token = it }, "Paste your token", secret = true) } }
row {
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
@@ -78,7 +78,7 @@ import kotlinx.coroutines.launch
}
}
row {
- Text("Use op://vault/item/field in a connector's credential field. Codync retrieves the value when the connector runs.",
+ Text(tr("Use op://vault/item/field in a connector's credential field. Codync retrieves the value when the connector runs."),
style = Type.footnote, color = Palette.secondary)
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/EditorControls.kt b/apps/android/app/src/main/kotlin/com/codync/android/EditorControls.kt
index b23fbfa8..49449a1e 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/EditorControls.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/EditorControls.kt
@@ -39,8 +39,8 @@ import com.kyant.shapes.RoundedRectangle
@Composable internal fun Field(label: String, detail: String? = null, content: @Composable () -> Unit) {
Column(Modifier.fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(8.dp)) {
Column(verticalArrangement = Arrangement.spacedBy(3.dp)) {
- Text(label, style = Type.body, color = Palette.text)
- if (detail != null) Text(detail, style = Type.caption.copy(lineHeight = Type.caption.lineHeight * 1.12f), color = Palette.secondary)
+ Text(tr(label), style = Type.body, color = Palette.text)
+ if (detail != null) Text(tr(detail), style = Type.caption.copy(lineHeight = Type.caption.lineHeight * 1.12f), color = Palette.secondary)
}
content()
}
@@ -61,8 +61,8 @@ import com.kyant.shapes.RoundedRectangle
@Composable internal fun SwitchRow(title: String, detail: String? = null, isOn: Boolean, onChange: (Boolean) -> Unit, enabled: Boolean = true) {
CodyncSwitch(isOn, onChange, Modifier.fillMaxWidth(), enabled) {
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(3.dp)) {
- Text(title, style = Type.body, color = Palette.text)
- if (detail != null) Text(detail, style = Type.caption.copy(lineHeight = Type.caption.lineHeight * 1.12f), color = Palette.secondary)
+ Text(tr(title), style = Type.body, color = Palette.text)
+ if (detail != null) Text(tr(detail), style = Type.caption.copy(lineHeight = Type.caption.lineHeight * 1.12f), color = Palette.secondary)
}
}
}
@@ -99,7 +99,7 @@ import com.kyant.shapes.RoundedRectangle
@Composable internal fun PluginToggles(title: String, empty: String, items: List<Triple<String, String, String>>, selection: List<String>,
change: (List<String>) -> Unit, info: ((String) -> Unit)? = null) {
CardSection(title) {
- if (items.isEmpty()) row { Text(empty, style = Type.body, color = Palette.secondary) }
+ if (items.isEmpty()) row { Text(tr(empty), style = Type.body, color = Palette.secondary) }
for ((id, name, detail) in items) row {
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp)) {
Box(Modifier.weight(1f)) {
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/FallbackRows.kt b/apps/android/app/src/main/kotlin/com/codync/android/FallbackRows.kt
index 66044bbb..7b5a30bc 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/FallbackRows.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/FallbackRows.kt
@@ -69,12 +69,12 @@ private fun fallbackChoices(state: AppState, own: String, list: List<Fallback>)
var about by remember { mutableStateOf(false) }
Column(modifier.fillMaxWidth().animateContentSize(Motion.layoutSize), verticalArrangement = Arrangement.spacedBy(10.dp)) {
Row(verticalAlignment = Alignment.CenterVertically) {
- Text("Fallbacks", style = Type.body, color = Palette.text)
+ Text(tr("Fallbacks"), style = Type.body, color = Palette.text)
IconButton("About fallbacks", "info.circle") { about = true }
Box(Modifier.weight(1f))
if (list.size < MAX_FALLBACKS && fallbackChoices(state, own, list).isNotEmpty()) IconButton("Add fallback", "plus", action = addFallback)
}
- if (list.isEmpty()) Text("No fallbacks yet.", style = Type.subheadline, color = Palette.secondary)
+ if (list.isEmpty()) Text(tr("No fallbacks yet."), style = Type.subheadline, color = Palette.secondary)
for ((index, fallback) in list.withIndex()) key(fallback.backend) {
FallbackRow(state, index + 1, fallback, bot?.restOf(fallback.backend), bot?.agentStep?.agent == fallback.backend) { buildList {
if (index > 0) add(MenuItem("Move up", icon = "arrow.up") { change(list.moved(index, -1)) })
@@ -82,8 +82,8 @@ private fun fallbackChoices(state: AppState, own: String, list: List<Fallback>)
add(MenuItem("Remove", icon = "trash", destructive = true) { change(list - fallback) })
} }
}
- Text("If ${backendName(state, own)} runs out of usage or can't answer, the bot carries on with the next one. " +
- "Chat, memory and workspace carry over.", style = Type.caption, color = Palette.secondary)
+ Text(tr("If {agent} runs out of usage or can't answer, the bot carries on with the next one. Chat, memory and workspace carry over.")
+ .replace("{agent}", backendName(state, own)), style = Type.caption, color = Palette.secondary)
}
CodyncDialog("Fallbacks", about, { about = false }, ABOUT_FALLBACKS, cancel = "OK") { emptyList() }
}
@@ -95,7 +95,7 @@ private fun fallbackChoices(state: AppState, own: String, list: List<Fallback>)
AgentIcon(agentRegistry(state, fallback.backend), 22.dp)
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(2.dp)) {
// ponytail: the model's id, not its name: a name needs the agent's model list, an agent start per row.
- Text("$name · ${fallback.model ?: "Default"}", style = Type.body, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text("${tr(name)} · ${tr(fallback.model ?: "Default")}", style = Type.body, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
if (rest != null) Text(rest.line(RelativeTime.clock(rest.until)), style = Type.caption, color = Palette.secondary)
}
if (inUse) Text("In use", Modifier.clip(Capsule()).background(Palette.accentFill).padding(horizontal = 8.dp, vertical = 3.dp),
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/FolderPicker.kt b/apps/android/app/src/main/kotlin/com/codync/android/FolderPicker.kt
index 5da88097..7bfec991 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/FolderPicker.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/FolderPicker.kt
@@ -88,7 +88,7 @@ import kotlinx.coroutines.CancellationException
}
}
}
- error != null -> Text(error.orEmpty(), style = Type.body, color = Palette.danger)
+ error != null -> Text(tr(error.orEmpty()), style = Type.body, color = Palette.danger)
else -> Box(Modifier.fillMaxWidth(), contentAlignment = Alignment.Center) { Spinner(20.dp) }
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/InstalledView.kt b/apps/android/app/src/main/kotlin/com/codync/android/InstalledView.kt
index 64ddeeb4..00584ef5 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/InstalledView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/InstalledView.kt
@@ -70,7 +70,7 @@ private data class Removal(val id: String, val name: String, val skill: Boolean)
}
}
val target = removing
- CodyncDialog("Remove ${target?.name.orEmpty()}?", target != null, { removing = null },
+ CodyncDialog(tr("Remove {name}?").replace("{name}", target?.name.orEmpty()), target != null, { removing = null },
if (target?.skill == true) "Bots stop using this skill." else "Bots lose this connector, and the keys saved for it are deleted.") {
listOf(DialogAction("Remove", destructive = true) { target?.let { r -> run { store.removePlugin(if (r.skill) "removeSkill" else "removeConnector", r.id) } } })
}
@@ -85,7 +85,7 @@ private data class Removal(val id: String, val name: String, val skill: Boolean)
icon()
Column(Modifier.fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(2.dp)) {
Text(title, style = Type.body, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
- Text(subtitle, style = Type.caption, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(tr(subtitle), style = Type.caption, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
accessory()
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/LiveUpdateGallery.kt b/apps/android/app/src/main/kotlin/com/codync/android/LiveUpdateGallery.kt
index f8f0b9e7..927a272a 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/LiveUpdateGallery.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/LiveUpdateGallery.kt
@@ -193,7 +193,7 @@ private val TaskPhase.mood get() = when (this) { TaskPhase.Working -> "working";
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) {
CharacterAvatar("blob", "green", 40.dp, phase.mood)
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text("Reviewer", style = Type.system(14f).semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(tr("Reviewer"), style = Type.system(14f).semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
Caption(phase, started)
}
PhaseMark(phase, 20.dp)
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/MainActivity.kt b/apps/android/app/src/main/kotlin/com/codync/android/MainActivity.kt
index f4ecb838..0ec068bc 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/MainActivity.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/MainActivity.kt
@@ -12,7 +12,9 @@ import androidx.activity.viewModels
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.key
@@ -20,6 +22,11 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.lifecycleScope
import com.codync.android.design.CodyncTheme
+import com.codync.android.design.LocalAppLanguage
+import com.codync.android.design.LocalPhrases
+import com.codync.android.design.LocalSetAppLanguage
+import com.codync.android.design.LocalSystemChinese
+import com.codync.android.design.systemScript
import com.codync.android.design.OverlayRoot
import coil3.ImageLoader
import coil3.disk.DiskCache
@@ -54,7 +61,20 @@ class MainActivity : ComponentActivity() {
}
val images = remember(state.contextId, state.generation) { AccountImages.open(applicationContext, state.contextId) }
DisposableEffect(images) { onDispose { AccountImages.close(images) } }
- CompositionLocalProvider(LocalNetworkImages provides images) {
+ var appLanguage by remember { mutableStateOf(AppLanguageStore.get(applicationContext)) }
+ val systemTag = remember { java.util.Locale.getDefault().toLanguageTag() }
+ val phrases = remember(appLanguage) { AppLanguageStore.phrases(applicationContext, appLanguage, systemTag) }
+ val systemChinese = remember(systemTag) { systemScript(systemTag) != null }
+ CompositionLocalProvider(
+ LocalNetworkImages provides images,
+ LocalAppLanguage provides appLanguage,
+ LocalSystemChinese provides systemChinese,
+ LocalPhrases provides phrases,
+ LocalSetAppLanguage provides { next ->
+ appLanguage = next
+ AppLanguageStore.set(applicationContext, next)
+ },
+ ) {
key(state.contextId, state.generation) {
val appearance by AppearancePreferences.mode.collectAsStateWithLifecycle()
val dark = appearance.isDark(isSystemInDarkTheme())
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/MarketFields.kt b/apps/android/app/src/main/kotlin/com/codync/android/MarketFields.kt
index 6002c9d2..c3c0a791 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/MarketFields.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/MarketFields.kt
@@ -27,7 +27,8 @@ import com.codync.android.design.*
*/
@Composable internal fun PlainInput(text: String, onChange: (String) -> Unit, prompt: String, modifier: Modifier = Modifier,
secret: Boolean = false, style: TextStyle = Type.body, minLines: Int = 1, maxLines: Int = 1, enabled: Boolean = true) {
- BasicTextField(text, onChange, modifier.fillMaxWidth().semantics { contentDescription = prompt }, enabled = enabled,
+ val hint = tr(prompt)
+ BasicTextField(text, onChange, modifier.fillMaxWidth().semantics { contentDescription = hint }, enabled = enabled,
singleLine = maxLines == 1, minLines = minLines, maxLines = maxLines, textStyle = style.copy(color = Palette.text),
cursorBrush = SolidColor(Palette.accent),
visualTransformation = if (secret) PasswordVisualTransformation() else VisualTransformation.None,
@@ -35,7 +36,7 @@ import com.codync.android.design.*
keyboardType = if (secret) KeyboardType.Password else KeyboardType.Text),
decorationBox = { field ->
Box(contentAlignment = Alignment.CenterStart) {
- if (text.isEmpty()) Text(prompt, style = style, color = Palette.tertiary, maxLines = maxLines)
+ if (text.isEmpty()) Text(hint, style = style, color = Palette.tertiary, maxLines = maxLines)
field()
}
})
@@ -44,7 +45,7 @@ import com.codync.android.design.*
/** A small caption over a field (iOS `CredentialFieldRow`). */
@Composable internal fun FieldRow(title: String, content: @Composable () -> Unit) {
Column(Modifier.fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(8.dp)) {
- Text(title, style = Type.caption, color = Palette.secondary)
+ Text(tr(title), style = Type.caption, color = Palette.secondary)
content()
}
}
@@ -53,9 +54,9 @@ import com.codync.android.design.*
@Composable internal fun NotedInput(text: String, onChange: (String) -> Unit, prompt: String, note: String?, secret: Boolean = false) {
Column(Modifier.fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(4.dp)) {
PlainInput(text, onChange, prompt, secret = secret)
- if (note != null) Text(note, style = Type.caption, color = Palette.secondary)
+ if (note != null) Text(tr(note), style = Type.caption, color = Palette.secondary)
}
}
/** An error inside a card. */
-@Composable internal fun ErrorRow(text: String) = Text(text, style = Type.body, color = Palette.danger)
+@Composable internal fun ErrorRow(text: String) = Text(tr(text), style = Type.body, color = Palette.danger)
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/MarketRows.kt b/apps/android/app/src/main/kotlin/com/codync/android/MarketRows.kt
index ce6f0a2d..3ed3f404 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/MarketRows.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/MarketRows.kt
@@ -51,7 +51,7 @@ import com.kyant.shapes.RoundedRectangle
@Composable internal fun MarketSection(title: String, content: @Composable () -> Unit) {
Column(verticalArrangement = Arrangement.spacedBy(12.dp)) {
- Text(title, Modifier.padding(start = 4.dp).semantics { heading() }, style = Type.headline, color = Palette.text)
+ Text(tr(title), Modifier.padding(start = 4.dp).semantics { heading() }, style = Type.headline, color = Palette.text)
content()
}
}
@@ -65,15 +65,15 @@ import com.kyant.shapes.RoundedRectangle
.padding(horizontal = 12.dp, vertical = 10.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(14.dp)) {
Box(Modifier.size(46.dp), contentAlignment = Alignment.Center) { icon() }
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text(title, style = Type.body.medium, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
- Text(subtitle, style = Type.subheadline, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(tr(title), style = Type.body.medium, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(tr(subtitle), style = Type.subheadline, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
when {
busy -> Box(Modifier.width(60.dp), contentAlignment = Alignment.Center) { ThinkingOrb(size = 18.dp, color = Palette.secondary) }
added -> Box(Modifier.width(60.dp), contentAlignment = Alignment.Center) {
- Symbol("checkmark", size = 16.dp, tint = Palette.secondary, contentDescription = "Added")
+ Symbol("checkmark", size = 16.dp, tint = Palette.secondary, contentDescription = tr("Added"))
}
- else -> Text(addLabel, Modifier.clip(Capsule()).background(Palette.bubbleAgent).plainButton(action = add)
+ else -> Text(tr(addLabel), Modifier.clip(Capsule()).background(Palette.bubbleAgent).plainButton(action = add)
.padding(horizontal = 16.dp, vertical = 7.dp), style = Type.subheadline.semibold, color = Palette.text)
}
}
@@ -96,7 +96,7 @@ import com.kyant.shapes.RoundedRectangle
}
Column(horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(2.dp)) {
Text(backend.name, style = Type.subheadline.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
- Text(status, style = Type.caption, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(tr(status), style = Type.caption, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
}
@@ -175,7 +175,8 @@ internal fun serviceDomain(website: String?, name: String, registryName: String?
@Composable internal fun WebLink(title: String, url: String, style: androidx.compose.ui.text.TextStyle = Type.body) {
val uri = LocalUriHandler.current
var failed by remember { mutableStateOf(false) }
- Text(if (failed) "$title (couldn't open the browser)" else title,
+ val label = tr(title)
+ Text(if (failed) "$label (couldn't open the browser)" else label,
Modifier.plainButton { failed = runCatching { uri.openUri(url) }.isFailure }, style = style.copy(textDecoration = TextDecoration.Underline),
color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
@@ -185,7 +186,7 @@ internal fun serviceDomain(website: String?, name: String, registryName: String?
Column(Modifier.fillMaxWidth().padding(vertical = 40.dp), horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(8.dp)) {
Symbol(icon, size = 30.dp, tint = Palette.tertiary)
- Text(title, style = Type.body.semibold, color = Palette.text)
- Text(detail, style = Type.subheadline, color = Palette.secondary)
+ Text(tr(title), style = Type.body.semibold, color = Palette.text)
+ Text(tr(detail), style = Type.subheadline, color = Palette.secondary)
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/MarketplaceView.kt b/apps/android/app/src/main/kotlin/com/codync/android/MarketplaceView.kt
index 5734d9ac..c4d3fe80 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/MarketplaceView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/MarketplaceView.kt
@@ -140,7 +140,7 @@ import kotlinx.coroutines.launch
Header(state, inset, showInstalled)
SearchBox(search, { search = it }, inset, ::submit) { search = ""; submit() }
if (agents.isNotEmpty()) Box(inset) {
- MarketSection(if (query.isEmpty()) "Agents" else "Agents matching “$query”") {
+ MarketSection(if (query.isEmpty()) "Agents" else tr("Agents matching “{query}”").replace("{query}", query)) {
if (backends.any { it.needsNode }) NodeNotice(state) { addingNode = true }
// The row runs edge to edge, past the page's margins.
LazyRow(Modifier.bleed(24.dp), contentPadding = PaddingValues(horizontal = 24.dp),
@@ -156,7 +156,7 @@ import kotlinx.coroutines.launch
MarketSection("Connectors") {
when {
loadingConnectors -> SkeletonRows()
- connectors.items.isEmpty() -> Text(if (query.isEmpty()) "Couldn't load connectors." else "No connectors match “$query”.", style = Type.body, color = Palette.secondary)
+ connectors.items.isEmpty() -> Text(if (query.isEmpty()) tr("Couldn't load connectors.") else tr("No connectors match “{query}”.").replace("{query}", query), style = Type.body, color = Palette.secondary)
else -> Column(verticalArrangement = Arrangement.spacedBy(4.dp)) {
for (c in connectors.visible) MarketRow(c.title, c.description ?: c.name, c.installed,
icon = { ServiceLogo(c.website, c.title, c.name) }) { installing = c }
@@ -191,7 +191,7 @@ import kotlinx.coroutines.launch
SecondaryButton({ showCredentials = true }) {
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
Symbol("lock.shield", size = 18.dp, tint = Palette.text)
- Text("Credentials")
+ Text(tr("Credentials"))
}
}
}
@@ -205,8 +205,8 @@ import kotlinx.coroutines.launch
}
}
}
- error?.let { Text(it, inset, style = Type.footnote, color = Palette.danger) }
- Text("Connectors come from the official MCP Registry, skills from Anthropic, agents from the ACP registry. Everything installs on ${state.hostName}.",
+ error?.let { Text(tr(it), inset, style = Type.footnote, color = Palette.danger) }
+ Text(tr("Connectors come from the official MCP Registry, skills from Anthropic, agents from the ACP registry. Everything installs on {name}.").replace("{name}", state.hostName),
inset, style = Type.footnote, color = Palette.tertiary)
}
// The sheet's own close, over the page.
@@ -237,7 +237,7 @@ private fun Modifier.bleed(amount: Dp) = layout { measurable, constraints ->
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp)) {
ComputerBadge(state.hello?.text("device"), 32.dp, state.computers.firstOrNull()?.color)
Column {
- Text("Extensions", style = Type.title2.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(tr("Extensions"), style = Type.title2.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
Text(state.hostName, style = Type.subheadline, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
@@ -247,8 +247,8 @@ private fun Modifier.bleed(amount: Dp) = layout { measurable, constraints ->
for (c in connectors.take(3)) ServiceLogo(null, c.name, c.registryName, 26.dp)
}
Column(verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text("$count installed", style = Type.body, color = Palette.secondary)
- Text("Connectors & skills", style = Type.caption, color = Palette.secondary)
+ Text(tr("{count} installed").replace("{count}", "$count"), style = Type.body, color = Palette.secondary)
+ Text(tr("Connectors & skills"), style = Type.caption, color = Palette.secondary)
}
Symbol("chevron.right", size = 13.dp, tint = Palette.tertiary)
}
@@ -256,12 +256,13 @@ private fun Modifier.bleed(amount: Dp) = layout { measurable, constraints ->
}
@Composable private fun SearchBox(text: String, onChange: (String) -> Unit, modifier: Modifier, submit: () -> Unit, clear: () -> Unit) {
+ val clearSearch = tr("Clear search")
Row(modifier.fillMaxWidth().height(38.dp).clip(Capsule()).background(Palette.bubbleAgent).padding(horizontal = 14.dp),
verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp)) {
Symbol("magnifyingglass", size = 18.dp, tint = Palette.secondary)
PlainTextField(text, onChange, Modifier.weight(1f), "Search agents, connectors and skills", singleLine = true,
imeAction = ImeAction.Search, actions = KeyboardActions(onSearch = { submit() }))
- if (text.isNotEmpty()) Box(Modifier.plainButton(action = clear).semantics { contentDescription = "Clear search" }) {
+ if (text.isNotEmpty()) Box(Modifier.plainButton(action = clear).semantics { contentDescription = clearSearch }) {
Symbol("xmark.circle.fill", size = 18.dp, tint = Palette.tertiary)
}
}
@@ -274,10 +275,10 @@ private fun Modifier.bleed(amount: Dp) = layout { measurable, constraints ->
Symbol("shippingbox", Modifier.padding(top = 1.dp), size = 18.dp, tint = Palette.secondary)
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(10.dp)) {
Column(verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text("Node.js isn't on ${state.hostName}", style = Type.subheadline.semibold, color = Palette.text)
- Text("Some agents need it to run. Codync can add a copy just for them.", style = Type.caption, color = Palette.secondary)
+ Text(tr("Node.js isn't on {name}").replace("{name}", state.hostName), style = Type.subheadline.semibold, color = Palette.text)
+ Text(tr("Some agents need it to run. Codync can add a copy just for them."), style = Type.caption, color = Palette.secondary)
}
- Text("Add Node.js", Modifier.clip(Capsule()).background(Palette.accentFill).plainButton(action = add).padding(horizontal = 14.dp, vertical = 7.dp),
+ Text(tr("Add Node.js"), Modifier.clip(Capsule()).background(Palette.accentFill).plainButton(action = add).padding(horizontal = 14.dp, vertical = 7.dp),
style = Type.subheadline.semibold, color = Palette.onAccent)
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/MessageComposer.kt b/apps/android/app/src/main/kotlin/com/codync/android/MessageComposer.kt
index 689ad5f5..3a8e9620 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/MessageComposer.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/MessageComposer.kt
@@ -132,10 +132,10 @@ private enum class Trailing { Interrupt, Stop, Call, Send }
else -> Trailing.Send
}
val placeholder = when {
- replyTo != null -> "Reply…"
- bot.kind == "group" -> "Ask everyone · @ to ask one bot"
- working -> "Queue a message for ${bot.name}"
- else -> "Ask ${bot.name}"
+ replyTo != null -> tr("Reply…")
+ bot.kind == "group" -> tr("Ask everyone · @ to ask one bot")
+ working -> tr("Queue a message for {name}").replace("{name}", bot.name)
+ else -> tr("Ask {name}").replace("{name}", bot.name)
}
val typed = text.text.toString()
val members = bot.memberBots(state.bots)
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/PairingView.kt b/apps/android/app/src/main/kotlin/com/codync/android/PairingView.kt
index eab0160d..a3e530cd 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/PairingView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/PairingView.kt
@@ -121,8 +121,8 @@ private enum class ComputerOS { Mac, Linux }
Box(Modifier.offset(y = (-8).dp)) { CharacterAvatar("blob", "blue", 52.dp, "working") }
}
Column(verticalArrangement = Arrangement.spacedBy(10.dp)) {
- Text("Install Codync\non your computer", style = PAGE_TITLE, color = Palette.text)
- Text("Your bots run there. This phone is how you talk to them.", style = Type.body, color = Palette.secondary)
+ Text(tr("Install Codync\non your computer"), style = PAGE_TITLE, color = Palette.text)
+ Text(tr("Your bots run there. This phone is how you talk to them."), style = Type.body, color = Palette.secondary)
}
SegmentedChoice(os, listOf(ComputerOS.Mac to "Mac", ComputerOS.Linux to "Linux"), choose)
// Copied here, pasted on the computer (a message to yourself, a shared clipboard).
@@ -139,8 +139,8 @@ private enum class ComputerOS { Mac, Linux }
Hint("or install with Homebrew")
CommandBlock("brew install leepokai/codync/codync-host\ncodync-host install", records = OutboundLink.InstallCommand)
}
- Text(if (shown == ComputerOS.Mac) "Open Codync and it sets up the host on its own."
- else "codync-host install keeps it running in the background.", style = Type.subheadline, color = Palette.secondary)
+ Text(tr(if (shown == ComputerOS.Mac) "Open Codync and it sets up the host on its own."
+ else "codync-host install keeps it running in the background."), style = Type.subheadline, color = Palette.secondary)
Hint("Every install option")
CommandBlock("https://www.codync.dev/#install", records = OutboundLink.InstallCommand)
}
@@ -166,7 +166,7 @@ private enum class ComputerOS { Mac, Linux }
}
/** A small label above a `CommandBlock`. */
-@Composable private fun Hint(text: String) = Text(text, style = Type.footnote, color = Palette.secondary)
+@Composable private fun Hint(text: String) = Text(tr(text), style = Type.footnote, color = Palette.secondary)
/** A terminal command with a copy button; copying it counts as opening `records`. */
@Composable private fun CommandBlock(command: String, records: OutboundLink? = null) {
@@ -216,9 +216,9 @@ private enum class ComputerOS { Mac, Linux }
Column(Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(horizontal = 24.dp).padding(bottom = 24.dp),
verticalArrangement = Arrangement.spacedBy(24.dp)) {
Column(verticalArrangement = Arrangement.spacedBy(10.dp)) {
- Text("Scan the pairing code", style = PAGE_TITLE, color = Palette.text)
- Text(if (os == ComputerOS.Mac) "On your Mac, click Codync in the menu bar, then Pair iPhone. The same code pairs this phone."
- else "On your computer, run this in a terminal:", style = Type.body, color = Palette.secondary)
+ Text(tr("Scan the pairing code"), style = PAGE_TITLE, color = Palette.text)
+ Text(tr(if (os == ComputerOS.Mac) "On your Mac, click Codync in the menu bar, then Pair iPhone. The same code pairs this phone."
+ else "On your computer, run this in a terminal:"), style = Type.body, color = Palette.secondary)
if (os == ComputerOS.Linux) CommandBlock("codync-host pair")
}
// The camera, right on the page: no extra sheet between the instruction and the scan.
@@ -230,14 +230,14 @@ private enum class ComputerOS { Mac, Linux }
}
Row(Modifier.fillMaxWidth().clip(RoundedRectangle(12.dp)).background(Palette.surface).padding(start = 14.dp, end = 4.dp, top = 4.dp, bottom = 4.dp),
verticalAlignment = Alignment.CenterVertically) {
- PlainTextField(pasted, { pasted = it }, Modifier.weight(1f), "Or paste a ${BuildConfig.URL_SCHEME}://pair link", singleLine = true,
+ PlainTextField(pasted, { pasted = it }, Modifier.weight(1f), tr("Or paste a {scheme}://pair link").replace("{scheme}", BuildConfig.URL_SCHEME), singleLine = true,
style = Type.callout.monospaced, keyboard = KeyboardOptions(capitalization = KeyboardCapitalization.None, autoCorrectEnabled = false,
imeAction = ImeAction.Go), actions = KeyboardActions(onGo = { pair(pasted) }))
IconButton("Pair", "arrow.right", enabled = pasted.isNotEmpty() && !state.pairing) { pair(pasted) }
}
AnimatedVisibility(error != null, enter = fadeIn(Motion.fade()), exit = fadeOut(Motion.fade())) {
Column(verticalArrangement = Arrangement.spacedBy(6.dp)) {
- Text(error.orEmpty(), style = Type.footnote, color = Palette.danger)
+ Text(tr(error.orEmpty()), style = Type.footnote, color = Palette.danger)
// The usual cause: the phone has no road to the computer yet.
IconLabel("Check that this phone and the computer are on the same Wi-Fi or both on Tailscale, or that “Reach from anywhere” is on in Codync on the computer.",
"wifi.exclamationmark", Palette.secondary)
@@ -260,7 +260,7 @@ private enum class ComputerOS { Mac, Linux }
style: TextStyle = Type.footnote) {
Row(modifier, horizontalArrangement = Arrangement.spacedBy(6.dp)) {
Symbol(systemImage, Modifier.padding(top = 1.dp), size = 16.dp, tint = color)
- Text(text, style = style, color = color)
+ Text(tr(text), style = style, color = color)
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/RelativeTime.kt b/apps/android/app/src/main/kotlin/com/codync/android/RelativeTime.kt
index 62859d40..6064d453 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/RelativeTime.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/RelativeTime.kt
@@ -26,12 +26,12 @@ internal object RelativeTime {
}
/** Roster stamp: 3:45 AM · Yesterday · Wednesday · Sep 16. */
- fun day(milliseconds: Long, now: Long = System.currentTimeMillis()): String {
+ fun day(milliseconds: Long, now: Long = System.currentTimeMillis(), yesterday: String = "Yesterday"): String {
val day = date(milliseconds)
val today = LocalDate.now(ZoneId.systemDefault())
return when {
day.toLocalDate() == today -> day.format(time)
- day.toLocalDate() == today.minusDays(1) -> "Yesterday"
+ day.toLocalDate() == today.minusDays(1) -> yesterday
now - milliseconds < 6 * 86_400_000L -> day.format(DateTimeFormatter.ofPattern("EEEE", Locale.getDefault()))
else -> day.format(monthDay)
}
@@ -50,12 +50,12 @@ internal object RelativeTime {
date(milliseconds).format(DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM).withLocale(Locale.getDefault()))
/** Chat separator: Today 3:27 AM · Yesterday 5:20 PM · Sep 16 9:02 AM. */
- fun separator(milliseconds: Long): String {
+ fun separator(milliseconds: Long, todayLabel: String = "Today", yesterdayLabel: String = "Yesterday"): String {
val day = date(milliseconds)
val today = LocalDate.now(ZoneId.systemDefault())
val name = when (day.toLocalDate()) {
- today -> "Today"
- today.minusDays(1) -> "Yesterday"
+ today -> todayLabel
+ today.minusDays(1) -> yesterdayLabel
else -> day.format(monthDay)
}
return name + " " + day.format(time)
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/RoutinesScreen.kt b/apps/android/app/src/main/kotlin/com/codync/android/RoutinesScreen.kt
index e0683250..6e82caa5 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/RoutinesScreen.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/RoutinesScreen.kt
@@ -82,7 +82,7 @@ import kotlinx.coroutines.launch
IconButton("Close routines", "xmark", action = dismiss)
}
val routines = listing?.routines.orEmpty()
- if (routines.isEmpty()) Text(if (listing != null) "No routines yet. Ask the bot for one, or set it up yourself with +." else "Loading routines…",
+ if (routines.isEmpty()) Text(tr(if (listing != null) "No routines yet. Ask the bot for one, or set it up yourself with +." else "Loading routines…"),
Modifier.fillMaxWidth().clip(RoundedRectangle(16.dp)).background(Palette.surface).padding(14.dp),
style = Type.system(12f).copy(lineHeight = Type.system(12f).lineHeight * 1.25f), color = Palette.secondary)
else Column(Modifier.fillMaxWidth().clip(RoundedRectangle(16.dp)).background(Palette.surface).padding(horizontal = 14.dp)) {
@@ -263,18 +263,21 @@ private val WEEKDAYS = listOf(1 to "Monday", 2 to "Tuesday", 3 to "Wednesday", 4
@Composable private fun SchedulePreview(preview: RoutineSchedulePreview?, error: String?, cronHint: Boolean) {
Column(Modifier.padding(start = 4.dp), verticalArrangement = Arrangement.spacedBy(2.dp)) {
when {
- error != null -> Text(error, style = Type.caption, color = Palette.danger)
+ error != null -> Text(tr(error), style = Type.caption, color = Palette.danger)
preview != null -> {
Text(preview.summary, style = Type.caption.medium, color = Palette.text)
- preview.nextRunAt?.let { Text("Next ${DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT).format(Date(it))}", style = Type.caption, color = Palette.secondary) }
- preview.warning?.let { Text(it, style = Type.caption, color = Palette.secondary) }
+ preview.nextRunAt?.let {
+ val whenText = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT).format(Date(it))
+ Text(tr("Next {when}").replace("{when}", whenText), style = Type.caption, color = Palette.secondary)
+ }
+ preview.warning?.let { Text(tr(it), style = Type.caption, color = Palette.secondary) }
}
cronHint -> Text("minute hour day month weekday", style = Type.caption.monospaced, color = Palette.tertiary)
}
}
}
-@Composable private fun Note(text: String) = Text(text, Modifier.padding(start = 4.dp), style = Type.caption, color = Palette.secondary)
+@Composable private fun Note(text: String) = Text(tr(text), Modifier.padding(start = 4.dp), style = Type.caption, color = Palette.secondary)
/** A saved webhook routine's address and key: copy either, reveal or replace the key (iOS `RoutineWebhookPanel`). */
@Composable private fun RoutineWebhookPanel(botId: String, id: String, online: Boolean, store: AppStore) {
@@ -322,7 +325,7 @@ private val WEEKDAYS = listOf(1 to "Monday", 2 to "Tuesday", 3 to "Wednesday", 4
else "POST with Authorization: Bearer <key>. For GitHub, use content type application/json and the key as the secret. " +
"Deliveries wait up to 72 hours while this computer is off. They pass through the Codync cloud, which can read them.")
}
- error != null -> Text(error.orEmpty(), Modifier.padding(start = 4.dp), style = Type.caption, color = Palette.danger)
+ error != null -> Text(tr(error.orEmpty()), Modifier.padding(start = 4.dp), style = Type.caption, color = Palette.danger)
else -> Note("Loading webhook…")
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ScreenView.kt b/apps/android/app/src/main/kotlin/com/codync/android/ScreenView.kt
index 8033ea07..c6971308 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/ScreenView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/ScreenView.kt
@@ -238,7 +238,7 @@ private fun rotate(activity: android.app.Activity) {
is ScreenSession.Phase.Failed -> Notice("exclamationmark.triangle", phase.message) { session.start() }
ScreenSession.Phase.Live, ScreenSession.Phase.Closed -> {
val text = if (!screen.input) "View only. To allow control, open Codync → Settings → Computer access on the computer." else session.lastError
- if (text != null) Text(text, Modifier.align(Alignment.BottomCenter).navigationBarsPadding().padding(bottom = 24.dp)
+ if (text != null) Text(tr(text), Modifier.align(Alignment.BottomCenter).navigationBarsPadding().padding(bottom = 24.dp)
.padding(horizontal = 16.dp).clip(RoundedCornerShape(if (screen.input) 8.dp else 12.dp)).frost(20.dp, MATERIAL)
.padding(if (screen.input) 8.dp else 12.dp), style = Type.caption, color = Color.White)
}
@@ -259,7 +259,7 @@ private fun rotate(activity: android.app.Activity) {
Column(Modifier.align(Alignment.Center).widthIn(max = 420.dp).padding(32.dp), horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(12.dp)) {
if (icon != null) Symbol(icon, size = 40.dp, tint = Palette.secondary) else Spinner(22.dp)
- Text(text, style = Type.callout, color = Palette.secondary, textAlign = TextAlign.Center)
+ Text(tr(text), style = Type.callout, color = Palette.secondary, textAlign = TextAlign.Center)
if (retry != null) SecondaryButton(retry) { Symbol("arrow.clockwise", size = 20.dp, contentDescription = "Try again") }
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt b/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt
index 5a89743e..1a57c94f 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt
@@ -107,15 +107,37 @@ import kotlinx.serialization.json.put
}
}
}
+ val appLanguage = LocalAppLanguage.current
+ val setAppLanguage = LocalSetAppLanguage.current
+ val systemChinese = LocalSystemChinese.current
+ val phrases = LocalPhrases.current
+ val script = systemScript(java.util.Locale.getDefault().toLanguageTag())
+ CardSection("Language", footer = when (script) {
+ ChineseScript.Hant ->
+ "System language is Traditional Chinese. \"Follow system\" matches the phone. You can switch this app to Simplified Chinese or English."
+ ChineseScript.Hans ->
+ "System language is Simplified Chinese. \"Follow system\" matches the phone. You can switch this app to Traditional Chinese or English."
+ null ->
+ "System language is English. \"Follow system\" matches the phone. You can switch this app to Simplified or Traditional Chinese."
+ }) {
+ row {
+ ValueRow("App language") {
+ ChoicePicker(appLanguage, AppLanguage.entries.map {
+ it to AppLanguage.menuTitle(it, appLanguage, systemChinese, phrases)
+ }, setAppLanguage)
+ }
+ }
+ }
NotificationsSection(state, store)
CardSection(footer = "Which features you use, never your messages, code or files. Helps us spot bugs sooner and make Codync better for you.") {
row {
+ val analyticsLabel = tr("Share usage analytics")
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp)) {
- Text("Share usage analytics", style = Type.body, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(analyticsLabel, style = Type.body, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
IconButton("About usage analytics", "info.circle") { aboutAnalytics = true }
Box(Modifier.weight(1f))
CodyncSwitch(Analytics.enabled, Analytics::setEnabled, Modifier.width(34.dp)
- .semantics { contentDescription = "Share usage analytics" }) {}
+ .semantics { contentDescription = analyticsLabel }) {}
}
}
}
@@ -145,7 +167,7 @@ import kotlinx.serialization.json.put
"Signs out of every account and forgets every computer on this phone, then shows the welcome again. Your computers keep their bots and chats; pair again to use them.") {
listOf(DialogAction("Start over", destructive = true, action = store::startOver))
}
- CodyncDialog("Remove ${paired?.name ?: "computer"}?", confirmForget, { confirmForget = false },
+ CodyncDialog(tr("Remove {name}?").replace("{name}", paired?.name ?: "computer"), confirmForget, { confirmForget = false },
"Its bots and conversations stay on that computer. You can pair again any time.") {
listOf(DialogAction("Remove", destructive = true, action = store::removeComputer))
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/SetupTerminal.kt b/apps/android/app/src/main/kotlin/com/codync/android/SetupTerminal.kt
index 0f9ab51d..e1a344a9 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/SetupTerminal.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/SetupTerminal.kt
@@ -93,9 +93,9 @@ import java.util.UUID
val code = status.exitCode
val error = status.error
when {
- renderError -> Text("The terminal couldn't load. Update Android System WebView, then try again.", Modifier.weight(1f),
+ renderError -> Text(tr("The terminal couldn't load. Update Android System WebView, then try again."), Modifier.weight(1f),
style = Type.footnote, color = Palette.danger, maxLines = 2, overflow = TextOverflow.Ellipsis)
- error != null -> Text(error, Modifier.weight(1f), style = Type.footnote, color = Palette.danger, maxLines = 2, overflow = TextOverflow.Ellipsis)
+ error != null -> Text(tr(error), Modifier.weight(1f), style = Type.footnote, color = Palette.danger, maxLines = 2, overflow = TextOverflow.Ellipsis)
code != null -> {
Symbol(if (code == 0) "checkmark.circle.fill" else "exclamationmark.circle.fill", size = 16.dp, tint = if (code == 0) Palette.added else Palette.warning)
Text(if (code == 0) "Finished." else "Ended with an error ($code).", Modifier.weight(1f), style = Type.footnote, color = Palette.secondary)
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/TraceView.kt b/apps/android/app/src/main/kotlin/com/codync/android/TraceView.kt
index 5e9e25a6..9f61481e 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/TraceView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/TraceView.kt
@@ -43,7 +43,7 @@ import kotlinx.serialization.json.jsonPrimitive
Column(Modifier.fillMaxSize()) {
ModalHeader("Full conversation")
LazyColumn(state = list, contentPadding = PaddingValues(20.dp), verticalArrangement = Arrangement.spacedBy(22.dp)) {
- if (turns.isEmpty()) item { Text("Nothing yet.", style = Type.body, color = Palette.tertiary) }
+ if (turns.isEmpty()) item { Text(tr("Nothing yet."), style = Type.body, color = Palette.tertiary) }
items(turns, key = { it.first }) { (turn, entries) ->
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
Text(entries.firstOrNull { it.kind == "user" }?.text ?: "Turn $turn", Modifier.padding(start = 4.dp),
@@ -69,18 +69,18 @@ internal fun runningTurn(entries: List<Entry>, working: Boolean): Long? =
Text(entry.text, style = Type.subheadline, color = Palette.text)
}
"agent" -> Column(verticalArrangement = Arrangement.spacedBy(4.dp)) {
- Text(if (d["final"]?.jsonPrimitive?.booleanOrNull == true) "Reply" else "Said", style = Type.caption2.bold, color = Palette.tertiary)
+ Text(tr(if (d["final"]?.jsonPrimitive?.booleanOrNull == true) "Reply" else "Said"), style = Type.caption2.bold, color = Palette.tertiary)
MarkdownText(entry.text)
}
"thought" -> Disclosure(expanded, { expanded = !expanded }, label = {
ThinkingOrb(size = 16.dp, color = Palette.secondary, animated = false)
- Text("Thinking", Modifier.padding(start = 8.dp), style = Type.subheadline, color = Palette.secondary)
+ Text(tr("Thinking"), Modifier.padding(start = 8.dp), style = Type.subheadline, color = Palette.secondary)
}) { SelectionContainer { Text(entry.text, style = Type.footnote, color = Palette.secondary) } }
"tool" -> ToolRow(d)
"plan" -> Column(verticalArrangement = Arrangement.spacedBy(6.dp)) {
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
Symbol("checklist", size = 16.dp, tint = Palette.text)
- Text("Plan", style = Type.subheadline.bold, color = Palette.text)
+ Text(tr("Plan"), style = Type.subheadline.bold, color = Palette.text)
}
for (item in (d["entries"] as? JsonArray).orEmpty().mapNotNull { it as? JsonObject }) {
val status = item.text("status")
@@ -96,7 +96,7 @@ internal fun runningTurn(entries: List<Entry>, working: Boolean): Long? =
Symbol("hand.raised", size = 16.dp, tint = Palette.secondary)
Text(d.text("title") ?: "Approval", style = Type.subheadline, color = Palette.secondary)
}
- else -> Text(entry.text, style = Type.footnote, color = Palette.tertiary)
+ else -> Text(tr(entry.text), style = Type.footnote, color = Palette.tertiary)
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/UsageScreen.kt b/apps/android/app/src/main/kotlin/com/codync/android/UsageScreen.kt
index d4c0898d..cff66214 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/UsageScreen.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/UsageScreen.kt
@@ -73,8 +73,8 @@ import kotlin.math.roundToInt
Column(Modifier.fillMaxWidth().padding(top = 60.dp, start = 24.dp, end = 24.dp), horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(8.dp)) {
Symbol("chart.bar", size = 48.dp, tint = Palette.tertiary)
- Text(title, style = Type.title3.semibold, color = Palette.text, textAlign = TextAlign.Center)
- Text(message, style = Type.subheadline, color = Palette.secondary, textAlign = TextAlign.Center)
+ Text(tr(title), style = Type.title3.semibold, color = Palette.text, textAlign = TextAlign.Center)
+ Text(tr(message), style = Type.subheadline, color = Palette.secondary, textAlign = TextAlign.Center)
}
}
@@ -94,19 +94,21 @@ import kotlin.math.roundToInt
provider.tightest?.let { top ->
Column(verticalArrangement = Arrangement.spacedBy(6.dp)) {
Row {
- Text(top.label, Modifier.weight(1f), style = Type.subheadline, color = Palette.text)
+ Text(tr(top.title), Modifier.weight(1f), style = Type.subheadline, color = Palette.text)
Text(percent(top.percent), style = Type.subheadline.monospacedDigit, color = Palette.text)
}
UsageTicks(top.percent ?: 0.0, tint, 15.dp)
- top.resetsShort()?.let { Text(it, Modifier.fillMaxWidth(), style = Type.caption.monospacedDigit, color = Palette.tertiary, textAlign = TextAlign.End) }
+ val reset = top.resetsShort()
+ if (reset != null) Text(resetLine(reset), Modifier.fillMaxWidth(), style = Type.caption.monospacedDigit, color = Palette.tertiary, textAlign = TextAlign.End)
}
}
AnimatedVisibility(!collapsed, enter = fadeIn(Motion.fade()) + expandVertically(Motion.layoutSize),
exit = fadeOut(Motion.fade()) + shrinkVertically(Motion.layoutSize)) {
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
for (window in provider.windows) {
- DetailRow(window.label, percent(window.percent))
- window.resetsShort()?.let { DetailRow("${window.label} reset", it.removePrefix("resets ")) }
+ DetailRow(tr(window.title), percent(window.percent))
+ val reset = window.resetsShort()
+ if (reset != null) DetailRow(tr("Resets"), resetLine(reset))
}
DetailRow("Source", provider.sourceLabel)
DetailRow("Updated", provider.updatedAt?.takeIf { it > 0 }?.let(::updatedAt) ?: "Not reported")
@@ -127,7 +129,7 @@ private fun updatedAt(milliseconds: Long): String {
@Composable private fun DetailRow(label: String, value: String) {
Row {
- Text(label, Modifier.weight(1f), style = Type.footnote, color = Palette.secondary)
+ Text(tr(label), Modifier.weight(1f), style = Type.footnote, color = Palette.secondary)
Text(value, style = Type.footnote.monospacedDigit, color = Palette.text)
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/WelcomeView.kt b/apps/android/app/src/main/kotlin/com/codync/android/WelcomeView.kt
index 0bebe2d1..610b3970 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/WelcomeView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/WelcomeView.kt
@@ -73,9 +73,9 @@ import kotlin.math.sin
Column(Modifier.padding(top = 24.dp)) {
ChatGlimpse(beat >= 2, Modifier.padding(bottom = 24.dp))
Column(Modifier.rise(beat >= 3), verticalArrangement = Arrangement.spacedBy(10.dp)) {
- Text("Your coding agents,\nas teammates.", style = Type.system(34f, FontWeight.SemiBold).copy(letterSpacing = (-0.6).sp),
+ Text(tr("Your coding agents,\nas teammates."), style = Type.system(34f, FontWeight.SemiBold).copy(letterSpacing = (-0.6).sp),
color = Palette.text)
- Text("Give each one a name and a project. They work on your computer while you're away.", style = Type.body, color = Palette.secondary)
+ Text(tr("Give each one a name and a project. They work on your computer while you're away."), style = Type.body, color = Palette.secondary)
DemoButton(Modifier.padding(top = 4.dp))
}
}
@@ -164,11 +164,11 @@ private val CREW = listOf(
Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(10.dp)) {
WideButton(enabled = enabled, busy = busy, action = { store.signIn(SignInProvider.Apple) }) {
Symbol("apple.logo", size = 20.dp, tint = Palette.onAccent)
- Text("Continue with Apple")
+ Text(tr("Continue with Apple"))
}
WideButton(primary = false, enabled = enabled, busy = busy, action = { store.signIn(SignInProvider.Google) }) {
Image(painterResource(R.drawable.google_logo), null, Modifier.size(20.dp))
- Text("Continue with Google")
+ Text(tr("Continue with Google"))
}
// Clerk's own page covers the sign-ins that need another step (email codes, verification).
LinkButton("Other sign-in options", enabled = enabled, color = Palette.secondary, style = Type.footnote) { store.signIn(SignInProvider.Hosted) }
@@ -177,7 +177,7 @@ private val CREW = listOf(
/** The full-width 50-point button of the onboarding pages: headline label, a spinner while busy. */
@Composable internal fun WideButton(title: String, primary: Boolean = true, enabled: Boolean = true, action: () -> Unit) =
- WideButton(primary, enabled, action = action) { Text(title) }
+ WideButton(primary, enabled, action = action) { Text(tr(title)) }
@Composable internal fun WideButton(primary: Boolean = true, enabled: Boolean = true, busy: Boolean = false, action: () -> Unit,
label: @Composable () -> Unit) {
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/WidgetCards.kt b/apps/android/app/src/main/kotlin/com/codync/android/WidgetCards.kt
index f22273ef..2c58c6b5 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/WidgetCards.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/WidgetCards.kt
@@ -72,6 +72,45 @@ internal fun UsageWindow.resetsShort(now: Long = System.currentTimeMillis()): St
return resetsText?.takeIf(String::isNotBlank)?.let { "resets " + it.replace(Regex(" \\(.*\\)$"), "") }
}
+/** "resets 3h 20m" / "resets in 2d 6h". Compact times become "3小时20分后重置". */
+@Composable internal fun resetLine(raw: String): String {
+ val language = LocalAppLanguage.current
+ val systemChinese = LocalSystemChinese.current
+ val phrases = LocalPhrases.current
+ return spokenReset(raw, language.usesChinese(systemChinese)) { translate(it, language, systemChinese, phrases) }
+}
+
+internal fun spokenReset(raw: String, chinese: Boolean, tr: (String) -> String): String {
+ val time = when {
+ raw.startsWith("resets in ") -> raw.removePrefix("resets in ")
+ raw.startsWith("resets ") -> raw.removePrefix("resets ")
+ else -> return tr(raw)
+ }
+ if (!chinese) return raw
+ val spoken = compactTime(time, tr)
+ return if (spoken != null) spoken + tr("after reset") else "${tr("resets")} $time"
+}
+
+private fun compactTime(time: String, tr: (String) -> String): String? {
+ var spoken = ""
+ var matched = false
+ for (token in time.split(" ")) {
+ if (token.length < 2) return null
+ val n = token.dropLast(1).toIntOrNull() ?: return null
+ val word = when (token.last()) {
+ 'd' -> tr("day unit")
+ 'h' -> tr("hour unit")
+ 'm' -> tr("minute unit")
+ else -> return null
+ }
+ matched = true
+ if (n == 0) continue
+ spoken += "$n$word"
+ }
+ if (!matched) return null
+ return spoken.ifEmpty { "0${tr("minute unit")}" }
+}
+
/** Time left: 2d · 3h 20m · 45m (CodyncKit `RelativeTime.until`). */
internal fun until(at: Long, now: Long): String {
val minutes = maxOf(0L, at - now) / 60_000
@@ -118,13 +157,13 @@ internal fun until(at: Long, now: Long): String {
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(7.dp)) {
ProviderMascot(provider, 22.dp)
Text(provider.name, Modifier.weight(1f), style = Type.system(13f).semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
- if (layout != ProviderLayout.Small) Text("Usage", style = Type.system(10f).medium, color = Palette.secondary)
+ if (layout != ProviderLayout.Small) Text(tr("Usage"), style = Type.system(10f).medium, color = Palette.secondary)
}
val top = provider.tightest
if (layout == ProviderLayout.Small && top != null) {
Spacer(Modifier.weight(1f))
Column(verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text(top.title, style = Type.system(11f), color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(tr(top.title), style = Type.system(11f), color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
Row(verticalAlignment = Alignment.Bottom) {
val ink = if ((top.percent ?: 0.0) >= 90) Palette.danger else Palette.text
Text("${(top.percent ?: 0.0).roundToInt()}", style = Type.system(32f).semibold.monospacedDigit, color = ink)
@@ -132,24 +171,26 @@ internal fun until(at: Long, now: Long): String {
}
}
UsageTicks(top.percent ?: 0.0, tint, 13.dp)
- Text(top.resetsShort() ?: "Usage reported by your computer", style = Type.system(9f), color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ val reset = top.resetsShort()
+ Text(if (reset == null) tr("Usage reported by your computer") else resetLine(reset), style = Type.system(9f), color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
} else {
if (layout == ProviderLayout.Large && top != null) Row(Modifier.padding(vertical = 4.dp), verticalAlignment = Alignment.Bottom,
horizontalArrangement = Arrangement.spacedBy(8.dp)) {
Text("${(top.percent ?: 0.0).roundToInt()}%", style = Type.system(36f).semibold.monospacedDigit,
color = if ((top.percent ?: 0.0) >= 90) Palette.danger else Palette.text)
- Text("${top.title} · highest usage", Modifier.padding(bottom = 6.dp), style = Type.system(11f), color = Palette.secondary, maxLines = 2, overflow = TextOverflow.Ellipsis)
+ Text("${tr(top.title)} · ${tr("highest usage")}", Modifier.padding(bottom = 6.dp), style = Type.system(11f), color = Palette.secondary, maxLines = 2, overflow = TextOverflow.Ellipsis)
}
for (window in provider.windows.take(if (layout == ProviderLayout.Large) 4 else 2)) {
Column(verticalArrangement = Arrangement.spacedBy(3.dp)) {
Row(verticalAlignment = Alignment.CenterVertically) {
- Text(window.title, Modifier.weight(1f), style = Type.system(11f).medium, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(tr(window.title), Modifier.weight(1f), style = Type.system(11f).medium, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
Text("${(window.percent ?: 0.0).roundToInt()}%", style = Type.system(13f).semibold.monospacedDigit,
color = if ((window.percent ?: 0.0) >= 90) Palette.danger else Palette.text)
}
UsageTicks(window.percent ?: 0.0, tint, 12.dp)
- window.resetsShort()?.let { Text(it, Modifier.fillMaxWidth(), style = Type.system(9f), color = Palette.secondary,
- maxLines = 1, overflow = TextOverflow.Ellipsis, textAlign = TextAlign.End) }
+ val reset = window.resetsShort()
+ if (reset != null) Text(resetLine(reset), Modifier.fillMaxWidth(), style = Type.system(9f), color = Palette.secondary,
+ maxLines = 1, overflow = TextOverflow.Ellipsis, textAlign = TextAlign.End)
}
}
}
@@ -176,7 +217,8 @@ internal fun until(at: Long, now: Long): String {
Column(verticalArrangement = Arrangement.spacedBy(2.dp)) {
Text("${limit.provider} · ${limit.window.label}", style = Type.caption, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
Text("${percent.roundToInt()}%", style = Type.system(34f).semibold.monospacedDigit, color = if (percent >= 90) Palette.danger else Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
- Text(limit.window.resetsShort() ?: " ", style = Type.caption2, color = Palette.tertiary, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ val reset = limit.window.resetsShort()
+ Text(if (reset == null) " " else resetLine(reset), style = Type.caption2, color = Palette.tertiary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
@@ -214,7 +256,7 @@ private fun rank(bot: WidgetBot) = when (bot.status) { "needsInput" -> 0; "worki
val summary: @Composable () -> Unit = {
Column(verticalArrangement = Arrangement.spacedBy(1.dp)) {
Text("$count", style = Type.system(36f).semibold.monospacedDigit, color = if (needs > 0) Palette.attention else Palette.text)
- Text(label, style = Type.system(12f).medium, color = Palette.secondary)
+ Text(tr(label), style = Type.system(12f).medium, color = Palette.secondary)
}
}
Column(Modifier.fillMaxSize(), verticalArrangement = Arrangement.spacedBy(10.dp)) {
@@ -258,12 +300,11 @@ private fun rank(bot: WidgetBot) = when (bot.status) { "needsInput" -> 0; "worki
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(7.dp)) {
CharacterAvatar(bot.avatarShape, bot.avatarColor, 24.dp)
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(1.dp)) {
- Text(bot.name, style = Type.system(11f).semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
- activities[bot.id]?.takeIf { bot.status == "working" || bot.status == "needsInput" }?.let {
- Text(it, style = Type.system(10f), color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
- }
+ Text(widgetName(bot), style = Type.system(11f).semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ val activity = activities[bot.id]?.takeIf { bot.status == "working" || bot.status == "needsInput" }
+ if (activity != null) Text(tr(activity), style = Type.system(10f), color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
- Text(label, style = Type.system(10f, if (bot.status == "needsInput") FontWeight.SemiBold else FontWeight.Normal), color = tint, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(tr(label), style = Type.system(10f, if (bot.status == "needsInput") FontWeight.SemiBold else FontWeight.Normal), color = tint, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
if (bots.isEmpty()) Text("Create your first bot in Codync.", style = Type.system(12f), color = Palette.secondary)
@@ -280,7 +321,7 @@ private fun rank(bot: WidgetBot) = when (bot.status) { "needsInput" -> 0; "worki
else {
Column(Modifier.padding(horizontal = 4.dp), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(4.dp)) {
CharacterAvatar(bot.avatarShape, bot.avatarColor, 30.dp, bot.status)
- Text(bot.name, style = Type.system(9f).semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(widgetName(bot), style = Type.system(9f).semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
if (bot.status == "working" || bot.status == "error") Box(Modifier.align(Alignment.TopEnd).padding(7.dp).size(7.dp)
.clip(Capsule()).background(widgetState(bot.status).second))
@@ -290,6 +331,10 @@ private fun rank(bot: WidgetBot) = when (bot.status) { "needsInput" -> 0; "worki
}
}
+/** Sample bots in the gallery have translated names. A bot the user named stays as they wrote it. */
+@Composable internal fun widgetName(bot: WidgetBot): String =
+ if (bot.id.startsWith("preview-")) tr(bot.name) else bot.name
+
/** Illustrative data only, for previews labelled as samples (the iOS gallery's). */
internal object WidgetPreview {
val bots = listOf(WidgetBot("preview-review", "Reviewer", "needsInput", avatarColor = "green", avatarShape = "blob"),
diff --git a/apps/android/app/src/test/kotlin/com/codync/android/AppLanguageTest.kt b/apps/android/app/src/test/kotlin/com/codync/android/AppLanguageTest.kt
new file mode 100644
index 00000000..101945b7
--- /dev/null
+++ b/apps/android/app/src/test/kotlin/com/codync/android/AppLanguageTest.kt
@@ -0,0 +1,42 @@
+package com.codync.android
+
+import com.codync.android.design.AppLanguage
+import com.codync.android.design.translate
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertTrue
+import org.junit.Test
+
+class AppLanguageTest {
+ private val phrases = mapOf("Pair a computer" to "配对一台电脑", "Follow system" to "跟随系统")
+
+ @Test fun chineseFollowsTheChoiceNotTheOtherLanguage() {
+ assertTrue(AppLanguage.Zh.usesChinese(systemIsChinese = false))
+ assertTrue(AppLanguage.ZhHant.usesChinese(systemIsChinese = false))
+ assertFalse(AppLanguage.En.usesChinese(systemIsChinese = true))
+ assertTrue(AppLanguage.System.usesChinese(systemIsChinese = true))
+ assertFalse(AppLanguage.System.usesChinese(systemIsChinese = false))
+ }
+
+ @Test fun phrasesStayEnglishUntilChineseIsChosen() {
+ assertEquals("配对一台电脑", translate("Pair a computer", AppLanguage.Zh, systemIsChinese = false, phrases))
+ assertEquals("Pair a computer", translate("Pair a computer", AppLanguage.En, systemIsChinese = true, phrases))
+ assertEquals("跟随系统", AppLanguage.menuTitle(AppLanguage.System, AppLanguage.Zh, systemIsChinese = false, phrases))
+ assertEquals("简体中文", AppLanguage.menuTitle(AppLanguage.Zh, AppLanguage.En, systemIsChinese = true, phrases))
+ assertEquals("繁體中文", AppLanguage.menuTitle(AppLanguage.ZhHant, AppLanguage.En, systemIsChinese = true, phrases))
+ assertEquals(AppLanguage.Zh, AppLanguage.fromStored("zh"))
+ assertEquals(AppLanguage.ZhHant, AppLanguage.fromStored("zh-Hant"))
+ assertEquals("Not a phrase", translate("Not a phrase", AppLanguage.Zh, systemIsChinese = false, phrases))
+ }
+
+ @Test fun aFilledSentenceReusesTheParsedTemplate() {
+ val table = mapOf(
+ "Runs the official installer on {name}." to "在 {name} 上运行官方安装程序。",
+ "this Mac" to "这台 Mac",
+ )
+ val sentence = "Runs the official installer on this Mac."
+ val expected = "在 这台 Mac 上运行官方安装程序。"
+ assertEquals(expected, translate(sentence, AppLanguage.Zh, systemIsChinese = false, table))
+ assertEquals(expected, translate(sentence, AppLanguage.Zh, systemIsChinese = false, table))
+ }
+}
diff --git a/apps/android/design/src/main/kotlin/com/codync/android/design/Chrome.kt b/apps/android/design/src/main/kotlin/com/codync/android/design/Chrome.kt
index ffb6feef..a9724e58 100644
--- a/apps/android/design/src/main/kotlin/com/codync/android/design/Chrome.kt
+++ b/apps/android/design/src/main/kotlin/com/codync/android/design/Chrome.kt
@@ -50,7 +50,7 @@ import kotlin.math.roundToInt
/** A modal's title row: title, optional trailing actions, and a close button. */
@Composable fun ModalHeader(title: String, trailing: @Composable RowScope.() -> Unit = {}) =
- ModalHeader({ Text(title, style = Type.body.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis) }, trailing)
+ ModalHeader({ Text(tr(title), style = Type.body.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis) }, trailing)
@Composable fun ModalHeader(title: @Composable RowScope.() -> Unit, trailing: @Composable RowScope.() -> Unit = {}) {
val dismiss = LocalDismissModal.current
@@ -81,7 +81,7 @@ import kotlin.math.roundToInt
/** A page's title row: the close button on a modal's first page, a back button once pushed in it. */
@Composable fun PageHeader(title: String, pop: (() -> Unit)? = null, trailing: @Composable RowScope.() -> Unit = {}) {
if (pop != null) ScreenHeader({ BackButton(pop) },
- { Text(title, style = Type.body.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis) }, trailing)
+ { Text(tr(title), style = Type.body.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis) }, trailing)
else ModalHeader(title, trailing)
}
@@ -100,7 +100,7 @@ class TabItem<T>(val value: T, val title: String, val systemImage: String, val i
Column(Modifier.size(TAB_WIDTH, 54.dp).clip(Capsule()).selectable(on, role = Role.Tab) { select(tab.value) },
horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center) {
Symbol(tab.systemImage, size = tab.iconSize, height = 28.dp, tint = Palette.text)
- Text(tab.title, style = Type.system(10f).medium, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(tr(tab.title), style = Type.system(10f).medium, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
}
diff --git a/apps/android/design/src/main/kotlin/com/codync/android/design/Controls.kt b/apps/android/design/src/main/kotlin/com/codync/android/design/Controls.kt
index f1e741a4..64104d6c 100644
--- a/apps/android/design/src/main/kotlin/com/codync/android/design/Controls.kt
+++ b/apps/android/design/src/main/kotlin/com/codync/android/design/Controls.kt
@@ -90,10 +90,11 @@ import com.kyant.shapes.RoundedRectangle
@Composable fun IconButton(title: String, systemImage: String, modifier: Modifier = Modifier, enabled: Boolean = true,
tint: Color = Color.Unspecified, action: () -> Unit) {
val (source, pressed) = rememberPress()
+ val label = tr(title)
Box(modifier.size(36.dp).pressScale(pressed).clip(RoundedRectangle(10.dp))
.background(Palette.text.copy(alpha = if (pressed) 0.14f else 0f))
.clickable(source, null, enabled = enabled, role = Role.Button, onClick = action)
- .semantics { contentDescription = title }
+ .semantics { contentDescription = label }
.graphicsLayer { alpha = if (enabled) 1f else 0.35f }, contentAlignment = Alignment.Center) {
Symbol(systemImage, size = 21.dp, tint = if (tint.isSpecified) tint else Palette.secondary)
}
@@ -101,10 +102,10 @@ import com.kyant.shapes.RoundedRectangle
/** A filled capsule button: `.buttonStyle(.primary)` (accent) or `.secondary`. */
@Composable fun PrimaryButton(title: String, modifier: Modifier = Modifier, enabled: Boolean = true, action: () -> Unit) =
- PrimaryButton(action, modifier, enabled) { Text(title, maxLines = 1, overflow = TextOverflow.Ellipsis) }
+ PrimaryButton(action, modifier, enabled) { Text(tr(title), maxLines = 1, overflow = TextOverflow.Ellipsis) }
@Composable fun SecondaryButton(title: String, modifier: Modifier = Modifier, enabled: Boolean = true, action: () -> Unit) =
- SecondaryButton(action, modifier, enabled) { Text(title, maxLines = 1, overflow = TextOverflow.Ellipsis) }
+ SecondaryButton(action, modifier, enabled) { Text(tr(title), maxLines = 1, overflow = TextOverflow.Ellipsis) }
/** `.buttonStyle(.primary)` around any label (the label sets its own font and frame). */
@Composable fun PrimaryButton(action: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, label: @Composable () -> Unit) =
@@ -127,7 +128,7 @@ import com.kyant.shapes.RoundedRectangle
@Composable fun LinkButton(title: String, modifier: Modifier = Modifier, enabled: Boolean = true, color: Color = Palette.text,
style: TextStyle = Type.body, action: () -> Unit) {
val (source, pressed) = rememberPress()
- Text(title, modifier.clickable(source, null, enabled = enabled, role = Role.Button, onClick = action)
+ Text(tr(title), modifier.clickable(source, null, enabled = enabled, role = Role.Button, onClick = action)
.graphicsLayer { alpha = if (!enabled) 0.4f else if (pressed) 0.5f else 1f }, style = style, color = color)
}
@@ -170,7 +171,7 @@ import com.kyant.shapes.RoundedRectangle
val on = id == selection
Box(Modifier.width(segment).height(36.dp).clip(Capsule())
.selectable(on, role = Role.Tab) { select(id) }, contentAlignment = Alignment.Center) {
- Text(label, style = Type.subheadline.medium, color = if (on) Palette.text else Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(tr(label), style = Type.subheadline.medium, color = if (on) Palette.text else Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
}
@@ -196,9 +197,10 @@ import com.kyant.shapes.RoundedRectangle
/** Shows the current choice in a pill with a chevron and opens the menu: `ChoicePicker`. */
@Composable fun <T> ChoicePicker(selection: T, options: List<Pair<T, String>>, select: (T) -> Unit, modifier: Modifier = Modifier,
fill: Color = Color.Transparent, label: String? = null, enabled: Boolean = true) {
- val current = options.firstOrNull { it.first == selection }?.second ?: "Choose"
- DropdownMenu({ options.map { (id, text) -> MenuItem(text, selected = id == selection) { select(id) } } }, modifier,
- enabled = enabled, label = label?.let { "$it: $current" }) {
+ val rows = options.map { (id, text) -> id to tr(text) }
+ val current = rows.firstOrNull { it.first == selection }?.second ?: tr("Choose")
+ DropdownMenu({ rows.map { (id, text) -> MenuItem(text, selected = id == selection) { select(id) } } }, modifier,
+ enabled = enabled, label = label?.let { "${tr(it)}: $current" }) {
Row(Modifier.then(if (fill == Color.Transparent) Modifier.outline() else Modifier).pill(fill),
verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) {
Text(current, Modifier.weight(1f, fill = false), style = Type.body, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
@@ -232,7 +234,7 @@ class CardRows internal constructor() {
Column(modifier.fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(10.dp)) {
if (title != null) Row(Modifier.padding(start = 2.dp), verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp)) {
- Text(title, Modifier.weight(1f).semantics { heading() }, style = Type.system(15f).semibold, color = Palette.text)
+ Text(tr(title), Modifier.weight(1f).semantics { heading() }, style = Type.system(15f).semibold, color = Palette.text)
accessory()
}
if (list.isNotEmpty()) Column(Modifier.fillMaxWidth().clip(RoundedRectangle(16.dp)).background(Palette.surface)) {
@@ -244,7 +246,7 @@ class CardRows internal constructor() {
if (index < list.lastIndex) Hairline(Modifier.padding(horizontal = 16.dp))
}
}
- if (footer != null) Text(footer, Modifier.padding(horizontal = 2.dp), style = Type.caption.copy(lineHeight = Type.caption.lineHeight * 1.12f),
+ if (footer != null) Text(tr(footer), Modifier.padding(horizontal = 2.dp), style = Type.caption.copy(lineHeight = Type.caption.lineHeight * 1.12f),
color = Palette.secondary)
}
}
@@ -262,8 +264,8 @@ class CardRows internal constructor() {
@Composable fun ValueRow(label: String, modifier: Modifier = Modifier, detail: String? = null, value: @Composable () -> Unit) {
Layout({
Column(verticalArrangement = Arrangement.spacedBy(3.dp)) {
- Text(label, style = Type.body, color = Palette.text)
- if (detail != null) Text(detail, style = Type.caption.copy(lineHeight = Type.caption.lineHeight * 1.12f), color = Palette.secondary)
+ Text(tr(label), style = Type.body, color = Palette.text)
+ if (detail != null) Text(tr(detail), style = Type.caption.copy(lineHeight = Type.caption.lineHeight * 1.12f), color = Palette.secondary)
}
CompositionLocalProvider(LocalContentColor provides Palette.secondary, LocalTextStyle provides Type.body.copy(color = Palette.secondary)) { value() }
}, modifier.fillMaxWidth()) { (labels, values), constraints ->
@@ -279,15 +281,16 @@ class CardRows internal constructor() {
}
@Composable fun ValueRow(label: String, value: String, modifier: Modifier = Modifier, detail: String? = null) =
- ValueRow(label, modifier, detail) { Text(value, style = Type.body, color = Palette.secondary) }
+ ValueRow(label, modifier, detail) { Text(tr(value), style = Type.body, color = Palette.secondary) }
/** A search box: the replacement for `.searchable`. */
@Composable fun SearchField(text: String, onChange: (String) -> Unit, modifier: Modifier = Modifier, prompt: String = "Search") {
+ val clear = tr("Clear search")
Row(modifier.fillMaxWidth().clip(Capsule()).background(Palette.bubbleAgent).padding(horizontal = 14.dp, vertical = 10.dp),
verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
Symbol("magnifyingglass", size = 19.dp, tint = Palette.secondary)
PlainTextField(text, onChange, Modifier.weight(1f), prompt, singleLine = true, imeAction = ImeAction.Search)
- if (text.isNotEmpty()) Box(Modifier.clickable(role = Role.Button) { onChange("") }.semantics { contentDescription = "Clear search" }) {
+ if (text.isNotEmpty()) Box(Modifier.clickable(role = Role.Button) { onChange("") }.semantics { contentDescription = clear }) {
Symbol("xmark.circle.fill", size = 18.dp, tint = Palette.tertiary)
}
}
@@ -304,7 +307,7 @@ class CardRows internal constructor() {
val centered = style.textAlign == TextAlign.Center
// A centered field spans its width, so its placeholder and empty cursor sit in the middle too.
Box(contentAlignment = Alignment.CenterStart, propagateMinConstraints = centered) {
- if (text.isEmpty()) Text(prompt, style = style, color = Palette.tertiary, maxLines = if (singleLine) 1 else Int.MAX_VALUE)
+ if (text.isEmpty()) Text(tr(prompt), style = style, color = Palette.tertiary, maxLines = if (singleLine) 1 else Int.MAX_VALUE)
field()
}
})
diff --git a/apps/android/design/src/main/kotlin/com/codync/android/design/Dialog.kt b/apps/android/design/src/main/kotlin/com/codync/android/design/Dialog.kt
index 461037c1..92372eb6 100644
--- a/apps/android/design/src/main/kotlin/com/codync/android/design/Dialog.kt
+++ b/apps/android/design/src/main/kotlin/com/codync/android/design/Dialog.kt
@@ -51,6 +51,7 @@ class DialogAction(val title: String, val destructive: Boolean = false, val acti
else { shown.animateTo(0f, Motion.fade()); mounted = false }
}
if (!mounted) return
+ val spokenTitle = tr(title)
val dismiss by rememberUpdatedState(onDismiss)
BackHandler(isPresented && cancel != null) { dismiss() }
Overlay {
@@ -60,15 +61,15 @@ class DialogAction(val title: String, val destructive: Boolean = false, val acti
Column(Modifier.widthIn(max = 320.dp).fillMaxWidth()
.graphicsLayer { val s = 0.96f + 0.04f * shown.value; scaleX = s; scaleY = s; shadowElevation = 24f; shape = RoundedRectangle(22.dp); clip = true }
.background(Palette.bubbleAgent).clickable(remember { MutableInteractionSource() }, null) {}
- .semantics { paneTitle = title }.padding(18.dp),
+ .semantics { paneTitle = spokenTitle }.padding(18.dp),
verticalArrangement = Arrangement.spacedBy(14.dp), horizontalAlignment = Alignment.CenterHorizontally) {
Column(verticalArrangement = Arrangement.spacedBy(6.dp), horizontalAlignment = Alignment.CenterHorizontally) {
- Text(title, style = Type.headline, color = Palette.text, textAlign = TextAlign.Center)
- if (!message.isNullOrEmpty()) Text(message, style = Type.subheadline, color = Palette.secondary, textAlign = TextAlign.Center)
+ Text(tr(title), style = Type.headline, color = Palette.text, textAlign = TextAlign.Center)
+ if (!message.isNullOrEmpty()) Text(tr(message), style = Type.subheadline, color = Palette.secondary, textAlign = TextAlign.Center)
}
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
- for (action in actions()) DialogButton(action.title, action.destructive, prominent = true) { dismiss(); action.action() }
- if (cancel != null) DialogButton(cancel, destructive = false, prominent = false) { dismiss() }
+ for (action in actions()) DialogButton(tr(action.title), action.destructive, prominent = true) { dismiss(); action.action() }
+ if (cancel != null) DialogButton(tr(cancel), destructive = false, prominent = false) { dismiss() }
}
}
}
diff --git a/apps/android/design/src/main/kotlin/com/codync/android/design/L10n.kt b/apps/android/design/src/main/kotlin/com/codync/android/design/L10n.kt
new file mode 100644
index 00000000..e3710099
--- /dev/null
+++ b/apps/android/design/src/main/kotlin/com/codync/android/design/L10n.kt
@@ -0,0 +1,157 @@
+package com.codync.android.design
+
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.staticCompositionLocalOf
+
+/** Which Chinese writing the interface uses. Traditional is its own table. */
+enum class ChineseScript { Hans, Hant }
+
+/** `zh-Hant`, `zh-TW`, `zh-HK` and `zh-MO` read Traditional. Other Chinese locales read Simplified. */
+fun systemScript(tag: String): ChineseScript? {
+ val id = tag.lowercase().replace('_', '-').substringBefore('.')
+ if (!id.startsWith("zh")) return null
+ return if (id.contains("hant") || id.contains("-tw") || id.contains("-hk") || id.contains("-mo")) ChineseScript.Hant else ChineseScript.Hans
+}
+
+/** The language of this app's own interface. Chats and bots are not translated. `Zh` stays stored as "zh". */
+enum class AppLanguage {
+ System, Zh, ZhHant, En;
+
+ fun usesChinese(systemIsChinese: Boolean): Boolean = when (this) {
+ Zh, ZhHant -> true
+ En -> false
+ System -> systemIsChinese
+ }
+
+ /** The table this choice reads. A missing Traditional line can fall back to Simplified. */
+ fun resolvedScript(systemTag: String): ChineseScript? = when (this) {
+ Zh -> ChineseScript.Hans
+ ZhHant -> ChineseScript.Hant
+ En -> null
+ System -> systemScript(systemTag)
+ }
+
+ companion object {
+ fun fromStored(raw: String?): AppLanguage = when (raw) {
+ "zh", "zh-Hans" -> Zh
+ "zh-Hant" -> ZhHant
+ "en" -> En
+ else -> System
+ }
+
+ fun stored(language: AppLanguage): String = when (language) {
+ System -> "system"
+ Zh -> "zh"
+ ZhHant -> "zh-Hant"
+ En -> "en"
+ }
+
+ /** Language names stay in that language. "Follow system" is translated with the interface. */
+ fun menuTitle(language: AppLanguage, preference: AppLanguage, systemIsChinese: Boolean, phrases: Map<String, String>): String =
+ when (language) {
+ System -> translate("Follow system", preference, systemIsChinese, phrases)
+ Zh -> "简体中文"
+ ZhHant -> "繁體中文"
+ En -> "English"
+ }
+ }
+}
+
+/** One piece of a phrase key such as "Runs the official installer on {name}." */
+private data class Piece(val literal: String?, val token: String?)
+
+/**
+ * A sentence the host or a view already filled in, matched back to its `{token}` phrase.
+ * A slot that is itself a known phrase (a setup hint) is translated too.
+ */
+private val templateLock = Any()
+private var cachedKey: Map<String, String>? = null
+private var cachedTemplates: List<Triple<Int, String, List<Piece>>> = emptyList()
+
+/** Parsed once per phrase-table instance. Callers keep one map for the process. */
+private fun templates(phrases: Map<String, String>): List<Triple<Int, String, List<Piece>>> {
+ synchronized(templateLock) {
+ if (cachedKey === phrases) return cachedTemplates
+ }
+ val built = phrases.keys.mapNotNull { key ->
+ val pieces = parseTemplate(key) ?: return@mapNotNull null
+ val literal = pieces.sumOf { it.literal?.length ?: 0 }
+ if (literal < 6) null else Triple(literal, key, pieces)
+ }.sortedWith(compareByDescending<Triple<Int, String, List<Piece>>> { it.first }.thenByDescending { it.second.length })
+ synchronized(templateLock) {
+ cachedKey = phrases
+ cachedTemplates = built
+ }
+ return built
+}
+
+private fun templated(text: String, phrases: Map<String, String>, depth: Int = 0): String? {
+ for ((_, key, pieces) in templates(phrases)) {
+ val phrase = phrases[key] ?: continue
+ fill(text, pieces, phrase, phrases, depth)?.let { return it }
+ }
+ return null
+}
+
+/** `{name}` and the same shape. A `{` that is not a slot makes the key unusable as a template. */
+private fun parseTemplate(template: String): List<Piece>? {
+ val pieces = mutableListOf<Piece>()
+ var rest = template
+ while (rest.contains('{')) {
+ val open = rest.indexOf('{')
+ if (open > 0) pieces.add(Piece(rest.substring(0, open), null))
+ val close = rest.indexOf('}', open)
+ if (close < 0) return null
+ val token = rest.substring(open, close + 1)
+ val name = token.substring(1, token.length - 1)
+ if (name.isEmpty() || name.any { !it.isLetterOrDigit() } || pieces.lastOrNull()?.token != null) return null
+ pieces.add(Piece(null, token))
+ rest = rest.substring(close + 1)
+ }
+ if (rest.isNotEmpty()) pieces.add(Piece(rest, null))
+ return if (pieces.any { it.token != null }) pieces else null
+}
+
+private fun fill(text: String, pieces: List<Piece>, phrase: String, phrases: Map<String, String>, depth: Int): String? {
+ var pos = 0
+ val caps = linkedMapOf<String, String>()
+ for ((index, piece) in pieces.withIndex()) {
+ val literal = piece.literal
+ if (literal != null) {
+ if (!text.startsWith(literal, pos)) return null
+ pos += literal.length
+ continue
+ }
+ val token = piece.token ?: return null
+ val next = pieces.getOrNull(index + 1)?.literal
+ val end = if (next == null) text.length else text.indexOf(next, pos)
+ if (end < 0 || end == pos) return null
+ caps[token] = text.substring(pos, end)
+ pos = end
+ }
+ if (pos != text.length) return null
+ var result = phrase
+ for ((token, value) in caps) {
+ val inner = phrases[value] ?: if (depth == 0) templated(value, phrases, 1) else null
+ result = result.replace(token, inner ?: value)
+ }
+ return result
+}
+
+fun translate(text: String, preference: AppLanguage, systemIsChinese: Boolean, phrases: Map<String, String>): String {
+ if (!preference.usesChinese(systemIsChinese)) return text
+ phrases[text]?.let { return it }
+ templated(text, phrases)?.let { return it }
+ val trimmed = text.trim()
+ if (trimmed == text) return text
+ return phrases[trimmed] ?: templated(trimmed, phrases) ?: text
+}
+
+/** Defaults keep source strings, so a test that doesn't provide a language stays in English. */
+val LocalAppLanguage = staticCompositionLocalOf { AppLanguage.System }
+val LocalSystemChinese = staticCompositionLocalOf { false }
+val LocalPhrases = staticCompositionLocalOf { emptyMap<String, String>() }
+val LocalSetAppLanguage = staticCompositionLocalOf<(AppLanguage) -> Unit> { {} }
+
+@Composable fun tr(text: String): String =
+ translate(text, LocalAppLanguage.current, LocalSystemChinese.current, LocalPhrases.current)
diff --git a/apps/android/design/src/main/kotlin/com/codync/android/design/Menus.kt b/apps/android/design/src/main/kotlin/com/codync/android/design/Menus.kt
index e494be1f..82eb6464 100644
--- a/apps/android/design/src/main/kotlin/com/codync/android/design/Menus.kt
+++ b/apps/android/design/src/main/kotlin/com/codync/android/design/Menus.kt
@@ -251,7 +251,7 @@ private val MenuShape = RoundedRectangle(26.dp)
Box(Modifier.size(24.dp), contentAlignment = Alignment.Center) {
if (leading != null) Symbol(leading, size = 21.dp, tint = ink)
}
- Text(item.title, Modifier.weight(1f), style = if (bold) Type.body.semibold else Type.body, color = ink,
+ Text(tr(item.title), Modifier.weight(1f), style = if (bold) Type.body.semibold else Type.body, color = ink,
maxLines = 2, overflow = TextOverflow.Ellipsis)
if (item.children != null) Symbol("chevron.right", size = 16.dp, tint = Palette.secondary)
}
diff --git a/apps/desktop/electron.vite.config.ts b/apps/desktop/electron.vite.config.ts
index be05989c..c2327c39 100644
--- a/apps/desktop/electron.vite.config.ts
+++ b/apps/desktop/electron.vite.config.ts
@@ -13,6 +13,7 @@ export default defineConfig({
preload: {},
renderer: {
resolve: { alias: { '@shared': resolve('src/shared') } },
+ server: { fs: { allow: [resolve('..')] } },
plugins: [react()],
// Readable function names in error reports; the files are local, so size doesn't matter.
build: { minify: false },
diff --git a/apps/desktop/src/main/tray.ts b/apps/desktop/src/main/tray.ts
index c8792ecb..331b74aa 100644
--- a/apps/desktop/src/main/tray.ts
+++ b/apps/desktop/src/main/tray.ts
@@ -8,6 +8,7 @@ import { setShowInDock, showInDock } from './dock'
import { identity } from './environment'
import { islandSupported, type Island } from './island'
import { islandLabel } from '../shared/island'
+import { systemScript, translate } from '../renderer/lib/l10n'
import { launchAtLogin, setLaunchAtLogin } from './login-item'
interface Deps {
@@ -55,6 +56,14 @@ export class Tray {
this.rebuild()
}
+ /** Menu-bar labels are a system menu, so they translate here. Slots are filled after lookup. */
+ private tr(text: string) {
+ // A summary's null script is English. Only a menu drawn before the first summary follows the computer.
+ const script = this.summary ? this.summary.script : systemScript(app.getLocale())
+ const preference = script === 'hant' ? 'zh-Hant' : script === 'hans' ? 'zh' : 'en'
+ return translate(text, preference, 'en')
+ }
+
/** The renderer draws menu images at 1× and 2× (`tray-summary.ts`): each screen gets its own pixels. */
private image(drawn: TrayImage | null) {
if (!drawn) return undefined
@@ -75,53 +84,53 @@ export class Tray {
: state.kind === 'starting' ? 'Connecting…'
: state.kind === 'failed' ? 'Host problem'
: (s?.status ?? 'Connected')
- items.push({ label: status, enabled: false })
- items.push({ label: `Open ${app.getName()}`, accelerator: 'CmdOrCtrl+O', click: () => this.deps.openChat() })
+ items.push({ label: this.tr(status), enabled: false })
+ items.push({ label: this.tr('Open {name}').replaceAll('{name}', app.getName()), accelerator: 'CmdOrCtrl+O', click: () => this.deps.openChat() })
if (state.kind === 'running') {
- items.push({ label: 'Pair iPhone…', enabled: s?.canPair ?? false, click: () => this.deps.openPairing() })
+ items.push({ label: this.tr('Pair iPhone…'), enabled: s?.canPair ?? false, click: () => this.deps.openPairing() })
}
items.push({ type: 'separator' })
switch (state.kind) {
case 'missingBinary':
if (identity.environment === 'dev') {
- items.push({ label: 'Rebuild Codync Dev with its development host.', enabled: false })
+ items.push({ label: this.tr('Rebuild Codync Dev with its development host.'), enabled: false })
break
}
- items.push({ label: 'Reinstall Codync or install the host with Homebrew.', enabled: false })
- items.push({ label: 'Copy host install command', click: () => clipboard.writeText('brew install leepokai/codync/codync-host') })
+ items.push({ label: this.tr('Reinstall Codync or install the host with Homebrew.'), enabled: false })
+ items.push({ label: this.tr('Copy host install command'), click: () => clipboard.writeText('brew install leepokai/codync/codync-host') })
break
case 'notInstalled':
- items.push({ label: 'Install host', click: () => void host.install() })
+ items.push({ label: this.tr('Install host'), click: () => void host.install() })
break
case 'starting':
- items.push({ label: 'Starting the host…', enabled: false })
+ items.push({ label: this.tr('Starting the host…'), enabled: false })
break
case 'failed':
- items.push({ label: state.message, enabled: false })
- items.push({ label: 'Restart host', click: () => host.restart() })
- items.push({ label: 'Open log', click: () => void shell.openPath(host.logPath) })
+ items.push({ label: this.tr(state.message), enabled: false })
+ items.push({ label: this.tr('Restart host'), click: () => host.restart() })
+ items.push({ label: this.tr('Open log'), click: () => void shell.openPath(host.logPath) })
break
case 'running':
if (s?.approval) {
- items.push({ label: `Review access request from ${s.approval}…`, click: () => send({ kind: 'reviewApprovals' }) })
+ items.push({ label: this.tr('Review access request from {name}…').replaceAll('{name}', s.approval), click: () => send({ kind: 'reviewApprovals' }) })
items.push({ type: 'separator' })
}
if (!s || s.bots.length === 0) {
- items.push({ label: 'No bots yet', enabled: false })
+ items.push({ label: this.tr('No bots yet'), enabled: false })
} else {
for (const bot of s.bots) {
const submenu: Electron.MenuItemConstructorOptions[] = [
- { label: bot.detail, enabled: false },
- { label: 'Open conversation', click: () => send({ kind: 'openBot', ref: bot.ref }) },
+ { label: this.tr(bot.detail), enabled: false },
+ { label: this.tr('Open conversation'), click: () => send({ kind: 'openBot', ref: bot.ref }) },
]
- if (bot.working) submenu.push({ label: 'Stop task', click: () => send({ kind: 'stopBot', ref: bot.ref }, false) })
+ if (bot.working) submenu.push({ label: this.tr('Stop task'), click: () => send({ kind: 'stopBot', ref: bot.ref }, false) })
items.push({ label: bot.name, icon: this.image(bot.avatar), submenu })
}
}
if (s?.screen) {
items.push({ type: 'separator' })
- items.push({ label: 'Remote screen', submenu: this.screenMenu(s.screen) })
+ items.push({ label: this.tr('Remote screen'), submenu: this.screenMenu(s.screen) })
}
if (s && s.usage.length) {
items.push({ type: 'separator' })
@@ -137,40 +146,41 @@ export class Tray {
}
items.push({ type: 'separator' })
- items.push({ label: 'Settings', submenu: this.settingsMenu() })
- if (s?.version) items.push({ label: `Version ${s.version}`, enabled: false })
- items.push({ label: `Quit ${app.getName()}`, accelerator: 'CmdOrCtrl+Q', click: () => app.quit() })
+ items.push({ label: this.tr('Settings'), submenu: this.settingsMenu() })
+ if (s?.version) items.push({ label: this.tr('Version {version}').replaceAll('{version}', s.version), enabled: false })
+ items.push({ label: this.tr('Quit {name}').replaceAll('{name}', app.getName()), accelerator: 'CmdOrCtrl+Q', click: () => app.quit() })
this.tray.setContextMenu(Menu.buildFromTemplate(items))
}
private screenMenu(screen: NonNullable<TraySummary['screen']>): Electron.MenuItemConstructorOptions[] {
const items: Electron.MenuItemConstructorOptions[] = [
{
- label: 'Enable remote screen',
+ label: this.tr('Enable remote screen'),
type: 'checkbox',
checked: screen.enabled,
click: () => this.deps.send({ kind: 'setRemoteScreen', on: !screen.enabled }, false),
},
- { label: screen.subtitle, enabled: false },
+ { label: this.tr(screen.subtitle), enabled: false },
]
- items.push({ label: 'Set up computer access…', click: () => this.deps.send({ kind: 'computerAccess' }, true) })
- if (screen.error) items.push({ label: screen.error, enabled: false })
+ items.push({ label: this.tr('Set up computer access…'), click: () => this.deps.send({ kind: 'computerAccess' }, true) })
+ if (screen.error) items.push({ label: this.tr(screen.error), enabled: false })
return items
}
private updatesMenu(): Electron.MenuItemConstructorOptions[] {
const { updates } = this.deps
const u = updates.state
+ const action = updateAction(u)
const items: Electron.MenuItemConstructorOptions[] = [
- { ...updateAction(u), click: () => updates.check() },
- { label: 'Automatically check for updates', type: 'checkbox', checked: u.autoCheck, enabled: u.supported, click: () => updates.emit('setAutoCheck', !u.autoCheck) },
- { label: 'Automatically download and install', type: 'checkbox', checked: u.autoDownload, enabled: u.supported, click: () => updates.emit('setAutoDownload', !u.autoDownload) },
+ { label: this.tr(action.label), enabled: action.enabled, click: () => updates.check() },
+ { label: this.tr('Automatically check for updates'), type: 'checkbox', checked: u.autoCheck, enabled: u.supported, click: () => updates.emit('setAutoCheck', !u.autoCheck) },
+ { label: this.tr('Automatically download and install'), type: 'checkbox', checked: u.autoDownload, enabled: u.supported, click: () => updates.emit('setAutoDownload', !u.autoDownload) },
]
- if (!u.supported) items.push({ label: 'Updates are available in release builds.', enabled: false })
- if (u.lastCheck) items.push({ label: `Last checked: ${new Date(u.lastCheck).toLocaleString()}`, enabled: false })
+ if (!u.supported) items.push({ label: this.tr('Updates are available in release builds.'), enabled: false })
+ if (u.lastCheck) items.push({ label: this.tr('Last checked {when}').replaceAll('{when}', new Date(u.lastCheck).toLocaleString()), enabled: false })
if (u.error) {
- items.push({ label: u.error, enabled: false })
- items.push({ label: 'Retry installing update', click: () => updates.check() })
+ items.push({ label: this.tr(u.error), enabled: false })
+ items.push({ label: this.tr('Retry installing update'), click: () => updates.check() })
}
return items
}
@@ -182,23 +192,23 @@ export class Tray {
const size = s?.textSize ?? 12
return [
{
- label: 'Usage icons',
+ label: this.tr('Usage icons'),
submenu: [
- { label: 'Character', type: 'radio', checked: style === 'character', click: () => send({ kind: 'setUsageIconStyle', style: 'character' }, false) },
- { label: 'Original', type: 'radio', checked: style === 'original', click: () => send({ kind: 'setUsageIconStyle', style: 'original' }, false) },
+ { label: this.tr('Character'), type: 'radio', checked: style === 'character', click: () => send({ kind: 'setUsageIconStyle', style: 'character' }, false) },
+ { label: this.tr('Original'), type: 'radio', checked: style === 'original', click: () => send({ kind: 'setUsageIconStyle', style: 'original' }, false) },
],
},
{
- label: 'Text Size',
+ label: this.tr('Text Size'),
submenu: TEXT_SIZES.map((pt) => ({
- label: pt === 12 ? `${pt} pt (Default)` : `${pt} pt`,
+ label: pt === 12 ? this.tr('{size} pt (Default)').replaceAll('{size}', String(pt)) : `${pt} pt`,
type: 'radio' as const,
checked: pt === size,
click: () => send({ kind: 'setTextSize', size: pt }, false),
})),
},
{
- label: 'Open at login',
+ label: this.tr('Open at login'),
type: 'checkbox',
checked: this.launchAtLogin,
click: () => {
@@ -206,17 +216,17 @@ export class Tray {
this.rebuild()
},
},
- ...(process.platform === 'darwin' ? [{ label: 'Show in Dock', type: 'checkbox' as const, checked: showInDock(), click: () => { setShowInDock(!showInDock()); this.rebuild() } }] : []),
- ...(islandSupported ? [{ label: islandLabel(process.platform), type: 'checkbox' as const, checked: island.enabled, click: () => island.setEnabled(!island.enabled) }] : []),
+ ...(process.platform === 'darwin' ? [{ label: this.tr('Show in Dock'), type: 'checkbox' as const, checked: showInDock(), click: () => { setShowInDock(!showInDock()); this.rebuild() } }] : []),
+ ...(islandSupported ? [{ label: this.tr(islandLabel(process.platform)), type: 'checkbox' as const, checked: island.enabled, click: () => island.setEnabled(!island.enabled) }] : []),
{ type: 'separator' },
- { label: 'Updates', submenu: this.updatesMenu() },
+ { label: this.tr('Updates'), submenu: this.updatesMenu() },
{ type: 'separator' },
- { label: 'Restart host', click: () => host.restart() },
- { label: 'Open log', click: () => void shell.openPath(host.logPath) },
+ { label: this.tr('Restart host'), click: () => host.restart() },
+ { label: this.tr('Open log'), click: () => void shell.openPath(host.logPath) },
{ type: 'separator' },
- { label: 'Uninstall host service', click: () => void host.uninstall() },
+ { label: this.tr('Uninstall host service'), click: () => void host.uninstall() },
{ type: 'separator' },
- { label: 'Reset all data…', click: () => send({ kind: 'confirmReset' }) },
+ { label: this.tr('Reset all data…'), click: () => send({ kind: 'confirmReset' }) },
]
}
}
diff --git a/apps/desktop/src/renderer/components/Controls.tsx b/apps/desktop/src/renderer/components/Controls.tsx
index f44d1790..9364dfd3 100644
--- a/apps/desktop/src/renderer/components/Controls.tsx
+++ b/apps/desktop/src/renderer/components/Controls.tsx
@@ -2,6 +2,7 @@ import { Children, Fragment, useEffect, useRef, useState, type CSSProperties, ty
import { Icon } from './Icon'
import { AnchoredMenu, IconButtonBase, type MenuItem } from './Overlay'
import { HStack, Spacer, VStack } from './Stack'
+import { useTr } from '../lib/use-language'
import { Text } from './Text'
import './controls.css'
@@ -18,9 +19,10 @@ export function Button({ kind = 'primary', children, onClick, disabled, classNam
className?: string
title?: string
}) {
+ const tr = useTr()
return (
- <button className={`styled-button ${kind} ${className ?? ''}`} onClick={onClick} disabled={disabled} title={title}>
- {children}
+ <button className={`styled-button ${kind} ${className ?? ''}`} onClick={onClick} disabled={disabled} title={title ? tr(title) : title}>
+ {typeof children === 'string' ? tr(children) : children}
</button>
)
}
@@ -29,7 +31,7 @@ export function Button({ kind = 'primary', children, onClick, disabled, classNam
export function Spinner({ size = 14 }: { size?: number }) {
const { w, r, c, center } = ring(size)
return (
- <svg className="spinner" width={size} height={size} viewBox={`0 0 ${size} ${size}`} aria-label="Loading" role="img">
+ <svg className="spinner" width={size} height={size} viewBox={`0 0 ${size} ${size}`} aria-label={useTr()('Loading')} role="img">
<circle cx={center} cy={center} r={r} fill="none" stroke="var(--secondary)" strokeWidth={w} strokeLinecap="round" strokeDasharray={`${c * 0.7} ${c}`} />
</svg>
)
@@ -65,9 +67,10 @@ function ring(size: number) {
/** On/off switch: label on the left, a flat capsule track on the right. */
/** `label` names a switch whose visible label sits outside it (beside an info button, say). */
export function Switch({ on, onChange, children, label, disabled, className }: { on: boolean; onChange: (on: boolean) => void; children?: ReactNode; label?: string; disabled?: boolean; className?: string }) {
+ const tr = useTr()
return (
- <button className={`switch${className ? ` ${className}` : ''}`} role="switch" aria-checked={on} aria-label={label} disabled={disabled} onClick={() => onChange(!on)}>
- {children !== undefined ? <span className="switch-label">{children}</span> : null}
+ <button className={`switch${className ? ` ${className}` : ''}`} role="switch" aria-checked={on} aria-label={label ? tr(label) : label} disabled={disabled} onClick={() => onChange(!on)}>
+ {children !== undefined ? <span className="switch-label">{typeof children === 'string' ? tr(children) : children}</span> : null}
<span className={`switch-track ${on ? 'on' : ''}`}>
<span className="switch-knob" />
</span>
@@ -98,14 +101,15 @@ export function ChoicePicker<T extends string | number>({ selection, options, on
fill?: string
fits?: boolean
}) {
+ const tr = useTr()
const chosen = options.find((o) => o.id === selection)
- const label = chosen?.label ?? 'Choose'
+ const label = tr(chosen?.label ?? 'Choose')
return (
<DropdownMenu
title={label}
className={`choice-picker${fill ? '' : ' outlined'}${fits ? ' fits' : ''}`}
style={{ background: fill }}
- items={() => options.map((o) => ({ title: o.label, leading: o.leading, selected: o.id === selection, action: () => onChange(o.id) }))}
+ items={() => options.map((o) => ({ title: tr(o.label), leading: o.leading, selected: o.id === selection, action: () => onChange(o.id) }))}
>
{chosen?.leading}
<span className="choice-label">{label}</span>
@@ -116,13 +120,14 @@ export function ChoicePicker<T extends string | number>({ selection, options, on
/** Picks one of a few values side by side: the replacement for `.segmented`. */
export function SegmentedChoice<T extends string>({ selection, options, onChange }: { selection: T; options: { id: T; label: string }[]; onChange: (id: T) => void }) {
+ const tr = useTr()
const index = Math.max(0, options.findIndex((o) => o.id === selection))
return (
<div className="segmented">
<div className="segmented-thumb" style={{ width: `calc((100% - 6px - ${(options.length - 1) * 2}px) / ${options.length})`, transform: `translateX(calc(${index} * (100% + 2px)))` }} />
{options.map((o) => (
<button key={o.id} className={`segmented-option ${o.id === selection ? 'on' : ''}`} onClick={() => onChange(o.id)} aria-pressed={o.id === selection}>
- {o.label}
+ {tr(o.label)}
</button>
))}
</div>
@@ -131,11 +136,12 @@ export function SegmentedChoice<T extends string>({ selection, options, onChange
/** Grok Bot's page tabs: plain labels, the chosen one on a light capsule. */
export function TabChoice<T extends string>({ label, selection, options, onChange }: { label: string; selection: T; options: { id: T; label: string }[]; onChange: (id: T) => void }) {
+ const tr = useTr()
return (
- <div className="tab-choice" role="tablist" aria-label={label}>
+ <div className="tab-choice" role="tablist" aria-label={tr(label)}>
{options.map((o) => (
<button key={o.id} role="tab" aria-selected={o.id === selection} className={`tab-choice-option ${o.id === selection ? 'on' : ''}`} onClick={() => onChange(o.id)}>
- {o.label}
+ {tr(o.label)}
</button>
))}
</div>
@@ -149,11 +155,12 @@ export function ChipChoice<T extends string | number>({ label, selection, option
options: readonly { id: T; label: string; title?: string }[]
onChange: (id: T) => void
}) {
+ const tr = useTr()
return (
- <HStack gap={2} wrap role="radiogroup" aria-label={label}>
+ <HStack gap={2} wrap role="radiogroup" aria-label={tr(label)}>
{options.map((o) => (
- <button key={o.id} role="radio" aria-checked={o.id === selection} aria-label={o.title} title={o.title} className={`chip-choice${o.id === selection ? ' on' : ''}`} onClick={() => onChange(o.id)}>
- {o.label}
+ <button key={o.id} role="radio" aria-checked={o.id === selection} aria-label={o.title ? tr(o.title) : undefined} title={o.title ? tr(o.title) : undefined} className={`chip-choice${o.id === selection ? ' on' : ''}`} onClick={() => onChange(o.id)}>
+ {tr(o.label)}
</button>
))}
</HStack>
@@ -162,13 +169,14 @@ export function ChipChoice<T extends string | number>({ label, selection, option
/** A list of choices, one per row with a checkmark: the replacement for `.inline` pickers. */
export function ChoiceList<T extends string>({ selection, options, onChange }: { selection: T; options: { id: T; label: string; detail?: string | null }[]; onChange: (id: T) => void }) {
+ const tr = useTr()
return (
<VStack gap={10}>
{options.map((o) => (
<button key={o.id} className="choice-row" onClick={() => onChange(o.id)}>
<VStack gap={2} className="choice-row-label">
- <Text tone="text">{o.label}</Text>
- {o.detail ? <Text size="compactSecondary" tone="secondary">{o.detail}</Text> : null}
+ <Text tone="text">{tr(o.label)}</Text>
+ {o.detail ? <Text size="compactSecondary" tone="secondary">{tr(o.detail)}</Text> : null}
</VStack>
<span className={`check-slot${o.id === selection ? ' on' : ''}`}>
<Icon name="checkmark" size={10} weight="semibold" />
@@ -193,12 +201,15 @@ export function CardForm({ children }: { children: ReactNode }) {
* rounded group whose rows are split by inset hairlines.
*/
export function CardSection({ title, footer, accessory, children }: { title?: string | null; footer?: ReactNode; accessory?: ReactNode; children: ReactNode }) {
+ const tr = useTr()
const rows = Children.toArray(children)
+ const heading = typeof title === 'string' ? tr(title) : title
+ const note = typeof footer === 'string' ? tr(footer) : footer
return (
<section className="card-section">
- {title || accessory ? (
+ {heading || accessory ? (
<div className="card-section-title">
- {title ? <Text as="h3" size="body" weight="semibold" tone="text">{title}</Text> : null}
+ {heading ? <Text as="h3" size="body" weight="semibold" tone="text">{heading}</Text> : null}
<Spacer />
{accessory}
</div>
@@ -211,7 +222,7 @@ export function CardSection({ title, footer, accessory, children }: { title?: st
</Fragment>
))}
</div>
- {footer ? <div className="card-section-footer">{footer}</div> : null}
+ {note ? <div className="card-section-footer">{typeof footer === 'string' ? <Text size="caption" tone="secondary">{note}</Text> : footer}</div> : null}
</section>
)
}
@@ -223,10 +234,13 @@ export function Hairline({ className, style }: { className?: string; style?: CSS
/** A row's title with an optional note under it (rows, fields and switches share it). */
export function RowLabel({ label, detail, labelId, detailId, grow = false }: { label: ReactNode; detail?: string | null; labelId?: string; detailId?: string; grow?: boolean }) {
+ const tr = useTr()
+ const heading = typeof label === 'string' ? tr(label) : label
+ const note = detail ? tr(detail) : detail
return (
<VStack as="span" gap={3} grow={grow} shrink>
- <Text id={labelId} tone="text">{label}</Text>
- {detail ? <span id={detailId} className="detail-note" title={detail}>{detail}</span> : null}
+ <Text id={labelId} tone="text">{heading}</Text>
+ {note ? <span id={detailId} className="detail-note" title={note}>{note}</span> : null}
</VStack>
)
}
@@ -244,12 +258,14 @@ export function ValueRow({ label, detail, children }: { label: string; detail?:
/** A search box: the replacement for `.searchable`. */
export function SearchField({ value, onChange, prompt = 'Search', inputRef }: { value: string; onChange: (v: string) => void; prompt?: string; inputRef?: React.RefObject<HTMLInputElement | null> }) {
+ const tr = useTr()
+ const clear = tr('Clear search')
return (
<div className="search-field">
<Icon name="magnifyingglass" size={12} color="var(--secondary)" />
- <input ref={inputRef} value={value} placeholder={prompt} spellCheck={false} onChange={(e) => onChange(e.target.value)} />
+ <input ref={inputRef} value={value} placeholder={tr(prompt)} spellCheck={false} onChange={(e) => onChange(e.target.value)} />
{value ? (
- <button aria-label="Clear search" title="Clear search" className="search-clear" onClick={() => onChange('')}>
+ <button aria-label={clear} title={clear} className="search-clear" onClick={() => onChange('')}>
<Icon name="xmark.circle.fill" size={12} />
</button>
) : null}
diff --git a/apps/desktop/src/renderer/components/Overlay.tsx b/apps/desktop/src/renderer/components/Overlay.tsx
index 915f309b..c4e3a192 100644
--- a/apps/desktop/src/renderer/components/Overlay.tsx
+++ b/apps/desktop/src/renderer/components/Overlay.tsx
@@ -2,6 +2,7 @@ import { createContext, useContext, useEffect, useId, useLayoutEffect, useRef, u
import { createPortal } from 'react-dom'
import { reduceMotion } from '../lib/theme'
import { afterExit } from '../lib/exit-delay'
+import { useTr } from '../lib/use-language'
import { Icon } from './Icon'
import { HStack, VStack } from './Stack'
import { Text } from './Text'
@@ -151,6 +152,7 @@ export function Dialog({ open, title, message, actions, cancel = 'Cancel', onClo
onClose: () => void
}) {
const { mounted, shown } = usePresence(open, 120)
+ const tr = useTr()
const last = useRef({ title, message, actions })
const layer = useRef<HTMLDivElement>(null)
const id = useId()
@@ -164,13 +166,14 @@ export function Dialog({ open, title, message, actions, cancel = 'Cancel', onClo
<div className="dialog-dim" onClick={() => cancel !== null && onClose()} />
<div className="dialog-card" data-modal-card tabIndex={-1}>
<div className="dialog-text">
+ {/* Callers translate the sentence, then insert names. A second pass would also translate a device named "Done". */}
<Text as="h2" id={`${id}-title`} size="title3" weight="semibold">{shownContent.title}</Text>
{shownContent.message ? <Text as="div" id={`${id}-message`} size="body" tone="secondary">{shownContent.message}</Text> : null}
</div>
<div className="dialog-buttons">
{cancel !== null ? (
<button className="dialog-button" data-autofocus onClick={onClose}>
- {cancel}
+ {tr(cancel)}
</button>
) : null}
{shownContent.actions.map((a) => (
@@ -182,7 +185,7 @@ export function Dialog({ open, title, message, actions, cancel = 'Cancel', onClo
a.action()
}}
>
- {a.title}
+ {tr(a.title)}
</button>
))}
</div>
@@ -238,6 +241,7 @@ export function ReactionStrip({ pick, dismiss, size = 26 }: { pick: ReactionPick
/** The floating panel of menu rows. */
export function MenuPanel({ items, reactions, dismiss, maxHeight }: { items: MenuItem[]; reactions?: ReactionPick; dismiss: () => void; maxHeight?: number }) {
+ const tr = useTr()
const [highlight, setHighlight] = useState(-1)
useEffect(() => {
const onKey = (e: KeyboardEvent) => {
@@ -267,7 +271,7 @@ export function MenuPanel({ items, reactions, dismiss, maxHeight }: { items: Men
className={`menu-row ${item.destructive ? 'destructive' : ''} ${highlight === i ? 'highlight' : ''}`}
role={item.selected === undefined ? 'menuitem' : 'menuitemradio'}
aria-checked={item.selected}
- title={item.title}
+ title={tr(item.title)}
onMouseEnter={() => setHighlight(i)}
onClick={() => {
dismiss()
@@ -279,7 +283,7 @@ export function MenuPanel({ items, reactions, dismiss, maxHeight }: { items: Men
{item.leading ?? (item.icon ? <Icon name={item.icon} size={12} /> : null)}
</span>
) : null}
- <span className="menu-title">{item.title}</span>
+ <span className="menu-title">{tr(item.title)}</span>
{item.selected !== undefined ? (
<span className={`check-slot${item.selected ? ' on' : ''}`}>
<Icon name="checkmark" size={10} weight="semibold" />
@@ -413,13 +417,15 @@ export function IconButtonBase({ title, icon, onClick, selected = false, size =
/** Set when the button opens a menu: whether that menu is open. */
menuOpen?: boolean
}) {
+ const tr = useTr()
+ const label = tr(title)
return (
<button
ref={buttonRef}
className={`icon-button ${selected ? 'selected' : ''} ${className ?? ''}`}
style={{ width: size, height: size, borderRadius: size * 0.28 }}
- title={title}
- aria-label={title}
+ title={label}
+ aria-label={label}
aria-haspopup={menuOpen === undefined ? undefined : 'menu'}
aria-expanded={menuOpen}
disabled={disabled}
diff --git a/apps/desktop/src/renderer/components/RecordingPill.tsx b/apps/desktop/src/renderer/components/RecordingPill.tsx
index 993b2296..04573e13 100644
--- a/apps/desktop/src/renderer/components/RecordingPill.tsx
+++ b/apps/desktop/src/renderer/components/RecordingPill.tsx
@@ -5,6 +5,8 @@ import { LevelDots, type LevelSample } from './LevelDots'
import { HStack } from './Stack'
import { Text } from './Text'
import './recording-pill.css'
+import { useTr } from '../lib/use-language'
+
/** m:ss since `startedAt`, updated every second. */
function useElapsed(startedAt: number) {
@@ -30,12 +32,13 @@ export function RecordingPill({ startedAt, sample, onStop, transcribing = false,
color?: string | null
className?: string
}) {
+ const tr = useTr()
const elapsed = useElapsed(startedAt)
if (transcribing) {
return (
<HStack as="span" gap={6} className={`recording-pill transcribing ${className}`}>
<Spinner size={12} />
- <Text tone="secondary">Transcribing…</Text>
+ <Text tone="secondary">{tr(`Transcribing…`)}</Text>
</HStack>
)
}
diff --git a/apps/desktop/src/renderer/lib/l10n.test.ts b/apps/desktop/src/renderer/lib/l10n.test.ts
new file mode 100644
index 00000000..338f57bb
--- /dev/null
+++ b/apps/desktop/src/renderer/lib/l10n.test.ts
@@ -0,0 +1,137 @@
+import assert from 'node:assert/strict'
+import { test } from 'node:test'
+import { languageTitle, systemIsChinese, systemScript, translate, usesChinese } from './l10n.ts'
+
+test('chinese follows the choice, and a system preference follows the computer', () => {
+ assert.equal(usesChinese('zh', false), true)
+ assert.equal(usesChinese('en', true), false)
+ assert.equal(usesChinese('system', true), true)
+ assert.equal(usesChinese('system', false), false)
+ assert.equal(usesChinese('zh-Hant', false), true)
+ assert.equal(systemIsChinese('zh-Hans-CN'), true)
+ assert.equal(systemIsChinese('zh-Hant-TW'), true)
+ assert.equal(systemIsChinese('en-US'), false)
+ assert.equal(systemScript('zh-TW'), 'hant')
+ assert.equal(systemScript('zh-HK'), 'hant')
+ assert.equal(systemScript('zh-Hant-TW'), 'hant')
+ assert.equal(systemScript('zh_MO.UTF-8'), 'hant')
+ assert.equal(systemScript('zh-CN'), 'hans')
+ assert.equal(systemScript('zh-Hans-CN'), 'hans')
+ assert.equal(systemScript('en-US'), null)
+})
+
+test('known chrome becomes Chinese and everything else stays', () => {
+ assert.equal(translate('Pair a computer', 'zh', false), '配对一台电脑')
+ assert.equal(translate(' Pair a computer\n', 'zh', false), '配对一台电脑')
+ assert.equal(translate('Pair a computer', 'en', true), 'Pair a computer')
+ assert.equal(translate('Not a phrase', 'system', true), 'Not a phrase')
+ assert.equal(languageTitle('system', 'zh', false), '跟随系统')
+ assert.equal(languageTitle('zh', 'en', true), '简体中文')
+ assert.equal(languageTitle('zh-Hant', 'en', true), '繁體中文')
+ assert.equal(translate('Settings', 'zh-Hant', 'en'), '設定')
+ assert.equal(translate('Files', 'zh-Hant', 'en'), '檔案')
+ assert.equal(translate('Settings', 'system', 'zh-TW'), '設定')
+ assert.equal(translate('Settings', 'system', 'zh-CN'), '设置')
+ assert.equal(languageTitle('en', 'zh', false), 'English')
+ assert.equal(translate('Personal', 'zh', false), '个人')
+ assert.equal(translate('This Mac', 'zh', false), '这台 Mac')
+ assert.equal(translate('Show in notch', 'zh', false), '在屏幕顶部显示')
+ assert.equal(translate('Show in Notch', 'zh', false), '在屏幕顶部显示')
+ assert.equal(translate('Voice input shortcut', 'zh', false), '语音输入快捷键')
+ assert.equal(translate('Right ⌘ twice', 'zh', false), '右 ⌘ 两次')
+ assert.equal(translate('Left ⌘ twice', 'zh', false), '左 ⌘ 两次')
+ assert.equal(translate('Claude Code (not installed)', 'zh', false), 'Claude Code(未安装)')
+ assert.equal(translate('Copy template', 'zh', false), '复制模板')
+ assert.equal(translate('Siri and Dictation are disabled', 'zh', false), 'Siri 和听写已关闭')
+ assert.equal(
+ translate('the Codync cloud refused (403 forbidden): Sign in on the computer to use remote screen relay.', 'zh', false),
+ 'Codync 云拒绝了(403 禁止):请先在电脑上登录,才能使用远程屏幕中继。',
+ )
+ assert.equal(
+ translate('Tip: double-tap the right ⌘ to talk from any app, then tap it once to send.', 'zh', false),
+ '提示:连按两次右侧 ⌘,就能在任何应用里说话,再按一次就发送。',
+ )
+ assert.equal(translate('Theme', 'zh', false), '主题')
+ assert.equal(translate('Only changes appearance on this device.', 'zh', false), '只改变这台设备的外观。')
+ assert.equal(translate('Continue on this Mac', 'zh', false), '在这台 Mac 上继续')
+ assert.equal(translate('Your coding agents,\nas teammates.', 'zh', false), '你的编程助手,\n像队友一样。')
+ assert.equal(translate('Open {name}', 'zh', false).replaceAll('{name}', 'Codync Dev'), '打开 Codync Dev')
+ assert.equal(translate('Quit {name}', 'zh', false).replaceAll('{name}', 'Codync Dev'), '退出 Codync Dev')
+ assert.equal(translate('Pair iPhone…', 'zh', false), '配对 iPhone…')
+ assert.equal(translate('Remote screen', 'zh', false), '远程屏幕')
+ assert.equal(translate('Text Size', 'zh', false), '文字大小')
+ assert.equal(translate('Restart host', 'zh', false), '重启 Host')
+ assert.equal(translate('2 bots working', 'zh', false), '2 个 Bot 正在工作')
+ assert.equal(translate('Check for updates', 'zh', false), '检查更新')
+ assert.equal(translate('Computer access is ready.', 'zh', false), '电脑访问已就绪。')
+ assert.equal(translate('Storage', 'zh', false), '存储')
+ assert.equal(translate('Load more agents', 'zh', false), '加载更多智能体')
+ assert.equal(
+ translate('listing skills on GitHub: https://api.github.com/repos/anthropics/skills answered 403 Forbidden', 'zh', false),
+ '无法列出 GitHub 上的技能:https://api.github.com/repos/anthropics/skills 返回了 403 Forbidden',
+ )
+ assert.equal(
+ translate('Remote screen is off. On the computer, open Codync → Settings → Computer access. Permissions are set separately on each computer.', 'zh', false),
+ '远程屏幕已关闭。在电脑上打开 Codync → 设置 → 电脑访问。每台电脑的权限要单独设置。',
+ )
+ assert.equal(translate('Updates are available in release builds.', 'zh', false), '正式版才会提供更新。')
+ assert.equal(translate('Privacy', 'zh', false), '隐私')
+ assert.equal(translate('Share usage analytics', 'zh', false), '共享用量分析')
+ assert.equal(translate('Fast mode', 'zh', false), '快速模式')
+ assert.equal(translate('Use the computer', 'zh', false), '使用电脑')
+ assert.equal(translate('{size} pt (Default)', 'zh', false), '{size} pt(默认)')
+ assert.equal(translate('Full conversation', 'zh', false), '完整对话')
+ assert.equal(translate('Settings', 'zh', false), '设置')
+ assert.equal(translate('Ask {name}', 'zh', false), '问 {name}')
+ assert.equal(translate('Stopped.', 'zh', false), '已停止。')
+ assert.equal(translate('Load earlier messages', 'zh', false), '加载更早的消息')
+ assert.equal(translate('Today', 'zh', false), '今天')
+ assert.equal(translate('Yesterday', 'zh', false), '昨天')
+ assert.equal(translate('No dreams yet.', 'zh', false), '还没有梦境。')
+ assert.equal(translate('Standing instructions', 'zh', false), '常驻指令')
+ assert.equal(translate('Your coding agents, as teammates.', 'zh', false), '你的编程智能体,像队友一样。')
+ assert.equal(translate('Mark as Read', 'zh', false), '标为已读')
+ assert.equal(translate('Resuming session…', 'zh', false), '正在恢复会话…')
+ assert.equal(translate('Search agents, connectors and skills', 'zh', false), '搜索智能体、连接器和技能')
+ assert.equal(translate('Apps', 'zh', false), '应用')
+ assert.equal(translate('Agents', 'zh', false), '智能体')
+ assert.equal(translate('Installed', 'zh', false), '已安装')
+ assert.equal(translate('Not installed', 'zh', false), '未安装')
+ assert.equal(translate('Set up', 'zh', false), '设置')
+ assert.equal(translate('Writing a reply…', 'zh', false), '正在写回复…')
+ assert.equal(translate('Downloading Codebuddy Code…', 'zh', false), '正在下载 Codebuddy Code…')
+ assert.equal(translate('Needs approval: Bash', 'zh', false), '需要批准:Bash')
+ assert.equal(translate('Gmail, Slack, GitHub, Notion and 1,000 more apps', 'zh', false), 'Gmail、Slack、GitHub、Notion 等 1,000 多个应用')
+ assert.equal(translate('Storage', 'zh', false), '存储')
+ assert.equal(translate('New skill', 'zh', false), '新建技能')
+ assert.equal(translate('Composio API key', 'zh', false), 'Composio API 密钥')
+ assert.equal(translate('When to use it', 'zh', false), '何时使用')
+ assert.equal(translate("Runs on {name} in the bot's project folder. Quotes work like in a shell.", 'zh', false), '在 {name} 上、Bot 的项目文件夹里运行。引号用法和 shell 一样。')
+ assert.equal(translate('Add connector', 'zh', false), '添加连接器')
+ assert.equal(translate('Name your group', 'zh', false), '给群聊起个名字')
+ assert.equal(translate('Nothing installed', 'zh', false), '还没有安装')
+ assert.equal(translate('Remove {name}?', 'zh', false), '移除 {name}?')
+ assert.equal(translate('No setup needed.', 'zh', false), '无需设置。')
+ assert.equal(translate('On {name} ({kind})', 'zh', false), '在 {name} 上({kind})')
+ assert.equal(translate('Runs the official installer on this Mac.', 'zh', false), '在 这台 Mac 上运行官方安装程序。')
+ assert.equal(translate('Use Claude subscription', 'zh', false), '使用 Claude 订阅')
+ assert.equal(translate('Support', 'zh', false), '支持')
+ assert.equal(translate('Devices that can use FORWARDXU-MC3', 'zh', false), '可以使用 FORWARDXU-MC3 的设备')
+ assert.equal(translate('Paired with a QR code · seen 10:54', 'zh', false), '通过二维码配对 · 10:54 见过')
+ assert.equal(translate("CodeBuddy Code's own memory", 'zh', false), 'CodeBuddy Code 自己的记忆')
+ assert.equal(translate("About {name}'s own memory", 'zh', false), '关于 {name} 自己的记忆')
+ assert.equal(translate('A memory of its own', 'zh', false), '它自己的记忆')
+ assert.equal(translate('Usage', 'zh', false), '用量')
+ assert.equal(translate('Computers & devices', 'zh', false), '电脑和设备')
+ assert.equal(translate('Reachable from anywhere through Cloudflare (encrypted).', 'zh', false), '通过 Cloudflare 随时随地连接(已加密)。')
+ assert.equal(translate('Use Anthropic Console (API usage billing)', 'zh', false), '使用 Anthropic 控制台(按 API 用量计费)')
+ assert.equal(translate('12 pt (Default)', 'zh', false), '12 pt(默认)')
+ assert.equal(
+ translate("Claude Code isn't set up on this computer. Install Claude Code and run `claude auth login`.", 'zh', false),
+ 'Claude Code 还没有在这台电脑上设置好。安装 Claude Code,然后运行 `claude auth login`。',
+ )
+ assert.equal(
+ translate("Claude Code isn't set up on this computer. Install Claude Code and run `claude auth login`.", 'en', true),
+ "Claude Code isn't set up on this computer. Install Claude Code and run `claude auth login`.",
+ )
+})
diff --git a/apps/desktop/src/renderer/lib/l10n.ts b/apps/desktop/src/renderer/lib/l10n.ts
new file mode 100644
index 00000000..5d0b3cdf
--- /dev/null
+++ b/apps/desktop/src/renderer/lib/l10n.ts
@@ -0,0 +1,166 @@
+import hansPhrases from '../../../../ios/Kit/Sources/CodyncKit/Resources/zh-Hans.json' with { type: 'json' }
+import hantPhrases from '../../../../ios/Kit/Sources/CodyncKit/Resources/zh-Hant.json' with { type: 'json' }
+
+/** This app's interface language. `zh` is Simplified, kept so a saved choice still means that. */
+export type AppLanguage = 'system' | 'zh' | 'zh-Hant' | 'en'
+
+/** Traditional is its own table. A boolean `true` from older callers means Simplified. */
+export type ChineseScript = 'hans' | 'hant'
+
+const hans = hansPhrases as Record<string, string>
+const hant = hantPhrases as Record<string, string>
+
+function languageTag(system: string | boolean, fallback = typeof navigator === 'undefined' ? '' : navigator.language): string {
+ if (system === true) return 'zh-Hans'
+ if (system === false) return 'en'
+ return system || fallback
+}
+
+/** `zh-Hant`, `zh-TW`, `zh-HK` and `zh-MO` read Traditional. Other Chinese locales read Simplified. */
+export function systemScript(language = typeof navigator === 'undefined' ? '' : navigator.language): ChineseScript | null {
+ const id = language.toLowerCase().replaceAll('_', '-').split('.')[0] ?? ''
+ if (!id.startsWith('zh')) return null
+ if (id.includes('hant') || id.includes('-tw') || id.includes('-hk') || id.includes('-mo')) return 'hant'
+ return 'hans'
+}
+
+export function systemIsChinese(language = typeof navigator === 'undefined' ? '' : navigator.language): boolean {
+ return systemScript(language) != null
+}
+
+/** The table this choice reads. A boolean `true` from older callers means Simplified. */
+export function resolvedScript(preference: AppLanguage, system: string | boolean): ChineseScript | null {
+ if (preference === 'zh') return 'hans'
+ if (preference === 'zh-Hant') return 'hant'
+ if (preference === 'en') return null
+ return systemScript(languageTag(system))
+}
+
+export function usesChinese(preference: AppLanguage, system: string | boolean): boolean {
+ return resolvedScript(preference, system) != null
+}
+
+function tables(script: ChineseScript): { primary: Record<string, string>; fallback: Record<string, string> } {
+ return script === 'hant' ? { primary: hant, fallback: hans } : { primary: hans, fallback: hans }
+}
+
+/** One piece of a phrase key such as "Runs the official installer on {name}." */
+interface Piece { literal?: string; token?: string }
+
+/**
+ * Phrase keys that already contain `{token}` slots, longest fixed text first.
+ * A filled sentence ("Runs the official installer on this Mac.") matches the key,
+ * and a slot that is itself a known phrase (a setup hint) is translated too.
+ */
+const templates: Array<{ key: string; pieces: Piece[]; literal: number }> = Object.keys(hans).flatMap((key) => {
+ const pieces = parseTemplate(key)
+ if (!pieces) return []
+ const literal = pieces.reduce((n, piece) => n + (piece.literal?.length ?? 0), 0)
+ return literal >= 6 ? [{ key, pieces, literal }] : []
+}).sort((a, b) => b.literal - a.literal || b.key.length - a.key.length)
+
+function parseTemplate(template: string): Piece[] | undefined {
+ const pieces: Piece[] = []
+ let rest = template
+ while (rest.includes('{')) {
+ const open = rest.indexOf('{')
+ if (open > 0) pieces.push({ literal: rest.slice(0, open) })
+ const close = rest.indexOf('}', open)
+ if (close < 0) return undefined
+ const token = rest.slice(open, close + 1)
+ const name = token.slice(1, -1)
+ if (name.length === 0 || !/^[A-Za-z0-9]+$/.test(name) || pieces.at(-1)?.token) return undefined
+ pieces.push({ token })
+ rest = rest.slice(close + 1)
+ }
+ if (rest.length > 0) pieces.push({ literal: rest })
+ return pieces.some((piece) => piece.token) ? pieces : undefined
+}
+
+function hit(key: string, primary: Record<string, string>, fallback: Record<string, string>): string | undefined {
+ return primary[key] ?? fallback[key]
+}
+
+function fill(text: string, pieces: Piece[], phrase: string, primary: Record<string, string>, fallback: Record<string, string>, depth: number): string | undefined {
+ let pos = 0
+ const caps = new Map<string, string>()
+ for (let i = 0; i < pieces.length; i++) {
+ const piece = pieces[i]
+ if (piece.literal !== undefined) {
+ if (!text.startsWith(piece.literal, pos)) return undefined
+ pos += piece.literal.length
+ continue
+ }
+ const token = piece.token ?? ''
+ const next = pieces[i + 1]?.literal
+ const end = next === undefined ? text.length : text.indexOf(next, pos)
+ if (end < 0 || end === pos) return undefined
+ caps.set(token, text.slice(pos, end))
+ pos = end
+ }
+ if (pos !== text.length) return undefined
+ let result = phrase
+ for (const [token, value] of caps) {
+ const inner = hit(value, primary, fallback) ?? (depth === 0 ? templated(value, primary, fallback, 1) : undefined) ?? value
+ result = result.replaceAll(token, inner)
+ }
+ return result
+}
+
+/** A sentence the host or a view already filled in, matched back to its `{token}` phrase. */
+function templated(text: string, primary: Record<string, string>, fallback: Record<string, string>, depth = 0): string | undefined {
+ for (const template of templates) {
+ const phrase = hit(template.key, primary, fallback)
+ const filled = phrase ? fill(text, template.pieces, phrase, primary, fallback, depth) : undefined
+ if (filled) return filled
+ }
+ return undefined
+}
+
+function phrase(text: string, primary: Record<string, string>, fallback: Record<string, string>): string | undefined {
+ return hit(text, primary, fallback) ?? templated(text, primary, fallback)
+}
+
+/** Exact chrome phrases, including a label whose JSX kept the surrounding spaces. */
+export function translate(text: string, preference: AppLanguage, system: string | boolean = 'en'): string {
+ const script = resolvedScript(preference, system)
+ if (!script) return text
+ const { primary, fallback } = tables(script)
+ const direct = phrase(text, primary, fallback)
+ if (direct) return direct
+ const trimmed = text.trim()
+ return trimmed === text ? text : (phrase(trimmed, primary, fallback) ?? text)
+}
+
+/** "resets 3h 20m" / "resets in 2d 6h". Compact times become "3小时20分后重置". */
+export function resetLine(raw: string, preference: AppLanguage, system: string | boolean = 'en'): string {
+ if (!usesChinese(preference, system)) return raw
+ const time = raw.startsWith('resets in ') ? raw.slice('resets in '.length) : raw.startsWith('resets ') ? raw.slice('resets '.length) : null
+ if (time == null) return translate(raw, preference, system)
+ const spoken = compactTime(time, (key) => translate(key, preference, system))
+ return spoken ? spoken + translate('after reset', preference, system) : `${translate('resets', preference, system)} ${time}`
+}
+
+function compactTime(time: string, tr: (key: string) => string): string | null {
+ let spoken = ''
+ let matched = false
+ for (const token of time.split(' ')) {
+ const unit = token.at(-1)
+ const n = Number(token.slice(0, -1))
+ if (!unit || token.length < 2 || !Number.isInteger(n)) return null
+ const word = unit === 'd' ? tr('day unit') : unit === 'h' ? tr('hour unit') : unit === 'm' ? tr('minute unit') : null
+ if (!word) return null
+ matched = true
+ if (n === 0) continue
+ spoken += `${n}${word}`
+ }
+ if (!matched) return null
+ return spoken || `0${tr('minute unit')}`
+}
+
+export function languageTitle(language: AppLanguage, preference: AppLanguage, system: string | boolean): string {
+ if (language === 'zh') return '简体中文'
+ if (language === 'zh-Hant') return '繁體中文'
+ if (language === 'en') return 'English'
+ return translate('Follow system', preference, system)
+}
diff --git a/apps/desktop/src/renderer/lib/prefs.ts b/apps/desktop/src/renderer/lib/prefs.ts
index 81295388..52587291 100644
--- a/apps/desktop/src/renderer/lib/prefs.ts
+++ b/apps/desktop/src/renderer/lib/prefs.ts
@@ -64,6 +64,7 @@ export const prefs = {
onboardingDone: pref('macAccountOnboardingCompleted', false),
computerAccessSetup: pref<'ready' | 'later' | null>('computerAccessSetup', null),
starAsk: pref<StarAsk>('githubStarAsk', { kind: 'never' }),
+ appLanguage: pref<'system' | 'zh' | 'zh-Hant' | 'en'>('appLanguage', 'system'),
}
/** The Mac preference supplies one scale for conversation text and app chrome. */
diff --git a/apps/desktop/src/renderer/lib/use-language.ts b/apps/desktop/src/renderer/lib/use-language.ts
new file mode 100644
index 00000000..2f08ffe8
--- /dev/null
+++ b/apps/desktop/src/renderer/lib/use-language.ts
@@ -0,0 +1,21 @@
+import { useSyncExternalStore } from 'react'
+import { prefs } from './prefs'
+import { resetLine, translate, type AppLanguage } from './l10n'
+
+export function useAppLanguage(): AppLanguage {
+ return useSyncExternalStore(prefs.appLanguage.subscribe, prefs.appLanguage.get)
+}
+
+/** Translates one chrome string for the language chosen in Settings. */
+export function useTr(): (text: string) => string {
+ const language = useAppLanguage()
+ const system = typeof navigator === 'undefined' ? 'en' : navigator.language
+ return (text) => translate(text, language, system)
+}
+
+/** "resets 3h 20m" for the language chosen in Settings. */
+export function useResetLine(): (raw: string) => string {
+ const language = useAppLanguage()
+ const system = typeof navigator === 'undefined' ? 'en' : navigator.language
+ return (raw) => resetLine(raw, language, system)
+}
diff --git a/apps/desktop/src/renderer/views/AccountWelcomeView.tsx b/apps/desktop/src/renderer/views/AccountWelcomeView.tsx
index b7c1c3d2..0894a298 100644
--- a/apps/desktop/src/renderer/views/AccountWelcomeView.tsx
+++ b/apps/desktop/src/renderer/views/AccountWelcomeView.tsx
@@ -5,6 +5,7 @@ import { Icon } from '../components/Icon'
import { HStack, Spacer, VStack } from '../components/Stack'
import { Text } from '../components/Text'
import { useReduceMotion } from '../lib/theme'
+import { useTr } from '../lib/use-language'
import { useAccount } from '../store/account'
import googleLogo from '../assets/google.svg'
import './account-welcome.css'
@@ -15,6 +16,8 @@ const deviceName = window.codync.platform === 'darwin' ? 'Mac' : 'computer'
export function AccountWelcomeView({ onContinue }: { onContinue: () => void }) {
const account = useAccount()
const reduce = useReduceMotion()
+ const tr = useTr()
+ const onThis = tr(deviceName === 'Mac' ? 'Continue on this Mac' : 'Continue on this computer')
const [beat, setBeat] = useState(reduce ? 4 : 0)
useEffect(() => {
@@ -32,9 +35,9 @@ export function AccountWelcomeView({ onContinue }: { onContinue: () => void }) {
return (
<VStack align="center" justify="center" gap={14} className="welcome-restoring">
<Spinner size={24} />
- <Text as="div" size="callout" tone="secondary">Checking for a saved account…</Text>
+ <Text as="div" size="callout" tone="secondary">{tr(`Checking for a saved account…`)}</Text>
<button className="welcome-skip" onClick={onContinue}>
- Continue on this {deviceName}
+ {onThis}
</button>
</VStack>
)
@@ -56,17 +59,13 @@ export function AccountWelcomeView({ onContinue }: { onContinue: () => void }) {
<WelcomeChatGlimpse shown={beat >= 2} />
</div>
<VStack gap={10} style={rise(beat >= 3)}>
- <div className="welcome-title">
- Your coding agents,
- <br />
- as teammates.
- </div>
- <Text as="div" size="body" tone="secondary">Give each one a name and a project. They work on your computer while you're away.</Text>
+ <div className="welcome-title">{tr('Your coding agents,\nas teammates.')}</div>
+ <Text as="div" size="body" tone="secondary">{tr(`Give each one a name and a project. They work on your computer while you're away.`)}</Text>
</VStack>
<Spacer min={32} />
<VStack gap={10} style={rise(beat >= 4)}>
<Button onClick={onContinue} className="welcome-button">
- Continue on this {deviceName}
+ {onThis}
</Button>
<Button onClick={() => void account.signIn('apple')} disabled={!account.isConfigured || account.isBusy} className="welcome-button">
{account.isBusy ? (
@@ -74,7 +73,7 @@ export function AccountWelcomeView({ onContinue }: { onContinue: () => void }) {
) : (
<HStack as="span" gap={10}>
<Icon name="apple.logo" size={20} />
- Continue with Apple
+ {tr('Continue with Apple')}
</HStack>
)}
</Button>
@@ -84,12 +83,12 @@ export function AccountWelcomeView({ onContinue }: { onContinue: () => void }) {
) : (
<HStack as="span" gap={10}>
<img src={googleLogo} alt="" width={20} height={20} />
- Continue with Google
+ {tr('Continue with Google')}
</HStack>
)}
</Button>
{!account.isConfigured ? (
- <Text as="div" size="footnote" tone="tertiary">Sign-in isn't configured in this build. You can still use Codync on this {deviceName}.</Text>
+ <Text as="div" size="footnote" tone="tertiary">{tr(deviceName === 'Mac' ? "Sign-in isn't configured in this build. You can still use Codync on this Mac." : "Sign-in isn't configured in this build. You can still use Codync on this computer.")}</Text>
) : null}
{account.errorMessage ? <Text as="div" size="footnote" tone="attention">{account.errorMessage}</Text> : null}
</VStack>
@@ -141,6 +140,7 @@ function WelcomeCrew({ shown }: { shown: boolean }) {
/** A short animated user and bot exchange, matching the iPhone onboarding preview. */
function WelcomeChatGlimpse({ shown }: { shown: boolean }) {
+ const tr = useTr()
const reduce = useReduceMotion()
const [replied, setReplied] = useState(false)
useEffect(() => {
@@ -152,16 +152,16 @@ function WelcomeChatGlimpse({ shown }: { shown: boolean }) {
return (
<VStack gap={10}>
<HStack align="stretch" justify="flex-end" style={rise}>
- <Text size="subheadline" tone="text" className="welcome-bubble user">Fix the flaky login test</Text>
+ <Text size="subheadline" tone="text" className="welcome-bubble user">{tr(`Fix the flaky login test`)}</Text>
</HStack>
<HStack align="flex-end" gap={8} style={rise}>
<CharacterAvatar shape="blob" color="blue" size={28} mood={replied ? 'idle' : 'working'} />
{replied ? (
<Text size="subheadline" tone="text" className="welcome-bubble agent">
- Done. It raced the session refresh; tests pass on fix/login.
+ {tr(`Done. It raced the session refresh; tests pass on fix/login.`)}
</Text>
) : (
- <Text size="subheadline" tone="tertiary">Working…</Text>
+ <Text size="subheadline" tone="tertiary">{tr(`Working…`)}</Text>
)}
</HStack>
</VStack>
diff --git a/apps/desktop/src/renderer/views/BotRow.tsx b/apps/desktop/src/renderer/views/BotRow.tsx
index 74f9f51a..19d48574 100644
--- a/apps/desktop/src/renderer/views/BotRow.tsx
+++ b/apps/desktop/src/renderer/views/BotRow.tsx
@@ -6,6 +6,7 @@ import { HStack, VStack } from '../components/Stack'
import { Text } from '../components/Text'
import { ThinkingOrb } from '../components/ThinkingOrb'
import { messagePreview } from '../lib/message-preview'
+import { useTr } from '../lib/use-language'
import type { BotStore } from '../store/bot-store'
/** A roster row: avatar with status, name, and the live activity or last message (Grok Bot's desktop sidebar). */
@@ -32,11 +33,13 @@ export const BotRow = memo(function BotRow({ bot, store, compact, usingComputer,
/** Live activity while working, otherwise the last message (Grok Bot row behavior). */
function Preview({ bot, store }: { bot: Bot; store: BotStore }) {
+ const tr = useTr()
+ const place = bot.managedWorkspace ? tr('Personal workspace') : folderName(bot)
if (needsInput(bot)) {
return (
<HStack as="span" gap={6} shrink>
<ThinkingOrb state="listening" size={16} color="var(--warning)" />
- <Text size="callout" tone="attention" truncate>{bot.activity || 'Needs your approval'}</Text>
+ <Text size="callout" tone="attention" truncate>{tr(bot.activity || 'Needs your approval')}</Text>
</HStack>
)
}
@@ -44,10 +47,10 @@ function Preview({ bot, store }: { bot: Bot; store: BotStore }) {
return (
<HStack as="span" gap={6} shrink>
<ThinkingOrb size={13} color="var(--secondary)" />
- <Text size="callout" tone="secondary" truncate>{bot.activity || 'Working…'}</Text>
+ <Text size="callout" tone="secondary" truncate>{tr(bot.activity || 'Working…')}</Text>
</HStack>
)
}
- if (bot.status === 'error') return <Text size="callout" tone="danger" truncate>{messagePreview(bot.lastMessage ?? 'Something went wrong')}</Text>
- return <Text size="callout" tone="secondary" truncate>{messagePreview(bot.lastMessage ?? (isGroup(bot) ? `${bot.members.length} bots` : `${store.backendName(bot.backend)} · ${folderName(bot)}`))}</Text>
+ if (bot.status === 'error') return <Text size="callout" tone="danger" truncate>{messagePreview(bot.lastMessage ?? tr(`Something went wrong`))}</Text>
+ return <Text size="callout" tone="secondary" truncate>{messagePreview(bot.lastMessage ?? (isGroup(bot) ? `${bot.members.length} bots` : `${store.backendName(bot.backend)} · ${place}`))}</Text>
}
diff --git a/apps/desktop/src/renderer/views/ChatWindow.tsx b/apps/desktop/src/renderer/views/ChatWindow.tsx
index 1d082802..b826f21f 100644
--- a/apps/desktop/src/renderer/views/ChatWindow.tsx
+++ b/apps/desktop/src/renderer/views/ChatWindow.tsx
@@ -40,9 +40,12 @@ import { useIslandSummary } from './island-summary'
import { useSSH, useSSHAttachments } from './settings/ssh-model'
import './chat-window.css'
import './sidebar-header.css'
+import { useTr } from '../lib/use-language'
+
/** Native desktop chat: roster on the left, the conversation on the right (Grok Bot's desktop layout). */
export function ChatWindow() {
+ const tr = useTr()
const app = useApp()
const [onboarded, setOnboarded] = usePref(prefs.onboardingDone)
const [accessSetup, setAccessSetup] = usePref(prefs.computerAccessSetup)
@@ -127,13 +130,13 @@ export function ChatWindow() {
{onboarded && accessSetup !== null && showsChat ? null : <div className="window-drag drag" />}
{onboarded && accessSetup !== null ? <StarPrompt /> : null}
<Sheet open={showAccess} onClose={() => setShowAccess(false)} width={660} height={Math.min(820, window.innerHeight - 80)}>
- <ModalHeader icon="hand.raised" title="Computer access" />
+ <ModalHeader icon="hand.raised" title={tr(`Computer access`)} />
<ComputerAccessView onContinue={(ready) => { finishAccess(ready, false); setShowAccess(false) }} />
</Sheet>
<Dialog
open={confirmReset}
- title="Reset all data?"
- message="Signs out every account and deletes this computer's bots, conversations, keys and settings. Codync then starts over from the welcome screen."
+ title={tr('Reset all data?')}
+ message={tr("Signs out every account and deletes this computer's bots, conversations, keys and settings. Codync then starts over from the welcome screen.")}
actions={[{ title: 'Reset everything', destructive: true, action: () => void window.codync.app.resetAllData() }]}
onClose={() => setConfirmReset(false)}
/>
@@ -171,6 +174,7 @@ interface CreateTarget {
}
function ChatSplitView() {
+ const tr = useTr()
const app = useApp()
const ssh = useSSH()
const connecting = ssh.state.profiles.some((p) => isSSHConnecting(ssh.status(p.id))) || [...app.stores.values()].some((s) => s.shownConnection.kind === 'connecting')
@@ -326,8 +330,8 @@ function ChatSplitView() {
<CharacterAvatar shape="squircle" color="orange" size={60} />
<CharacterAvatar shape="teardrop" color="violet" size={60} mood="working" />
</HStack>
- <Text as="div" size="title2" weight="semibold">{connecting ? 'Connecting to your computers…' : 'Your coding agents, as teammates.'}</Text>
- <Text as="div" tone="secondary" className="empty-detail-message">{connecting ? 'Your bots will appear once connected. Manage computers to see connection progress.' : 'Pick a bot, or create one for each kind of work and point it at a project.'}</Text>
+ <Text as="div" size="title2" weight="semibold">{connecting ? tr(`Connecting to your computers…`) : tr(`Your coding agents, as teammates.`)}</Text>
+ <Text as="div" tone="secondary" className="empty-detail-message">{connecting ? tr(`Your bots will appear once connected. Manage computers to see connection progress.`) : tr(`Pick a bot, or create one for each kind of work and point it at a project.`)}</Text>
<Button onClick={() => create('bot')} disabled={!onlineStores.length}>
New bot
</Button>
@@ -359,8 +363,8 @@ function ChatSplitView() {
<BotRoster roster={roster} compact={compact} onContext={(bot, store, x, y) => setContextBot({ target: { bot, store }, x, y })} />
{visibleRoster.length === 0 && !roster.grouped && !compact && mismatchStores.length === 0 ? (
<div className="roster-empty">
- <Text as="div" size="body" weight="medium">{onlineStores.length ? 'No bots yet' : 'Waiting for a computer'}</Text>
- {onlineStores.length ? <Text as="div" size="callout" tone="secondary">Use + to create a bot.</Text> : null}
+ <Text as="div" size="body" weight="medium">{onlineStores.length ? tr(`No bots yet`) : tr(`Waiting for a computer`)}</Text>
+ {onlineStores.length ? <Text as="div" size="callout" tone="secondary">{tr(`Use + to create a bot.`)}</Text> : null}
</div>
) : null}
</div>
@@ -438,19 +442,19 @@ function ChatSplitView() {
</Sheet>
<Dialog
open={newSessionBot !== null}
- title="Start a new session?"
- message="The conversation stays here, but the agent starts with a fresh context."
+ title={tr('Start a new session?')}
+ message={tr('The conversation stays here, but the agent starts with a fresh context.')}
actions={newSessionBot ? [{ title: 'New session', action: () => newSessionBot.store.newSession(newSessionBot.bot.id) }] : []}
onClose={() => setNewSessionBot(null)}
/>
<Dialog
open={confirmDelete !== null}
title={`Delete ${confirmDelete?.bot.name ?? 'bot'}?`}
- message="Files it changed on your computer stay as they are."
+ message={tr('Files it changed on your computer stay as they are.')}
actions={confirmDelete ? [{ title: 'Delete bot and its conversation', destructive: true, action: () => confirmDelete.store.delete(confirmDelete.bot) }] : []}
onClose={() => setConfirmDelete(null)}
/>
- <Dialog open={errorMessage !== null} title="Something went wrong" message={errorMessage} actions={[]} cancel="OK" onClose={() => app.clearErrors()} />
+ <Dialog open={errorMessage !== null} title={tr('Something went wrong')} message={errorMessage} actions={[]} cancel="OK" onClose={() => app.clearErrors()} />
</div>
)
}
diff --git a/apps/desktop/src/renderer/views/ComputerFilterHeader.tsx b/apps/desktop/src/renderer/views/ComputerFilterHeader.tsx
index 21fa43ef..16fdcab8 100644
--- a/apps/desktop/src/renderer/views/ComputerFilterHeader.tsx
+++ b/apps/desktop/src/renderer/views/ComputerFilterHeader.tsx
@@ -4,6 +4,7 @@ import { DropdownMenu } from '../components/Controls'
import { Icon } from '../components/Icon'
import type { MenuItem } from '../components/Overlay'
import { Text } from '../components/Text'
+import { useTr } from '../lib/use-language'
import { useApp } from '../store/context'
import { useSSH } from './settings/ssh-model'
import type { Connection } from '../store/bot-store'
@@ -44,6 +45,7 @@ function summary(connections: Connection[]) {
/** The roster's connection summary, with details and filters on demand. */
export function ComputerFilterHeader({ hidden, setHidden, manage, compact = false }: { hidden: string; setHidden: (v: string) => void; manage: () => void; compact?: boolean }) {
const app = useApp()
+ const tr = useTr()
const ssh = useSSH()
const pending = ssh.state.profiles.filter((p) => !ssh.state.attachments.some((a) => a.profileId === p.id))
const pendingSummary = sshSummary(pending.map((p) => ssh.status(p.id)))
@@ -53,7 +55,7 @@ export function ComputerFilterHeader({ hidden, setHidden, manage, compact = fals
const text = pendingSummary ? `${online ? `${online} connected · ` : ''}${pendingSummary}` : summary(stores.map((s) => s.shownConnection))
const title = (c: Computer) => {
const store = app.store(c.id)
- return store ? `${store.hostName} · ${store.connectionLabel}` : c.name
+ return store ? `${store.hostName} · ${tr(store.connectionLabel)}` : c.name
}
const items = (): MenuItem[] => {
const list: MenuItem[] = [{ title: 'All computers', selected: selection.shown.length === app.computers.length, action: () => setHidden('') }]
diff --git a/apps/desktop/src/renderer/views/ComputerRosterSection.tsx b/apps/desktop/src/renderer/views/ComputerRosterSection.tsx
index e50135ca..5466f5da 100644
--- a/apps/desktop/src/renderer/views/ComputerRosterSection.tsx
+++ b/apps/desktop/src/renderer/views/ComputerRosterSection.tsx
@@ -1,6 +1,7 @@
import { useRef, type ReactNode } from 'react'
import { Icon } from '../components/Icon'
import { pointerDrag } from '../lib/pointer-drag'
+import { useTr } from '../lib/use-language'
import { useSlide } from '../lib/slide'
import type { BotStore } from '../store/bot-store'
import { ComputerBadge } from './ComputerBadge'
@@ -22,6 +23,7 @@ interface Props {
export function ComputerRosterSection({ store, compact, collapsed, previous, next, dragged, setDragged, toggle, move, notice, children }: Props) {
const section = useRef<HTMLElement>(null)
+ const tr = useTr()
const dropTarget = useRef<string | null>(null)
const id = store.computer.id
useSlide(section)
@@ -54,7 +56,7 @@ export function ComputerRosterSection({ store, compact, collapsed, previous, nex
if (target) move(id, target)
}}>
<ComputerBadge computer={store.computer} size={20} />
- {!compact ? <span className="computer-roster-label"><strong>{store.hostName}</strong><span className={store.shownConnection.kind === 'online' ? '' : 'warning'}>{store.connectionLabel}</span></span> : null}
+ {!compact ? <span className="computer-roster-label"><strong>{store.hostName}</strong><span className={store.shownConnection.kind === 'online' ? '' : 'warning'}>{tr(store.connectionLabel)}</span></span> : null}
<span className={`computer-roster-chevron ${collapsed ? 'collapsed' : ''}`}><Icon name="chevron.down" size={9} /></span>
</button>
</div>
diff --git a/apps/desktop/src/renderer/views/HostStateView.tsx b/apps/desktop/src/renderer/views/HostStateView.tsx
index 01c916d7..2f3f67f9 100644
--- a/apps/desktop/src/renderer/views/HostStateView.tsx
+++ b/apps/desktop/src/renderer/views/HostStateView.tsx
@@ -3,6 +3,7 @@ import { CharacterAvatar, type Mood } from '../components/Avatar'
import { Button } from '../components/Controls'
import { Icon } from '../components/Icon'
import { Text } from '../components/Text'
+import { useTr } from '../lib/use-language'
import { palette, rgbHex, useDark } from '../lib/theme'
import { useApp } from '../store/context'
@@ -18,12 +19,29 @@ export function HostStateView({ compact = false }: { compact?: boolean }) {
case 'missingBinary':
return <EmptyState compact={compact} icon={<HostBot compact={compact} mood="failed" />} title="The host is missing" message={window.codync.appScheme === 'codync-dev' ? 'Rebuild Codync Dev with its development host, then open it again.' : "This copy of Codync doesn't include codync-host. Download Codync again from codync.dev or GitHub."} />
case 'failed':
- return <EmptyState compact={compact} icon={<HostBot compact={compact} mood="failed" />} title="The host isn't running" message={state.message} action={['Try again', () => window.codync.host.restart()]} />
+ return <FailedHost compact={compact} message={state.message} />
default:
return <EmptyState compact={compact} icon={<HostBot compact={compact} mood="working" />} title="Starting the host…" message="This takes a few seconds." />
}
}
+/** launchctl prints this in English, with the plist path in the host's own error line. */
+function hostFailure(message: string, tr: (text: string) => string): string {
+ const loaded = /launchctl bootstrap \S+ (\S+) failed/.exec(message)
+ if (loaded || message.includes('Bootstrap failed:')) {
+ const path = loaded?.[1]
+ return path
+ ? tr("The background service didn't start. macOS couldn't load {path}.").replaceAll('{path}', path)
+ : tr("The background service didn't start.")
+ }
+ return tr(message)
+}
+
+function FailedHost({ compact, message }: { compact: boolean; message: string }) {
+ const tr = useTr()
+ return <EmptyState compact={compact} icon={<HostBot compact={compact} mood="failed" />} title="The host isn't running" message={hostFailure(message, tr)} action={['Try again', () => window.codync.host.restart()]} />
+}
+
/** The app-icon bot expresses progress or failure without replacing the recovery instructions. */
function HostBot({ compact, mood }: { compact: boolean; mood: Mood }) {
return (
@@ -35,11 +53,12 @@ function HostBot({ compact, mood }: { compact: boolean; mood: Mood }) {
/** A quiet placeholder for an empty screen: icon (an SF Symbol name or artwork), title, a line of help and an optional action. */
export function EmptyState({ icon, title, message, action, compact = false }: { icon: string | ReactElement; title: string; message: string; action?: [string, () => void]; compact?: boolean }) {
+ const tr = useTr()
return (
<div className={`empty-state ${compact ? 'local-recovery' : ''}`}>
{typeof icon === 'string' ? <Icon name={icon} size={compact ? 22 : 36} weight="light" color="var(--tertiary)" /> : icon}
- <Text as="div" size={compact ? 'callout' : 'title3'} weight="semibold" tone="text">{title}</Text>
- <Text as="div" size="callout" tone="secondary" className="empty-state-message">{message}</Text>
+ <Text as="div" size={compact ? 'callout' : 'title3'} weight="semibold" tone="text">{tr(title)}</Text>
+ <Text as="div" size="callout" tone="secondary" className="empty-state-message">{tr(message)}</Text>
{action ? (
<Button kind={compact ? 'secondary' : 'primary'} onClick={action[1]} className="empty-state-action">
{action[0]}
diff --git a/apps/desktop/src/renderer/views/PairingCode.tsx b/apps/desktop/src/renderer/views/PairingCode.tsx
index 6e38293c..575c0505 100644
--- a/apps/desktop/src/renderer/views/PairingCode.tsx
+++ b/apps/desktop/src/renderer/views/PairingCode.tsx
@@ -6,6 +6,8 @@ import { HStack, VStack } from '../components/Stack'
import { Text } from '../components/Text'
import { useScreenViewed } from '../store/analytics'
import './pairing-code.css'
+import { useTr } from '../lib/use-language'
+
/**
* A one-time pairing QR (v3) from a computer this app manages: its keys, a code, and how to reach it.
@@ -13,6 +15,7 @@ import './pairing-code.css'
* error takes the place of the old code, which may have expired.
*/
export function PairingCode({ name, cloudOn, requestCode, renew = 0 }: { name: string; cloudOn: boolean; requestCode: () => Promise<PairingInfo>; renew?: number }) {
+ const tr = useTr()
const [code, setCode] = useState<{ info: PairingInfo; qr: string } | null>(null)
const [error, setError] = useState<string | null>(null)
useScreenViewed('pairing', renew)
@@ -50,12 +53,12 @@ export function PairingCode({ name, cloudOn, requestCode, renew = 0 }: { name: s
<img src={code.qr} alt={`Pairing code for ${name}`} width={200} height={200} />
</div>
<Text as="div" size="caption" tone="secondary" className="pairing-note">
- Scan with the Codync app or the iPhone Camera. No Tailscale or open ports needed: your iPhone connects directly on the same Wi-Fi, and through the encrypted relay anywhere else.
+ {tr(`Scan with the Codync app or the iPhone Camera. No Tailscale or open ports needed: your iPhone connects directly on the same Wi-Fi, and through the encrypted relay anywhere else.`)}
</Text>
{!cloudOn ? (
<Text as="div" size="caption" tone="attention" className="pairing-note">
{code.info.urls.length === 0
- ? 'No network address found and “Reach from anywhere” is off. Connect to Wi-Fi or turn it on.'
+ ? tr(`No network address found and “Reach from anywhere” is off. Connect to Wi-Fi or turn it on.`)
: `“Reach from anywhere” is off, so the iPhone only reaches ${name} on the same network.`}
</Text>
) : null}
diff --git a/apps/desktop/src/renderer/views/PanelMenus.tsx b/apps/desktop/src/renderer/views/PanelMenus.tsx
index 368a8026..49b7a560 100644
--- a/apps/desktop/src/renderer/views/PanelMenus.tsx
+++ b/apps/desktop/src/renderer/views/PanelMenus.tsx
@@ -8,6 +8,8 @@ import type { Link } from '@shared/analytics'
import { account, useAccount } from '../store/account'
import { openLink, useScreenViewed } from '../store/analytics'
import googleLogo from '../assets/google.svg'
+import { useTr } from '../lib/use-language'
+
// The chat window's floating panels: the account menu (with its profile avatar) and the roster's
// right-click actions, both built on the same keyboard-driven rows.
@@ -50,6 +52,7 @@ export function AccountPanelLayer({ compact, approvals, onDismiss, onUsage, onSe
onUsage: () => void
onSettings: () => void
}) {
+ const tr = useTr()
const [page, setPage] = useState<'main' | 'support'>('main')
const { user, isBusy, errorMessage } = useAccount()
useScreenViewed('account')
@@ -90,8 +93,8 @@ export function AccountPanelLayer({ compact, approvals, onDismiss, onUsage, onSe
<div className="panel-divider" />
<div className="panel-identity">
<Icon name="person.crop.circle" size={15} />
- <Text size="callout" truncate grow>{user?.email ?? 'Account'}</Text>
- {signedIn ? null : <Text size="caption">Not signed in</Text>}
+ <Text size="callout" truncate grow>{user?.email ?? tr(`Account`)}</Text>
+ {signedIn ? null : <Text size="caption">{tr(`Not signed in`)}</Text>}
</div>
</>
) : page === 'support' && i === 0 ? (
@@ -108,6 +111,7 @@ export function AccountPanelLayer({ compact, approvals, onDismiss, onUsage, onSe
}
function PanelRows({ items, onDismiss, after, dismissOnActivate = false }: { items: PanelItem[]; onDismiss: () => void; after?: (i: number) => ReactNode; dismissOnActivate?: boolean }) {
+ const tr = useTr()
const [highlighted, setHighlighted] = useState(0)
useEffect(() => {
const onKey = (e: KeyboardEvent) => {
@@ -148,7 +152,7 @@ function PanelRows({ items, onDismiss, after, dismissOnActivate = false }: { ite
<IconSlot width={20}>
{item.image ? <img src={item.image} alt="" width={14} height={14} /> : <Icon name={item.icon} size={14} />}
</IconSlot>
- <Text size="callout" truncate grow>{item.title}</Text>
+ <Text size="callout" truncate grow>{tr(item.title)}</Text>
{item.detail ? <Text size="body" tone="secondary">{item.detail}</Text> : null}
{item.chevron ? <Icon name="chevron.right" size={11} color="var(--secondary)" /> : null}
</button>
diff --git a/apps/desktop/src/renderer/views/SidebarFooter.tsx b/apps/desktop/src/renderer/views/SidebarFooter.tsx
index 99a25348..06b52e03 100644
--- a/apps/desktop/src/renderer/views/SidebarFooter.tsx
+++ b/apps/desktop/src/renderer/views/SidebarFooter.tsx
@@ -1,3 +1,4 @@
+import { useTr } from '../lib/use-language'
import { ProfileAvatar } from './PanelMenus'
import { UpdateBadge } from './UpdateButton'
import gmail from '../assets/gmail.png'
@@ -11,6 +12,7 @@ export function SidebarFooter({ accountOpen, onAccount, onExtensions }: {
onAccount: () => void
onExtensions: () => void
}) {
+ const tr = useTr()
return (
<div className="sidebar-footer">
<div className="sidebar-footer-fade" aria-hidden />
@@ -24,7 +26,7 @@ export function SidebarFooter({ accountOpen, onAccount, onExtensions }: {
<ProfileAvatar />
</button>
<button className="extensions" onClick={onExtensions}>
- <span>Extensions</span>
+ <span>{tr('Extensions')}</span>
<span className="extensions-logos" aria-hidden>
{[gmail, calendar, drive].map((src) => <img key={src} src={src} alt="" draggable={false} />)}
</span>
diff --git a/apps/desktop/src/renderer/views/StarPrompt.tsx b/apps/desktop/src/renderer/views/StarPrompt.tsx
index 647366e0..07c2fb51 100644
--- a/apps/desktop/src/renderer/views/StarPrompt.tsx
+++ b/apps/desktop/src/renderer/views/StarPrompt.tsx
@@ -10,6 +10,8 @@ import { prefs, usePref } from '../lib/prefs'
import { afterStarAsk, dueStarAsk } from '../lib/star-ask'
import { useApp } from '../store/context'
import { analytics } from '../store/analytics'
+import { useTr } from '../lib/use-language'
+
const [OWNER, NAME] = ['leepokai', 'Codync']
const REPO = `https://github.com/${OWNER}/${NAME}`
@@ -30,6 +32,7 @@ const copy = {
* Starring ends it.
*/
export function StarPrompt() {
+ const tr = useTr()
const app = useApp()
const local = useModel(app.local)
const [onboarded] = usePref(prefs.onboardingDone)
@@ -60,7 +63,7 @@ export function StarPrompt() {
<Text size="body" weight="semibold" tone="text" truncate>
<Text weight="regular" tone="secondary">{OWNER} /</Text> {NAME}
</Text>
- <Text size="callout" tone="secondary" truncate>{REPO.replace('https://', '')}</Text>
+ <Text size="callout" tone="secondary" truncate>{REPO.replace(tr(`https://`), '')}</Text>
</VStack>
<Icon name="arrow.up.right.square" size={13} color="var(--secondary)" />
</button>
diff --git a/apps/desktop/src/renderer/views/StartupRecovery.tsx b/apps/desktop/src/renderer/views/StartupRecovery.tsx
index 9ad34b8b..e252883a 100644
--- a/apps/desktop/src/renderer/views/StartupRecovery.tsx
+++ b/apps/desktop/src/renderer/views/StartupRecovery.tsx
@@ -7,9 +7,12 @@ import { HostStateView } from './HostStateView'
import { SSHRow } from './settings/SSHRow'
import { useSSH } from './settings/ssh-model'
import './startup-recovery.css'
+import { useTr } from '../lib/use-language'
+
/** Saved remote computers remain visible while no computer is ready for a chat. */
export function StartupRecovery({ manage }: { manage: () => void }) {
+ const tr = useTr()
const app = useApp()
const ssh = useSSH()
const connecting = ssh.state.profiles.some((p) => isSSHConnecting(ssh.status(p.id)))
@@ -19,9 +22,9 @@ export function StartupRecovery({ manage }: { manage: () => void }) {
<div className="startup-recovery-content">
<div className="startup-recovery-title" role="status">
{connecting ? <Spinner size={22} /> : <Icon name="desktopcomputer" size={22} color="var(--secondary)" />}
- <Text size="title2" weight="semibold">{connecting ? 'Connecting to your computers…' : 'Your remote computers'}</Text>
+ <Text size="title2" weight="semibold">{connecting ? tr(`Connecting to your computers…`) : tr(`Your remote computers`)}</Text>
</div>
- <Text as="div" tone="secondary">Your bots will appear once a computer is connected.</Text>
+ <Text as="div" tone="secondary">{tr(`Your bots will appear once a computer is connected.`)}</Text>
<div className="startup-recovery-profiles">
{ssh.state.profiles.map((p) => (
<SSHRow key={p.id} profile={p} status={ssh.status(p.id)} attached={ssh.state.attachments.some((a) => a.profileId === p.id)} edit={manage} />
diff --git a/apps/desktop/src/renderer/views/account-welcome.css b/apps/desktop/src/renderer/views/account-welcome.css
index 27f82992..15817a67 100644
--- a/apps/desktop/src/renderer/views/account-welcome.css
+++ b/apps/desktop/src/renderer/views/account-welcome.css
@@ -22,6 +22,7 @@
}
/* A fixed display size: it doesn't follow the text size preference. */
.welcome-title {
+ white-space: pre-line;
font-size: 34px;
font-weight: 600;
letter-spacing: -0.6px;
diff --git a/apps/desktop/src/renderer/views/bots/AgentModelPicker.tsx b/apps/desktop/src/renderer/views/bots/AgentModelPicker.tsx
index 9faa47f4..6968cd87 100644
--- a/apps/desktop/src/renderer/views/bots/AgentModelPicker.tsx
+++ b/apps/desktop/src/renderer/views/bots/AgentModelPicker.tsx
@@ -3,6 +3,8 @@ import { ChoicePicker, IconButton, Pill, Spinner } from '../../components/Contro
import { HStack, Spacer, VStack } from '../../components/Stack'
import { Text } from '../../components/Text'
import type { AgentModelsState } from './agent-models'
+import { useTr } from '../../lib/use-language'
+
/** The bot's model and its options, from the list `useAgentModels` loaded for its agent. */
export function AgentModelPicker({ backend, models, selection, onChange, options: chosen, onOptionsChange, sessionNote = true }: {
@@ -15,6 +17,7 @@ export function AgentModelPicker({ backend, models, selection, onChange, options
/** Says that a change starts a new session: true for a bot's own model, not for one it hasn't used yet. */
sessionNote?: boolean
}) {
+ const tr = useTr()
const { catalog, loading, failure } = models
const custom = backend === 'custom'
@@ -45,7 +48,7 @@ export function AgentModelPicker({ backend, models, selection, onChange, options
return (
<VStack gap={6}>
<HStack gap={8}>
- <Text tone="text" className="model-picker-label">Model</Text>
+ <Text tone="text" className="model-picker-label">{tr(`Model`)}</Text>
<Spacer />
<HStack gap={4} shrink>
{custom ? null : (
@@ -86,9 +89,9 @@ export function AgentModelPicker({ backend, models, selection, onChange, options
{!custom && !loading && failure ? (
<Text size="caption" tone="attention">{failure}</Text>
) : !custom && !loading && empty ? (
- <Text size="caption" tone="secondary">This agent doesn't advertise a model list. Leave Default or enter a model ID.</Text>
+ <Text size="caption" tone="secondary">{tr(`This agent doesn't advertise a model list. Leave Default or enter a model ID.`)}</Text>
) : null}
- {sessionNote ? <Text size="caption" tone="secondary">Changing the model starts a new agent session. Chat history is kept.</Text> : null}
+ {sessionNote ? <Text size="caption" tone="secondary">{tr(`Changing the model starts a new agent session. Chat history is kept.`)}</Text> : null}
</VStack>
)
}
diff --git a/apps/desktop/src/renderer/views/bots/BotEditorView.tsx b/apps/desktop/src/renderer/views/bots/BotEditorView.tsx
index d36dbeee..7039153f 100644
--- a/apps/desktop/src/renderer/views/bots/BotEditorView.tsx
+++ b/apps/desktop/src/renderer/views/bots/BotEditorView.tsx
@@ -18,9 +18,12 @@ import { FormSheet } from '../marketplace/pieces'
import { SkillSheet, type SkillRef } from '../marketplace/SkillSheet'
import { AnchoredPanel, AutoTextArea, AvatarPicker, Field, SwitchRow } from './parts'
import './bots.css'
+import { useTr } from '../../lib/use-language'
+
/** Edit a bot in a modal: the settings form plus Close / Save. New bots start in `NewBotView`. */
export function BotEditorView({ draft: initial }: { draft: BotDraft }) {
+ const tr = useTr()
const store = useStore()
const dismiss = useDismiss()
const plugins = usePlugins(store)
@@ -44,7 +47,7 @@ export function BotEditorView({ draft: initial }: { draft: BotDraft }) {
return (
<SheetPage>
<ModalHeader
- title="Settings"
+ title={tr(`Settings`)}
trailing={saving ? <Spinner /> : <IconButton title="Save" icon="checkmark" disabled={!isValid(draft) || saving || !online} onClick={save} />}
/>
<div className="bot-editor-body">
@@ -93,11 +96,12 @@ export function BotSettingsPanel({ botId, part }: { botId: string; part: FormPar
/** The bot that created this one with its team tools, and when. */
function CreatedBy({ bot, creator }: { bot: Bot; creator: string }) {
+ const tr = useTr()
const store = useStore()
const date = new Date(bot.createdAt).toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' })
return (
<ValueRow label="Created by">
- <Text truncate>{`${store.bots.get(creator)?.name ?? 'A bot'} · ${date}`}</Text>
+ <Text truncate>{`${store.bots.get(creator)?.name ?? tr(`A bot`)} · ${date}`}</Text>
</ValueRow>
)
}
@@ -110,6 +114,7 @@ function BotSettingsForm({ draft, onChange, error, plugins, part = 'all' }: {
plugins: Plugins | null
part?: FormPart
}) {
+ const tr = useTr()
const store = useStore()
const [pickingAvatar, setPickingAvatar] = useState(false)
const [pickingFolder, setPickingFolder] = useState(false)
@@ -247,7 +252,7 @@ function BotSettingsForm({ draft, onChange, error, plugins, part = 'all' }: {
]}
>
<Pill outlined className="workspace-pill">
- <Text truncate className="workspace-pill-label">{draft.cwd ? lastPathComponent(draft.cwd) : 'Personal'}</Text>
+ <Text truncate className="workspace-pill-label">{draft.cwd ? lastPathComponent(draft.cwd) : tr(`Personal`)}</Text>
<Icon name="chevron.down" size={10} weight="semibold" color="var(--secondary)" />
</Pill>
</DropdownMenu>
@@ -343,9 +348,10 @@ function PluginToggles({ title, empty, items, selection, onChange, onInfo }: {
/** Shows an item's details from an info button beside its switch. */
onInfo?: (item: { id: string; name: string; detail: string }) => void
}) {
+ const tr = useTr()
return (
<CardSection title={title}>
- {items.length ? null : <Text tone="secondary">{empty}</Text>}
+ {items.length ? null : <Text tone="secondary">{tr(empty)}</Text>}
{items.map((item) => {
const row = (
<SwitchRow
diff --git a/apps/desktop/src/renderer/views/bots/BotTemplateView.tsx b/apps/desktop/src/renderer/views/bots/BotTemplateView.tsx
index 35cb3ec0..ec68e8a8 100644
--- a/apps/desktop/src/renderer/views/bots/BotTemplateView.tsx
+++ b/apps/desktop/src/renderer/views/bots/BotTemplateView.tsx
@@ -4,6 +4,7 @@ import { Icon } from '../../components/Icon'
import { ModalHeader } from '../../components/Overlay'
import { HStack, VStack } from '../../components/Stack'
import { Text } from '../../components/Text'
+import { useTr } from '../../lib/use-language'
import './bots.css'
/**
@@ -22,6 +23,7 @@ export function encodeTemplate(draft: BotDraft): string {
/** A portable settings snapshot, with no conversation identity or runtime state. */
export function BotTemplateView({ draft }: { draft: BotDraft }) {
+ const tr = useTr()
const encoded = useMemo(() => encodeTemplate(draft), [draft])
const [copied, setCopied] = useState(false)
@@ -43,19 +45,19 @@ export function BotTemplateView({ draft }: { draft: BotDraft }) {
return (
<VStack className="bot-template">
- <ModalHeader icon="square.on.square" title="Create template" subtitle={draft.name} />
+ <ModalHeader icon="square.on.square" title={tr(`Create template`)} subtitle={draft.name} />
<VStack gap={16} className="bot-template-body">
- <Text size="body" tone="secondary">Copy this bot’s settings to reuse as a template. Conversation history and conversation ID are excluded.</Text>
+ <Text size="body" tone="secondary">{tr(`Copy this bot’s settings to reuse as a template. Conversation history and conversation ID are excluded.`)}</Text>
<div className="bot-template-code">
<pre className="selectable">
{encoded}
</pre>
</div>
<HStack gap={8}>
- <Text size="caption" tone="secondary" grow>Includes workspace preferences and agent configuration.</Text>
+ <Text size="caption" tone="secondary" grow>{tr(`Includes workspace preferences and agent configuration.`)}</Text>
<button className="press bot-template-copy" onClick={copy}>
<Icon key={copied ? 'checkmark' : 'square.on.square'} name={copied ? 'checkmark' : 'square.on.square'} size={13} weight="semibold" className="fade-in" />
- {copied ? 'Copied' : 'Copy template'}
+ {tr(copied ? 'Copied' : 'Copy template')}
</button>
</HStack>
</VStack>
diff --git a/apps/desktop/src/renderer/views/bots/Fallbacks.tsx b/apps/desktop/src/renderer/views/bots/Fallbacks.tsx
index fa47d6eb..76e4a8df 100644
--- a/apps/desktop/src/renderer/views/bots/Fallbacks.tsx
+++ b/apps/desktop/src/renderer/views/bots/Fallbacks.tsx
@@ -7,6 +7,7 @@ import { Icon } from '../../components/Icon'
import { Dialog, ModalHeader, SheetPage } from '../../components/Overlay'
import { HStack, IconSlot, Spacer, VStack } from '../../components/Stack'
import { Text } from '../../components/Text'
+import { useTr } from '../../lib/use-language'
import { useStore } from '../../store/context'
import { FormSheet } from '../marketplace/pieces'
import { useAgentModels } from './agent-models'
@@ -34,6 +35,7 @@ export function AgentStepBanner({ bot }: { bot: Bot }) {
/** The Agent card's Fallbacks: the agents that carry on in order, added, moved and removed here, saved with the form. */
export function FallbacksRow({ draft, bot, onChange }: { draft: BotDraft; bot: Bot; onChange: (update: (d: BotDraft) => BotDraft) => void }) {
const store = useStore()
+ const tr = useTr()
const [adding, setAdding] = useState(false)
const [about, setAbout] = useState(false)
const list = draft.fallbacks ?? []
@@ -44,7 +46,7 @@ export function FallbacksRow({ draft, bot, onChange }: { draft: BotDraft; bot: B
return (
<VStack gap={8}>
<HStack gap={2}>
- <Text tone="text">Fallbacks</Text>
+ <Text tone="text">{tr(`Fallbacks`)}</Text>
<IconButton title="About fallbacks" icon="info.circle" size={22} onClick={() => setAbout(true)} />
<Spacer />
{list.length < MAX_FALLBACKS && choices.length ? <IconButton title="Add fallback" icon="plus" className="fade-in" onClick={() => setAdding(true)} /> : null}
@@ -63,12 +65,12 @@ export function FallbacksRow({ draft, bot, onChange }: { draft: BotDraft; bot: B
/>
))
) : (
- <Text tone="secondary">No fallbacks yet.</Text>
+ <Text tone="secondary">{tr(`No fallbacks yet.`)}</Text>
)}
<Text size="caption" tone="secondary">
- {`If ${store.backendName(draft.backend)} runs out of usage or can't answer, the bot carries on with the next one. Chat, memory and workspace carry over.`}
+ {tr('If {agent} runs out of usage or can\'t answer, the bot carries on with the next one. Chat, memory and workspace carry over.').replace('{agent}', store.backendName(draft.backend))}
</Text>
- <Dialog open={about} title="Fallbacks" message={ABOUT} actions={[]} cancel="OK" onClose={() => setAbout(false)} />
+ <Dialog open={about} title={tr('Fallbacks')} message={tr(ABOUT)} actions={[]} cancel="OK" onClose={() => setAbout(false)} />
<FormSheet open={adding} onClose={() => setAdding(false)} width={460} height={420}>
{adding ? (
<AddFallback
@@ -95,6 +97,7 @@ function FallbackRow({ fallback, index, count, bot, now, move, remove }: {
remove: () => void
}) {
const store = useStore()
+ const tr = useTr()
const backend = store.hello?.backends.find((b) => b.id === fallback.backend)
const name = backend ? agentChoice(backend).label : store.backendName(fallback.backend)
const rest = restOf(bot, fallback.backend, now)
@@ -105,10 +108,10 @@ function FallbackRow({ fallback, index, count, bot, now, move, remove }: {
</IconSlot>
<AgentIcon registry={store.agentRegistry(fallback.backend)} size={14} />
<VStack gap={2} grow>
- <Text tone="text" truncate>{`${name} · ${fallback.model || 'Default'}`}</Text>
+ <Text tone="text" truncate>{`${name} · ${fallback.model || tr(`Default`)}`}</Text>
{rest ? <Text size="caption" tone="secondary">{restLine(rest, now)}</Text> : null}
</VStack>
- {bot.agentStep?.agent === fallback.backend ? <Text size="caption" weight="medium" tone="text" className="fallback-chip fade-in">In use</Text> : null}
+ {bot.agentStep?.agent === fallback.backend ? <Text size="caption" weight="medium" tone="text" className="fallback-chip fade-in">{tr(`In use`)}</Text> : null}
<DropdownMenu
className="icon-button fallback-menu"
title="More"
@@ -126,6 +129,7 @@ function FallbackRow({ fallback, index, count, bot, now, move, remove }: {
/** The "Add fallback" sheet: another agent, and the model to use on it. */
function AddFallback({ choices, onAdd }: { choices: Backend[]; onAdd: (f: Fallback) => void }) {
+ const tr = useTr()
const [backend, setBackend] = useState((choices.find((b) => b.available) ?? choices[0])?.id ?? '')
const [model, setModel] = useState<string | null>(null)
const [modelOptions, setModelOptions] = useState<Record<string, string>>({})
@@ -137,7 +141,7 @@ function AddFallback({ choices, onAdd }: { choices: Backend[]; onAdd: (f: Fallba
}
return (
<SheetPage>
- <ModalHeader title="Add fallback" trailing={<IconButton title="Add" icon="checkmark" disabled={!backend} onClick={() => onAdd({ backend, model, modelOptions })} />} />
+ <ModalHeader title={tr(`Add fallback`)} trailing={<IconButton title="Add" icon="checkmark" disabled={!backend} onClick={() => onAdd({ backend, model, modelOptions })} />} />
<CardForm>
<CardSection>
<ValueRow label="Agent">
diff --git a/apps/desktop/src/renderer/views/bots/GroupEditorView.tsx b/apps/desktop/src/renderer/views/bots/GroupEditorView.tsx
index 657c8b4f..5d8a97fd 100644
--- a/apps/desktop/src/renderer/views/bots/GroupEditorView.tsx
+++ b/apps/desktop/src/renderer/views/bots/GroupEditorView.tsx
@@ -10,12 +10,15 @@ import { useStore } from '../../store/context'
import { errorText } from './drafts'
import { AutoTextArea } from './parts'
import './bots.css'
+import { useTr } from '../../lib/use-language'
+
/**
* Change a group chat's name, what it's for and who's in it. Bots are added from a
* search of the ones not in it yet. New groups start in `NewGroupView`.
*/
export function GroupEditorView({ group }: { group: Bot }) {
+ const tr = useTr()
const store = useStore()
const dismiss = useDismiss()
const [name, setName] = useState(group.name)
@@ -53,7 +56,7 @@ export function GroupEditorView({ group }: { group: Bot }) {
return (
<SheetPage>
- <ModalHeader icon="person.2" title="Group chat" trailing={saving ? <Spinner /> : <IconButton title="Save" icon="checkmark" disabled={!canSave} onClick={save} />} />
+ <ModalHeader icon="person.2" title={tr(`Group chat`)} trailing={saving ? <Spinner /> : <IconButton title="Save" icon="checkmark" disabled={!canSave} onClick={save} />} />
<div className="group-scroll">
<div className="group-form">
<div className="group-identity">
@@ -96,10 +99,10 @@ export function GroupEditorView({ group }: { group: Bot }) {
<span className="member-add-icon">
<Icon name="plus" size={16} color="var(--secondary)" />
</span>
- <Text tone="secondary" className="member-name">Add Member</Text>
+ <Text tone="secondary" className="member-name">{tr(`Add Member`)}</Text>
</button>
) : null}
- <Text as="div" size="caption" tone="tertiary" className="group-note">Everyone answers in turn unless you @mention someone.</Text>
+ <Text as="div" size="caption" tone="tertiary" className="group-note">{tr(`Everyone answers in turn unless you @mention someone.`)}</Text>
</VStack>
{error ? <Text size="footnote" tone="danger" className="fade-in">{error}</Text> : null}
{current ? (
@@ -117,11 +120,12 @@ export function GroupEditorView({ group }: { group: Bot }) {
/** The one "Delete <bot>?" confirmation (kit `deleteBotConfirmation`). */
function DeleteBotDialog({ bot, onClose, onDeleted }: { bot: Bot | null; onClose: () => void; onDeleted: () => void }) {
const store = useStore()
+ const tr = useTr()
return (
<Dialog
open={bot !== null}
title={`Delete ${bot?.name ?? 'bot'}?`}
- message={bot && isGroup(bot) ? 'Its bots and their own chats stay.' : 'Files it changed on your computer stay as they are.'}
+ message={tr(bot && isGroup(bot) ? 'Its bots and their own chats stay.' : 'Files it changed on your computer stay as they are.')}
actions={[
{
title: 'Delete bot and its conversation',
diff --git a/apps/desktop/src/renderer/views/bots/MemoryFiles.tsx b/apps/desktop/src/renderer/views/bots/MemoryFiles.tsx
index bce85499..a339d4d4 100644
--- a/apps/desktop/src/renderer/views/bots/MemoryFiles.tsx
+++ b/apps/desktop/src/renderer/views/bots/MemoryFiles.tsx
@@ -9,23 +9,23 @@ import { relativeTime } from '../thread/chat-items'
export interface FileTarget { name: string; shared: boolean }
/** One layer's long-form notes, as rows under its entries: name, description, size and date, marked past a cap. Read-only: the bot writes them. */
-export function fileRows(files: MemoryFiles, shared: boolean, open: (target: FileTarget) => void): ReactElement[] {
+export function fileRows(files: MemoryFiles, shared: boolean, open: (target: FileTarget) => void, tr: (text: string) => string = (text) => text): ReactElement[] {
const live = (shared ? files.yours : files.bot).files.filter((f) => !f.deleted)
return [
- <p key="notes" className="memory-notes-header">Notes</p>,
- ...(live.length === 0 ? [<p key="notes-empty" className="memory-muted">Longer notes, one topic each. The bot reads one when its topic comes up.</p>] : []),
+ <p key="notes" className="memory-notes-header">{tr('Notes')}</p>,
+ ...(live.length === 0 ? [<p key="notes-empty" className="memory-muted">{tr('Longer notes, one topic each. The bot reads one when its topic comes up.')}</p>] : []),
...(live.length > files.folderCap ? [<p key="notes-cap" className="memory-attention">{live.length} notes, over the {files.folderCap}-note cap. Ask the bot to merge some.</p>] : []),
- ...live.map((file) => <FileRow key={file.name} file={file} cap={files.cap} open={() => open({ name: file.name, shared })} />),
+ ...live.map((file) => <FileRow key={file.name} file={file} cap={files.cap} tr={tr} open={() => open({ name: file.name, shared })} />),
]
}
-function FileRow({ file, cap, open }: { file: MemoryFile; cap: number; open: () => void }) {
+function FileRow({ file, cap, tr, open }: { file: MemoryFile; cap: number; tr: (text: string) => string; open: () => void }) {
const over = file.tokens > cap
return <button className="press memory-content fade-in" onClick={open}>
<strong><Icon name="doc.text" size={11} />{file.name}</strong>
{file.description ? <span className="memory-muted">{file.description}</span> : null}
<small className={over ? 'memory-attention' : undefined}>
- {file.tokens} tokens{over ? `, over the ${cap} cap` : ''} · {relativeTime.day(file.updatedAt)}
+ {file.tokens} tokens{over ? `, over the ${cap} cap` : ''} · {relativeTime.day(file.updatedAt, tr)}
</small>
</button>
}
diff --git a/apps/desktop/src/renderer/views/bots/MemoryInfoSheet.tsx b/apps/desktop/src/renderer/views/bots/MemoryInfoSheet.tsx
index 8160fa63..880efd80 100644
--- a/apps/desktop/src/renderer/views/bots/MemoryInfoSheet.tsx
+++ b/apps/desktop/src/renderer/views/bots/MemoryInfoSheet.tsx
@@ -3,16 +3,18 @@ import { Icon } from '../../components/Icon'
import { ModalHeader, SheetPage } from '../../components/Overlay'
import { HStack, IconSlot, VStack } from '../../components/Stack'
import { Text } from '../../components/Text'
+import { useTr } from '../../lib/use-language'
interface Point { icon: string; title: string; detail: string }
-/** What the harness's own memory switch means. `readable`: Codync shows its notes (Claude Code's are a file). */
-export function harnessInfo(harness: string, readable: boolean): Point[] {
+/** What the harness's own memory switch means. `readable`: Codync shows its notes (Claude Code's are a file). The harness name is filled in after the sentence is translated. */
+export function harnessInfo(harness: string, readable: boolean, tr: (text: string) => string): Point[] {
+ const fill = (template: string) => tr(template).replaceAll('{name}', harness)
return [
- { icon: 'brain', title: 'A memory of its own', detail: `${harness} keeps notes apart from Codync's memory. It's off by default, so this bot has one memory and you see all of it here.` },
- { icon: 'square.on.square', title: 'Remembered twice', detail: 'With both on, the bot may save the same thing twice, and the two can disagree after something changes.' },
- { icon: 'trash', title: 'Forgetting', detail: `What the bot forgets in Codync stays in ${harness}'s notes. Codync can't change them.` },
- { icon: 'eye', title: 'Where to see it', detail: readable ? `Its notes show read-only under the ${harness} tab.` : `Codync can't show it; look in ${harness} itself.` },
+ { icon: 'brain', title: tr('A memory of its own'), detail: fill("{name} keeps notes apart from Codync's memory. It's off by default, so this bot has one memory and you see all of it here.") },
+ { icon: 'square.on.square', title: tr('Remembered twice'), detail: tr('With both on, the bot may save the same thing twice, and the two can disagree after something changes.') },
+ { icon: 'trash', title: tr('Forgetting'), detail: fill("What the bot forgets in Codync stays in {name}'s notes. Codync can't change them.") },
+ { icon: 'eye', title: tr('Where to see it'), detail: fill(readable ? 'Its notes show read-only under the {name} tab.' : "Codync can't show it; look in {name} itself.") },
]
}
@@ -27,9 +29,10 @@ export const dreamsInfo: Point[] = [
/** The memory screen's info buttons: a title and what to know, one point per row. The same text as the kit's; the terminal UI says it short in place. */
export function MemoryInfoSheet({ icon, title, points }: { icon: string; title: string; points: Point[] }) {
+ const tr = useTr()
return (
<SheetPage>
- <ModalHeader icon={icon} title={title} />
+ <ModalHeader icon={icon} title={tr(title)} />
<CardForm>
<CardSection>
{points.map((d) => (
@@ -38,8 +41,8 @@ export function MemoryInfoSheet({ icon, title, points }: { icon: string; title:
<Icon name={d.icon} size={15} />
</IconSlot>
<VStack gap={2} grow>
- <span>{d.title}</span>
- <Text size="footnote" tone="secondary">{d.detail}</Text>
+ <Text>{tr(d.title)}</Text>
+ <Text size="footnote" tone="secondary">{tr(d.detail)}</Text>
</VStack>
</HStack>
))}
diff --git a/apps/desktop/src/renderer/views/bots/MemoryView.tsx b/apps/desktop/src/renderer/views/bots/MemoryView.tsx
index 29d43af8..58854756 100644
--- a/apps/desktop/src/renderer/views/bots/MemoryView.tsx
+++ b/apps/desktop/src/renderer/views/bots/MemoryView.tsx
@@ -5,6 +5,7 @@ import { Sheet } from '../../components/Overlay'
import { HStack } from '../../components/Stack'
import { Text } from '../../components/Text'
import { useModel } from '../../lib/observable'
+import { useTr } from '../../lib/use-language'
import { useStore } from '../../store/context'
import { useScreenViewed } from '../../store/analytics'
import { MemoryStore, authorLabel, type MemoryEntry } from '../../store/memory-store'
@@ -21,6 +22,7 @@ type Info = 'harness' | 'dreams'
/** A bot's memory, read-only: what all your bots know about you, what this one knows, its dreams, and its harness's own notes when the user kept them on. The user changes memory by telling the bot. */
export function MemoryCard({ botId }: { botId: string }) {
const host = useStore()
+ const tr = useTr()
const memory = useModel(useMemo(() => new MemoryStore(botId, () => host.ready()), [botId, host]))
useScreenViewed('memory')
const bot = host.bots.get(botId)
@@ -54,40 +56,41 @@ export function MemoryCard({ botId }: { botId: string }) {
Use what your bots share
</Switch>}
{view && bot && section === 'bot' && bot.harnessMemory !== null && <HStack gap={4}>
- <span>{harness}'s own memory</span>
- <IconButton title={`About ${harness}'s own memory`} icon="info.circle" onClick={() => setInfo('harness')} />
- <Switch on={bot.harnessMemory} onChange={(on) => host.setHarnessMemory(bot, on)} label={`${harness}'s own memory`} className="memory-harness-switch" />
+ <span>{tr("{name}'s own memory").replaceAll('{name}', harness)}</span>
+ <IconButton title={tr("About {name}'s own memory").replaceAll('{name}', harness)} icon="info.circle" onClick={() => setInfo('harness')} />
+ <Switch on={bot.harnessMemory} onChange={(on) => host.setHarnessMemory(bot, on)} label={tr("{name}'s own memory").replaceAll('{name}', harness)} className="memory-harness-switch" />
</HStack>}
{layer && [
- <p key="note" className="memory-muted">{section === 'yours'
- ? 'Your name, time zone, people and lasting preferences, shared by your bots.'
- : 'What this bot learned about you.'} {layer.used} of {layer.cap} in use. To change it, tell the bot.</p>,
+ <p key="note" className="memory-muted">{tr(section === 'yours'
+ ? 'Your name, time zone, people and lasting preferences, shared by your bots. {used} of {cap} in use. To change it, tell the bot.'
+ : 'What this bot learned about you. {used} of {cap} in use. To change it, tell the bot.')
+ .replace('{used}', String(layer.used)).replace('{cap}', String(layer.cap))}</p>,
...(layer.entries.length ? [] : [<div key="empty" className="memory-empty">
<Icon name="brain" size={20} color="var(--tertiary)" />
- <span>{section === 'yours' ? 'Nothing shared yet.' : 'Nothing yet. What this bot learns about you shows up here.'}</span>
+ <span>{tr(section === 'yours' ? 'Nothing shared yet.' : 'Nothing yet. What this bot learns about you shows up here.')}</span>
</div>]),
...layer.entries.map((entry) => <EntryRow key={entry.id} entry={entry} />),
- ...(view?.files ? fileRows(view.files, section === 'yours', setFile) : []),
+ ...(view?.files ? fileRows(view.files, section === 'yours', setFile, tr) : []),
]}
{view && section === 'dreams' && [
<div key="note" className="memory-layer-note">
- <p className="memory-muted">Between chats the bot tidies its memory from your own words.</p>
+ <p className="memory-muted">{tr('Between chats the bot tidies its memory from your own words.')}</p>
<IconButton title="About dreaming" icon="info.circle" onClick={() => setInfo('dreams')} />
</div>,
- ...(view.dreams.length ? [] : [<div key="empty" className="memory-empty"><Icon name="moon" size={20} color="var(--tertiary)" /><span>No dreams yet.</span></div>]),
+ ...(view.dreams.length ? [] : [<div key="empty" className="memory-empty"><Icon name="moon" size={20} color="var(--tertiary)" /><span>{tr('No dreams yet.')}</span></div>]),
...view.dreams.map((dream) => <div className="memory-content fade-in" key={dream.id}>
- <strong>{relativeTime.day(dream.at)}{dream.undone ? ' · undone' : ''}</strong>
+ <strong>{relativeTime.day(dream.at, tr)}{dream.undone ? ' · undone' : ''}</strong>
{dream.added.map((c) => <Text key={`a${c.id}`} tone="added" className="line-clamp memory-clamp" title={c.text}>+ {c.text}</Text>)}
{dream.archived.map((c) => <Text key={`r${c.id}`} tone="removed" className="line-clamp memory-clamp" title={c.text}>− {c.text}</Text>)}
{(dream.files ?? []).map((f) => <span key={`f${f.version}`} className="memory-muted">Added to {f.name}</span>)}
</div>),
]}
{view?.projectMemory && section === 'harness' && <div className="memory-content">
- <p className="memory-muted">Claude Code's own notes, read-only here.</p>
+ <p className="memory-muted">{tr("Claude Code's own notes, read-only here.")}</p>
<small className="memory-muted">{view.projectMemory.path}</small>
{view.projectMemory.text
? <pre className="memory-history">{view.projectMemory.text}</pre>
- : <div className="memory-empty"><Icon name="brain" size={20} color="var(--tertiary)" /><span>Nothing yet. Claude Code's notes show up here once it saves some.</span></div>}
+ : <div className="memory-empty"><Icon name="brain" size={20} color="var(--tertiary)" /><span>{tr("Nothing yet. Claude Code's notes show up here once it saves some.")}</span></div>}
</div>}
</CardSection>
</div>
@@ -95,7 +98,7 @@ export function MemoryCard({ botId }: { botId: string }) {
{file && <MemoryFileSheet memory={memory} target={file} />}
</Sheet>
<FormSheet open={info !== null} onClose={() => setInfo(null)} height={560}>
- {info === 'harness' && <MemoryInfoSheet icon="brain" title={`${harness}'s own memory`} points={harnessInfo(harness, bot?.backend === 'claude')} />}
+ {info === 'harness' && <MemoryInfoSheet icon="brain" title={tr("{name}'s own memory").replaceAll('{name}', harness)} points={harnessInfo(harness, bot?.backend === 'claude', tr)} />}
{info === 'dreams' && <MemoryInfoSheet icon="moon" title="Dreaming" points={dreamsInfo} />}
</FormSheet>
</>
@@ -103,9 +106,10 @@ export function MemoryCard({ botId }: { botId: string }) {
function EntryRow({ entry }: { entry: MemoryEntry }) {
const host = useStore()
+ const tr = useTr()
const archived = entry.state === 'archived'
return <div className="memory-content fade-in">
<strong className={archived ? 'memory-archived' : undefined}>{entry.pinned && <Icon name="pin.fill" size={10} color="var(--secondary)" />}<span className="line-clamp memory-clamp" title={entry.text}>{entry.text}</span></strong>
- <small>{authorLabel(entry, (id) => host.authorName(id))} · {relativeTime.day(entry.updatedAt)}{archived ? ' · archived' : ''}</small>
+ <small>{authorLabel(entry, (id) => host.authorName(id))} · {relativeTime.day(entry.updatedAt, tr)}{archived ? ' · archived' : ''}</small>
</div>
}
diff --git a/apps/desktop/src/renderer/views/bots/NewBotView.tsx b/apps/desktop/src/renderer/views/bots/NewBotView.tsx
index 3b7c6c35..43249d67 100644
--- a/apps/desktop/src/renderer/views/bots/NewBotView.tsx
+++ b/apps/desktop/src/renderer/views/bots/NewBotView.tsx
@@ -6,6 +6,7 @@ import { ModalHeader, useDismiss } from '../../components/Overlay'
import { HStack, Spacer, VStack } from '../../components/Stack'
import { Text } from '../../components/Text'
import { useStore } from '../../store/context'
+import { useTr } from '../../lib/use-language'
import { errorText, fillDefaults, newDraft } from './drafts'
import { AvatarPicker } from './parts'
import './bots.css'
@@ -53,6 +54,7 @@ export function NewBotView({ computer }: { computer: ComputerChoice | null }) {
/** A new group chat, laid out like a new bot: its face, an optional name, then the bots to put in it. */
export function NewGroupView({ computer }: { computer: ComputerChoice | null }) {
+ const tr = useTr()
const store = useStore()
const [name, setName] = useState('')
const [members, setMembers] = useState<string[]>([])
@@ -92,9 +94,9 @@ export function NewGroupView({ computer }: { computer: ComputerChoice | null })
})}
</HStack>
) : (
- <Text tone="secondary">No bots yet. Create a bot first.</Text>
+ <Text tone="secondary">{tr(`No bots yet. Create a bot first.`)}</Text>
)}
- <Text as="div" size="caption" tone="tertiary">Everyone answers in turn unless you @mention someone.</Text>
+ <Text as="div" size="caption" tone="tertiary">{tr(`Everyone answers in turn unless you @mention someone.`)}</Text>
</CreateLayout>
)
}
@@ -112,6 +114,7 @@ function CreateLayout({ title, preview, name, placeholder, onName, canCreate, co
children: ReactNode
}) {
const store = useStore()
+ const tr = useTr()
const dismiss = useDismiss()
const [saving, setSaving] = useState(false)
const [error, setError] = useState<string | null>(null)
@@ -136,7 +139,7 @@ function CreateLayout({ title, preview, name, placeholder, onName, canCreate, co
className="field-box create-name"
autoFocus
value={name}
- placeholder={placeholder}
+ placeholder={tr(placeholder)}
aria-label="Name"
onChange={(e) => onName(e.target.value)}
onKeyDown={(e) => {
@@ -149,7 +152,7 @@ function CreateLayout({ title, preview, name, placeholder, onName, canCreate, co
<HStack gap={8} className="create-footer">
{computer ? (
<HStack gap={8}>
- <Text tone="secondary">On</Text>
+ <Text tone="secondary">{tr(`On`)}</Text>
<ChoicePicker selection={computer.selection} options={computer.options} onChange={computer.onChange} />
</HStack>
) : null}
diff --git a/apps/desktop/src/renderer/views/bots/parts.tsx b/apps/desktop/src/renderer/views/bots/parts.tsx
index eb14f0c1..27b7670c 100644
--- a/apps/desktop/src/renderer/views/bots/parts.tsx
+++ b/apps/desktop/src/renderer/views/bots/parts.tsx
@@ -4,6 +4,7 @@ import { CharacterAvatar } from '../../components/Avatar'
import { RowLabel, Switch } from '../../components/Controls'
import { anchorPlacement, useEscape, usePresence } from '../../components/Overlay'
import { VStack } from '../../components/Stack'
+import { useTr } from '../../lib/use-language'
import { AVATAR_COLORS, AVATAR_SHAPES } from '../../lib/theme'
import './bots.css'
@@ -37,6 +38,7 @@ export function AutoTextArea({ value, onChange, placeholder, minRows, maxRows, c
className?: string
onKeyDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void
}) {
+ const tr = useTr()
const ref = useRef<HTMLTextAreaElement>(null)
useLayoutEffect(() => {
const el = ref.current
@@ -47,7 +49,7 @@ export function AutoTextArea({ value, onChange, placeholder, minRows, maxRows, c
el.style.height = '0px'
el.style.height = `${Math.min(Math.max(el.scrollHeight, line * minRows + pad), line * maxRows + pad)}px`
}, [value, minRows, maxRows])
- return <textarea ref={ref} rows={minRows} className={className} value={value} placeholder={placeholder} onChange={(e) => onChange(e.target.value)} onKeyDown={onKeyDown} />
+ return <textarea ref={ref} rows={minRows} className={className} value={value} placeholder={placeholder === undefined ? undefined : tr(placeholder)} onChange={(e) => onChange(e.target.value)} onKeyDown={onKeyDown} />
}
/** The avatar's shape and color: each a wrapping, centered row of choices, ringed when picked. */
diff --git a/apps/desktop/src/renderer/views/computer-access/ComputerAccessView.tsx b/apps/desktop/src/renderer/views/computer-access/ComputerAccessView.tsx
index f1d31821..f3e4b1eb 100644
--- a/apps/desktop/src/renderer/views/computer-access/ComputerAccessView.tsx
+++ b/apps/desktop/src/renderer/views/computer-access/ComputerAccessView.tsx
@@ -1,6 +1,7 @@
import type { ReactNode } from 'react'
import { Button, IconButton, Spinner } from '../../components/Controls'
import { Icon } from '../../components/Icon'
+import { useTr } from '../../lib/use-language'
import { useScreenViewed } from '../../store/analytics'
import { useComputerAccess } from './use-computer-access'
import appIcon from '../../../../resources/icon.png'
@@ -9,6 +10,7 @@ import './computer-access.css'
/** Shared by onboarding and Settings. Permission requests remain explicit and local. */
export function ComputerAccessView({ onContinue }: { onContinue?: (ready: boolean) => void }) {
const access = useComputerAccess()
+ const tr = useTr()
useScreenViewed('computer_access')
const { screen, step, busy } = access
const mac = window.codync.platform === 'darwin'
@@ -21,19 +23,19 @@ export function ComputerAccessView({ onContinue }: { onContinue?: (ready: boolea
: Number(screen?.capture === true && screen.input))
const request = (permission: 'capture' | 'input' | 'portal', title: string) => (
<Button kind={step === permission ? 'primary' : 'secondary'} disabled={!canRequest || busy !== null} onClick={() => void access.request(permission)}>
- {busy === permission ? <><Spinner /> Waiting for permission…</> : title}
+ {busy === permission ? <><Spinner /> {tr('Waiting for permission…')}</> : title}
</Button>
)
return (
- <section className={`computer-access ${onContinue ? 'onboarding' : ''}`} aria-label="Computer access setup">
+ <section className={`computer-access ${onContinue ? 'onboarding' : ''}`} aria-label={tr('Computer access setup')}>
<div className="computer-access-content">
<header className="computer-access-header">
<div className="computer-access-identity">
<img src={appIcon} width={40} height={40} alt="Codync" />
- <div><span>This computer</span><strong>{access.computerName}</strong></div>
+ <div><span>{tr('This computer')}</span><strong>{access.computerName}</strong></div>
</div>
- <h1>{ready ? 'Your computer is ready' : 'Computer access'}</h1>
- <p>{windows ? 'Let a bot work in your apps. You choose which bots can use this computer.' : 'Work in your apps with a bot, or access your screen from your phone. You choose which bots can use this computer.'}</p>
+ <h1>{ready ? tr('Your computer is ready') : tr('Computer access')}</h1>
+ <p>{tr(windows ? 'Let a bot work in your apps. You choose which bots can use this computer.' : 'Work in your apps with a bot, or access your screen from your phone. You choose which bots can use this computer.')}</p>
</header>
{step === 'host' ? <AccessNotice title="Waiting for your computer" icon="desktopcomputer">
Start or restart the host from Codync’s menu to continue. We’ll check again automatically.
@@ -43,14 +45,14 @@ export function ComputerAccessView({ onContinue }: { onContinue?: (ready: boolea
</AccessNotice> : null}
{access.error ? <AccessNotice title="Couldn’t finish setup" icon="exclamationmark.circle" error>{access.error}</AccessNotice> : null}
<div className="computer-access-section-label">
- <span>{windows ? 'Availability' : 'Permissions'}</span>
- <span>{ready ? 'All set' : `${completed} of ${mac ? 3 : windows ? 1 : 2} ready`}<IconButton title="Check again" icon="arrow.clockwise" size={22} onClick={() => void access.refresh()} /></span>
+ <span>{tr(windows ? 'Availability' : 'Permissions')}</span>
+ <span>{ready ? tr('All set') : tr('{done} of {total} ready').replace('{done}', String(completed)).replace('{total}', String(mac ? 3 : windows ? 1 : 2))}<IconButton title="Check again" icon="arrow.clockwise" size={22} onClick={() => void access.refresh()} /></span>
</div>
<div className="computer-access-steps">
{windows ? <AccessRow title="Computer control" icon="cursorarrow.motionlines" detail="Bots can use apps on this computer. Remote screen viewing from your phone isn’t available on Windows yet." done={ready} /> : <>
<AccessRow title="Codync Screen" icon="desktopcomputer" detail="Runs in the background to share your screen and connect your controls." done={helperReady} active={['enable', 'helper', 'background'].includes(step)} status={step === 'background' ? 'Needs approval' : undefined}>
- {['enable', 'helper'].includes(step) ? <Button disabled={busy !== null} onClick={() => void access.enable()}>{busy === 'enable' ? <><Spinner /> Starting…</> : step === 'helper' ? 'Start again' : 'Enable Codync Screen'}</Button> : null}
- {step === 'background' ? <><p className="computer-access-inline-note">Allow Codync to run in the background in Login Items.</p><Button onClick={() => access.openSettings('background')}>Open Login Items <Icon name="arrow.up.right.square" size={10} /></Button></> : null}
+ {['enable', 'helper'].includes(step) ? <Button disabled={busy !== null} onClick={() => void access.enable()}>{busy === 'enable' ? <><Spinner /> {tr('Starting…')}</> : step === 'helper' ? 'Start again' : 'Enable Codync Screen'}</Button> : null}
+ {step === 'background' ? <><p className="computer-access-inline-note">{tr('Allow Codync to run in the background in Login Items.')}</p><Button onClick={() => access.openSettings('background')}>{tr('Open Login Items')} <Icon name="arrow.up.right.square" size={10} /></Button></> : null}
</AccessRow>
{mac ? <>
<AccessRow title="Screen recording" icon="record.circle" detail="Lets Codync see your screen, including anything visible in your apps." done={screen?.capture === true} active={step === 'capture'}>
@@ -69,11 +71,11 @@ export function ComputerAccessView({ onContinue }: { onContinue?: (ready: boolea
</>}
</div>
<ul className="computer-access-notes">
- <li><Icon name="lock.shield" size={13} /><p>Permissions stay on this computer. {onContinue ? 'You can change them later in Settings → Computer access.' : 'Your other computers keep their own permissions.'}</p></li>
- <li><Icon name="iphone" size={13} /><p>On iPhone, connect with a QR code or Ask Access. No SSH setup needed.</p></li>
+ <li><Icon name="lock.shield" size={13} /><p>{tr(onContinue ? 'Permissions stay on this computer. You can change them later in Settings → Computer access.' : 'Permissions stay on this computer. Your other computers keep their own permissions.')}</p></li>
+ <li><Icon name="iphone" size={13} /><p>{tr('On iPhone, connect with a QR code or Ask Access. No SSH setup needed.')}</p></li>
</ul>
{onContinue ? <footer className="computer-access-footer">
- <Button kind={ready ? 'primary' : 'secondary'} onClick={() => onContinue(ready)}>{ready ? 'Continue' : 'Set up later'}{ready ? <Icon name="arrow.right" size={12} /> : null}</Button>
+ <Button kind={ready ? 'primary' : 'secondary'} onClick={() => onContinue(ready)}>{tr(ready ? 'Continue' : 'Set up later')}{ready ? <Icon name="arrow.right" size={12} /> : null}</Button>
</footer> : null}
</div>
</section>
@@ -83,31 +85,35 @@ export function ComputerAccessView({ onContinue }: { onContinue?: (ready: boolea
function AccessRow({ title, icon, detail, done, active = false, status, children }: {
title: string; icon: string; detail: string; done: boolean; active?: boolean; status?: string; children?: ReactNode
}) {
- const label = done ? 'Ready' : status ?? (active ? 'Needs access' : 'Waiting')
+ const tr = useTr()
+ const label = tr(done ? 'Ready' : status ?? (active ? 'Needs access' : 'Waiting'))
return <div className={`computer-access-row ${done ? 'granted' : active ? 'current' : 'waiting'}`}>
<span className="computer-access-badge" role="img" aria-label={label} title={label}>
{done ? <Icon name="checkmark" size={12} weight="bold" /> : <Icon name={icon} size={15} />}
</span>
<div className="computer-access-row-body">
- <h2>{title}</h2>
- <p>{detail}</p>
+ <h2>{tr(title)}</h2>
+ <p>{tr(detail)}</p>
{!done ? <div className="computer-access-actions">{children}</div> : null}
</div>
</div>
}
function AccessNotice({ title, icon, error = false, children }: { title: string; icon: string; error?: boolean; children: ReactNode }) {
+ const tr = useTr()
return <div className={`computer-access-notice ${error ? 'error' : ''}`} role={error ? 'alert' : 'status'}>
- <Icon name={icon} size={16} /><div><strong>{title}</strong><p>{children}</p></div>
+ <Icon name={icon} size={16} /><div><strong>{tr(title)}</strong><p>{typeof children === 'string' ? tr(children) : children}</p></div>
</div>
}
function SettingsHint({ app, control = false }: { app: string; control?: boolean }) {
+ const tr = useTr()
return <p className="computer-access-inline-note">
- In System Settings, look for <strong>{app}</strong>.{control ? <> It may be listed under <strong>Device Control and Data Access</strong> or <strong>Accessibility</strong>.</> : null} Return here after granting access; if asked, allow the helper to restart.
+ {tr('In System Settings, look for')} <strong>{app}</strong>.{control ? <> {tr('It may be listed under Device Control and Data Access or Accessibility.')}</> : null} {tr('Return here after granting access; if asked, allow the helper to restart.')}
</p>
}
function SettingsLink({ action }: { action: () => void }) {
- return <Button kind="secondary" onClick={action}>Open System Settings <Icon name="arrow.up.right.square" size={10} /></Button>
+ const tr = useTr()
+ return <Button kind="secondary" onClick={action}>{tr('Open System Settings')} <Icon name="arrow.up.right.square" size={10} /></Button>
}
diff --git a/apps/desktop/src/renderer/views/island/IslandUsage.tsx b/apps/desktop/src/renderer/views/island/IslandUsage.tsx
index bc3cb500..20b72f2c 100644
--- a/apps/desktop/src/renderer/views/island/IslandUsage.tsx
+++ b/apps/desktop/src/renderer/views/island/IslandUsage.tsx
@@ -1,6 +1,7 @@
import type { UsageProvider, UsageWindow } from '@shared/models'
import { prefs, usePref } from '../../lib/prefs'
import { usePixelRatio } from '../../lib/theme'
+import { useResetLine, useTr } from '../../lib/use-language'
import { UsageBar } from '../usage/UsageBar'
import { mascotDataURL } from '../usage/ProviderMascot'
import { providerTintCSS, resetDescription, tightest, windowTitle } from '../usage/usage-model'
@@ -32,12 +33,16 @@ export function UsageMeter({ model }: { model: IslandModel }) {
const top = tightestOverall(model.summary.usage)
if (!top) return null
const { provider, window } = top
+ const tr = useTr()
+ const line = useResetLine()
+ const title = tr(windowTitle(window))
const reset = resetDescription(window)
+ const spoken = reset ? line(reset) : ''
return (
<button
className="island-meter"
- title={`${provider.name} · ${windowTitle(window)} · ${Math.round(window.percent)}%${reset ? ` · ${reset}` : ''}`}
- aria-label={`Usage: ${provider.name} ${windowTitle(window)} ${Math.round(window.percent)} percent`}
+ title={`${provider.name} · ${title} · ${Math.round(window.percent)}%${spoken ? ` · ${spoken}` : ''}`}
+ aria-label={`Usage: ${provider.name} ${title} ${Math.round(window.percent)} percent`}
onClick={() => model.setTab('usage')}
>
<Mascot provider={provider} size={15} />
@@ -52,6 +57,8 @@ export function UsageMeter({ model }: { model: IslandModel }) {
/** Every provider's limits side by side, each window a bar with when it resets. */
export function UsageView({ model }: { model: IslandModel }) {
const usage = model.summary.usage
+ const tr = useTr()
+ const line = useResetLine()
if (!usage.length) {
return (
<div className="island-card island-empty">
@@ -72,10 +79,10 @@ export function UsageView({ model }: { model: IslandModel }) {
</div>
{provider.windows.slice(0, 3).map((w) => (
<div key={w.id} className="island-usage-row">
- <span className="island-usage-title">{windowTitle(w)}</span>
+ <span className="island-usage-title">{tr(windowTitle(w))}</span>
<UsageBar percent={w.percent} tint={providerTintCSS(provider.id)} />
<span className="island-usage-value">{`${Math.round(w.percent)}%`}</span>
- <span className="island-usage-reset">{resetDescription(w)?.replace('resets ', '') ?? ''}</span>
+ <span className="island-usage-reset">{line(resetDescription(w) ?? '')}</span>
</div>
))}
</div>
diff --git a/apps/desktop/src/renderer/views/island/IslandViews.tsx b/apps/desktop/src/renderer/views/island/IslandViews.tsx
index e050eb98..1c950ec4 100644
--- a/apps/desktop/src/renderer/views/island/IslandViews.tsx
+++ b/apps/desktop/src/renderer/views/island/IslandViews.tsx
@@ -6,6 +6,7 @@ import { Icon } from '../../components/Icon'
import { RecordingPill } from '../../components/RecordingPill'
import { ThinkingOrb } from '../../components/ThinkingOrb'
import { useModel } from '../../lib/observable'
+import { useTr } from '../../lib/use-language'
import { avatarColor, withAlpha } from '../../lib/theme'
import type { IslandModel } from './island-model'
import { useArrivals, useFlip, useSwap } from './island-motion'
@@ -187,6 +188,7 @@ export function Message({ model }: { model: IslandModel }) {
const dictation = useModel(model.dictation)
const bot = model.messageBot
/** Why dictation stopped, else how to talk from any app. */
+ const tr = useTr()
const hint = dictation.error ?? model.voiceTip
const swap = useSwap(bot?.ref)
if (!bot) return null
@@ -239,7 +241,7 @@ export function Message({ model }: { model: IslandModel }) {
<Icon name="arrow.up" size={12} weight="bold" scaled={false} />
</button>
</form>
- {hint ? <span className="island-hint">{hint}</span> : null}
+ {hint ? <span className="island-hint">{tr(hint)}</span> : null}
</div>
</div>
<MiniColumn bots={model.others(3).filter((b) => b.ref !== bot.ref)} onOpen={(ref) => model.openBot(ref)} />
diff --git a/apps/desktop/src/renderer/views/marketplace/AgentSheet.tsx b/apps/desktop/src/renderer/views/marketplace/AgentSheet.tsx
index 7670116f..b5cab305 100644
--- a/apps/desktop/src/renderer/views/marketplace/AgentSheet.tsx
+++ b/apps/desktop/src/renderer/views/marketplace/AgentSheet.tsx
@@ -8,6 +8,7 @@ import { HStack, IconSlot, VStack } from '../../components/Stack'
import { Text } from '../../components/Text'
import { ThinkingOrb } from '../../components/ThinkingOrb'
import { useStore } from '../../store/context'
+import { useTr } from '../../lib/use-language'
import { errorText, market, type AgentAuth, type AuthMethod } from './market-models'
import { ErrorText, Field, ScreenHeader, SlideStack, WebLink, filled } from './pieces'
import { SetupTerminalView } from './SetupTerminal'
@@ -58,12 +59,13 @@ function TintedAgentIcon({ registry, size }: { registry?: string | null; size: n
*/
export function NodeNotice({ onAdd }: { onAdd: () => void }) {
const store = useStore()
+ const tr = useTr()
return (
<div className="node-notice fade-in">
<Icon name="shippingbox" size={15} color="var(--secondary)" />
<VStack as="span" gap={2} grow>
- <Text size="subheadline" weight="semibold" tone="text">Node.js isn't on {store.hostName}</Text>
- <Text size="caption" tone="secondary">Some agents need it to run. Codync can add a copy just for them.</Text>
+ <Text size="subheadline" weight="semibold" tone="text">{tr("Node.js isn't on {name}").replaceAll('{name}', store.hostName)}</Text>
+ <Text size="caption" tone="secondary">{tr(`Some agents need it to run. Codync can add a copy just for them.`)}</Text>
</VStack>
<Button onClick={onAdd}>Add Node.js</Button>
</div>
@@ -252,6 +254,7 @@ function AgentKeysForm({ backend, method, saved, back, done }: {
back: () => void
done: (auth: AgentAuth) => void
}) {
+ const tr = useTr()
const store = useStore()
const [values, setValues] = useState<Record<string, string>>({})
const [saving, setSaving] = useState(false)
@@ -291,7 +294,7 @@ function AgentKeysForm({ backend, method, saved, back, done }: {
placeholder={saved.includes(v.name) ? 'Saved (type to replace)' : v.name}
onChange={(x) => setValues((old) => ({ ...old, [v.name]: x }))}
/>
- <Text size="caption" tone="secondary">{v.label + (v.optional ? ' (optional)' : '')}</Text>
+ <Text size="caption" tone="secondary">{v.label + (v.optional ? tr(` (optional)`) : '')}</Text>
</VStack>
))}
</CardSection>
@@ -321,8 +324,9 @@ function SetupStepRow({ number, title, detail, done, action }: {
done: boolean
action: { label: string; run: () => void } | null
}) {
+ const tr = useTr()
return (
- <HStack gap={12} className="agent-step-row" aria-label={`${title}. ${detail}${done ? '. Done' : ''}`}>
+ <HStack gap={12} className="agent-step-row" aria-label={`${tr(title)}. ${tr(detail)}${done ? `. ${tr('Done')}` : ''}`}>
<span aria-hidden className={`agent-step-number${done ? ' done' : ''}`}>
{done
? <Icon name="checkmark" size={10} weight="bold" color="var(--on-accent)" />
@@ -335,7 +339,7 @@ function SetupStepRow({ number, title, detail, done, action }: {
<span className="agent-row-gap" />
{action ? (
<button className="capsule-action agent-step-action" onClick={action.run}>
- {action.label}
+ {tr(action.label)}
</button>
) : null}
</HStack>
diff --git a/apps/desktop/src/renderer/views/marketplace/ComposioViews.tsx b/apps/desktop/src/renderer/views/marketplace/ComposioViews.tsx
index 2bd7de25..768c5a88 100644
--- a/apps/desktop/src/renderer/views/marketplace/ComposioViews.tsx
+++ b/apps/desktop/src/renderer/views/marketplace/ComposioViews.tsx
@@ -10,12 +10,15 @@ import {
type ComposioApp, type ComposioConnect,
} from './market-models'
import { AppLogo, ErrorText, Field, filled } from './pieces'
+import { useTr } from '../../lib/use-language'
+
/**
* Connects one app: Composio's sign-in page (opened here, finished anywhere),
* or a form for apps that use a key.
*/
export function ComposioConnectSheet({ app, requestId, done }: { app: ComposioApp; requestId?: string; done: () => void }) {
+ const tr = useTr()
const store = useStore()
const dismiss = useDismiss()
const [plan, setPlan] = useState<ComposioConnect | null>(null)
@@ -139,7 +142,7 @@ export function ComposioConnectSheet({ app, requestId, done }: { app: ComposioAp
{(plan?.fields ?? []).map((f) => (
<VStack key={f.name} gap={4}>
<Field label={f.label} value={values[f.name] ?? ''} secret={f.secret} placeholder={f.label} onChange={(v) => setValues((old) => ({ ...old, [f.name]: v }))} />
- {f.description ? <Text size="caption" tone="secondary">{f.description + (f.required ? '' : ' (optional)')}</Text> : null}
+ {f.description ? <Text size="caption" tone="secondary">{f.description + (f.required ? '' : tr(` (optional)`))}</Text> : null}
</VStack>
))}
</CardSection>
diff --git a/apps/desktop/src/renderer/views/marketplace/ConnectionRequestCard.tsx b/apps/desktop/src/renderer/views/marketplace/ConnectionRequestCard.tsx
index 2c4139d7..42c395bc 100644
--- a/apps/desktop/src/renderer/views/marketplace/ConnectionRequestCard.tsx
+++ b/apps/desktop/src/renderer/views/marketplace/ConnectionRequestCard.tsx
@@ -14,9 +14,12 @@ import {
} from './market-models'
import { AppLogo, Field, FormSheet, ServiceLogo } from './pieces'
import { pluginsFor } from './plugins'
+import { useTr } from '../../lib/use-language'
+
/** Credentials go through the setup API; only the request's state is a chat entry. */
export function ConnectionRequestCard({ entry }: { entry: Entry }) {
+ const tr = useTr()
const store = useStore()
const request = entry.data.connectionRequest as unknown as ConnectionRequest
const [app, setApp] = useState<ComposioApp | null>(null)
@@ -90,13 +93,13 @@ export function ConnectionRequestCard({ entry }: { entry: Entry }) {
<>
<Field value={username} onChange={setUsername} placeholder="Username or email" />
<Field value={value} onChange={setValue} placeholder="Password or op:// reference" secret />
- <Text size="caption" tone="secondary">Saved securely on this computer. The bot types it into the sign-in page but never sees it.</Text>
+ <Text size="caption" tone="secondary">{tr(`Saved securely on this computer. The bot types it into the sign-in page but never sees it.`)}</Text>
</>
) : pending && isSecret ? (
<>
- <Text size="caption" tone="secondary">{`${request.field ?? 'Credential'} · ${request.location ?? ''}`}</Text>
+ <Text size="caption" tone="secondary">{`${request.field ?? tr(`Credential`)} · ${request.location ?? ''}`}</Text>
<Field value={value} onChange={setValue} placeholder="Credential or op:// reference" secret />
- <Text size="caption" tone="secondary">Saved securely on this computer. Never added to the conversation.</Text>
+ <Text size="caption" tone="secondary">{tr(`Saved securely on this computer. Never added to the conversation.`)}</Text>
</>
) : null}
{error ? <Text size="footnote" tone="danger">{error}</Text> : null}
diff --git a/apps/desktop/src/renderer/views/marketplace/ConnectorSheets.tsx b/apps/desktop/src/renderer/views/marketplace/ConnectorSheets.tsx
index 273da038..196dd144 100644
--- a/apps/desktop/src/renderer/views/marketplace/ConnectorSheets.tsx
+++ b/apps/desktop/src/renderer/views/marketplace/ConnectorSheets.tsx
@@ -7,6 +7,7 @@ import { useStore } from '../../store/context'
import { errorText, market, needsSignIn, type InstalledConnector, type MarketConnector, type MarketInput } from './market-models'
import { ErrorText, Field, WebLink } from './pieces'
import { usePlugins } from './plugins'
+import { useTr } from '../../lib/use-language'
export function InstallConnectorSheet({ item, requestId, done }: { item: MarketConnector; requestId?: string; done: () => void }) {
const store = useStore()
@@ -52,12 +53,14 @@ export function InstallConnectorSheet({ item, requestId, done }: { item: MarketC
if (item.options.length === 1 && item.options[0].inputs.length === 0) void install()
}, [])
+ const tr = useTr()
+ const onHost = (template: string) => tr(template).replaceAll('{name}', store.hostName)
const missing = !option || option.inputs.some((i) => i.required && !(values[i.name] ?? i.default ?? ''))
return (
<SheetPage>
<ModalHeader
icon="point.3.connected.trianglepath.dotted"
- title="Add connector"
+ title={tr(`Add connector`)}
trailing={saving ? <Spinner /> : <IconButton title="Add" icon="plus" disabled={installed === null && missing} onClick={() => void install()} />}
/>
<CardForm>
@@ -75,15 +78,22 @@ export function InstallConnectorSheet({ item, requestId, done }: { item: MarketC
<ChoiceList
selection={optionId}
onChange={setOptionId}
- options={item.options.map((o) => ({ id: o.id, label: o.kind === 'remote' ? `Hosted by ${item.title}` : `On ${store.hostName} (${o.kind})` }))}
+ options={item.options.map((o) => ({
+ id: o.id,
+ label: o.kind === 'remote'
+ ? tr('Hosted by {name}').replaceAll('{name}', item.title)
+ : tr('On {name} ({kind})').replaceAll('{name}', store.hostName).replaceAll('{kind}', o.kind),
+ }))}
/>
</CardSection>
) : null}
{option ? (
- <CardSection title="Setup" footer={`Keys are saved on ${store.hostName} only.`}>
+ <CardSection title="Setup" footer={onHost('Keys are saved on {name} only.')}>
{option.inputs.length === 0 ? (
<Text tone="secondary">
- {option.kind === 'remote' ? `No keys needed here. If ${item.title} wants you to sign in, its sign-in page opens next.` : 'No setup needed.'}
+ {option.kind === 'remote'
+ ? tr('No keys needed here. If {name} wants you to sign in, its sign-in page opens next.').replaceAll('{name}', item.title)
+ : tr(`No setup needed.`)}
</Text>
) : null}
{option.inputs.map((input) => (
@@ -96,7 +106,7 @@ export function InstallConnectorSheet({ item, requestId, done }: { item: MarketC
onChange={(v) => setValues((old) => ({ ...old, [input.name]: v }))}
/>
{input.description ? (
- <Text size="caption" tone="secondary">{input.description + (input.required ? '' : ' (optional)')}</Text>
+ <Text size="caption" tone="secondary">{input.description + (input.required ? '' : tr(' (optional)'))}</Text>
) : null}
</VStack>
))}
@@ -112,6 +122,7 @@ type Mode = 'command' | 'url' | 'config'
export function CustomConnectorSheet() {
const store = useStore()
+ const tr = useTr()
const plugins = usePlugins(store)
const dismiss = useDismiss()
const [name, setName] = useState('')
@@ -123,10 +134,11 @@ export function CustomConnectorSheet() {
const [error, setError] = useState<string | null>(null)
const ready = mode === 'config' ? config.trim() !== '' : name.trim() !== '' && target.trim() !== ''
+ const onHost = (template: string) => tr(template).replaceAll('{name}', store.hostName)
const footer = {
- command: `Runs on ${store.hostName} in the bot's project folder. Quotes work like in a shell.`,
+ command: onHost("Runs on {name} in the bot's project folder. Quotes work like in a shell."),
url: 'A remote MCP server, streamable HTTP or SSE.',
- config: `Paste the MCP config from a README or another app (Claude, Cursor, VS Code). Every server in it is added. Saved on ${store.hostName} only.`,
+ config: onHost('Paste the MCP config from a README or another app (Claude, Cursor, VS Code). Every server in it is added. Saved on {name} only.'),
}[mode]
const save = async () => {
@@ -154,7 +166,7 @@ export function CustomConnectorSheet() {
return (
<SheetPage>
- <ModalHeader icon="point.3.connected.trianglepath.dotted" title="Custom connector" trailing={saving ? <Spinner /> : <IconButton title="Add" icon="plus" disabled={!ready} onClick={() => void save()} />} />
+ <ModalHeader icon="point.3.connected.trianglepath.dotted" title={tr(`Custom connector`)} trailing={saving ? <Spinner /> : <IconButton title="Add" icon="plus" disabled={!ready} onClick={() => void save()} />} />
<CardForm>
<CardSection footer={footer}>
<SegmentedChoice selection={mode} onChange={setMode} options={[{ id: 'command', label: 'Command' }, { id: 'url', label: 'URL' }, { id: 'config', label: 'Config' }]} />
@@ -163,11 +175,11 @@ export function CustomConnectorSheet() {
{mode !== 'config' ? <Field value={target} onChange={setTarget} placeholder={mode === 'url' ? 'https://example.com/mcp' : 'npx -y @scope/server'} mono /> : null}
</CardSection>
{mode === 'url' ? (
- <CardSection title="Headers" footer={`Optional, one Name: value per line. Leave empty if the service has you sign in. Saved on ${store.hostName} only.`}>
+ <CardSection title="Headers" footer={onHost('Optional, one Name: value per line. Leave empty if the service has you sign in. Saved on {name} only.')}>
<Field value={envText} onChange={setEnvText} placeholder="Authorization: Bearer …" lines={[2, 6]} mono />
</CardSection>
) : mode === 'command' ? (
- <CardSection title="Environment" footer={`One KEY=value per line. Saved on ${store.hostName} only.`}>
+ <CardSection title="Environment" footer={onHost('One KEY=value per line. Saved on {name} only.')}>
<Field value={envText} onChange={setEnvText} placeholder="API_KEY=…" lines={[2, 6]} mono />
</CardSection>
) : null}
@@ -178,6 +190,7 @@ export function CustomConnectorSheet() {
}
export function NewSkillSheet() {
+ const tr = useTr()
const store = useStore()
const plugins = usePlugins(store)
const dismiss = useDismiss()
@@ -202,7 +215,7 @@ export function NewSkillSheet() {
<SheetPage>
<ModalHeader
icon="square.and.pencil"
- title="New skill"
+ title={tr(`New skill`)}
trailing={saving ? <Spinner /> : <IconButton title="Save" icon="checkmark" disabled={!name.trim() || !instructions.trim()} onClick={() => void save()} />}
/>
<CardForm>
diff --git a/apps/desktop/src/renderer/views/marketplace/CredentialsView.tsx b/apps/desktop/src/renderer/views/marketplace/CredentialsView.tsx
index 3697d62c..bff32929 100644
--- a/apps/desktop/src/renderer/views/marketplace/CredentialsView.tsx
+++ b/apps/desktop/src/renderer/views/marketplace/CredentialsView.tsx
@@ -8,11 +8,13 @@ import { useStore } from '../../store/context'
import { errorText, market, type CredentialStatus, type InstalledConnector, type SavedLogin } from './market-models'
import { ErrorText, Field, FormSheet, ScreenHeader, filled } from './pieces'
import { usePlugins } from './plugins'
+import { useTr } from '../../lib/use-language'
import './credentials.css'
export function CredentialsView({ onBack }: { onBack: () => void }) {
const dismiss = useDismiss()
const store = useStore()
+ const tr = useTr()
const plugins = usePlugins(store)
const [selected, setSelected] = useState<InstalledConnector | null>(null)
const [token, setToken] = useState('')
@@ -52,7 +54,7 @@ export function CredentialsView({ onBack }: { onBack: () => void }) {
<ScreenHeader title="Credentials" onBack={onBack} trailing={<IconButton title="Close" icon="xmark" onClick={dismiss} />} />
<CardForm>
<CardSection title="Storage">
- <div className="credential-storage"><Icon name="lock.shield" size={20} /><div><strong>{status?.provider ?? 'System credential store'}</strong><p>Encrypted on the connected computer.</p></div></div>
+ <div className="credential-storage"><Icon name="lock.shield" size={20} /><div><strong>{tr(status?.provider ?? 'System credential store')}</strong><p>{tr('Encrypted on the connected computer.')}</p></div></div>
</CardSection>
<CardSection title="Saved connections">
{plugins.installedConnectors.filter((c) => c.keys.length > 0).map((c) => (
@@ -61,16 +63,16 @@ export function CredentialsView({ onBack }: { onBack: () => void }) {
<Icon name="chevron.right" size={10} />
</button>
))}
- {!plugins.installedConnectors.some((c) => c.keys.length > 0) ? <Text size="caption" tone="secondary">No saved connection credentials yet.</Text> : null}
- <Text size="caption" tone="secondary">Values stay hidden. Select a connection to replace its credentials.</Text>
+ {!plugins.installedConnectors.some((c) => c.keys.length > 0) ? <Text size="caption" tone="secondary">{tr(`No saved connection credentials yet.`)}</Text> : null}
+ <Text size="caption" tone="secondary">{tr(`Values stay hidden. Select a connection to replace its credentials.`)}</Text>
</CardSection>
<LoginsSection />
<CardSection title="1Password" footer="Use a service account with read access only to a dedicated shared vault. The 1Password CLI must be installed on the computer.">
- <span>{status?.onePasswordConnected ? 'Connected' : 'Connect a shared vault'}</span>
+ <span>{tr(status?.onePasswordConnected ? 'Connected' : 'Connect a shared vault')}</span>
<CredentialField label="Service account token" value={token} onChange={setToken} placeholder="Paste your token" secret />
<div><Button disabled={busy || !token} onClick={() => void save(token)}>Connect</Button></div>
{status?.onePasswordConnected ? <div><Button kind="secondary" disabled={busy} onClick={() => void save('')}>Disconnect</Button></div> : null}
- <Text size="footnote" tone="secondary">Use op://vault/item/field in a connector's credential field. Codync retrieves the value when the connector runs.</Text>
+ <Text size="footnote" tone="secondary">{tr(`Use op://vault/item/field in a connector's credential field. Codync retrieves the value when the connector runs.`)}</Text>
</CardSection>
{busy ? <Spinner /> : null}
{error ? <ErrorText text={error} /> : null}
@@ -196,5 +198,6 @@ function ConnectorCredentialEditor({ connector }: { connector: InstalledConnecto
/** Persistent labels keep a filled credential field identifiable. */
function CredentialField({ label, ...props }: Parameters<typeof Field>[0] & { label: string }) {
- return <label className="credential-field"><span>{label}</span><Field {...props} label={label} /></label>
+ const tr = useTr()
+ return <label className="credential-field"><span>{tr(label)}</span><Field {...props} label={label} /></label>
}
diff --git a/apps/desktop/src/renderer/views/marketplace/MarketplaceView.tsx b/apps/desktop/src/renderer/views/marketplace/MarketplaceView.tsx
index 64d60e76..39319dfb 100644
--- a/apps/desktop/src/renderer/views/marketplace/MarketplaceView.tsx
+++ b/apps/desktop/src/renderer/views/marketplace/MarketplaceView.tsx
@@ -19,6 +19,7 @@ import {
} from './market-models'
import { AppLogo, FormSheet, ItemGrid, ItemRow, MarketRow, MarketSection, ScreenHeader, ServiceLogo, SkeletonGrid, SkillGlyph, SlideStack, TileIcon } from './pieces'
import { usePlugins } from './plugins'
+import { useTr } from '../../lib/use-language'
const connectorId = (c: MarketConnector) => c.name
@@ -30,6 +31,7 @@ const connectorId = (c: MarketConnector) => c.name
*/
export function MarketplaceView({ computers, computer, onComputer }: { computers: { id: string; name: string }[]; computer: string; onComputer: (id: string) => void }) {
const store = useStore()
+ const tr = useTr()
const plugins = usePlugins(store)
const dismiss = useDismiss()
useScreenViewed('marketplace')
@@ -143,14 +145,14 @@ export function MarketplaceView({ computers, computer, onComputer }: { computers
<HStack gap={10} shrink>
<ComputerBadge computer={store.computer} size={32} />
<VStack shrink className="market-heading-titles">
- <Text size="title" weight="semibold" tone="text">Extensions</Text>
+ <Text size="title" weight="semibold" tone="text">{tr(`Extensions`)}</Text>
{computers.length > 1 ? (
<DropdownMenu
- title="Switch computer"
+ title={tr('Switch computer')}
className="market-computer-switch"
items={() => computers.map((c) => ({ title: c.name, selected: c.id === computer, action: () => onComputer(c.id) }))}
>
- <Text truncate aria-label={`Computer: ${store.hostName}`}>{store.hostName}</Text>
+ <Text truncate aria-label={tr('Computer: {name}').replaceAll('{name}', store.hostName)}>{store.hostName}</Text>
<Icon name="chevron.down" size={10} weight="semibold" />
</DropdownMenu>
) : (
@@ -159,7 +161,7 @@ export function MarketplaceView({ computers, computer, onComputer }: { computers
</VStack>
</HStack>
<Spacer />
- <Button kind="secondary" onClick={() => setShowCredentials(true)}><Icon name="lock.shield" size={12} />Credentials</Button>
+ <Button kind="secondary" onClick={() => setShowCredentials(true)}><Icon name="lock.shield" size={12} />{tr('Credentials')}</Button>
{installedCount > 0 ? (
<button className="press market-installed" onClick={() => setShowInstalled(true)}>
<HStack as="span" align="stretch" className="market-installed-logos">
@@ -170,8 +172,8 @@ export function MarketplaceView({ computers, computer, onComputer }: { computers
))}
</HStack>
<VStack as="span" align="flex-start" className="market-installed-text">
- <Text tone="secondary">{installedCount} installed</Text>
- <Text size="caption" tone="secondary">Connectors & skills</Text>
+ <Text tone="secondary">{tr('{count} installed').replaceAll('{count}', String(installedCount))}</Text>
+ <Text size="caption" tone="secondary">{tr(`Connectors & skills`)}</Text>
</VStack>
<Icon name="chevron.right" size={10} weight="semibold" color="var(--tertiary)" />
</button>
@@ -184,8 +186,8 @@ export function MarketplaceView({ computers, computer, onComputer }: { computers
<Icon name="magnifyingglass" size={13} color="var(--secondary)" />
<input
value={search}
- placeholder="Search agents, connectors and skills"
- aria-label="Search agents, connectors and skills"
+ placeholder={tr('Search agents, connectors and skills')}
+ aria-label={tr('Search agents, connectors and skills')}
spellCheck={false}
onChange={(e) => {
setSearch(e.target.value)
@@ -197,8 +199,8 @@ export function MarketplaceView({ computers, computer, onComputer }: { computers
/>
{search ? (
<button
- aria-label="Clear search"
- title="Clear search"
+ aria-label={tr('Clear search')}
+ title={tr('Clear search')}
className="market-search-clear"
onClick={() => {
setSearch('')
@@ -221,7 +223,7 @@ export function MarketplaceView({ computers, computer, onComputer }: { computers
{header}
{searchField}
{agents.length > 0 ? (
- <MarketSection title={query ? `Agents matching “${query}”` : 'Agents'}>
+ <MarketSection title={query ? tr('Agents matching “{query}”').replaceAll('{query}', query) : 'Agents'}>
{allAgents.some((b) => b.node === 'missing') ? <NodeNotice onAdd={() => setAddingNode(true)} /> : null}
<div className="agent-grid">
{agents.slice(0, agentLimit).map((b) => <AgentCard key={b.id} backend={b} onClick={() => setAgent(b)} />)}
@@ -233,7 +235,7 @@ export function MarketplaceView({ computers, computer, onComputer }: { computers
{loadingConnectors ? (
<SkeletonGrid />
) : connectors.items.length === 0 ? (
- <Text tone="secondary">{query ? `No connectors match “${query}”.` : "Couldn't load connectors."}</Text>
+ <Text tone="secondary">{query ? tr('No connectors match “{query}”.').replaceAll('{query}', query) : tr(`Couldn't load connectors.`)}</Text>
) : (
<>
<ItemGrid>
@@ -300,7 +302,7 @@ export function MarketplaceView({ computers, computer, onComputer }: { computers
</MarketSection>
{error ? <Text size="footnote" tone="danger">{error}</Text> : null}
<Text size="footnote" tone="tertiary">
- Connectors come from the official MCP Registry, skills from Anthropic, agents from the ACP registry. Everything installs on {store.hostName}.
+ {tr('Connectors come from the official MCP Registry, skills from Anthropic, agents from the ACP registry. Everything installs on {name}.').replaceAll('{name}', store.hostName)}
</Text>
</div>
</div>
@@ -357,6 +359,7 @@ function AgentCard({ backend, onClick }: { backend: Backend; onClick: () => void
function InstalledView({ back }: { back: () => void }) {
const store = useStore()
+ const tr = useTr()
const plugins = usePlugins(store)
const [removing, setRemoving] = useState<{ id: string; name: string; isSkill: boolean } | null>(null)
const [signingIn, setSigningIn] = useState<string | null>(null)
@@ -430,8 +433,8 @@ function InstalledView({ back }: { back: () => void }) {
</div>
<Dialog
open={removing !== null}
- title={`Remove ${removing?.name ?? ''}?`}
- message={removing ? (removing.isSkill ? 'Bots stop using this skill.' : 'Bots lose this connector, and the keys saved for it are deleted.') : null}
+ title={tr('Remove {name}?').replaceAll('{name}', removing?.name ?? '')}
+ message={removing ? tr(removing.isSkill ? 'Bots stop using this skill.' : 'Bots lose this connector, and the keys saved for it are deleted.') : null}
actions={removing ? [{ title: 'Remove', destructive: true, action: () => void remove(removing) }] : []}
onClose={() => setRemoving(null)}
/>
@@ -444,11 +447,12 @@ function InstalledView({ back }: { back: () => void }) {
/** A quiet "nothing here" message (replaces `ContentUnavailableView`). */
function EmptyState({ icon, title, detail }: { icon: string; title: string; detail: string }) {
+ const tr = useTr()
return (
<VStack align="center" gap={8} className="market-empty">
<Icon name={icon} size={28} color="var(--tertiary)" />
- <Text size="compactBody" weight="semibold" tone="text">{title}</Text>
- <Text size="compactSecondary" tone="secondary">{detail}</Text>
+ <Text size="compactBody" weight="semibold" tone="text">{tr(title)}</Text>
+ <Text size="compactSecondary" tone="secondary">{tr(detail)}</Text>
</VStack>
)
}
diff --git a/apps/desktop/src/renderer/views/marketplace/SetupTerminal.tsx b/apps/desktop/src/renderer/views/marketplace/SetupTerminal.tsx
index 3c4fa641..c500d7da 100644
--- a/apps/desktop/src/renderer/views/marketplace/SetupTerminal.tsx
+++ b/apps/desktop/src/renderer/views/marketplace/SetupTerminal.tsx
@@ -14,6 +14,8 @@ import { useStore } from '../../store/context'
import type { Backend } from '@shared/models'
import { errorText, market, type AuthMethod, type SetupStep } from './market-models'
import { ScreenHeader } from './pieces'
+import { useTr } from '../../lib/use-language'
+
const openLink = (uri: string) => {
if (/^https?:/i.test(uri)) window.codync.app.openExternal(uri)
@@ -32,6 +34,7 @@ export function SetupTerminalView({ backend, step, method, back }: {
/** Back to the agent's sheet (the terminal is a step inside it). */
back: () => void
}) {
+ const tr = useTr()
const store = useStore()
const surface = useRef<HTMLDivElement>(null)
const [exitCode, setExitCode] = useState<number | null>(null)
@@ -181,7 +184,7 @@ export function SetupTerminalView({ backend, step, method, back }: {
) : exitCode !== null ? (
<>
<Icon name={exitCode === 0 ? 'checkmark.circle.fill' : 'exclamationmark.circle.fill'} size={10} color={exitCode === 0 ? 'var(--added)' : 'var(--warning)'} />
- <Text tone="secondary" lines={2}>{exitCode === 0 ? 'Finished.' : `Ended with an error (${exitCode}).`}</Text>
+ <Text tone="secondary" lines={2}>{exitCode === 0 ? tr(`Finished.`) : `Ended with an error (${exitCode}).`}</Text>
</>
) : (
<>
diff --git a/apps/desktop/src/renderer/views/marketplace/SkillSheet.tsx b/apps/desktop/src/renderer/views/marketplace/SkillSheet.tsx
index 42c98aad..3bb38c05 100644
--- a/apps/desktop/src/renderer/views/marketplace/SkillSheet.tsx
+++ b/apps/desktop/src/renderer/views/marketplace/SkillSheet.tsx
@@ -8,12 +8,15 @@ import { MarkdownText } from '../thread/Markdown'
import { errorText, market } from './market-models'
import { ErrorText } from './pieces'
import { usePlugins } from './plugins'
+import { useTr } from '../../lib/use-language'
+
/** The skill a details sheet shows: an installed one (`id`) or one from the catalog (`source`). */
export type SkillRef = { name: string; description: string } & ({ id: string; source?: never; installed?: never } | { source: string; installed?: boolean; id?: never })
/** A skill's details (kit `SkillSheet`): what it tells the bot, its `SKILL.md`, with Add while it isn't installed. */
export function SkillSheet({ skill }: { skill: SkillRef }) {
+ const tr = useTr()
const store = useStore()
const plugins = usePlugins(store)
const [markdown, setMarkdown] = useState<string | null>(null)
@@ -62,7 +65,7 @@ export function SkillSheet({ skill }: { skill: SkillRef }) {
</CardSection>
) : null}
<CardSection title="Instructions" footer={added ? 'Bots read these before using the skill.' : 'Add it to let bots use these instructions.'}>
- {markdown ? <MarkdownText text={markdown} /> : markdown === '' ? <Text tone="secondary">No instructions.</Text> : error ? null : <Spinner />}
+ {markdown ? <MarkdownText text={markdown} /> : markdown === '' ? <Text tone="secondary">{tr(`No instructions.`)}</Text> : error ? null : <Spinner />}
</CardSection>
{error ? <CardSection><ErrorText text={error} /></CardSection> : null}
</CardForm>
diff --git a/apps/desktop/src/renderer/views/marketplace/pieces.tsx b/apps/desktop/src/renderer/views/marketplace/pieces.tsx
index d05c2ef9..712835ee 100644
--- a/apps/desktop/src/renderer/views/marketplace/pieces.tsx
+++ b/apps/desktop/src/renderer/views/marketplace/pieces.tsx
@@ -4,6 +4,7 @@ import { Sheet, usePresence } from '../../components/Overlay'
import { Icon } from '../../components/Icon'
import { HStack, Spacer, VStack } from '../../components/Stack'
import { Text } from '../../components/Text'
+import { useTr } from '../../lib/use-language'
import { ThinkingOrb } from '../../components/ThinkingOrb'
import './marketplace.css'
@@ -34,6 +35,8 @@ export function MarketRow({ title, subtitle, added, busy = false, addLabel = 'Ad
/** The whole row opens the item's details; without it the row does what its button does. */
onOpen?: () => void
}) {
+ const tr = useTr()
+ const addedLabel = tr('Added')
return (
<ItemRow
title={title}
@@ -45,7 +48,7 @@ export function MarketRow({ title, subtitle, added, busy = false, addLabel = 'Ad
<ThinkingOrb size={18} color="var(--secondary)" />
</HStack>
) : added ? (
- <HStack as="span" align="stretch" justify="center" className="market-row-status market-row-added" aria-label="Added" title="Added">
+ <HStack as="span" align="stretch" justify="center" className="market-row-status market-row-added" aria-label={addedLabel} title={addedLabel}>
<Icon name="checkmark" size={11} weight="semibold" />
</HStack>
) : (
@@ -56,7 +59,7 @@ export function MarketRow({ title, subtitle, added, busy = false, addLabel = 'Ad
onAdd()
}}
>
- {addLabel}
+ {tr(addLabel)}
</button>
)}
/>
@@ -189,18 +192,20 @@ export function SkillGlyph() {
/** Text that opens a web page (replaces the system `Link`). */
export function WebLink({ title, url, className }: { title: string; url: string; className?: string }) {
+ const tr = useTr()
return (
<button className={`plain-link${className ? ` ${className}` : ''}`} title={url} onClick={() => window.codync.app.openExternal(url)}>
- {title}
+ {tr(title)}
</button>
)
}
/** A full screen's top bar (kit `ScreenHeader`): back on the leading side, centered title, trailing. */
export function ScreenHeader({ title, onBack, trailing }: { title: string; onBack: () => void; trailing?: ReactNode }) {
+ const tr = useTr()
return (
<HStack gap={6} className="market-screen-header">
- <Text as="div" size="compactBody" weight="semibold" tone="text" truncate className="market-screen-title">{title}</Text>
+ <Text as="div" size="compactBody" weight="semibold" tone="text" truncate className="market-screen-title">{tr(title)}</Text>
<IconButton title="Back" icon="chevron.left" onClick={onBack} />
<Spacer min={8} />
{trailing}
@@ -235,14 +240,17 @@ export function Field({ value, onChange, placeholder, secret = false, lines, mon
mono?: boolean
label?: string
}) {
+ const tr = useTr()
+ const hint = placeholder ? tr(placeholder) : undefined
+ const named = label ? tr(label) : hint
const className = `market-field${mono ? ' mono' : ''}`
if (lines) {
return (
<textarea
className={className}
- aria-label={label ?? placeholder}
+ aria-label={named}
value={value}
- placeholder={placeholder}
+ placeholder={hint}
spellCheck={false}
onChange={(e) => onChange(e.target.value)}
style={{ minHeight: `${lines[0] * 1.3}em`, maxHeight: `${lines[1] * 1.3}em` }}
@@ -252,10 +260,10 @@ export function Field({ value, onChange, placeholder, secret = false, lines, mon
return (
<input
className={className}
- aria-label={label ?? placeholder}
+ aria-label={named}
type={secret ? 'password' : 'text'}
value={value}
- placeholder={placeholder}
+ placeholder={hint}
spellCheck={false}
autoComplete="off"
onChange={(e) => onChange(e.target.value)}
diff --git a/apps/desktop/src/renderer/views/routines/RoutineEditorView.tsx b/apps/desktop/src/renderer/views/routines/RoutineEditorView.tsx
index f1898eca..530d8a6b 100644
--- a/apps/desktop/src/renderer/views/routines/RoutineEditorView.tsx
+++ b/apps/desktop/src/renderer/views/routines/RoutineEditorView.tsx
@@ -11,6 +11,8 @@ import { LabeledRow, RoutineScheduleFields } from './RoutineScheduleFields'
import { RoutineWebhookPanel } from './RoutineWebhookPanel'
import { currentZone } from './time-zones'
import './routines.css'
+import { useTr } from '../../lib/use-language'
+
const saveShortcut = window.codync.platform === 'darwin' ? '⌘S' : 'Ctrl+S'
@@ -20,6 +22,7 @@ export function RoutineEditorView({ botId, routine, saved }: {
/** Called after a save (the routine) or a delete (null). */
saved: (routine: Routine | null) => void
}) {
+ const tr = useTr()
const store = useStore()
const [name, setName] = useState(routine?.name ?? '')
const [instruction, setInstruction] = useState(routine?.instruction ?? '')
@@ -164,7 +167,7 @@ export function RoutineEditorView({ botId, routine, saved }: {
</VStack>
<VStack gap={10}>
<HStack gap={12}>
- <Text tone="text" grow>When to run</Text>
+ <Text tone="text" grow>{tr(`When to run`)}</Text>
<SegmentedChoice selection={schedule.kind} options={options} onChange={(kind) => update({ kind })} />
</HStack>
{loaded ? (
@@ -190,7 +193,7 @@ export function RoutineEditorView({ botId, routine, saved }: {
<CardSection footer="A run is stopped after this long. 1 second to 24 hours.">
<LabeledRow label="Timeout">
<input className="schedule-input routine-timeout" aria-label="Timeout in seconds" value={timeout} placeholder="3600" onChange={(e) => setTimeoutText(e.target.value)} />
- <Text size="callout" tone="secondary">seconds</Text>
+ <Text size="callout" tone="secondary">{tr(`seconds`)}</Text>
</LabeledRow>
</CardSection>
</div>
@@ -253,8 +256,8 @@ export function RoutineEditorView({ botId, routine, saved }: {
<Dialog
open={confirmDelete}
- title="Delete routine?"
- message="This deletes the routine and stops its future runs. This can't be undone."
+ title={tr('Delete routine?')}
+ message={tr("This deletes the routine and stops its future runs. This can't be undone.")}
actions={[
{
title: 'Delete routine',
diff --git a/apps/desktop/src/renderer/views/routines/RoutineScheduleFields.tsx b/apps/desktop/src/renderer/views/routines/RoutineScheduleFields.tsx
index 1a00f5a4..d49101a8 100644
--- a/apps/desktop/src/renderer/views/routines/RoutineScheduleFields.tsx
+++ b/apps/desktop/src/renderer/views/routines/RoutineScheduleFields.tsx
@@ -5,6 +5,8 @@ import { Text } from '../../components/Text'
import { TimeZonePicker } from './TimeZonePicker'
import { compiledCron, repeatChoice, repeatChoices, type RepeatChoice, type RoutineScheduleDraft, type RoutineSchedulePreview } from './routine'
import './routines.css'
+import { useTr } from '../../lib/use-language'
+
const weekdays = [
{ id: 1, label: 'Mon', title: 'Monday' },
@@ -29,6 +31,7 @@ export function RoutineScheduleFields({ schedule, update, preview, error }: {
preview: RoutineSchedulePreview | null
error: string | null
}) {
+ const tr = useTr()
const repeat = repeatChoice(schedule.calendarStyle)
// Custom starts from the host's cron for the choice it replaces; empty while that check is
// still out, never the cron the routine opened with.
@@ -62,7 +65,7 @@ export function RoutineScheduleFields({ schedule, update, preview, error }: {
autoCorrect="off"
onChange={(e) => update({ expression: e.target.value })}
/>
- <Text size="caption" mono tone="tertiary" className="routine-cron-hint">minute hour day month weekday</Text>
+ <Text size="caption" mono tone="tertiary" className="routine-cron-hint">{tr(`minute hour day month weekday`)}</Text>
</VStack>
</LabeledRow>
) : (
@@ -98,6 +101,7 @@ export function LabeledRow({ label, top = false, className, children }: { label:
/** One quiet line under the group: what the host read, or why it can't. */
function SchedulePreview({ preview, error }: { preview: RoutineSchedulePreview | null; error: string | null }) {
+ const tr = useTr()
if (error) return <Text size="callout" tone="danger" className="schedule-preview">{error}</Text>
return (
<VStack gap={2} className="schedule-preview" aria-live="polite">
@@ -107,7 +111,7 @@ function SchedulePreview({ preview, error }: { preview: RoutineSchedulePreview |
<Text size="callout" weight="medium" tone="text">{preview.summary}</Text>
{preview.nextRunAt ? (
<Text size="callout" tone="secondary">
- Next {new Date(preview.nextRunAt).toLocaleString(undefined, { dateStyle: 'medium', timeStyle: 'short' })}
+ {tr('Next')} {new Date(preview.nextRunAt).toLocaleString(undefined, { dateStyle: 'medium', timeStyle: 'short' })}
</Text>
) : null}
</HStack>
diff --git a/apps/desktop/src/renderer/views/routines/RoutineWebhookPanel.tsx b/apps/desktop/src/renderer/views/routines/RoutineWebhookPanel.tsx
index c1c10ceb..314c7c11 100644
--- a/apps/desktop/src/renderer/views/routines/RoutineWebhookPanel.tsx
+++ b/apps/desktop/src/renderer/views/routines/RoutineWebhookPanel.tsx
@@ -7,9 +7,12 @@ import { useStore } from '../../store/context'
import { errorText, type RoutineWebhook } from './routine'
import { LabeledRow } from './RoutineScheduleFields'
import './routines.css'
+import { useTr } from '../../lib/use-language'
+
/** A saved webhook routine's address and key: copy either, reveal or replace the key. */
export function RoutineWebhookPanel({ botId, routineId }: { botId: string; routineId: string }) {
+ const tr = useTr()
const store = useStore()
const [webhook, setWebhook] = useState<RoutineWebhook | null>(null)
const [error, setError] = useState<string | null>(null)
@@ -82,12 +85,12 @@ export function RoutineWebhookPanel({ botId, routineId }: { botId: string; routi
) : error ? (
<Text size="caption" tone="danger" className="routine-caption">{error}</Text>
) : (
- <Text size="caption" tone="secondary" className="routine-caption">Loading webhook…</Text>
+ <Text size="caption" tone="secondary" className="routine-caption">{tr(`Loading webhook…`)}</Text>
)}
<Dialog
open={confirmRotate}
- title="Replace the key?"
- message="Senders using the current key stop working until they get the new one."
+ title={tr('Replace the key?')}
+ message={tr('Senders using the current key stop working until they get the new one.')}
actions={[{ title: 'Replace key', destructive: true, action: () => void load(true) }]}
onClose={() => setConfirmRotate(false)}
/>
diff --git a/apps/desktop/src/renderer/views/routines/RoutinesView.tsx b/apps/desktop/src/renderer/views/routines/RoutinesView.tsx
index 2af64e38..18a5a331 100644
--- a/apps/desktop/src/renderer/views/routines/RoutinesView.tsx
+++ b/apps/desktop/src/renderer/views/routines/RoutinesView.tsx
@@ -8,6 +8,8 @@ import { useStore } from '../../store/context'
import { errorText, isActiveRun, runLabel, type Routine, type RoutineListing, type RoutineRun } from './routine'
import { RoutineEditorView } from './RoutineEditorView'
import './routines.css'
+import { useTr } from '../../lib/use-language'
+
/** The open editor: on a routine, or (`routineId` null) setting up a new one. `id` is one per opening. */
interface EditorTarget {
@@ -17,6 +19,7 @@ interface EditorTarget {
/** The routine list in the details panel (and the routines sheet); a row opens its editor. */
export function RoutinesView({ botId, initialId, onClose }: { botId: string; initialId: string | null; onClose?: () => void }) {
+ const tr = useTr()
const store = useStore()
const [routines, setRoutines] = useState<Routine[]>([])
const [runs, setRuns] = useState<RoutineRun[]>([])
@@ -106,7 +109,7 @@ export function RoutinesView({ botId, initialId, onClose }: { botId: string; ini
return (
<VStack gap={onClose ? 16 : 10} className="routines">
<HStack>
- <Text size="body" weight="semibold" className="routines-title">Routines</Text>
+ <Text size="body" weight="semibold" className="routines-title">{tr(`Routines`)}</Text>
<Spacer />
<IconButton title="Ask the bot for a routine" icon="text.bubble" disabled={store.isOffline} onClick={() => {
store.setRoutineDraft(botId, 'I want a routine that ')
@@ -119,7 +122,7 @@ export function RoutinesView({ botId, initialId, onClose }: { botId: string; ini
{error ? <Text size="caption" tone="danger" className="routines-error">{error}</Text> : null}
{routines.length === 0 ? (
<Text as="div" size="callout" tone="secondary" className="outlined-card routines-empty">
- {loaded ? 'No routines yet. Ask the bot for one, or set it up yourself with +.' : 'Loading routines…'}
+ {loaded ? tr(`No routines yet. Ask the bot for one, or set it up yourself with +.`) : tr(`Loading routines…`)}
</Text>
) : (
<VStack gap={8}>
diff --git a/apps/desktop/src/renderer/views/settings/AnalyticsSheet.tsx b/apps/desktop/src/renderer/views/settings/AnalyticsSheet.tsx
index fccca9c3..adf4de5b 100644
--- a/apps/desktop/src/renderer/views/settings/AnalyticsSheet.tsx
+++ b/apps/desktop/src/renderer/views/settings/AnalyticsSheet.tsx
@@ -3,6 +3,7 @@ import { Icon } from '../../components/Icon'
import { ModalHeader, SheetPage } from '../../components/Overlay'
import { HStack, IconSlot, VStack } from '../../components/Stack'
import { Text } from '../../components/Text'
+import { useTr } from '../../lib/use-language'
import { openLink } from '../../store/analytics'
const PRIVACY_POLICY = 'https://codync.dev/privacy'
@@ -20,18 +21,19 @@ const details = [
/** Settings → Privacy's info button: everything Share usage analytics covers. */
export function AnalyticsSheet() {
+ const tr = useTr()
return (
<SheetPage>
- <ModalHeader icon="chart.bar" title="Usage analytics" />
+ <ModalHeader icon="chart.bar" title={tr(`Usage analytics`)} />
<CardForm>
<CardSection
footer={
<>
- See the{' '}
+ {tr('See the')}{' '}
<button className="settings-link" onClick={() => openLink(PRIVACY_POLICY, 'privacy')}>
- Privacy Policy
+ {tr('Privacy Policy')}
</button>{' '}
- for details.
+ {tr('for details.')}
</>
}
>
@@ -41,8 +43,8 @@ export function AnalyticsSheet() {
<Icon name={d.icon} size={15} color="var(--secondary)" />
</IconSlot>
<VStack gap={2} grow className="settings-stack">
- <span>{d.title}</span>
- <Text size="footnote" tone="secondary">{d.detail}</Text>
+ <span>{tr(d.title)}</span>
+ <Text size="footnote" tone="secondary">{tr(d.detail)}</Text>
</VStack>
</HStack>
))}
diff --git a/apps/desktop/src/renderer/views/settings/ApprovalSheet.tsx b/apps/desktop/src/renderer/views/settings/ApprovalSheet.tsx
index 444dbd60..6694f485 100644
--- a/apps/desktop/src/renderer/views/settings/ApprovalSheet.tsx
+++ b/apps/desktop/src/renderer/views/settings/ApprovalSheet.tsx
@@ -7,6 +7,8 @@ import { Text } from '../../components/Text'
import type { Approval } from '../../store/app-model'
import { useApp } from '../../store/context'
import { deviceIcon, errorText, Reveal, spacedCode } from './parts'
+import { useTr } from '../../lib/use-language'
+
/**
* A device asks for access through the account (spec §4.2 B). The code is the only thing that
@@ -14,6 +16,7 @@ import { deviceIcon, errorText, Reveal, spacedCode } from './parts'
* Closing puts the request off (the sheet's onClose defers it).
*/
export function ApprovalSheet({ approval }: { approval: Approval }) {
+ const tr = useTr()
const app = useApp()
const [busy, setBusy] = useState(false)
const [error, setError] = useState<string | null>(null)
@@ -34,7 +37,7 @@ export function ApprovalSheet({ approval }: { approval: Approval }) {
return (
<VStack className="settings-approval">
- <ModalHeader icon="lock.shield" title="Access request" />
+ <ModalHeader icon="lock.shield" title={tr(`Access request`)} />
<VStack align="center" gap={16} className="settings-approval-body">
<Icon name={deviceIcon(request.platform)} size={40} weight="light" color="var(--secondary)" />
<VStack align="center" gap={4}>
diff --git a/apps/desktop/src/renderer/views/settings/AuthorizedDevicesSection.tsx b/apps/desktop/src/renderer/views/settings/AuthorizedDevicesSection.tsx
index 88e05579..5ab599ac 100644
--- a/apps/desktop/src/renderer/views/settings/AuthorizedDevicesSection.tsx
+++ b/apps/desktop/src/renderer/views/settings/AuthorizedDevicesSection.tsx
@@ -8,9 +8,12 @@ import { Text } from '../../components/Text'
import { useModel } from '../../lib/observable'
import type { BotStore } from '../../store/bot-store'
import { deviceIcon, errorText, liveClient, relativeDay } from './parts'
+import { useTr } from '../../lib/use-language'
+
/** The devices that can use a computer this app manages, each one revocable. */
export function AuthorizedDevicesSection({ store }: { store: BotStore }) {
+ const tr = useTr()
useModel(store)
const [devices, setDevices] = useState<AuthorizedDevice[] | { error: string } | null>(null)
const [confirmRevoke, setConfirmRevoke] = useState<AuthorizedDevice | null>(null)
@@ -41,14 +44,14 @@ export function AuthorizedDevicesSection({ store }: { store: BotStore }) {
return (
<>
- <CardSection title={`Devices that can use ${name}`}>
+ <CardSection title={tr('Devices that can use {name}').replaceAll('{name}', name)}>
{devices === null
? [<Spinner key="loading" />]
: 'error' in devices
? [<Text key="error" tone="danger" className="settings-appear">{devices.error}</Text>]
: [
...(devices.length === 0
- ? [<Text key="none" tone="secondary">None yet. Pair an iPhone, or approve one from your account.</Text>]
+ ? [<Text key="none" tone="secondary">{tr(`None yet. Pair an iPhone, or approve one from your account.`)}</Text>]
: []),
...devices.map((device) => (
<HStack key={device.key} gap={8} className="settings-row settings-appear">
@@ -57,7 +60,7 @@ export function AuthorizedDevicesSection({ store }: { store: BotStore }) {
</IconSlot>
<VStack grow className="settings-stack">
<span>{device.name}</span>
- <Text size="caption" tone="tertiary">{deviceDetail(device)}</Text>
+ <Text size="caption" tone="tertiary">{deviceDetail(device, tr)}</Text>
</VStack>
<IconButton title="Revoke access" icon="xmark.circle" onClick={() => setConfirmRevoke(device)} />
</HStack>
@@ -66,8 +69,8 @@ export function AuthorizedDevicesSection({ store }: { store: BotStore }) {
</CardSection>
<Dialog
open={confirmRevoke !== null}
- title={`Revoke ${confirmRevoke?.name ?? 'device'}?`}
- message="It disconnects right away and has to pair or ask again."
+ title={tr('Revoke {name}?').replaceAll('{name}', confirmRevoke?.name ?? 'device')}
+ message={tr('It disconnects right away and has to pair or ask again.')}
actions={confirmRevoke ? [{ title: 'Revoke access', destructive: true, action: () => void revoke(confirmRevoke) }] : []}
onClose={() => setConfirmRevoke(null)}
/>
@@ -75,9 +78,10 @@ export function AuthorizedDevicesSection({ store }: { store: BotStore }) {
)
}
-function deviceDetail(device: AuthorizedDevice) {
- const parts = [device.source === 'account' ? 'Approved through the account' : 'Paired with a QR code']
- if (device.connected) parts.push('connected')
- else if (device.lastSeenAt) parts.push(`seen ${relativeDay(new Date(device.lastSeenAt))}`)
- return parts.join(' · ')
+function deviceDetail(device: AuthorizedDevice, tr: (text: string) => string) {
+ const paired = device.source === 'account' ? 'Approved through the account' : 'Paired with a QR code'
+ if (device.connected) return tr(`${paired} · connected`)
+ if (!device.lastSeenAt) return tr(paired)
+ const when = relativeDay(new Date(device.lastSeenAt))
+ return tr(`${paired} · seen {when}`).replaceAll('{when}', when === 'Yesterday' ? tr('Yesterday') : when)
}
diff --git a/apps/desktop/src/renderer/views/settings/ComputersView.tsx b/apps/desktop/src/renderer/views/settings/ComputersView.tsx
index 8cfb8ff3..9afa0db6 100644
--- a/apps/desktop/src/renderer/views/settings/ComputersView.tsx
+++ b/apps/desktop/src/renderer/views/settings/ComputersView.tsx
@@ -14,6 +14,7 @@ import { StoreContext, useApp } from '../../store/context'
import { ComputerBadge } from '../ComputerBadge'
import { PairingCode } from '../PairingCode'
import { AuthorizedDevicesSection } from './AuthorizedDevicesSection'
+import { useTr } from '../../lib/use-language'
import { errorText, liveClient, relativeDay, Reveal, SectionHeader, statusText, thisMac } from './parts'
import { useSSH } from './ssh-model'
import { SSHRow } from './SSHRow'
@@ -24,6 +25,7 @@ import { VoiceChatSettingsView } from './VoiceChatSettingsView'
* SSH profiles; and the account's other computers.
*/
export function ComputersView() {
+ const tr = useTr()
const app = useApp()
const account = useAccount()
const sshState = useSSH()
@@ -47,7 +49,7 @@ export function ComputersView() {
</SectionHeader>
<Reveal show={sshState.state.profiles.length === 0}>
<Text as="div" size="callout" tone="secondary">
- Run bots on another computer you reach with SSH. It needs codync-host installed; your SSH keys stay on {thisMac}.
+ {tr('Run bots on another computer you reach with SSH. It needs codync-host installed; your SSH keys stay on {name}.').replaceAll('{name}', tr(thisMac))}
</Text>
</Reveal>
{sshState.state.profiles.map((profile) => (
@@ -60,9 +62,9 @@ export function ComputersView() {
{account.isSignedIn ? <IconButton title="Refresh" icon="arrow.clockwise" onClick={() => void cloud.refresh()} /> : null}
</SectionHeader>
{!account.isSignedIn ? (
- <Text as="div" size="callout" tone="secondary">Sign in to see the other computers in your account.</Text>
+ <Text as="div" size="callout" tone="secondary">{tr(`Sign in to see the other computers in your account.`)}</Text>
) : others.length === 0 ? (
- <Text as="div" size="callout" tone="secondary">No other computers in your account yet.</Text>
+ <Text as="div" size="callout" tone="secondary">{tr(`No other computers in your account yet.`)}</Text>
) : null}
{others.map((computer) => (
<AccountComputerRow key={computer.computerId} computer={computer} olderCopy={cloud.isOlderCopy(computer)} onRemove={() => setRemovingCopy(computer)} />
@@ -75,8 +77,8 @@ export function ComputersView() {
</Sheet>
<Dialog
open={removingCopy !== null}
- title={`Remove the older ${removingCopy?.name ?? 'computer'}?`}
- message={`It's an earlier identity of ${removingCopy?.name ?? 'a computer'} and can't be reached anymore. Removing it only cleans up your account.`}
+ title={tr('Remove the older {name}?').replaceAll('{name}', removingCopy?.name ?? 'computer')}
+ message={tr("It's an earlier identity of {name} and can't be reached anymore. Removing it only cleans up your account.").replaceAll('{name}', removingCopy?.name ?? 'a computer')}
actions={removingCopy ? [{ title: 'Remove', destructive: true, action: () => void cloud.removeFromAccount(removingCopy.computerId) }] : []}
onClose={() => setRemovingCopy(null)}
/>
@@ -88,6 +90,7 @@ const isMacLabel = thisMac === 'this Mac' ? 'This Mac' : 'This computer'
/** This computer or an SSH computer: relay, account membership, pairing and authorized devices. */
function ManagedComputerCard({ store, ssh: overSSH }: { store: BotStore; ssh: boolean }) {
+ const tr = useTr()
const app = useApp()
const account = useAccount()
useModel(store)
@@ -119,8 +122,8 @@ function ManagedComputerCard({ store, ssh: overSSH }: { store: BotStore; ssh: bo
})
const cloudLine = !cloud?.enabled
- ? 'Off: only Wi-Fi and Tailscale reach it, nothing goes through Cloudflare.'
- : (cloud.lastError ?? (cloud.connected ? 'Reachable from anywhere through Cloudflare (encrypted).' : 'Connecting to Cloudflare…'))
+ ? tr('Off: only Wi-Fi and Tailscale reach it, nothing goes through Cloudflare.')
+ : (cloud.lastError ?? tr(cloud.connected ? 'Reachable from anywhere through Cloudflare (encrypted).' : 'Connecting to Cloudflare…'))
const accountLine = (
<HStack key="account" gap={8} className="settings-row settings-appear">
@@ -128,11 +131,11 @@ function ManagedComputerCard({ store, ssh: overSSH }: { store: BotStore; ssh: bo
<Text size="callout" grow>
{owner
? owner.userId === account.user?.userId
- ? 'In your account'
- : `In ${owner.email ?? 'another'} account`
+ ? tr(`In your account`)
+ : tr('In {name} account').replaceAll('{name}', owner.email ?? tr('another'))
: account.isSignedIn
- ? 'Not in your account'
- : 'Sign in to add it to your account'}
+ ? tr(`Not in your account`)
+ : tr(`Sign in to add it to your account`)}
</Text>
{owner ? (
<Button kind="secondary" onClick={() => setConfirmUnclaim(true)} disabled={busy || !manageable}>
@@ -155,7 +158,7 @@ function ManagedComputerCard({ store, ssh: overSSH }: { store: BotStore; ssh: bo
<VStack grow className="settings-stack">
<Text size="headline">{name}</Text>
<Text size="caption" tone="secondary">
- {overSSH ? 'Over SSH' : isMacLabel} · {statusText(store)}
+ {`${tr(overSSH ? 'Over SSH' : isMacLabel)} · ${tr(statusText(store))}`}
</Text>
</VStack>
{overSSH ? (
@@ -169,7 +172,7 @@ function ManagedComputerCard({ store, ssh: overSSH }: { store: BotStore; ssh: bo
? [
<Switch key="cloud" className="settings-appear" on={cloud.enabled} disabled={busy || !manageable} onChange={(on) => run(() => app.cloud.setCloud(store, on))}>
<span className="settings-stack">
- <span>Reach from anywhere</span>
+ <Text>{tr(`Reach from anywhere`)}</Text>
<Text size="caption" tone={cloud.lastError ? 'attention' : 'secondary'}>{cloudLine}</Text>
</span>
</Switch>,
@@ -185,9 +188,9 @@ function ManagedComputerCard({ store, ssh: overSSH }: { store: BotStore; ssh: bo
onChange={(on) => (on ? setConfirmAutoApproval(true) : setApproval('code'))}
>
<span className="settings-stack settings-appear">
- <span>Skip the 6-digit check</span>
+ <Text>{tr(`Skip the 6-digit check`)}</Text>
<Text size="caption" tone={autoApproval ? 'attention' : 'secondary'}>
- {autoApproval ? 'Devices on your account get in on their own.' : 'Each new device shows a code you approve here.'}
+ {autoApproval ? tr(`Devices on your account get in on their own.`) : tr(`Each new device shows a code you approve here.`)}
</Text>
</span>
</Switch>,
@@ -204,20 +207,20 @@ function ManagedComputerCard({ store, ssh: overSSH }: { store: BotStore; ssh: bo
</StoreContext.Provider>
</Sheet>
<Sheet open={showPairing} onClose={() => setShowPairing(false)} width={340}>
- <ModalHeader icon="qrcode" title={`Pair iPhone with ${name}`} />
+ <ModalHeader icon="qrcode" title={tr('Pair iPhone with {name}').replaceAll('{name}', name)} />
<PairingPanel store={store} />
</Sheet>
<Dialog
open={confirmAutoApproval}
- title="Let account devices in without a code?"
- message={`Any device signed in to your account gets full control of ${name}: its files, terminals and bots, with no check here. If someone gets into your account, or Codync's cloud is ever compromised, they could add their own device and you'd have no chance to stop it. Devices paired with a QR code aren't affected.`}
+ title={tr('Let account devices in without a code?')}
+ message={tr("Any device signed in to your account gets full control of {name}: its files, terminals and bots, with no check here. If someone gets into your account, or Codync's cloud is ever compromised, they could add their own device and you'd have no chance to stop it. Devices paired with a QR code aren't affected.").replaceAll('{name}', name)}
actions={[{ title: 'Skip the check', destructive: true, action: () => setApproval('auto') }]}
onClose={() => setConfirmAutoApproval(false)}
/>
<Dialog
open={confirmUnclaim}
- title={`Remove ${name} from the account?`}
- message="Devices that were approved through the account lose access. Devices paired with a QR code keep it."
+ title={tr('Remove {name} from the account?').replaceAll('{name}', name)}
+ message={tr('Devices that were approved through the account lose access. Devices paired with a QR code keep it.')}
actions={[{ title: 'Remove from account', destructive: true, action: () => run(() => app.cloud.unclaim(store)) }]}
onClose={() => setConfirmUnclaim(false)}
/>
@@ -227,6 +230,7 @@ function ManagedComputerCard({ store, ssh: overSSH }: { store: BotStore; ssh: bo
/** An account computer this app isn't authorized on, or one it uses under an earlier identity (`olderCopy`). */
function AccountComputerRow({ computer, olderCopy, onRemove }: { computer: CloudComputer; olderCopy: boolean; onRemove: () => void }) {
+ const tr = useTr()
return (
<div className="settings-card settings-appear">
<div className="settings-row">
@@ -235,7 +239,7 @@ function AccountComputerRow({ computer, olderCopy, onRemove }: { computer: Cloud
</span>
<div className="settings-stack">
<Text size="callout" weight="medium" tone={olderCopy ? 'secondary' : undefined}>{computer.name}</Text>
- <Text size="caption" tone={olderCopy ? 'tertiary' : 'secondary'}>{accountComputerStatus(computer, olderCopy)}</Text>
+ <Text size="caption" tone={olderCopy ? 'tertiary' : 'secondary'}>{tr(accountComputerStatus(computer, olderCopy))}</Text>
</div>
<Spacer />
{olderCopy ? <IconButton title="Remove from account" icon="trash" onClick={onRemove} /> : null}
@@ -265,6 +269,7 @@ function PairingPanel({ store }: { store: BotStore }) {
/** Add or change an SSH computer. Only fields ssh takes as separate arguments; nothing goes through a shell. */
function SSHProfileEditor({ profile: initial, isNew }: { profile: SSHProfile; isNew: boolean }) {
+ const tr = useTr()
const dismiss = useDismiss()
const [profile, setProfile] = useState(initial)
const [port, setPort] = useState(initial.port?.toString() ?? '')
@@ -313,7 +318,7 @@ function SSHProfileEditor({ profile: initial, isNew }: { profile: SSHProfile; is
<div className="settings-row">
<span>Key</span>
<Spacer />
- <Text tone="secondary">{profile.identityFile?.split('/').pop() ?? 'ssh-agent / SSH config'}</Text>
+ <Text tone="secondary">{profile.identityFile?.split('/').pop() ?? tr(`ssh-agent / SSH config`)}</Text>
<IconButton
title="Choose key file"
icon="key"
@@ -328,7 +333,7 @@ function SSHProfileEditor({ profile: initial, isNew }: { profile: SSHProfile; is
{field('Codync port', remotePort, setRemotePort, '')}
</CardSection>
<Text size="caption" tone="secondary">
- Codync opens an SSH tunnel to codync-host on that computer's loopback. It uses your SSH config and ssh-agent; agent forwarding stays off.
+ {tr(`Codync opens an SSH tunnel to codync-host on that computer's loopback. It uses your SSH config and ssh-agent; agent forwarding stays off.`)}
</Text>
<Reveal show={problem !== null}>
<Text size="caption" tone="danger">{problem}</Text>
diff --git a/apps/desktop/src/renderer/views/settings/SettingsView.tsx b/apps/desktop/src/renderer/views/settings/SettingsView.tsx
index 1e1d9a6b..7326c9b9 100644
--- a/apps/desktop/src/renderer/views/settings/SettingsView.tsx
+++ b/apps/desktop/src/renderer/views/settings/SettingsView.tsx
@@ -9,6 +9,8 @@ import { useDismiss } from '../../components/Overlay'
import { HStack, IconSlot, VStack } from '../../components/Stack'
import { Text } from '../../components/Text'
import { useModel } from '../../lib/observable'
+import { languageTitle, systemScript, type AppLanguage } from '../../lib/l10n'
+import { useTr } from '../../lib/use-language'
import { DEFAULT_TEXT_SIZE, prefs, TEXT_SIZES, usePref } from '../../lib/prefs'
import { useAccount } from '../../store/account'
import { useScreenViewed } from '../../store/analytics'
@@ -44,6 +46,7 @@ export function SettingsView({ page: initial }: { page: SettingsPage }) {
const [page, setPage] = useState(initial)
const app = useApp()
const dismiss = useDismiss()
+ const tr = useTr()
const current = pages.find((p) => p.id === page)!
useScreenViewed(pageScreens[page])
return (
@@ -51,13 +54,13 @@ export function SettingsView({ page: initial }: { page: SettingsPage }) {
<nav className="settings-sidebar">
{['Personal', thisComputer].map((group) => (
<Fragment key={group}>
- <div className="settings-group">{group}</div>
+ <div className="settings-group">{tr(group)}</div>
{pages.filter((p) => p.group === group).map((item) => (
<button key={item.id} className={`settings-item ${item.id === page ? 'selected' : ''}`} aria-current={item.id === page ? 'page' : undefined} onClick={() => setPage(item.id)}>
<IconSlot width={18} tone="secondary">
<Icon name={item.icon} size={13} />
</IconSlot>
- <Text truncate grow>{item.label ?? item.title}</Text>
+ <Text truncate grow>{tr(item.label ?? item.title)}</Text>
{item.id === 'computers' && app.approvals.length > 0 ? (
<Text size="caption" weight="semibold" tone="secondary">{app.approvals.length}</Text>
) : null}
@@ -68,7 +71,7 @@ export function SettingsView({ page: initial }: { page: SettingsPage }) {
</nav>
<div className="settings-divider" />
<div className="settings-main">
- <Text as="div" size={24} weight="semibold" tone="text" className="settings-title">{current.title}</Text>
+ <Text as="div" size={24} weight="semibold" tone="text" className="settings-title">{tr(current.title)}</Text>
<div key={page} className="settings-page">
<PageContent page={page} />
</div>
@@ -81,6 +84,7 @@ export function SettingsView({ page: initial }: { page: SettingsPage }) {
}
function PageContent({ page }: { page: SettingsPage }) {
+ const tr = useTr()
const app = useApp()
switch (page) {
case 'access':
@@ -96,7 +100,7 @@ function PageContent({ page }: { page: SettingsPage }) {
</StoreContext.Provider>
) : (
<CardForm>
- <Text tone="secondary">Voice keys are kept by {thisMac}'s host, which isn't running.</Text>
+ <Text tone="secondary">{tr(isMac ? "Voice keys are kept by This Mac's host, which isn't running." : `Voice keys are kept by ${thisMac}'s host, which isn't running.`)}</Text>
</CardForm>
)
case 'usage':
@@ -116,6 +120,9 @@ function GeneralSettings() {
const [appearance, setAppearance] = useState<Appearance>('system')
useEffect(() => void window.codync.app.appearance().then(setAppearance), [])
const [textSize, setTextSize] = usePref(prefs.textSize)
+ const [language, setLanguage] = usePref(prefs.appLanguage)
+ const systemLanguage = typeof navigator === 'undefined' ? 'en' : navigator.language
+ const script = systemScript(systemLanguage)
const [usageIconStyle, setUsageIconStyle] = usePref(prefs.usageIconStyle)
const [compact, setCompact] = usePref(prefs.sidebarCompact)
const [showInDock, setShowInDock] = useState(true)
@@ -126,6 +133,7 @@ function GeneralSettings() {
useEffect(() => void window.codync.island.enabled().then(setIsland), [])
const [voiceShortcut, setVoiceShortcut] = useState<VoiceShortcut>('off')
useEffect(() => void window.codync.speech.shortcut().then(setVoiceShortcut), [])
+ const tr = useTr()
return (
<CardForm>
@@ -134,10 +142,10 @@ function GeneralSettings() {
<Icon name="person.crop.circle" size={26} color="var(--secondary)" />
<VStack grow className="settings-stack">
<Text truncate>
- {account.isSignedIn ? (account.user?.email ?? 'Signed in') : 'Not signed in'}
+ {account.isSignedIn ? (account.user?.email ?? tr(`Signed in`)) : tr(`Not signed in`)}
</Text>
<Text size="caption" tone="secondary">
- {account.isSignedIn ? 'Reach your computers from anywhere' : 'Sign in to reach your computers from anywhere'}
+ {account.isSignedIn ? tr(`Reach your computers from anywhere`) : tr(`Sign in to reach your computers from anywhere`)}
</Text>
</VStack>
{account.isSignedIn ? (
@@ -163,7 +171,7 @@ function GeneralSettings() {
<ValueRow label="Text size">
<ChoicePicker
selection={textSize}
- options={TEXT_SIZES.map((s) => ({ id: s, label: s === DEFAULT_TEXT_SIZE ? `${s} pt (Default)` : `${s} pt` }))}
+ options={TEXT_SIZES.map((s) => ({ id: s, label: s === DEFAULT_TEXT_SIZE ? tr('{size} pt (Default)').replace('{size}', String(s)) : `${s} pt` }))}
onChange={setTextSize}
/>
</ValueRow>
@@ -174,6 +182,27 @@ function GeneralSettings() {
Compact sidebar
</Switch>
</CardSection>
+ <CardSection
+ title="Language"
+ footer={
+ script === 'hant'
+ ? 'System language is Traditional Chinese. "Follow system" matches this computer. You can switch this app to Simplified Chinese or English.'
+ : script === 'hans'
+ ? 'System language is Simplified Chinese. "Follow system" matches this computer. You can switch this app to Traditional Chinese or English.'
+ : 'System language is English. "Follow system" matches this computer. You can switch this app to Simplified or Traditional Chinese.'
+ }
+ >
+ <ValueRow label="App language">
+ <ChoicePicker
+ selection={language}
+ options={(['system', 'zh', 'zh-Hant', 'en'] as const satisfies readonly AppLanguage[]).map((id) => ({
+ id,
+ label: languageTitle(id, language, systemLanguage),
+ }))}
+ onChange={setLanguage}
+ />
+ </ValueRow>
+ </CardSection>
<CardSection title="System">
{window.codync.platform === 'darwin' ? <Switch on={showInDock} onChange={(on) => void window.codync.app.setShowInDock(on).then(setShowInDock)}>Show in Dock</Switch> : null}
{window.codync.island.supported ? (
@@ -202,12 +231,13 @@ function PrivacySettings() {
const local = useModel(app.local)
const running = local !== null && local.connection.kind === 'online'
const [about, setAbout] = useState(false)
+ const tr = useTr()
const setShared = (on: boolean) => void local?.setAnalytics(on).catch((e: unknown) => app.setError(errorText(e)))
return (
<>
<CardSection title="Privacy" footer="Which features you use, never your messages, code or files. Helps us spot bugs sooner and make Codync better for you.">
<HStack gap={4}>
- <span className={running ? undefined : 'settings-off'}>Share usage analytics</span>
+ <span className={running ? undefined : 'settings-off'}>{tr('Share usage analytics')}</span>
<IconButton title="About usage analytics" icon="info.circle" onClick={() => setAbout(true)} />
<Switch on={local?.analytics === true} onChange={setShared} disabled={!running} label="Share usage analytics" className="settings-privacy-switch" />
</HStack>
@@ -221,10 +251,11 @@ function PrivacySettings() {
/** Every computer's usage limits, grouped by computer when there's more than one. */
function UsageLimitsList() {
+ const tr = useTr()
const app = useApp()
const stores = app.computers.flatMap((c) => app.store(c.id) ?? [])
const withUsage = stores.filter((s) => s.usage.providers.length > 0)
- if (withUsage.length === 0) return <Text tone="secondary">No usage information yet.</Text>
+ if (withUsage.length === 0) return <Text tone="secondary">{tr(`No usage information yet.`)}</Text>
return (
<>
{withUsage.flatMap((store) => [
diff --git a/apps/desktop/src/renderer/views/settings/UsageLimits.tsx b/apps/desktop/src/renderer/views/settings/UsageLimits.tsx
index b32c5978..d975873b 100644
--- a/apps/desktop/src/renderer/views/settings/UsageLimits.tsx
+++ b/apps/desktop/src/renderer/views/settings/UsageLimits.tsx
@@ -2,6 +2,7 @@ import type { Usage } from '@shared/models'
import { HStack, VStack } from '../../components/Stack'
import { Text } from '../../components/Text'
import { prefs, usePref } from '../../lib/prefs'
+import { useResetLine } from '../../lib/use-language'
import { ProviderMascot } from '../usage/ProviderMascot'
import { UsageBar } from '../usage/UsageBar'
import { providerTintCSS, resetDescription, windowTitle } from '../usage/usage-model'
@@ -10,6 +11,7 @@ import './settings.css'
/** Every limit as a bar under its provider, the way the menu bar lists them. */
export function UsageLimits({ usage }: { usage: Usage }) {
const [style] = usePref(prefs.usageIconStyle)
+ const resetLine = useResetLine()
return (
<VStack gap={18}>
{usage.providers.map((provider) => (
@@ -23,7 +25,7 @@ export function UsageLimits({ usage }: { usage: Usage }) {
<Text tone="text" truncate className="settings-usage-title">{windowTitle(w)}</Text>
<UsageBar percent={w.percent} tint={providerTintCSS(provider.id)} />
<Text tone="text" tabular className="settings-usage-percent">{Math.round(w.percent)}%</Text>
- <Text tone="secondary" truncate className="settings-usage-reset">{resetDescription(w) ?? ''}</Text>
+ <Text tone="secondary" truncate className="settings-usage-reset">{resetLine(resetDescription(w) ?? '')}</Text>
</HStack>
))}
</VStack>
diff --git a/apps/desktop/src/renderer/views/settings/VoiceChatSettingsView.tsx b/apps/desktop/src/renderer/views/settings/VoiceChatSettingsView.tsx
index 4fd0a0aa..d0b58c83 100644
--- a/apps/desktop/src/renderer/views/settings/VoiceChatSettingsView.tsx
+++ b/apps/desktop/src/renderer/views/settings/VoiceChatSettingsView.tsx
@@ -12,6 +12,8 @@ import { useScreenViewed } from '../../store/analytics'
import { errorText, liveClient, Reveal } from './parts'
import * as voice from './voice-settings'
import type { VoiceModels, VoiceProvider } from './voice-settings'
+import { useTr } from '../../lib/use-language'
+
/**
* Voice chat settings: which voice carries calls (on-device speech, or OpenAI / Gemini on the
@@ -19,6 +21,7 @@ import type { VoiceModels, VoiceProvider } from './voice-settings'
* in `StoreContext`. `showsHeader` is false inside Settings, which titles the page itself.
*/
export function VoiceChatSettingsView({ showsHeader = true }: { showsHeader?: boolean }) {
+ const tr = useTr()
useScreenViewed('voice_settings')
const [engine, setEngine] = usePref(voice.engine)
const [rate, setRate] = usePref(voice.rate)
@@ -36,7 +39,7 @@ export function VoiceChatSettingsView({ showsHeader = true }: { showsHeader?: bo
: onDeviceUnavailableReason()
return (
<SheetPage className={showsHeader ? 'settings-voice-sheet' : undefined}>
- {showsHeader ? <ModalHeader icon="waveform" title="Voice chat" /> : null}
+ {showsHeader ? <ModalHeader icon="waveform" title={tr(`Voice chat`)} /> : null}
<div className="settings-voice-body">
<CardForm>
<CardSection title="Voice" footer={footer}>
@@ -92,6 +95,7 @@ function PauseRow() {
/** One provider: the key the computer keeps, models, voice and this month's minutes. `dictationOnly` keeps the key and speech-to-text model. */
function ProviderVoiceSettings({ provider, dictationOnly = false }: { provider: VoiceProvider; dictationOnly?: boolean }) {
+ const tr = useTr()
const store = useStore()
const info = voice.voiceInfo[provider]
const [mode] = usePref(voice.mode(provider))
@@ -219,7 +223,7 @@ function ProviderVoiceSettings({ provider, dictationOnly = false }: { provider:
<div className="settings-row">
<Icon name="key.fill" size={13} color="var(--secondary)" />
<VStack grow className="settings-stack">
- <Text tone="text" truncate>Key saved</Text>
+ <Text tone="text" truncate>{tr(`Key saved`)}</Text>
<Text size="caption" tone="tertiary" truncate>Stays on {store.hostName}</Text>
</VStack>
{busy ? (
diff --git a/apps/desktop/src/renderer/views/settings/parts.tsx b/apps/desktop/src/renderer/views/settings/parts.tsx
index c124ccad..dafaadc8 100644
--- a/apps/desktop/src/renderer/views/settings/parts.tsx
+++ b/apps/desktop/src/renderer/views/settings/parts.tsx
@@ -1,5 +1,6 @@
import type { ReactNode } from 'react'
import { usePresence } from '../../components/Overlay'
+import { useTr } from '../../lib/use-language'
import { Spacer } from '../../components/Stack'
import { Text } from '../../components/Text'
import type { BotStore } from '../../store/bot-store'
@@ -27,9 +28,10 @@ export function Reveal({ show, children }: { show: boolean; children: ReactNode
/** A section's title row (the CardSection heading). */
export function SectionHeader({ title, children }: { title: string; children?: ReactNode }) {
+ const tr = useTr()
return (
<div className="settings-section-header">
- <Text as="h3" size="body" weight="semibold" tone="text">{title}</Text>
+ <Text as="h3" size="body" weight="semibold" tone="text">{tr(title)}</Text>
<Spacer />
{children}
</div>
diff --git a/apps/desktop/src/renderer/views/thread/BotConversation.tsx b/apps/desktop/src/renderer/views/thread/BotConversation.tsx
index 85911071..fac0ab3c 100644
--- a/apps/desktop/src/renderer/views/thread/BotConversation.tsx
+++ b/apps/desktop/src/renderer/views/thread/BotConversation.tsx
@@ -10,6 +10,8 @@ import { botConversation, buildBotConversation, groupSummary, verbOf, type BotCo
import { AuthorLabel, Bubble, TimeSeparator } from './ChatRows'
import { MarkdownText } from './Markdown'
import './bot-conversation.css'
+import { useTr } from '../../lib/use-language'
+
/** The compact chat row for bot-to-bot messages with one peer: who, never what. Opens the conversation. */
export function BotMessageRow({ exchanges, open }: { exchanges: BotExchange[]; open: (peerId: string) => void }) {
@@ -54,6 +56,7 @@ function BotPair({ botId, peerId }: { botId: string; peerId: string }) {
/** Read-only history between a bot and one peer: the live chat merged with what the host returns. */
export function BotConversationView({ botId, peerId }: { botId: string; peerId: string }) {
+ const tr = useTr()
const store = useStore()
// null while the host's history loads.
const [fetched, setFetched] = useState<Entry[] | null>(null)
@@ -90,7 +93,7 @@ export function BotConversationView({ botId, peerId }: { botId: string; peerId:
<div className="bot-conversation-scroll" ref={scroller}>
<div className="bot-conversation-rows">
{error ? <Text as="div" size="footnote" tone="danger" className="bot-conversation-note">{error}</Text> : null}
- {!error && fetched && rows.length === 0 ? <Text as="div" size="footnote" tone="tertiary" className="bot-conversation-note">No messages yet.</Text> : null}
+ {!error && fetched && rows.length === 0 ? <Text as="div" size="footnote" tone="tertiary" className="bot-conversation-note">{tr(`No messages yet.`)}</Text> : null}
{rows.map((row) => <ConversationRow key={row.id} row={row} />)}
</div>
</div>
diff --git a/apps/desktop/src/renderer/views/thread/ChatRows.tsx b/apps/desktop/src/renderer/views/thread/ChatRows.tsx
index a30f6f24..340e0b60 100644
--- a/apps/desktop/src/renderer/views/thread/ChatRows.tsx
+++ b/apps/desktop/src/renderer/views/thread/ChatRows.tsx
@@ -9,6 +9,7 @@ import { HStack, VStack } from '../../components/Stack'
import { Text } from '../../components/Text'
import { ThinkingOrb } from '../../components/ThinkingOrb'
import { messagePreview } from '../../lib/message-preview'
+import { useTr } from '../../lib/use-language'
import { avatarColor } from '../../lib/theme'
import { useStore as useLiveStore, useStoreRef as useStore } from '../../store/context'
import { QUICK_REACTIONS, type BotStore } from '../../store/bot-store'
@@ -111,7 +112,8 @@ export function Bubble({ className, items, reactions, children }: { className: s
/** The centered time label between runs of messages. */
export function TimeSeparator({ date }: { date: number }) {
- return <Text as="div" size="footnote" tone="tertiary" className="time-separator">{relativeTime.separator(date)}</Text>
+ const tr = useTr()
+ return <Text as="div" size="footnote" tone="tertiary" className="time-separator">{relativeTime.separator(date, tr)}</Text>
}
const fullDate = new Intl.DateTimeFormat(undefined, { dateStyle: 'medium', timeStyle: 'short' })
@@ -147,22 +149,23 @@ export function UserBubble({ entry, botWorking, reply }: { entry: Entry; botWork
}
function UserStatus({ entry, botWorking, hovering }: { entry: Entry; botWorking: boolean; hovering: boolean }) {
+ const tr = useTr()
const store = useStore()
switch (entry.data.status) {
case 'sending':
- return <Text size="caption2" tone="tertiary">Sending…</Text>
+ return <Text size="caption2" tone="tertiary">{tr(`Sending…`)}</Text>
case 'queued':
- return <Text size="caption2" tone="tertiary">{botWorking ? 'Queued until this response finishes' : 'Queued'}</Text>
+ return <Text size="caption2" tone="tertiary">{botWorking ? tr(`Queued until this response finishes`) : tr(`Queued`)}</Text>
case 'failed':
return (
<HStack as="span" gap={2}>
- <Text size="caption2" weight="semibold" tone="danger" className="user-status-error">Failed to send</Text>
+ <Text size="caption2" weight="semibold" tone="danger" className="user-status-error">{tr(`Failed to send`)}</Text>
<IconButton title="Resend" icon="arrow.clockwise" size={24} onClick={() => store.retry(entry)} />
<IconButton title="Delete" icon="trash" size={24} onClick={() => store.discard(entry)} />
</HStack>
)
case 'cancelled':
- return <Text size="caption2" tone="tertiary">Not sent — stopped</Text>
+ return <Text size="caption2" tone="tertiary">{tr(`Not sent — stopped`)}</Text>
default:
return <Text size="caption" tone="tertiary" className={hovering ? 'user-status-time shown' : 'user-status-time'}>{relativeTime.time(entry.createdAt)}</Text>
}
@@ -221,13 +224,14 @@ export function NoticeRow({ entry, addFallback }: { entry: Entry; addFallback?:
/** The bot's current activity and elapsed time. */
export function WorkingIndicator({ bot }: { bot: Bot }) {
+ const tr = useTr()
const waiting = needsInput(bot)
return (
<VStack align="flex-start" className="agent-inset">
<div className="working">
<HStack as="span" gap={8}>
<ThinkingOrb state={waiting ? 'listening' : 'working'} size={16} color={waiting ? 'var(--warning)' : 'var(--secondary)'} />
- <Text size="subheadline" tone={waiting ? 'attention' : 'secondary'} truncate>{bot.activity || 'Working…'}</Text>
+ <Text size="subheadline" tone={waiting ? 'attention' : 'secondary'} truncate>{tr(bot.activity || 'Working…')}</Text>
{bot.startedAt ? <Timer since={bot.startedAt} /> : null}
</HStack>
</div>
diff --git a/apps/desktop/src/renderer/views/thread/CommandMenu.tsx b/apps/desktop/src/renderer/views/thread/CommandMenu.tsx
index 09656d74..27536730 100644
--- a/apps/desktop/src/renderer/views/thread/CommandMenu.tsx
+++ b/apps/desktop/src/renderer/views/thread/CommandMenu.tsx
@@ -1,6 +1,7 @@
import { useEffect, useRef, useState, type KeyboardEvent } from 'react'
import { Icon } from '../../components/Icon'
import { usePresence } from '../../components/Overlay'
+import { useTr } from '../../lib/use-language'
import { returnRuns, type SlashCommand } from './slash-commands'
/**
@@ -39,6 +40,7 @@ export function CommandMenu({ commands, index, hover, pick }: {
pick: (command: SlashCommand) => void
}) {
const open = commands.length > 0
+ const tr = useTr()
const { mounted, shown } = usePresence(open)
const last = useRef(commands)
if (open) last.current = commands
@@ -59,15 +61,15 @@ export function CommandMenu({ commands, index, hover, pick }: {
role="option"
aria-selected={i === index}
className={`menu-row ${i === index ? 'highlight' : ''}`}
- title={c.detail || c.title}
+ title={tr(c.detail || c.title)}
onMouseEnter={() => hover(i)}
// Keep the caret in the field.
onMouseDown={(e) => e.preventDefault()}
onClick={() => pick(c)}
>
<span className="menu-icon"><Icon name={c.icon} size={12} color="var(--secondary)" /></span>
- <span className="command-title">{c.title}</span>
- <span className={`command-detail ${c.warning ? 'warning' : ''}`}>{c.detail}</span>
+ <span className="command-title">{tr(c.title)}</span>
+ <span className={`command-detail ${c.warning ? 'warning' : ''}`}>{tr(c.detail)}</span>
</button>
))}
</div>
diff --git a/apps/desktop/src/renderer/views/thread/Composer.tsx b/apps/desktop/src/renderer/views/thread/Composer.tsx
index 6f1fd1f0..c84dd2a0 100644
--- a/apps/desktop/src/renderer/views/thread/Composer.tsx
+++ b/apps/desktop/src/renderer/views/thread/Composer.tsx
@@ -9,6 +9,7 @@ import { usePresence } from '../../components/Overlay'
import { HStack, VStack } from '../../components/Stack'
import { Text } from '../../components/Text'
import { useModel } from '../../lib/observable'
+import { useTr } from '../../lib/use-language'
import { useStore } from '../../store/context'
import { MAX_FILE_SIZE, type OutgoingFile } from '../../store/bot-store'
import { pluginsFor } from '../marketplace/plugins'
@@ -47,6 +48,7 @@ function DestinationComposer({ botId, reply, cancelReply, onCall, onInterrupt }:
botId: string; reply: Entry | null; cancelReply?: () => void; onCall?: (() => void) | null; onInterrupt?: (() => void) | null
}) {
const store = useStore()
+ const tr = useTr()
const plugins = useModel(pluginsFor(store))
const bot = store.bots.get(botId) ?? null
const drafts = store.composerDrafts
@@ -66,7 +68,14 @@ function DestinationComposer({ botId, reply, cancelReply, onCall, onInterrupt }:
const members = bot && isGroup(bot) ? store.members(bot) : []
- const placeholder = reply ? 'Reply…' : bot && isGroup(bot) ? 'Ask everyone · @ to ask one bot' : working ? `Queue a message for ${bot?.name ?? ''}` : `Ask ${bot?.name ?? ''}`
+ const name = bot?.name ?? ''
+ const placeholder = reply
+ ? tr('Reply…')
+ : bot && isGroup(bot)
+ ? tr('Ask everyone · @ to ask one bot')
+ : working
+ ? tr('Queue a message for {name}').replace('{name}', name)
+ : tr('Ask {name}').replace('{name}', name)
// A routine's "Try it" fills the box.
const routineDraft = store.routineDrafts.get(botId)
diff --git a/apps/desktop/src/renderer/views/thread/DetailsPanel.tsx b/apps/desktop/src/renderer/views/thread/DetailsPanel.tsx
index b2310dbc..6dd6fd53 100644
--- a/apps/desktop/src/renderer/views/thread/DetailsPanel.tsx
+++ b/apps/desktop/src/renderer/views/thread/DetailsPanel.tsx
@@ -13,6 +13,8 @@ import { RoutinesView } from '../routines/RoutinesView'
import { MacChatButton } from './MacChatButton'
import '../bots/bots.css'
import './details-panel.css'
+import { useTr } from '../../lib/use-language'
+
export type DetailsTab = 'details' | 'memory' | 'settings'
@@ -95,13 +97,14 @@ function Identity({ bot }: { bot: Bot }) {
/** Whether this bot may use the computer, switched right here (also in Settings). */
function ComputerUse({ bot }: { bot: Bot }) {
+ const tr = useTr()
const store = useStore()
const screen = store.screen
if (!screen) return null
const ready = screen.platform === 'windows' || (screen.enabled && screen.connected && screen.capture && screen.input)
return (
<section className="details-section">
- <span className="details-section-title">Computer</span>
+ <Text className="details-section-title">{tr(`Computer`)}</Text>
<div className="outlined-card details-switch">
<RowLabel grow label="Use the computer" detail={ready ? null : 'On that computer, open Codync → Settings → Computer access to set it up first.'} />
<HStack as="span" align="stretch" className="details-switch-control">
@@ -114,6 +117,7 @@ function ComputerUse({ bot }: { bot: Bot }) {
/** A group's bots (Grok Bot's member list); clicking one opens its own chat. */
function GroupMembersList({ group, editGroup }: { group: Bot; editGroup: () => void }) {
+ const tr = useTr()
const store = useStore()
return (
<div className="details-members">
@@ -123,7 +127,7 @@ function GroupMembersList({ group, editGroup }: { group: Bot; editGroup: () => v
<BotAvatar bot={bot} size={32} />
<VStack as="span" gap={1} grow>
<span className="member-name">{bot.name}</span>
- {isWorking(bot) ? <Text size="compactSecondary" tone="secondary" className="member-name">{bot.activity || 'Working…'}</Text> : null}
+ {isWorking(bot) ? <Text size="compactSecondary" tone="secondary" className="member-name">{tr(bot.activity || 'Working…')}</Text> : null}
</VStack>
</button>
{group.members.length > 1 ? <IconButton title={`Remove ${bot.name} from the group`} icon="xmark" onClick={() => store.removeMember(group, bot.id)} /> : null}
@@ -133,7 +137,7 @@ function GroupMembersList({ group, editGroup }: { group: Bot; editGroup: () => v
<span className="member-add-icon">
<Icon name="plus" size={16} color="var(--secondary)" />
</span>
- <Text tone="secondary" className="member-name">Add Member</Text>
+ <Text tone="secondary" className="member-name">{tr(`Add Member`)}</Text>
</button>
</div>
)
diff --git a/apps/desktop/src/renderer/views/thread/HandoffNotice.tsx b/apps/desktop/src/renderer/views/thread/HandoffNotice.tsx
index 618bb951..374f03ea 100644
--- a/apps/desktop/src/renderer/views/thread/HandoffNotice.tsx
+++ b/apps/desktop/src/renderer/views/thread/HandoffNotice.tsx
@@ -7,6 +7,8 @@ import { Text } from '../../components/Text'
import { useStore as useLiveStore } from '../../store/context'
import { Field } from '../marketplace/pieces'
import './handoff.css'
+import { useTr } from '../../lib/use-language'
+
function Line({ icon, text }: { icon: string; text?: string }) {
return (
@@ -34,6 +36,7 @@ export function AgentSwitchNotice({ entry, carried }: { entry: Entry; carried: s
/** The bot's chat starts over: what the new conversation carries, which the user can edit, or turn down to carry on. */
export function HandoffNotice({ entry, card }: { entry: Entry; card: HandoffCard }) {
+ const tr = useTr()
const store = useLiveStore()
const [expanded, setExpanded] = useState(false)
const [draft, setDraft] = useState<string | null>(null)
@@ -57,7 +60,7 @@ export function HandoffNotice({ entry, card }: { entry: Entry; card: HandoffCard
return (
<div className="handoff-card">
<Line icon="arrow.triangle.branch" text={entry.data.text} />
- <Disclosure expanded={expanded} onToggle={() => setExpanded(!expanded)} label={<Text size="footnote" weight="medium">What it carries</Text>}>
+ <Disclosure expanded={expanded} onToggle={() => setExpanded(!expanded)} label={<Text size="footnote" weight="medium">{tr(`What it carries`)}</Text>}>
{carried}
</Disclosure>
<div className="handoff-actions">
@@ -69,7 +72,7 @@ export function HandoffNotice({ entry, card }: { entry: Entry; card: HandoffCard
<Sheet open={draft !== null} onClose={() => setDraft(null)} width={620}>
{draft !== null && <SheetPage>
<ModalHeader
- title="Edit the handoff"
+ title={tr(`Edit the handoff`)}
trailing={saving ? <Spinner /> : <IconButton title="Save" icon="checkmark" disabled={!draft.trim()} onClick={() => { void save() }} />}
/>
<CardForm>
diff --git a/apps/desktop/src/renderer/views/thread/PermissionCard.tsx b/apps/desktop/src/renderer/views/thread/PermissionCard.tsx
index 9cd0315c..67971fe0 100644
--- a/apps/desktop/src/renderer/views/thread/PermissionCard.tsx
+++ b/apps/desktop/src/renderer/views/thread/PermissionCard.tsx
@@ -5,6 +5,8 @@ import { Icon } from '../../components/Icon'
import { HStack, VStack } from '../../components/Stack'
import { Text } from '../../components/Text'
import './permission-card.css'
+import { useTr } from '../../lib/use-language'
+
/** What the agent wants, from the tool's kind (also the notch island's headline). */
export const permissionHeadline = (toolKind?: string) => {
@@ -47,6 +49,7 @@ export function optionLabel(o: PermissionOption) {
/** Approval card in Grok Bot's choice-card style: what the agent wants, where it runs, the answers. */
export function PermissionCard({ entry, hostName, answering, respond }: { entry: Entry; hostName: string; answering: string | null; respond: (option: string | null) => void }) {
+ const tr = useTr()
const [expanded, setExpanded] = useState(false)
const d = entry.data
const pending = d.status === 'pending'
@@ -68,7 +71,7 @@ export function PermissionCard({ entry, hostName, answering, respond }: { entry:
<Text size="caption" tone="tertiary">{`Runs on ${hostName}${cwd}`}</Text>
</HStack>
{hasDetail ? (
- <Disclosure expanded={expanded} onToggle={() => setExpanded((e) => !e)} label={<Text size="caption" weight="medium" tone="secondary">Details</Text>}>
+ <Disclosure expanded={expanded} onToggle={() => setExpanded((e) => !e)} label={<Text size="caption" weight="medium" tone="secondary">{tr(`Details`)}</Text>}>
<VStack gap={8} className="permission-card-details">
{d.command ? <CodeBox text={d.command} /> : null}
{d.detail ? <CodeBox text={d.detail.slice(0, 2000)} /> : null}
diff --git a/apps/desktop/src/renderer/views/thread/ThreadView.tsx b/apps/desktop/src/renderer/views/thread/ThreadView.tsx
index 7c11d31d..6741acb2 100644
--- a/apps/desktop/src/renderer/views/thread/ThreadView.tsx
+++ b/apps/desktop/src/renderer/views/thread/ThreadView.tsx
@@ -7,6 +7,7 @@ import { Sheet, usePresence } from '../../components/Overlay'
import { HStack, IconSlot, Spacer } from '../../components/Stack'
import { Text } from '../../components/Text'
import { prefs, usePref } from '../../lib/prefs'
+import { useTr } from '../../lib/use-language'
import { useScreenViewed } from '../../store/analytics'
import { useStore } from '../../store/context'
import { UpdateNeededCard } from '../UpdateNeededCard'
@@ -258,6 +259,7 @@ const PAGE = 40
const Transcript = memo(function Transcript({ botId, openTrace, onReply, openRoutine, openAgent, openBotChat }: { botId: string; openTrace: () => void; onReply?: (e: Entry) => void; openRoutine: (id: string | null) => void; openAgent: (botId: string) => void; openBotChat: (peerId: string) => void }) {
const store = useStore()
+ const tr = useTr()
const bot = store.bots.get(botId) ?? null
const live = !!bot && isWorkingIn(bot, botId) && !store.isOffline
// Rebuilt only when this chat changes: the store replaces a chat's list on every change.
@@ -355,7 +357,7 @@ const Transcript = memo(function Transcript({ botId, openTrace, onReply, openRou
<div className="transcript-content">
{more ? (
<button className="load-earlier" disabled={loadingEarlier} onClick={() => void showEarlier()}>
- {loadingEarlier ? <Spinner size={14} /> : 'Load earlier messages'}
+ {loadingEarlier ? <Spinner size={14} /> : tr('Load earlier messages')}
</button>
) : null}
{items.length === 0 && bot ? <div className="transcript-intro">{isGroup(bot) ? <GroupIntroCard group={bot} /> : <IntroCard bot={bot} />}</div> : null}
@@ -398,6 +400,7 @@ function Row({ item, chat, openTrace, onReply, openRoutine, openAgent, openBotCh
/** The start of an empty group chat: who's in it and how the room works. */
function GroupIntroCard({ group }: { group: Bot }) {
+ const tr = useTr()
const store = useStore()
const members = store.members(group)
const names = members.map((m) => m.name)
@@ -407,22 +410,26 @@ function GroupIntroCard({ group }: { group: Bot }) {
<Text as="div" size="title2" weight="semibold" tone="text">{group.name}</Text>
{group.name !== names.join(', ') ? <Text as="div" size="subheadline" tone="secondary">{names.join(' · ')}</Text> : null}
{group.description ? <Text as="div" size="subheadline" tone="secondary">{group.description}</Text> : null}
- <Text as="div" size="callout" tone="secondary" className="intro-card-hint balanced">Everyone answers in turn. @mention a bot to ask just that one.</Text>
+ <Text as="div" size="callout" tone="secondary" className="intro-card-hint balanced">{tr(`Everyone answers in turn. @mention a bot to ask just that one.`)}</Text>
</div>
)
}
function IntroCard({ bot }: { bot: Bot }) {
const store = useStore()
+ const tr = useTr()
+ const where = bot.managedWorkspace
+ ? `${store.backendName(bot.backend)} · ${tr('Personal workspace')}`
+ : tr('{agent} in {path}').replace('{agent}', store.backendName(bot.backend)).replace('{path}', bot.cwd)
return (
<div className="intro-card">
<BotAvatar bot={bot} size={72} />
<Text as="div" size="title2" weight="semibold" tone="text">{bot.name}</Text>
<Text as="div" size="callout" tone="secondary" className="intro-card-path">
- {bot.managedWorkspace ? `${store.backendName(bot.backend)} · Personal workspace` : `${store.backendName(bot.backend)} in ${bot.cwd}`}
+ {where}
</Text>
{bot.description ? <Text as="div" size="subheadline" tone="secondary">{bot.description}</Text> : null}
- <Text as="div" size="callout" tone="secondary" className="intro-card-hint">Tell it what you need. You'll get a notification when it's done or needs you.</Text>
+ <Text as="div" size="callout" tone="secondary" className="intro-card-hint">{tr(`Tell it what you need. You'll get a notification when it's done or needs you.`)}</Text>
</div>
)
}
diff --git a/apps/desktop/src/renderer/views/thread/TraceView.tsx b/apps/desktop/src/renderer/views/thread/TraceView.tsx
index aebf1a2d..64a3a522 100644
--- a/apps/desktop/src/renderer/views/thread/TraceView.tsx
+++ b/apps/desktop/src/renderer/views/thread/TraceView.tsx
@@ -13,12 +13,15 @@ import { MarkdownText } from './Markdown'
import { CodeBox, DiffView } from './PermissionCard'
import { runningTurn, scrolledToEnd, traceTurns } from './trace-turns'
import './trace.css'
+import { useTr } from '../../lib/use-language'
+
/**
* "Full conversation": everything the agent did (narration, thinking, tool calls with output
* and diffs, plans) grouped by turn.
*/
export function TraceView({ botId }: { botId: string }) {
+ const tr = useTr()
const store = useStore()
useScreenViewed('trace')
const all = store.allEntries(botId)
@@ -38,10 +41,10 @@ export function TraceView({ botId }: { botId: string }) {
}
return (
<SheetPage>
- <ModalHeader title="Full conversation" />
+ <ModalHeader title={tr(`Full conversation`)} />
<div ref={scroller} className="thread-scroll" onScroll={onScroll}>
<VStack gap={14} className="trace-content">
- {sorted.length === 0 ? <Text tone="tertiary">Nothing yet.</Text> : null}
+ {sorted.length === 0 ? <Text tone="tertiary">{tr(`Nothing yet.`)}</Text> : null}
{sorted.map(([turn, entries]) => (
<VStack key={turn} gap={8}>
<Text as="div" size="compactSecondary" weight="semibold" tone="text" truncate className="trace-turn-title">
@@ -72,6 +75,7 @@ function Label({ icon, weight, tone, children }: { icon: React.ReactNode; weight
/** The running turn's thoughts start `unfolded`, so its reasoning reads as it comes in. */
function TraceRow({ entry, unfolded }: { entry: Entry; unfolded: boolean }) {
+ const tr = useTr()
const [expanded, setExpanded] = useState(unfolded)
const d = entry.data
switch (entry.kind) {
@@ -84,7 +88,7 @@ function TraceRow({ entry, unfolded }: { entry: Entry; unfolded: boolean }) {
case 'agent':
return (
<VStack gap={4}>
- <Text size="caption2" weight="semibold" tone="tertiary">{d.final ? 'Reply' : 'Said'}</Text>
+ <Text size="caption2" weight="semibold" tone="tertiary">{d.final ? tr(`Reply`) : tr(`Said`)}</Text>
<MarkdownText text={d.text ?? ''} />
</VStack>
)
@@ -96,7 +100,7 @@ function TraceRow({ entry, unfolded }: { entry: Entry; unfolded: boolean }) {
label={
<HStack as="span" gap={6}>
<ThinkingOrb size={16} color="var(--secondary)" animated={false} />
- <Text size="subheadline" tone="secondary">Thinking</Text>
+ <Text size="subheadline" tone="secondary">{tr(`Thinking`)}</Text>
</HStack>
}
>
@@ -145,6 +149,7 @@ const toolIcon = (kind?: string) =>
const toolOrb = (kind?: string): OrbState => ({ search: 'searching', fetch: 'connecting', edit: 'shaping' } as const)[kind ?? ''] ?? 'working'
export function ToolRow({ data }: { data: EntryData }) {
+ const tr = useTr()
const [expanded, setExpanded] = useState(false)
const hasBody = !!data.output || !!data.diffs?.length
const label = (
@@ -152,7 +157,7 @@ export function ToolRow({ data }: { data: EntryData }) {
<IconSlot width={18} tone="secondary">
<Icon name={toolIcon(data.toolKind)} size={10} />
</IconSlot>
- <Text size="subheadline" tone="text" lines={2} grow>{data.title ?? 'Tool'}</Text>
+ <Text size="subheadline" tone="text" lines={2} grow>{data.title ?? tr(`Tool`)}</Text>
{data.status === 'completed' ? (
<Icon name="checkmark" size={10} color="var(--accent)" />
) : data.status === 'failed' ? (
diff --git a/apps/desktop/src/renderer/views/thread/chat-items.ts b/apps/desktop/src/renderer/views/thread/chat-items.ts
index dea5d3af..ef89492d 100644
--- a/apps/desktop/src/renderer/views/thread/chat-items.ts
+++ b/apps/desktop/src/renderer/views/thread/chat-items.ts
@@ -68,19 +68,19 @@ const sameDay = (a: Date, b: Date) => a.getFullYear() === b.getFullYear() && a.g
export const relativeTime = {
time: (ms: number) => time.format(new Date(ms)),
/** Chat separator: Today 3:27 AM · Yesterday 5:20 PM · Sep 16 9:02 AM */
- separator(ms: number) {
+ separator(ms: number, tr: (text: string) => string = (text) => text) {
const date = new Date(ms)
const now = new Date()
const yesterday = new Date(now.getTime() - 86_400_000)
- const day = sameDay(date, now) ? 'Today' : sameDay(date, yesterday) ? 'Yesterday' : monthDay.format(date)
+ const day = sameDay(date, now) ? tr('Today') : sameDay(date, yesterday) ? tr('Yesterday') : monthDay.format(date)
return `${day} ${time.format(date)}`
},
/** Roster stamp: 3:45 AM · Yesterday · Wednesday · Sep 16 */
- day(ms: number) {
+ day(ms: number, tr: (text: string) => string = (text) => text) {
const date = new Date(ms)
const now = new Date()
if (sameDay(date, now)) return time.format(date)
- if (sameDay(date, new Date(now.getTime() - 86_400_000))) return 'Yesterday'
+ if (sameDay(date, new Date(now.getTime() - 86_400_000))) return tr('Yesterday')
if (now.getTime() - ms < 6 * 86_400_000) return weekday.format(date)
return monthDay.format(date)
},
diff --git a/apps/desktop/src/renderer/views/tray-summary.ts b/apps/desktop/src/renderer/views/tray-summary.ts
index b3d9541e..feccb394 100644
--- a/apps/desktop/src/renderer/views/tray-summary.ts
+++ b/apps/desktop/src/renderer/views/tray-summary.ts
@@ -3,6 +3,7 @@ import type { TrayImage, TraySummary } from '@shared/ipc'
import { isGroup, isWorking, needsInput, folderName, type Bot, type UsageWindow } from '@shared/models'
import { drawCharacter, moodOf } from '../components/Avatar'
import { useModels } from '../lib/observable'
+import { resetLine, resolvedScript, translate } from '../lib/l10n'
import { prefs, usePref } from '../lib/prefs'
import { avatarColor, isDark, palette } from '../lib/theme'
import type { AppModel } from '../store/app-model'
@@ -83,8 +84,12 @@ function barIcon(providerId: string, window: UsageWindow) {
}
function usageLine(w: UsageWindow) {
+ const preference = prefs.appLanguage.get()
+ const system = typeof navigator === 'undefined' ? 'en' : navigator.language
+ const title = translate(windowTitle(w), preference, system)
const reset = resetDate(w)
- return `${windowTitle(w)} · ${Math.round(w.percent)}%${reset ? ` · resets in ${untilText(reset)}` : ''}`
+ const spoken = reset ? resetLine(`resets in ${untilText(reset)}`, preference, system) : ''
+ return `${title} · ${Math.round(w.percent)}%${spoken ? ` · ${spoken}` : ''}`
}
/** Sends what the menu bar shows whenever the stores change. */
@@ -93,6 +98,7 @@ export function useTraySummary(app: AppModel) {
useModels(stores)
const [textSize] = usePref(prefs.textSize)
const [iconStyle] = usePref(prefs.usageIconStyle)
+ const [language] = usePref(prefs.appLanguage)
useEffect(() => {
const timer = setTimeout(() => {
const local = app.local
@@ -132,6 +138,7 @@ export function useTraySummary(app: AppModel) {
needsAttention: app.needsAttention,
textSize,
usageIconStyle: iconStyle,
+ script: resolvedScript(language, typeof navigator === 'undefined' ? 'en' : navigator.language),
}
window.codync.app.setTraySummary(summary)
}, 150)
diff --git a/apps/desktop/src/shared/ipc.ts b/apps/desktop/src/shared/ipc.ts
index e9b17ef0..cdd4fcb3 100644
--- a/apps/desktop/src/shared/ipc.ts
+++ b/apps/desktop/src/shared/ipc.ts
@@ -59,6 +59,8 @@ export interface TraySummary {
needsAttention: boolean
textSize: number
usageIconStyle: 'character' | 'original'
+ /** The menu bar is a system menu, so the main process translates its labels from this. */
+ script: 'hans' | 'hant' | null
}
/** Things the tray menu (or the app menu) asks the window to do. */
diff --git a/apps/desktop/tsconfig.json b/apps/desktop/tsconfig.json
index 12a4d45f..227c787a 100644
--- a/apps/desktop/tsconfig.json
+++ b/apps/desktop/tsconfig.json
@@ -10,6 +10,7 @@
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
+ "resolveJsonModule": true,
"isolatedModules": true,
"allowImportingTsExtensions": true,
"noEmit": true,
diff --git a/apps/ios/App/CodyncApp.swift b/apps/ios/App/CodyncApp.swift
index 49ea57f3..8706c0a5 100644
--- a/apps/ios/App/CodyncApp.swift
+++ b/apps/ios/App/CodyncApp.swift
@@ -14,6 +14,7 @@ struct CodyncApp: App {
@Environment(\.scenePhase) private var scenePhase
@AppStorage(Appearance.storageKey) private var appearance = Appearance.system
@AppStorage("onboardingCompleted") private var onboardingCompleted = false
+ @AppStorage(AppLanguage.storageKey, store: AppLanguage.defaults) private var appLanguageRaw = AppLanguage.system.rawValue
/// Cold launch with a computer to reach: the splash covers its connect and catch-up.
@State private var launching = !AppStore.shared.accounts.computers.isEmpty
init() {
@@ -36,6 +37,9 @@ struct CodyncApp: App {
.environment(updates)
.tint(Palette.accent)
.background(AppearanceWindow(appearance: appearance).frame(width: 0, height: 0))
+ .environment(\.locale, AppLanguage.locale(
+ preference: AppLanguage(rawValue: appLanguageRaw) ?? .system,
+ systemIsChinese: AppLanguage.systemIsChinese()))
// No scroll indicators anywhere in the app.
.scrollIndicators(.never)
.codyncSheet(isPresented: Binding(
diff --git a/apps/ios/Kit/Package.swift b/apps/ios/Kit/Package.swift
index 2cffddf6..6babe532 100644
--- a/apps/ios/Kit/Package.swift
+++ b/apps/ios/Kit/Package.swift
@@ -16,7 +16,12 @@ let package = Package(
.package(url: "https://github.com/migueldeicaza/SwiftTerm.git", exact: "1.18.0"),
],
targets: [
- .target(name: "CodyncKit", resources: [.copy("Resources/ThirdPartyNotices"), .process("Resources/ProviderIcons.xcassets")]),
+ .target(name: "CodyncKit", resources: [
+ .copy("Resources/ThirdPartyNotices"),
+ .copy("Resources/zh-Hans.json"),
+ .copy("Resources/zh-Hant.json"),
+ .process("Resources/ProviderIcons.xcassets"),
+ ]),
.target(
name: "CodyncUI",
dependencies: [
diff --git a/apps/ios/Kit/Sources/CodyncKit/Design/AccessoryWidgetCard.swift b/apps/ios/Kit/Sources/CodyncKit/Design/AccessoryWidgetCard.swift
index 1dcb4e81..c604954d 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Design/AccessoryWidgetCard.swift
+++ b/apps/ios/Kit/Sources/CodyncKit/Design/AccessoryWidgetCard.swift
@@ -42,7 +42,7 @@ public struct AccessoryWidgetCard: View {
Gauge(value: min(100, max(0, top.window.percent)), in: 0...100) {
Text(top.name.prefix(2))
} currentValueLabel: {
- Text("\(Int(top.window.percent.rounded()))").font(.system(size: 18, weight: .semibold))
+ Text(L10n.tr("\(Int(top.window.percent.rounded()))")).font(.system(size: 18, weight: .semibold))
}
.gaugeStyle(.accessoryCircularCapacity)
.accessibilityLabel(headline)
@@ -58,13 +58,13 @@ public struct AccessoryWidgetCard: View {
Text(headline).font(.system(size: 12, weight: .semibold)).lineLimit(1)
if paired, kind == .bots {
ForEach(bots.sorted { rank($0) < rank($1) }.prefix(2)) { bot in
- Text("\(bot.name) · \(bot.needsInput ? "Needs you" : bot.isWorking ? "Working" : "Ready")")
+ Text("\(widgetName(bot)) · \(L10n.tr(bot.needsInput ? "Needs you" : bot.isWorking ? "Working" : "Ready"))")
.font(.system(size: 10)).lineLimit(1)
}
} else if paired, let top {
- Text(top.window.title).font(.system(size: 10)).lineLimit(1)
+ Text(L10n.tr(top.window.title)).font(.system(size: 10)).lineLimit(1)
if let reset = top.window.resetsShort() {
- Text(reset).font(.system(size: 9)).lineLimit(1)
+ Text(L10n.resetLine(reset)).font(.system(size: 9)).lineLimit(1)
}
}
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Design/ActivityCards.swift b/apps/ios/Kit/Sources/CodyncKit/Design/ActivityCards.swift
index 16fc8e71..96aa7184 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Design/ActivityCards.swift
+++ b/apps/ios/Kit/Sources/CodyncKit/Design/ActivityCards.swift
@@ -73,14 +73,14 @@ public struct ActivityCaption: View {
public var body: some View {
HStack(spacing: 4) {
- Text(state.caption)
+ Text(L10n.tr(state.caption))
.foregroundStyle(state.captionTint)
.contentTransition(.interpolate)
.layoutPriority(1)
// No fixedSize on a timer Text: a Live Activity can't lay one out at its ideal width
// and draws the whole card black. Unconstrained, it takes the width left over.
if let since = state.elapsedStart(startedAt) {
- Text("·").foregroundStyle(Palette.tertiary)
+ Text(L10n.tr("·")).foregroundStyle(Palette.tertiary)
Text(since, style: .timer).monospacedDigit().foregroundStyle(Palette.secondary)
}
}
@@ -103,7 +103,7 @@ public struct ActivityReviewButton: View {
}
private var label: some View {
- Label("Review", systemImage: "hand.raised.fill")
+ Label(L10n.tr("Review"), systemImage: "hand.raised.fill")
.font(.system(size: 13, weight: .semibold))
.foregroundStyle(Palette.onAccent)
.frame(maxWidth: .infinity, minHeight: 34)
@@ -155,7 +155,7 @@ public struct BotActivityCard<Face: View, Mark: View>: View {
public extension BotActivityCard where Face == ActivityAvatar, Mark == BotActivityIndicator {
init(bot: Bot, state: BotActivityPresentation, startedAt: Date? = nil) {
- self.init(name: bot.name, state: state, startedAt: startedAt) {
+ self.init(name: widgetName(bot), state: state, startedAt: startedAt) {
ActivityAvatar(shape: bot.avatarShape, color: bot.avatarColor, state: state, size: 32)
} mark: {
BotActivityIndicator(state: state, size: 28)
@@ -271,8 +271,8 @@ public struct BotActivityPreview: View {
HStack(spacing: 10) {
islandFace(26)
VStack(spacing: 2) {
- Text(bot.name).font(.system(size: 14, weight: .semibold)).foregroundStyle(.white)
- Text(state.caption).font(.system(size: 12)).foregroundStyle(state.captionTint)
+ Text(widgetName(bot)).font(.system(size: 14, weight: .semibold)).foregroundStyle(.white)
+ Text(L10n.tr(state.caption)).font(.system(size: 12)).foregroundStyle(state.captionTint)
}
.lineLimit(1)
.frame(maxWidth: .infinity)
diff --git a/apps/ios/Kit/Sources/CodyncKit/Design/CharacterAvatar.swift b/apps/ios/Kit/Sources/CodyncKit/Design/CharacterAvatar.swift
index b67cd2e3..33eb0585 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Design/CharacterAvatar.swift
+++ b/apps/ios/Kit/Sources/CodyncKit/Design/CharacterAvatar.swift
@@ -293,7 +293,7 @@ public struct GroupAvatar: View {
if members.count == 4 {
place(members[3], size * 0.5, .bottomTrailing)
} else {
- Text("+\(members.count - 3)")
+ Text(L10n.tr("+\(members.count - 3)"))
.font(.system(size: size * 0.24, weight: .bold, design: .rounded))
.foregroundStyle(.secondary)
.frame(width: size * 0.5, height: size * 0.5)
diff --git a/apps/ios/Kit/Sources/CodyncKit/Design/Theme.swift b/apps/ios/Kit/Sources/CodyncKit/Design/Theme.swift
index 808832a5..a5ff47b8 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Design/Theme.swift
+++ b/apps/ios/Kit/Sources/CodyncKit/Design/Theme.swift
@@ -95,7 +95,7 @@ public enum RelativeTime {
public static func day(_ date: Date, now: Date = .now) -> String {
let cal = Calendar.current
if cal.isDate(date, inSameDayAs: now) { return date.formatted(date: .omitted, time: .shortened) }
- if cal.isDateInYesterday(date) { return String(localized: "Yesterday") }
+ if cal.isDateInYesterday(date) { return L10n.tr("Yesterday") }
if now.timeIntervalSince(date) < 6 * 86_400 { return date.formatted(.dateTime.weekday(.wide)) }
return date.formatted(.dateTime.month(.abbreviated).day())
}
@@ -103,8 +103,8 @@ public enum RelativeTime {
/// Chat separator: Today 3:27 AM · Yesterday 5:20 PM · Sep 16 9:02 AM
public static func separator(_ date: Date) -> String {
let cal = Calendar.current
- let day = cal.isDateInToday(date) ? String(localized: "Today")
- : cal.isDateInYesterday(date) ? String(localized: "Yesterday")
+ let day = cal.isDateInToday(date) ? L10n.tr("Today")
+ : cal.isDateInYesterday(date) ? L10n.tr("Yesterday")
: date.formatted(.dateTime.month(.abbreviated).day())
return day + " " + date.formatted(date: .omitted, time: .shortened)
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Design/WidgetCards.swift b/apps/ios/Kit/Sources/CodyncKit/Design/WidgetCards.swift
index b7bf57bf..f67d7464 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Design/WidgetCards.swift
+++ b/apps/ios/Kit/Sources/CodyncKit/Design/WidgetCards.swift
@@ -27,7 +27,7 @@ public struct ProviderWidgetCard: View {
.lineLimit(1)
Spacer(minLength: 0)
if layout != .small {
- Text("Usage")
+ Text(L10n.tr("Usage"))
.font(.system(size: 10, weight: .medium))
.foregroundStyle(Palette.secondary)
}
@@ -35,29 +35,29 @@ public struct ProviderWidgetCard: View {
if layout == .small, let window = provider.tightest {
Spacer(minLength: 0)
VStack(alignment: .leading, spacing: 2) {
- Text(window.title).font(.system(size: 11)).foregroundStyle(Palette.secondary).lineLimit(1)
+ Text(L10n.tr(window.title)).font(.system(size: 11)).foregroundStyle(Palette.secondary).lineLimit(1)
HStack(alignment: .firstTextBaseline, spacing: 1) {
- Text("\(Int(window.percent.rounded()))")
+ Text(L10n.tr("\(Int(window.percent.rounded()))"))
.font(.system(size: 32, weight: .semibold, design: .rounded))
.contentTransition(.numericText(value: window.percent))
- Text("%").font(.system(size: 17, weight: .medium))
+ Text(L10n.tr("%")).font(.system(size: 17, weight: .medium))
}
.monospacedDigit()
.foregroundStyle(window.percent >= 90 ? Palette.danger : Palette.text)
.minimumScaleFactor(0.7)
}
UsageTicks(percent: window.percent, tint: provider.widgetTint, height: 13)
- Text(window.resetsShort(now: date) ?? "Usage reported by your computer")
+ Text(window.resetsShort(now: date).map(L10n.resetLine) ?? L10n.tr("Usage reported by your computer"))
.font(.system(size: 9)).foregroundStyle(Palette.secondary)
.lineLimit(1)
} else {
if layout == .large, let top = provider.tightest {
HStack(alignment: .firstTextBaseline, spacing: 8) {
- Text("\(Int(top.percent.rounded()))%")
+ Text(L10n.tr("\(Int(top.percent.rounded()))%"))
.font(.system(size: 36, weight: .semibold, design: .rounded)).monospacedDigit()
.contentTransition(.numericText(value: top.percent))
.foregroundStyle(top.percent >= 90 ? Palette.danger : Palette.text)
- Text("\(top.title) · highest usage").font(.system(size: 11)).foregroundStyle(Palette.secondary)
+ Text("\(L10n.tr(top.title)) · \(L10n.tr("highest usage"))").font(.system(size: 11)).foregroundStyle(Palette.secondary)
.lineLimit(2)
}
.padding(.vertical, 4)
@@ -65,12 +65,12 @@ public struct ProviderWidgetCard: View {
ForEach(provider.windows.prefix(layout == .large ? 4 : 2)) { window in
VStack(alignment: .leading, spacing: 3) {
HStack(alignment: .firstTextBaseline) {
- Text(window.title)
+ Text(L10n.tr(window.title))
.font(.system(size: 11, weight: .medium))
.foregroundStyle(Palette.secondary)
.lineLimit(1)
Spacer(minLength: 4)
- Text("\(Int(window.percent.rounded()))%")
+ Text(L10n.tr("\(Int(window.percent.rounded()))%"))
.font(.system(size: 13, weight: .semibold))
.monospacedDigit()
.contentTransition(.numericText(value: window.percent))
@@ -78,7 +78,7 @@ public struct ProviderWidgetCard: View {
}
UsageTicks(percent: window.percent, tint: provider.widgetTint, height: 12)
if let reset = window.resetsShort(now: date) {
- Text(reset).font(.system(size: 9)).foregroundStyle(Palette.secondary)
+ Text(L10n.resetLine(reset)).font(.system(size: 9)).foregroundStyle(Palette.secondary)
.lineLimit(1).frame(maxWidth: .infinity, alignment: .trailing)
}
}
@@ -178,7 +178,7 @@ public struct BotsWidgetCard: View {
public var body: some View {
VStack(alignment: .leading, spacing: 10) {
HStack {
- Text("Bots").font(.system(size: 13, weight: .semibold))
+ Text(L10n.tr("Bots")).font(.system(size: 13, weight: .semibold))
Spacer()
Image(systemName: "bubble.left.and.bubble.right")
.font(.system(size: 12)).foregroundStyle(Palette.secondary)
@@ -187,7 +187,7 @@ public struct BotsWidgetCard: View {
HStack {
summary
Spacer()
- Text("\(bots.count) total · \(working) working")
+ Text(L10n.tr("\(bots.count) total · \(working) working"))
.font(.system(size: 11)).foregroundStyle(Palette.secondary)
}
Divider()
@@ -208,7 +208,7 @@ public struct BotsWidgetCard: View {
}
Spacer(minLength: 0)
if working > 0 && needs > 0 {
- Text("\(working) working").font(.system(size: 9)).foregroundStyle(Palette.secondary)
+ Text(L10n.tr("\(working) working")).font(.system(size: 9)).foregroundStyle(Palette.secondary)
}
}
}
@@ -230,7 +230,7 @@ public struct BotsWidgetCard: View {
.transition(.activityRow)
}
if bots.isEmpty {
- Text("Create your first bot in Codync.")
+ Text(L10n.tr("Create your first bot in Codync."))
.font(.system(size: 12)).foregroundStyle(Palette.secondary)
}
}
@@ -239,10 +239,10 @@ public struct BotsWidgetCard: View {
private var summary: some View {
VStack(alignment: .leading, spacing: 1) {
- Text("\(count)").font(.system(size: 36, weight: .semibold, design: .rounded))
+ Text(L10n.tr("\(count)")).font(.system(size: 36, weight: .semibold, design: .rounded))
.monospacedDigit().foregroundStyle(needs > 0 ? Palette.attention : Palette.text)
.contentTransition(.numericText(value: Double(count)))
- Text(label).font(.system(size: 12, weight: .medium)).foregroundStyle(Palette.secondary)
+ Text(L10n.tr(label)).font(.system(size: 12, weight: .medium)).foregroundStyle(Palette.secondary)
.contentTransition(.interpolate)
}
.accessibilityElement(children: .combine)
@@ -254,15 +254,15 @@ public struct BotsWidgetCard: View {
return HStack(spacing: 7) {
CharacterAvatar(bot: bot, size: 24, still: true)
VStack(alignment: .leading, spacing: 1) {
- Text(bot.name).font(.system(size: 11, weight: .semibold)).foregroundStyle(Palette.text)
+ Text(widgetName(bot)).font(.system(size: 11, weight: .semibold)).foregroundStyle(Palette.text)
if bot.isWorking, !bot.activity.isEmpty {
- Text(bot.activity).font(.system(size: 10)).foregroundStyle(Palette.secondary)
+ Text(L10n.tr(bot.activity)).font(.system(size: 10)).foregroundStyle(Palette.secondary)
.contentTransition(.interpolate)
}
}
.lineLimit(1)
Spacer(minLength: 4)
- Text(state.label)
+ Text(L10n.tr(state.label))
.font(.system(size: 10, weight: bot.needsInput ? .semibold : .regular))
.foregroundStyle(state.tint)
.lineLimit(1)
@@ -272,6 +272,11 @@ public struct BotsWidgetCard: View {
}
}
+/// Sample bots in the gallery have translated names. A bot the user named stays as they wrote it.
+func widgetName(_ bot: Bot) -> String {
+ bot.id.hasPrefix("preview-") ? L10n.tr(bot.name) : bot.name
+}
+
public extension Bot {
/// The state word the widgets show and its color: only what needs you (or failed) stands out.
var widgetState: (label: String, tint: Color) {
@@ -337,7 +342,7 @@ public struct BotsTeamCard: View {
private func botTile(_ bot: Bot) -> some View {
VStack(spacing: 4) {
CharacterAvatar(bot: bot, size: 30, still: true)
- Text(bot.name)
+ Text(widgetName(bot))
.font(.system(size: 9, weight: .semibold))
.foregroundStyle(Palette.text)
.lineLimit(1)
@@ -352,7 +357,7 @@ public struct BotsTeamCard: View {
}
}
.accessibilityElement(children: .ignore)
- .accessibilityLabel("\(bot.name), \(bot.widgetState.label)")
+ .accessibilityLabel("\(widgetName(bot)), \(L10n.tr(bot.widgetState.label))")
}
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/L10n.swift b/apps/ios/Kit/Sources/CodyncKit/L10n.swift
new file mode 100644
index 00000000..35a73279
--- /dev/null
+++ b/apps/ios/Kit/Sources/CodyncKit/L10n.swift
@@ -0,0 +1,261 @@
+import Foundation
+import os
+
+/// Which Chinese writing the interface uses. Traditional is its own table, not a conversion of Simplified.
+public enum ChineseScript: Sendable {
+ case hans
+ case hant
+}
+
+/// The language of this app's own interface. Stored on the device; chats and bots are not translated.
+/// `zh` stays the stored name for Simplified, so a choice saved before Traditional existed still reads it.
+public enum AppLanguage: String, CaseIterable, Sendable, Identifiable, Hashable {
+ case system
+ case zh
+ case zhHant = "zh-Hant"
+ case en
+
+ public var id: String { rawValue }
+
+ public static let storageKey = "appLanguage"
+
+ /// The App Group, so the widget extension reads the same choice the app writes.
+ /// A choice saved before this was shared is copied across the first time the app looks.
+ public static var defaults: UserDefaults {
+ let shared = UserDefaults(suiteName: SharedStore.appGroup) ?? .standard
+ if shared.string(forKey: storageKey) == nil,
+ let existing = UserDefaults.standard.string(forKey: storageKey) {
+ shared.set(existing, forKey: storageKey)
+ }
+ return shared
+ }
+
+ public static func preference(in store: UserDefaults = defaults) -> AppLanguage {
+ AppLanguage(rawValue: store.string(forKey: storageKey) ?? "") ?? .system
+ }
+
+ public static func systemIsChinese(languages: [String] = Locale.preferredLanguages) -> Bool {
+ systemScript(languages: languages) != nil
+ }
+
+ /// `zh-Hant`, `zh-TW`, `zh-HK` and `zh-MO` read Traditional. Other Chinese locales read Simplified.
+ public static func systemScript(languages: [String] = Locale.preferredLanguages) -> ChineseScript? {
+ guard let id = languages.first?.lowercased().replacingOccurrences(of: "_", with: "-") else { return nil }
+ guard id.hasPrefix("zh") else { return nil }
+ if id.contains("hant") || id.contains("-tw") || id.contains("-hk") || id.contains("-mo") { return .hant }
+ return .hans
+ }
+
+ public static func usesChinese(preference: AppLanguage, systemIsChinese: Bool) -> Bool {
+ switch preference {
+ case .zh, .zhHant: true
+ case .en: false
+ case .system: systemIsChinese
+ }
+ }
+
+ /// The locale SwiftUI should use so dates and string lookups follow the choice.
+ public static func locale(preference: AppLanguage, systemIsChinese: Bool) -> Locale {
+ switch preference {
+ case .zh: return Locale(identifier: "zh-Hans")
+ case .zhHant: return Locale(identifier: "zh-Hant")
+ case .en: return Locale(identifier: "en")
+ case .system:
+ guard systemIsChinese else { return Locale(identifier: "en") }
+ return systemScript() == .hant ? Locale(identifier: "zh-Hant") : Locale(identifier: "zh-Hans")
+ }
+ }
+
+ /// What the language menu shows for this choice. Names of languages stay in that language.
+ public static func menuTitle(_ language: AppLanguage, preference: AppLanguage, systemIsChinese: Bool) -> String {
+ switch language {
+ case .system: L10n.tr("Follow system", preference: preference, systemIsChinese: systemIsChinese)
+ case .zh: "简体中文"
+ case .zhHant: "繁體中文"
+ case .en: "English"
+ }
+ }
+}
+
+/// English source strings, with a Simplified or Traditional table when the app language asks for it.
+public enum L10n {
+ private static let log = Logger(subsystem: "com.pokai.Codync", category: "L10n")
+
+ private static let hans = load("zh-Hans")
+ private static let hant = load("zh-Hant")
+
+ /// A missing or malformed table is logged and left empty, so the interface stays in English.
+ private static func load(_ name: String) -> [String: String] {
+ guard let url = Bundle.module.url(forResource: name, withExtension: "json") else {
+ log.error("\(name, privacy: .public) phrases are missing from the app bundle")
+ return [:]
+ }
+ do {
+ return try JSONDecoder().decode([String: String].self, from: Data(contentsOf: url))
+ } catch {
+ log.error("\(name, privacy: .public) phrases failed to load: \(error, privacy: .public)")
+ return [:]
+ }
+ }
+
+ public static func tr(
+ _ key: String,
+ preference: AppLanguage = AppLanguage.preference(),
+ systemIsChinese: Bool = AppLanguage.systemIsChinese(),
+ systemLanguages: [String] = Locale.preferredLanguages
+ ) -> String {
+ guard let tables = tables(preference: preference, systemIsChinese: systemIsChinese, systemLanguages: systemLanguages) else {
+ return key
+ }
+ if let hit = phrase(key, primary: tables.primary, fallback: tables.fallback) { return hit }
+ let trimmed = key.trimmingCharacters(in: .whitespacesAndNewlines)
+ return trimmed == key ? key : (phrase(trimmed, primary: tables.primary, fallback: tables.fallback) ?? key)
+ }
+
+ /// Simplified, Traditional, or neither. A missing Traditional line falls back to Simplified.
+ private static func tables(
+ preference: AppLanguage,
+ systemIsChinese: Bool,
+ systemLanguages: [String]
+ ) -> (primary: [String: String], fallback: [String: String])? {
+ switch preference {
+ case .zh: return (hans, [:])
+ case .zhHant: return (hant, hans)
+ case .en: return nil
+ case .system:
+ guard systemIsChinese else { return nil }
+ return AppLanguage.systemScript(languages: systemLanguages) == .hant ? (hant, hans) : (hans, [:])
+ }
+ }
+
+ /// One piece of a phrase key such as "Runs the official installer on {name}."
+ private struct Piece {
+ var literal: String?
+ var token: String?
+ }
+
+ /// Phrase keys that already contain `{token}` slots, longest fixed text first.
+ private static let templates: [(key: String, pieces: [Piece])] = {
+ hans.compactMap { key, _ -> (Int, String, [Piece])? in
+ guard let pieces = parseTemplate(key) else { return nil }
+ let literal = pieces.reduce(0) { $0 + ($1.literal?.count ?? 0) }
+ guard literal >= 6 else { return nil }
+ return (literal, key, pieces)
+ }
+ .sorted { $0.0 == $1.0 ? $0.1.count > $1.1.count : $0.0 > $1.0 }
+ .map { ($0.1, $0.2) }
+ }()
+
+ /// `{name}` and the same shape. A `{` that is not a slot makes the key unusable as a template.
+ private static func parseTemplate(_ template: String) -> [Piece]? {
+ var pieces: [Piece] = []
+ var rest = template[...]
+ while let open = rest.firstIndex(of: "{") {
+ if open != rest.startIndex {
+ pieces.append(Piece(literal: String(rest[..<open]), token: nil))
+ }
+ guard let close = rest[open...].firstIndex(of: "}") else { return nil }
+ let token = String(rest[open...close])
+ let name = token.dropFirst().dropLast()
+ guard !name.isEmpty, name.allSatisfy({ $0.isLetter || $0.isNumber }), pieces.last?.token == nil else { return nil }
+ pieces.append(Piece(literal: nil, token: token))
+ rest = rest[rest.index(after: close)...]
+ }
+ if !rest.isEmpty { pieces.append(Piece(literal: String(rest), token: nil)) }
+ return pieces.contains(where: { $0.token != nil }) ? pieces : nil
+ }
+
+ /// A sentence the host or a view already filled in, matched back to its `{token}` phrase.
+ private static func phrase(_ key: String, primary: [String: String], fallback: [String: String]) -> String? {
+ if let hit = primary[key] ?? fallback[key] { return hit }
+ for template in templates {
+ guard let phrase = primary[template.key] ?? fallback[template.key],
+ let filled = fill(key, pieces: template.pieces, phrase: phrase, primary: primary, fallback: fallback, depth: 0) else { continue }
+ return filled
+ }
+ return nil
+ }
+
+ private static func fill(
+ _ text: String,
+ pieces: [Piece],
+ phrase: String,
+ primary: [String: String],
+ fallback: [String: String],
+ depth: Int
+ ) -> String? {
+ var pos = text.startIndex
+ var caps: [String: String] = [:]
+ for (index, piece) in pieces.enumerated() {
+ if let literal = piece.literal {
+ guard text[pos...].hasPrefix(literal) else { return nil }
+ pos = text.index(pos, offsetBy: literal.count)
+ continue
+ }
+ guard let token = piece.token else { return nil }
+ let end: String.Index
+ if let next = index + 1 < pieces.count ? pieces[index + 1].literal : nil {
+ guard let found = text[pos...].range(of: next)?.lowerBound, found > pos else { return nil }
+ end = found
+ } else {
+ guard pos < text.endIndex else { return nil }
+ end = text.endIndex
+ }
+ caps[token] = String(text[pos..<end])
+ pos = end
+ }
+ guard pos == text.endIndex else { return nil }
+ var result = phrase
+ for (token, value) in caps {
+ let inner = primary[value] ?? fallback[value] ?? (depth == 0 ? nested(value, primary: primary, fallback: fallback) : nil) ?? value
+ result = result.replacingOccurrences(of: token, with: inner)
+ }
+ return result
+ }
+
+ /// One more template pass, for a setup hint inside an error. It does not look inside its own slots.
+ private static func nested(_ text: String, primary: [String: String], fallback: [String: String]) -> String? {
+ for template in templates {
+ guard let phrase = primary[template.key] ?? fallback[template.key],
+ let filled = fill(text, pieces: template.pieces, phrase: phrase, primary: primary, fallback: fallback, depth: 1) else { continue }
+ return filled
+ }
+ return nil
+ }
+
+ /// "resets 3h 20m" / "resets in 2d 6h". Compact times become "3小时20分后重置".
+ public static func resetLine(_ raw: String) -> String {
+ guard let time = resetRemainder(raw) else { return tr(raw) }
+ let preference = AppLanguage.preference()
+ guard AppLanguage.usesChinese(preference: preference, systemIsChinese: AppLanguage.systemIsChinese()) else { return raw }
+ if let spoken = compactTime(time) { return spoken + tr("after reset") }
+ return "\(tr("resets")) \(time)"
+ }
+
+ private static func resetRemainder(_ raw: String) -> String? {
+ if raw.hasPrefix("resets in ") { return String(raw.dropFirst("resets in ".count)) }
+ if raw.hasPrefix("resets ") { return String(raw.dropFirst("resets ".count)) }
+ return nil
+ }
+
+ /// "3h 20m", "2d 6h", "45m". A clock time such as "Sep 26 at 12pm" stays nil.
+ private static func compactTime(_ time: String) -> String? {
+ var spoken = ""
+ var matched = false
+ for token in time.split(separator: " ") {
+ guard token.count >= 2, let unit = token.last, let n = Int(token.dropLast()) else { return nil }
+ let word: String
+ switch unit {
+ case "d": word = tr("day unit")
+ case "h": word = tr("hour unit")
+ case "m": word = tr("minute unit")
+ default: return nil
+ }
+ matched = true
+ if n == 0 { continue }
+ spoken += "\(n)\(word)"
+ }
+ guard matched else { return nil }
+ return spoken.isEmpty ? "0\(tr("minute unit"))" : spoken
+ }
+}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/zh-Hans.json b/apps/ios/Kit/Sources/CodyncKit/Resources/zh-Hans.json
new file mode 100644
index 00000000..ddcc1d6e
--- /dev/null
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/zh-Hans.json
@@ -0,0 +1,1165 @@
+{
+ "About usage analytics": "关于用量分析",
+ "Access": "访问",
+ "Account": "账户",
+ "Add Widget": "添加小组件",
+ "Add a Codync widget": "添加 Codync 小组件",
+ "Add a widget": "添加小组件",
+ "Add account": "添加账户",
+ "Appearance": "外观",
+ "App language": "应用语言",
+ "App language…": "应用语言…",
+ "App version": "应用版本",
+ "Apple": "Apple",
+ "Apple speech on this iPhone, or OpenAI and Gemini on your own API key, kept on the computer.": "用这台 iPhone 上的苹果语音,或你自己的 OpenAI、Gemini 密钥。密钥留在电脑上。",
+ "Applies to Usage in the app and in widgets.": "应用内的用量和小组件都会跟着变。",
+ "Approved for an earlier install of Codync. Revoke it, then ask again.": "这是更早一次安装的授权。先撤销,再重新申请。",
+ "Ask again": "再申请一次",
+ "Ask for access": "申请访问",
+ "Ask one of your account's computers for access, or pair one with its code.": "向账户里的一台电脑申请访问,或用配对码配对。",
+ "Auto: Wi-Fi or Tailscale, then Cloudflare": "自动:先 Wi-Fi 或 Tailscale,再 Cloudflare",
+ "Back": "返回",
+ "Bots": "机器人",
+ "Can't reach": "连不上",
+ "Cancel": "取消",
+ "Cancel request": "取消申请",
+ "Character": "角色",
+ "Check again": "再检查一次",
+ "Check for updates": "检查更新",
+ "Checking": "正在检查",
+ "Checking your widgets…": "正在检查小组件…",
+ "Choose": "选择",
+ "Choose the look": "选择样子",
+ "Choose your widget": "选择小组件",
+ "Clear search": "清除搜索",
+ "Close": "关闭",
+ "Cloudflare, then Wi-Fi or Tailscale": "先 Cloudflare,再 Wi-Fi 或 Tailscale",
+ "Code": "配对码",
+ "Collapse": "收起",
+ "Collapsed": "已收起",
+ "Color": "颜色",
+ "Compact sidebar": "紧凑侧栏",
+ "Complete": "完成",
+ "Computers": "电脑",
+ "Computers & devices": "电脑和设备",
+ "Computers & settings": "电脑与设置",
+ "Computer access": "电脑访问",
+ "Computers in your account need your OK on the computer before this iPhone can use them.": "账户里的电脑要先在电脑上同意,这台 iPhone 才能使用。",
+ "Computers in your account need your OK on the computer before this phone can use them.": "账户里的电脑要先在电脑上同意,这台手机才能使用。",
+ "Connect a computer": "连接一台电脑",
+ "Connects on Wi-Fi, over Tailscale, or from anywhere through Cloudflare, on its own. End-to-end encrypted.": "会自己走 Wi-Fi、Tailscale,或经 Cloudflare 从任何地方连接。端到端加密。",
+ "Connecting": "正在连接",
+ "Connecting…": "正在连接…",
+ "Connection": "连接",
+ "Continue": "继续",
+ "Continue with Apple": "通过 Apple 继续",
+ "Continue with Google": "通过 Google 继续",
+ "Copied": "已复制",
+ "Copy": "复制",
+ "Create a bot for each kind of work — a reviewer, a fixer, a docs writer — and point it at a project.": "按工作各建一个 Bot,比如审查、修 bug、写文档,并指定一个项目。",
+ "Create your first bot": "创建第一个 Bot",
+ "Customize": "自定义",
+ "Delete": "删除",
+ "Delete bot and its conversation": "删除 Bot 和它的对话",
+ "Delete group chat": "删除群聊",
+ "Details of this bot…": "这个 Bot 的详情…",
+ "Done": "完成",
+ "Each bot runs on its own computer. Sign in to see the computers in your account.": "每个 Bot 都在自己的电脑上运行。登录后可以看到账户里的电脑。",
+ "Edit": "编辑",
+ "Edit group": "编辑群聊",
+ "Edit profile": "编辑资料",
+ "English": "English",
+ "Error": "出错",
+ "Every install option": "全部安装方式",
+ "Expand": "展开",
+ "Expanded": "已展开",
+ "Extensions": "扩展",
+ "Extensions: agents, connectors, skills…": "扩展:智能体、连接器和技能…",
+ "Files": "文件",
+ "Files it changed on your computer stay as they are.": "它在电脑上改过的文件会保留。",
+ "Follow system": "跟随系统",
+ "General": "通用",
+ "Get a result summary, a request for input, or a failure notice. Notification previews follow your iOS settings.": "会收到结果摘要、需要你处理的请求,或失败通知。通知预览跟随 iOS 设置。",
+ "Get set up": "开始设置",
+ "Get started": "开始使用",
+ "Give each one a name and a project. They work on your computer while you're away.": "给每个 Bot 起名并指定项目。你不在时,它们在电脑上继续工作。",
+ "Go to": "前往",
+ "Google": "Google",
+ "Hidden bots": "已隐藏的 Bot",
+ "Hide from list": "从列表隐藏",
+ "In your account": "在你的账户里",
+ "Install with Homebrew": "用 Homebrew 安装",
+ "Its bots and conversations stay on that computer. You can pair again any time.": "Bot 和对话仍留在那台电脑上。随时可以重新配对。",
+ "Its bots and their own chats stay.": "里面的 Bot 和各自的对话会保留。",
+ "Keys": "按键",
+ "Know when a bot is done or needs you.": "Bot 完成或需要你时会通知你。",
+ "Language": "语言",
+ "Large": "大",
+ "Linux": "Linux",
+ "Live Activities are turned off in iOS Settings.": "iOS 设置里已关闭实时活动。",
+ "Live Activity": "实时活动",
+ "Loading": "正在加载",
+ "Local pairing": "本机配对",
+ "Mac": "Mac",
+ "Mark as read": "标为已读",
+ "Medium": "中",
+ "Memory of this bot…": "这个 Bot 的记忆…",
+ "Needs update": "需要更新",
+ "Needs you": "需要你",
+ "New": "新建",
+ "New bot": "新建 Bot",
+ "New bot…": "新建 Bot…",
+ "New group chat": "新建群聊",
+ "Name your group": "给群聊起个名字",
+ "Sign in so bots can use it": "登录后 Bot 才能使用",
+ "Remove {name}?": "移除 {name}?",
+ "Bots lose this connector, and the keys saved for it are deleted.": "Bot 会失去这个连接器,为它保存的密钥也会删除。",
+ "Bots stop using this skill.": "Bot 将不再使用这个技能。",
+ "Nothing installed": "还没有安装",
+ "Connectors and skills you add show up here.": "你添加的连接器和技能会显示在这里。",
+ "Install": "安装",
+ "Runs the official installer on {name}.": "在 {name} 上运行官方安装程序。",
+ "Installed on {name}.": "已安装在 {name} 上。",
+ "Checking with {name}… The first check can download it.": "正在向 {name} 确认…第一次确认时可能会下载。",
+ "Checking…": "正在确认…",
+ "Signed in.": "已登录。",
+ "Add Node.js first.": "请先添加 Node.js。",
+ "Not signed in yet.": "尚未登录。",
+ "Couldn't tell. Skip this if you've already signed in on {name}.": "无法判断。如果已经在 {name} 上登录过,可以跳过。",
+ "{name} runs on Node.js. Codync adds its own copy.": "{name} 运行需要 Node.js。Codync 会单独为它准备一份。",
+ "Added on {name}.": "已添加到 {name}。",
+ "In a terminal on {name}. Links open here.": "在 {name} 的终端里进行。链接会在这里打开。",
+ "In a terminal on {name}.": "在 {name} 的终端里进行。",
+ "Saved on {name} only.": "只保存在 {name} 上。",
+ "Finish signing in in the browser on {name}…": "请在 {name} 的浏览器里完成登录…",
+ "Opens a browser on {name}.": "会在 {name} 上打开浏览器。",
+ "Browser sign-ins open on {name} itself. Away from it? Use Remote screen to finish there.": "浏览器登录会在 {name} 本机打开。人不在旁边的话,用远程屏幕在那里完成。",
+ "This sign-in needs a newer app. Sign in on {name} for now.": "这种登录方式需要更新的应用。请先在 {name} 上登录。",
+ "Agent marketplace with 174+ AI capabilities. Browse, invoke, and pay for agent services settled in USDC on Base L2.": "智能体市场,提供 170 多种 AI 能力。可以浏览、调用,并用 Base L2 上的 USDC 结算。",
+ "ACP wrapper for Amp - the frontier coding agent": "Amp 的 ACP 封装,前沿编程智能体",
+ "Google’s AI coding agent": "Google 的 AI 编程智能体",
+ "Augment Code's powerful software agent, backed by industry-leading context engine": "Augment Code 的软件智能体,背后是业界领先的上下文引擎",
+ "Autohand Code - AI coding agent powered by Autohand AI": "Autohand Code,由 Autohand AI 驱动的编程智能体",
+ "IBM Bob is your AI-Powered Development Partner": "IBM Bob,你的 AI 开发伙伴",
+ "ACP wrapper for Anthropic's Claude": "Anthropic Claude 的 ACP 封装",
+ "Autonomous coding agent CLI - capable of creating/editing files, running commands, using the browser, and more": "自主编程智能体命令行,可以创建和编辑文件、运行命令、使用浏览器等",
+ "Tencent Cloud's official intelligent coding tool": "腾讯云官方的智能编程工具",
+ "ACP adapter for OpenAI's coding assistant": "OpenAI 编程助手的 ACP 适配器",
+ "Snowflake's Cortex Code coding agent": "Snowflake 的 Cortex Code 编程智能体",
+ "Co-building with a seasoned Rust partner.": "和一位资深 Rust 搭档一起写代码。",
+ "Minimal ACP Native Coding Agent": "精简的原生 ACP 编程智能体",
+ "Cursor's coding agent": "Cursor 的编程智能体",
+ "Batteries-included AI coding and general purpose agent powered by LangChain.": "开箱即用的 AI 编程和通用智能体,由 LangChain 驱动。",
+ "Devin CLI coding agent by Cognition": "Cognition 的 Devin CLI 编程智能体",
+ "A coding agent that puts leading models at your command.": "把领先模型交给你调用的编程智能体。",
+ "Reduces API costs by more than 50%, produces better and faster work. Uses Hash anchored parallel edits, AST manipulation and a whole lot of neat optimizations. Fully Open Source.": "API 成本可以降低一半以上,工作更快也更好。使用哈希锚定的并行编辑、AST 操作和一系列优化。完全开源。",
+ "Factory Droid - AI coding agent powered by Factory AI": "Factory Droid,由 Factory AI 驱动的编程智能体",
+ "Code and build agents with comprehensive multi-provider support": "编写和构建智能体,支持多家模型服务",
+ "Google's official CLI for Gemini": "Google 官方的 Gemini 命令行",
+ "GitHub's AI pair programmer": "GitHub 的 AI 结对程序员",
+ "ACP agent powered by Zhipu AI's GLM Coding Plan models (glm-5.1, glm-5-turbo, glm-4.7, glm-4.5-air). Supports streaming, tool calls, mid-session model switching, image input via Z.AI Coding Plan Vision MCP, and session load/fork/resume with on-disk persistence.": "智谱 GLM Coding Plan 模型驱动的 ACP 智能体(glm-5.1、glm-5-turbo、glm-4.7、glm-4.5-air)。支持流式输出、工具调用、会话中切换模型、通过 Z.AI Coding Plan Vision MCP 输入图片,以及把会话保存、分叉和恢复到磁盘。",
+ "A local, extensible, open source AI agent that automates engineering tasks": "本地、可扩展的开源 AI 智能体,用来自动完成工程任务",
+ "xAI's coding agent and CLI": "xAI 的编程智能体和命令行",
+ "Harn runs .harn agent pipelines as a native ACP coding agent over stdio.": "Harn 把 .harn 智能体流水线作为原生 ACP 编程智能体,通过标准输入输出运行。",
+ "AI Coding Agent by JetBrains": "JetBrains 的 AI 编程智能体",
+ "The open source coding agent": "开源编程智能体",
+ "Coding agent powered by multi-model orchestration": "由多模型编排驱动的编程智能体",
+ "Moonshot AI's coding assistant": "月之暗面的编程助手",
+ "MiniMax Code is an AI coding agent with Agent Client Protocol support.": "MiniMax Code,支持 Agent Client Protocol 的 AI 编程智能体。",
+ "An enhanced AI code assistant built on the Minion framework with rich development tools": "基于 Minion 框架的增强型 AI 编程助手,带有丰富的开发工具",
+ "Mistral's open-source coding assistant": "Mistral 的开源编程助手",
+ "Nova by Compass AI - a fully-fledged software engineer at your command": "Compass AI 的 Nova,一位听你调遣的软件工程师",
+ "The open source coding agent, version 2": "开源编程智能体,第 2 版",
+ "ACP adapter for pi coding agent": "pi 编程智能体的 ACP 适配器",
+ "Poolside's coding agent": "Poolside 的编程智能体",
+ "AI coding assistant with agentic capabilities": "具备智能体能力的 AI 编程助手",
+ "Alibaba's Qwen coding assistant": "阿里巴巴的 Qwen 编程助手",
+ "Local-first coding agent. Runs entirely on your machine with optional on-device LLM inference via Onde.": "本地优先的编程智能体。完全在你的电脑上运行,也可以通过 Onde 在本机推理模型。",
+ "Open-source DevOps agent in Rust with enterprise-grade security": "用 Rust 编写的开源 DevOps 智能体,具备企业级安全能力",
+ "An open-source coding agent with LLM-native code understanding and robust shell safety. Supports multiple LLM providers with automatic failover and efficient context management.": "开源编程智能体,能按模型的方式理解代码,并对 shell 做严格的安全控制。支持多家模型服务,可以自动切换,并高效管理上下文。",
+ "New group chat…": "新建群聊…",
+ "No bots yet": "还没有 Bot",
+ "No computer yet": "还没有电脑",
+ "No usage yet": "还没有用量",
+ "Not complete": "未完成",
+ "Not paired": "未配对",
+ "Not signed in": "未登录",
+ "Nothing matches": "没有匹配项",
+ "Notifications": "通知",
+ "OK": "好",
+ "Off": "关",
+ "Off in Settings": "在设置中关闭",
+ "Offline": "离线",
+ "On": "开",
+ "Online": "在线",
+ "Open Codync and it sets up the host on its own.": "打开 Codync,它会自己装好 host。",
+ "Open at login": "登录时打开",
+ "Open iOS Settings": "打开 iOS 设置",
+ "Original": "原图标",
+ "Original icon": "原图标",
+ "Pair": "配对",
+ "Pair a computer": "配对一台电脑",
+ "Pair a computer later from Computers & settings.": "稍后可以在「电脑与设置」里配对。",
+ "Pair a phone…": "配对 iPhone…",
+ "Pause": "暂停",
+ "Personal": "个人",
+ "Photos": "照片",
+ "Pin": "置顶",
+ "Play": "播放",
+ "Please wait…": "请稍候…",
+ "Preview": "预览",
+ "Push notifications": "推送通知",
+ "Reach your computers from anywhere": "随时使用你的电脑",
+ "Refresh agents": "刷新 agent",
+ "Remove": "移除",
+ "Remove from account": "从账户移除",
+ "Revoke": "撤销",
+ "Revoke this iPhone's access": "撤销这台 iPhone 的访问",
+ "Run the installer": "运行安装器",
+ "Sample data": "示例数据",
+ "Scan a computer's code": "扫描电脑上的配对码",
+ "Scan the pairing code": "扫描配对码",
+ "Screen": "屏幕",
+ "Search": "搜索",
+ "Search Widgets": "搜索小组件",
+ "Sending": "正在发送",
+ "Share usage analytics": "共享用量分析",
+ "Show Live Activities": "显示实时活动",
+ "Show in Dock": "在程序坞中显示",
+ "Show in Dynamic Island": "在灵动岛中显示",
+ "Sign in to reach your computers from anywhere": "登录后可以随时使用你的电脑",
+ "Sign in to see the computers in your account.": "登录后可以看到账户里的电脑。",
+ "Sign out": "退出登录",
+ "Signed in": "已登录",
+ "Signing in": "正在登录",
+ "Skip": "跳过",
+ "Small": "小",
+ "Something went wrong": "出了点问题",
+ "Source": "来源",
+ "Source code": "源代码",
+ "Start over": "重新开始",
+ "Start over?": "重新开始?",
+ "State": "状态",
+ "Step": "步骤",
+ "Switch account": "切换账户",
+ "System": "系统",
+ "System language is Chinese. \"Follow system\" matches the iPhone. You can switch this app to English.": "系统语言是中文。选「跟随系统」时界面和 iPhone 一致,也可以改成英文。",
+ "System language is Chinese. \"Follow system\" matches the phone. You can switch this app to English.": "系统语言是中文。选「跟随系统」时界面和手机一致,也可以改成英文。",
+ "System language is Chinese. \"Follow system\" matches this computer. You can switch this app to English.": "系统语言是中文。选「跟随系统」时界面和这台电脑一致,也可以改成英文。",
+ "System language is English. \"Follow system\" matches the iPhone. You can switch this app to Simplified or Traditional Chinese.": "系统语言是英文。选「跟随系统」时界面和 iPhone 一致,也可以改成简体中文或繁体中文。",
+ "System language is English. \"Follow system\" matches the phone. You can switch this app to Simplified or Traditional Chinese.": "系统语言是英文。选「跟随系统」时界面和手机一致,也可以改成简体中文或繁体中文。",
+ "System language is English. \"Follow system\" matches this computer. You can switch this app to Simplified or Traditional Chinese.": "系统语言是英文。选「跟随系统」时界面和这台电脑一致,也可以改成简体中文或繁体中文。",
+ "System language is Simplified Chinese. \"Follow system\" matches the iPhone. You can switch this app to Traditional Chinese or English.": "系统语言是简体中文。选「跟随系统」时界面和 iPhone 一致,也可以改成繁体中文或英文。",
+ "System language is Simplified Chinese. \"Follow system\" matches the phone. You can switch this app to Traditional Chinese or English.": "系统语言是简体中文。选「跟随系统」时界面和手机一致,也可以改成繁体中文或英文。",
+ "System language is Simplified Chinese. \"Follow system\" matches this computer. You can switch this app to Traditional Chinese or English.": "系统语言是简体中文。选「跟随系统」时界面和这台电脑一致,也可以改成繁体中文或英文。",
+ "System language is Traditional Chinese. \"Follow system\" matches the iPhone. You can switch this app to Simplified Chinese or English.": "系统语言是繁体中文。选「跟随系统」时界面和 iPhone 一致,也可以改成简体中文或英文。",
+ "System language is Traditional Chinese. \"Follow system\" matches the phone. You can switch this app to Simplified Chinese or English.": "系统语言是繁体中文。选「跟随系统」时界面和手机一致,也可以改成简体中文或英文。",
+ "System language is Traditional Chinese. \"Follow system\" matches this computer. You can switch this app to Simplified Chinese or English.": "系统语言是繁体中文。选「跟随系统」时界面和这台电脑一致,也可以改成简体中文或英文。",
+ "Text size": "文字大小",
+ "This Mac": "这台 Mac",
+ "This computer": "这台电脑",
+ "This iPhone forgets the account's computers. Your bots stay on them.": "这台 iPhone 会忘掉账户里的电脑。Bot 仍留在那些电脑上。",
+ "Through Cloudflare": "经 Cloudflare",
+ "Try again": "再试一次",
+ "Turn on": "打开",
+ "Turn on notifications": "打开通知",
+ "Turn on notifications in Settings": "在设置中打开通知",
+ "Unable to check": "无法检查",
+ "Unhide": "取消隐藏",
+ "Unpin": "取消置顶",
+ "Update delayed": "更新延迟",
+ "Updated": "已更新",
+ "Updates": "更新",
+ "Usage": "用量",
+ "Usage icons": "用量图标",
+ "Usage limits": "用量上限",
+ "Usage shows up once a computer is connected.": "连上电脑后会显示用量。",
+ "Voice and API keys": "语音和 API 密钥",
+ "Voice chat": "语音",
+ "Voice keys are kept by This Mac's host, which isn't running.": "语音密钥由这台 Mac 的 host 保存,而 host 没在运行。",
+ "Waiting for approval…": "等待电脑同意…",
+ "Waiting for computer": "等待电脑",
+ "Watch the demo": "看演示",
+ "Which features you use, never your messages, code or files. Helps us spot bugs sooner and make Codync better for you.": "只记录你用了哪些功能,不包括消息、代码或文件。便于更快发现 bug,把 Codync 做得更好。",
+ "Wi-Fi or Tailscale": "Wi-Fi 或 Tailscale",
+ "Wi-Fi or Tailscale only, never Cloudflare": "只用 Wi-Fi 或 Tailscale,不走 Cloudflare",
+ "Widget": "小组件",
+ "Working": "正在工作",
+ "Working…": "正在工作…",
+ "Resuming session…": "正在恢复会话…",
+ "Starting agent…": "正在启动 Agent…",
+ "Thinking…": "思考中…",
+ "Continuing…": "正在继续…",
+ "Couldn't start": "无法启动",
+ "Writing a reply…": "正在写回复…",
+ "Typing…": "正在输入…",
+ "Installing…": "正在安装…",
+ "Downloading {name}…": "正在下载 {name}…",
+ "Installing {name}…": "正在安装 {name}…",
+ "Needs approval: {title}": "需要批准:{title}",
+ "Summarizing the earlier conversation…": "正在总结更早的对话…",
+ "Picking up where it left off…": "正在接着上次继续…",
+ "You can ask for access again; the computer will show a new code to confirm.": "可以再次申请。电脑会显示一个新的配对码供你确认。",
+ "Your bots run there. This iPhone is how you talk to them.": "Bot 在那台电脑上运行。这台 iPhone 用来和它们对话。",
+ "Your computer": "你的电脑",
+ "Your computer reads the limits from Claude Code and Codex.": "电脑会从 Claude Code 和 Codex 读取用量上限。",
+ "or download the Mac app": "或下载 Mac 应用",
+ "or install with Homebrew": "或用 Homebrew 安装",
+ "search bots": "搜索 Bot",
+ "ACTIONS": "操作",
+ "Android speech on this phone, or OpenAI and Gemini on your own API key, kept on the computer.": "用这台手机上的 Android 语音,或你自己的 OpenAI、Gemini 密钥。密钥留在电脑上。",
+ "It's this computer under an earlier identity and can't be reached anymore. Removing it only cleans up your account.": "这是同一台电脑更早的身份,已经连不上了。移除只会清理你的账户。",
+ "Signs out of every account and forgets every computer on this iPhone, then shows the welcome again. Your computers keep their bots and chats; pair again to use them.": "会退出所有账户,并忘掉这台 iPhone 上的每台电脑,然后重新显示欢迎页。电脑上的 Bot 和对话都还在,配对后可以继续用。",
+ "Signs out of every account and forgets every computer on this phone, then shows the welcome again. Your computers keep their bots and chats; pair again to use them.": "会退出所有账户,并忘掉这台手机上的每台电脑,然后重新显示欢迎页。电脑上的 Bot 和对话都还在,配对后可以继续用。",
+ "Remove the older computer?": "移除更早的那台电脑?",
+ "On your Mac, click Codync in the menu bar, then Pair iPhone.": "在 Mac 上点菜单栏的 Codync,然后选配对 iPhone。",
+ "On your Mac, click Codync in the menu bar, then Pair iPhone. The same code pairs this phone.": "在 Mac 上点菜单栏的 Codync,然后选配对 iPhone。同一个码也能配这台手机。",
+ "On your computer, run this in a terminal:": "在电脑上的终端里运行:",
+ "Or paste a {scheme}://pair link": "或粘贴 {scheme}://pair 链接",
+ "Find nearby barcodes.": "寻找附近的条形码。",
+ "Camera not available. Paste the link below.": "相机不可用。请把链接粘贴在下面。",
+ "Codync, at a glance.": "一眼看到 Codync。",
+ "Your bots and usage, on every surface.": "Bot 和用量,出现在各个界面上。",
+ "Approve only if the computer shows exactly this code. If it doesn't, deny it there: someone may be trying to get in.": "只有电脑上显示的码和这里完全一致时才同意。不一致就在电脑上拒绝:可能有人想进入。",
+ "Install Codync\non your computer": "在电脑上\n安装 Codync",
+ "Check that this iPhone and the computer are on the same Wi-Fi or both on Tailscale, or that “Reach from anywhere” is on in Codync on the computer.": "确认这台 iPhone 和电脑在同一个 Wi-Fi,或都开了 Tailscale,或电脑上的 Codync 已打开「随处访问」。",
+ "Check that this phone and the computer are on the same Wi-Fi or both on Tailscale, or that “Reach from anywhere” is on in Codync on the computer.": "确认这台手机和电脑在同一个 Wi-Fi,或都开了 Tailscale,或电脑上的 Codync 已打开「随处访问」。",
+ "Tailscale is on: Codync connects over it directly.": "Tailscale 已打开:Codync 会直接通过它连接。",
+ "Use Tailscale? Direct and faster away from home.": "使用 Tailscale?离家时更直接,也更快。",
+ "Your coding agents,\nas teammates.": "你的编程助手,\n像队友一样。",
+ "Fix the flaky login test": "修一下不稳定的登录测试",
+ "Done. It raced the session refresh; tests pass on fix/login.": "好了。它和会话刷新撞在一起了;fix/login 上测试已通过。",
+ "Couldn't check your widgets. You can still add one using the steps below.": "暂时检查不了小组件。你仍可以按下面的步骤添加。",
+ "Keep tasks in view": "让任务保持可见",
+ "Lock Screen widgets": "锁定屏幕小组件",
+ "Widgets show the latest report. Open Codync for live updates and approvals.": "小组件显示最近一次报告。打开 Codync 看实时更新和待处理的请求。",
+ "How to add the Codync widget": "如何添加 Codync 小组件",
+ "See who needs you and who's still working.": "看谁需要你、谁还在工作。",
+ "QR pairing only in this build": "这个版本只能用二维码配对",
+ "Move up": "上移",
+ "Move down": "下移",
+ "Sample task": "示例任务",
+ "iOS chooses the presentation based on your device and other active tasks. These previews don't start a Live Activity. Approvals are handled inside Codync.": "iOS 会按设备和正在进行的其他任务决定怎么显示。这些预览不会真的启动实时活动。同意操作在 Codync 里完成。",
+ "Touch and hold your Lock Screen → Customize → Lock Screen. Tap the widget area and choose Codync. Inline widgets go in the date row above the clock.": "按住锁定屏幕 → 自定义 → 锁定屏幕。点小组件区域,选择 Codync。行内小组件放在时钟上方的日期那一行。",
+ "Choose Bots for task status or Usage limits for the highest reported limit. iOS applies your Lock Screen's color and style.": "选「机器人」看任务状态,或选「用量上限」看报得最高的额度。颜色和样式由 iOS 锁定屏幕决定。",
+ "Dismiss": "关闭",
+ "Computer": "电脑",
+ "No bots yet. Create a bot first.": "还没有 Bot。请先创建一个。",
+ "Everyone answers in turn unless you @mention someone.": "大家轮流回复,除非你 @ 某一个人。",
+ "Create": "创建",
+ "All computers": "全部电脑",
+ "Show only": "只显示",
+ "Reconnect": "重新连接",
+ "Manage computers": "管理电脑",
+ "Model": "模型",
+ "This agent doesn't advertise a model list. Leave Default or enter a model ID.": "这个 agent 没有提供模型列表。留着「默认」,或自己填一个模型 ID。",
+ "Changing the model starts a new agent session. Chat history is kept.": "更换模型会新开一个 agent 会话。聊天记录会保留。",
+ "Loading available models": "正在加载可用模型",
+ "Notes": "笔记",
+ "Longer notes, one topic each. The bot reads one when its topic comes up.": "较长的笔记,一条一个主题。聊到相关主题时,Bot 会读那一条。",
+ "Loading…": "正在加载…",
+ "Switch back": "换回来",
+ "No fallbacks yet.": "还没有备用 agent。",
+ "Personal workspace": "个人工作区",
+ "Fast mode": "快速模式",
+ "Faster replies for more usage, on models that offer it.": "回复更快,用量也更高。仅部分模型支持。",
+ "Faster replies for more usage, on models that offer it (Claude Code, Codex)": "回复更快,用量也更高。仅部分模型支持(Claude Code、Codex)。",
+ "Turn on for faster replies and more usage": "打开后回复更快,用量也更高",
+ "Turn off and return to standard speed": "关闭,回到正常速度",
+ "Turn on for every bot here: faster replies and more usage": "给这里的每个 Bot 打开:回复更快,用量也更高",
+ "Turn off for every bot here and return to standard speed": "给这里的每个 Bot 关闭,回到正常速度",
+ "Let the bot change its fallbacks": "让 Bot 自己改备用列表",
+ "It can set this list itself, for example when you ask it to.": "它可以自己改这份列表,比如你让它改的时候。",
+ "Let the bot change its fallbacks: it can set this list itself, for example when you ask it to.": "让 Bot 自己改备用列表:它可以自己改这份列表,比如你让它改的时候。",
+ "Use the computer": "使用电脑",
+ "Use computer": "使用电脑",
+ "On that computer, open Codync → Settings → Computer access to set it up first.": "先在那台电脑上打开 Codync → 设置 → 电脑访问,完成设置。",
+ "Set up on the computer: Codync → Settings → Computer access": "在电脑上设置:Codync → 设置 → 电脑访问",
+ "No routines yet. Ask the bot for one, or set it up yourself with +.": "还没有例行任务。让 Bot 建一个,或点 + 自己设置。",
+ "Loading routines…": "正在加载例行任务…",
+ "No routines. c asks the bot for one; n sets one up here.": "还没有例行任务。按 c 让 Bot 建一个;按 n 在这里设置。",
+ "Close routines": "关闭例行任务",
+ "Choose project folder…": "选择项目文件夹…",
+ "If {agent} runs out of usage or can't answer, the bot carries on with the next one. Chat, memory and workspace carry over.": "如果 {agent} 用量用完或无法回答,Bot 会交给下一个继续。对话、记忆和工作区都会带过去。",
+ "{agent} in {path}": "{agent},在 {path}",
+ "{size} pt (Default)": "{size} pt(默认)",
+ "Show in notch": "在屏幕顶部显示",
+ "Show at top of screen": "在屏幕顶部显示",
+ "Privacy": "隐私",
+ "Full conversation": "完整对话",
+ "Settings": "设置",
+ "New session": "新会话",
+ "Delete bot": "删除 Bot",
+ "Delete group": "删除群聊",
+ "Memory": "记忆",
+ "About you": "关于你",
+ "This bot": "这个 Bot",
+ "Dreams": "梦境",
+ "No dreams yet.": "还没有梦境。",
+ "Load earlier messages": "加载更早的消息",
+ "Today": "今天",
+ "Yesterday": "昨天",
+ "Instructions": "指令",
+ "Standing instructions": "常驻指令",
+ "Rules that always apply. Put task-specific requests in the chat instead.": "一直生效的规则。针对某次任务的要求,写在对话里。",
+ "e.g. Reviews PRs. Never pushes without asking.": "例如:审阅 PR。未经询问不推送。",
+ "Agent": "智能体",
+ "Manage the team": "管理团队",
+ "Manage team": "管理团队",
+ "Let this bot create bots and change any bot's setup, its own included. The bots it creates can too.": "让这个 Bot 创建 Bot,并修改任何 Bot 的设置,包括它自己。它创建的 Bot 也可以。",
+ "Let this bot see the screen and use the mouse and keyboard. You can watch and take over from your phone.": "让这个 Bot 看屏幕,并用鼠标和键盘。你可以在手机上观看和接管。",
+ "Let this bot see the screen and use the mouse and keyboard.": "让这个 Bot 看屏幕,并用鼠标和键盘。",
+ "Let this bot see the screen and use the mouse and keyboard. On that computer, open Codync → Settings → Computer access to set up permissions first.": "让这个 Bot 看屏幕,并用鼠标和键盘。先在那台电脑上打开 Codync → 设置 → 电脑访问,完成权限设置。",
+ "Let this bot use apps. On that computer, open Codync → Settings → Computer access to set up permissions first.": "让这个 Bot 使用应用。先在那台电脑上打开 Codync → 设置 → 电脑访问,完成权限设置。",
+ "Connectors": "连接器",
+ "No connectors yet. Add GitHub, Linear, Notion and more from Extensions.": "还没有连接器。到「扩展」里添加 GitHub、Linear、Notion 等。",
+ "Skills": "技能",
+ "No skills yet. Get some from Extensions, or write your own.": "还没有技能。到「扩展」里找,或自己写。",
+ "Your coding agents, as teammates.": "你的编程智能体,像队友一样。",
+ "Pick a bot, or create one for each kind of work and point it at a project.": "选一个 Bot,或为每种工作新建一个,并指向一个项目。",
+ "Mark as Read": "标为已读",
+ "Edit Profile…": "编辑资料…",
+ "Copy conversation ID": "复制对话 ID",
+ "Hide from sidebar": "从侧边栏隐藏",
+ "The host isn't running": "Host 没有在运行",
+ "The background service didn't start. macOS couldn't load {path}.": "后台服务没有启动。macOS 无法加载 {path}。",
+ "The background service didn't start.": "后台服务没有启动。",
+ "Starting the host…": "正在启动 Host…",
+ "This takes a few seconds.": "需要几秒钟。",
+ "The host isn't responding. See the log for details.": "Host 没有响应。详情见日志。",
+ "Restart the manually started development host in its terminal.": "请在终端里重启手动启动的开发版 Host。",
+ "Another build of the host is running, not this app's. Try again to replace it.": "正在运行的是另一个版本的 Host,不是这个应用自带的。再试一次即可换上。",
+ "Your computer is ready": "这台电脑已就绪",
+ "Work in your apps with a bot, or access your screen from your phone. You choose which bots can use this computer.": "让 Bot 在你的应用里工作,或从手机查看屏幕。哪些 Bot 能用这台电脑,由你决定。",
+ "Let a bot work in your apps. You choose which bots can use this computer.": "让 Bot 在你的应用里工作。哪些 Bot 能用这台电脑,由你决定。",
+ "Waiting for your computer": "等待你的电脑",
+ "Start or restart the host from Codync’s menu to continue. We’ll check again automatically.": "从 Codync 的菜单启动或重启 Host 后继续。我们会自动再检查。",
+ "Codync Screen is missing": "找不到 Codync Screen",
+ "Install the full Codync desktop app to finish setup.": "安装完整的 Codync 桌面版以完成设置。",
+ "Couldn’t finish setup": "设置没有完成",
+ "All set": "全部就绪",
+ "{done} of {total} ready": "已就绪 {done} / {total}",
+ "Runs in the background to share your screen and connect your controls.": "在后台运行,用来共享屏幕并连接键鼠。",
+ "Needs approval": "需要批准",
+ "Starting…": "正在启动…",
+ "Start again": "重新启动",
+ "Enable Codync Screen": "启用 Codync Screen",
+ "Allow Codync to run in the background in Login Items.": "在「登录项」里允许 Codync 在后台运行。",
+ "Open Login Items": "打开登录项",
+ "Screen recording": "屏幕录制",
+ "Lets Codync see your screen, including anything visible in your apps.": "允许 Codync 看到你的屏幕,包括应用里正在显示的内容。",
+ "Allow screen recording": "允许屏幕录制",
+ "Control apps": "控制应用",
+ "Lets Codync click, type and interact with apps on your behalf.": "允许 Codync 代你点击、输入,并操作应用。",
+ "Allow computer control": "允许控制电脑",
+ "Screen sharing & control": "屏幕共享和控制",
+ "Choose a screen and allow mouse and keyboard access. You can stop sharing at any time.": "选择一块屏幕,并允许鼠标和键盘访问。你可以随时停止共享。",
+ "Choose screen and allow control": "选择屏幕并允许控制",
+ "Availability": "可用性",
+ "Computer control": "电脑控制",
+ "Bots can use apps on this computer. Remote screen viewing from your phone isn’t available on Windows yet.": "Bot 可以在这台电脑上使用应用。从手机远程看屏幕在 Windows 上还不可用。",
+ "Waiting for permission…": "正在等待权限…",
+ "In System Settings, look for": "在系统设置里找到",
+ "It may be listed under Device Control and Data Access or Accessibility.": "它可能列在「设备控制和数据访问」或「辅助功能」下面。",
+ "Return here after granting access; if asked, allow the helper to restart.": "授权后回到这里;如果询问,允许助手重新启动。",
+ "Open System Settings": "打开系统设置",
+ "Permissions stay on this computer. You can change them later in Settings → Computer access.": "权限只留在这台电脑上。之后可以在「设置 → 电脑访问」里修改。",
+ "Permissions stay on this computer. Your other computers keep their own permissions.": "权限只留在这台电脑上。其他电脑各自保留自己的权限。",
+ "On iPhone, connect with a QR code or Ask Access. No SSH setup needed.": "在 iPhone 上,用二维码或「请求访问」连接。不需要设置 SSH。",
+ "Set up later": "稍后设置",
+ "Needs access": "需要访问权限",
+ "Waiting": "等待中",
+ "Computer access setup": "电脑访问设置",
+ "Profile": "资料",
+ "Avatar": "头像",
+ "Name": "名称",
+ "Workspace": "工作区",
+ "Permissions": "权限",
+ "Ask me": "每次询问",
+ "Approve automatically": "自动批准",
+ "Activity": "活动",
+ "Get notified when this bot finishes or needs you": "这个 Bot 做完或需要你时通知你",
+ "This bot has its own space for files. It can work in other folders when you ask.": "这个 Bot 有自己的文件空间。你让它去别的文件夹时,它也能工作。",
+ "This project is the default starting folder. The bot can work elsewhere when you ask.": "这个项目是默认的起始文件夹。你让它去别处时,它也能工作。",
+ "Tool requests are approved automatically. Your agent's own settings (like Claude Code's permission rules) still apply.": "工具请求会自动批准。Agent 自己的设置(比如 Claude Code 的权限规则)仍然有效。",
+ "You'll get an approval card and a notification whenever the agent asks.": "Agent 每次请求时,你会收到一张批准卡片和一条通知。",
+ "What this bot learned about you.": "这个 Bot 了解到的关于你的事。",
+ "What this bot learned about you": "这个 Bot 了解到的关于你的事",
+ "What this bot learned about you. {used} of {cap} in use. To change it, tell the bot.": "这个 Bot 了解到的关于你的事。已用 {used} / {cap}。想改的话,告诉 Bot。",
+ "Your name, time zone, people and lasting preferences, shared by your bots. {used} of {cap} in use. To change it, tell the bot.": "你的名字、时区、重要的人和长期偏好,所有 Bot 共用。已用 {used} / {cap}。想改的话,告诉 Bot。",
+ "Nothing yet. What this bot learns about you shows up here.": "还没有。这个 Bot 了解到的关于你会显示在这里。",
+ "Nothing shared yet.": "还没有共享的内容。",
+ "Nothing shared yet. Facts every bot should know (your name, time zone, people) go here.": "还没有共享的内容。所有 Bot 该知道的事(你的名字、时区、重要的人)会在这里。",
+ "Said": "说了",
+ "Reply": "回复",
+ "Stopped.": "已停止。",
+ "Ask {name}": "问 {name}",
+ "Queue a message for {name}": "给 {name} 排一条消息",
+ "Ask everyone · @ to ask one bot": "问所有人 · 用 @ 问其中一个 Bot",
+ "Reply…": "回复…",
+ "Connected through Cloudflare": "经 Cloudflare 连接",
+ "Connected over Wi-Fi or Tailscale": "通过 Wi-Fi 或 Tailscale 连接",
+ "What this bot learned about you · {harness}'s own memory on · m turns it off": "这个 Bot 了解到的关于你的事 · {harness} 自己的记忆开着 · 按 m 关掉",
+ "What this bot learned about you · {harness}'s own memory off · m turns it on": "这个 Bot 了解到的关于你的事 · {harness} 自己的记忆关着 · 按 m 打开",
+ "Shared by your bots · s stops this bot using it": "所有 Bot 共用 · 按 s 让这个 Bot 停用",
+ "This bot doesn't use what your bots share · s turns it on": "这个 Bot 不用大家共享的内容 · 按 s 打开",
+ "Fallbacks": "备用",
+ "About fallbacks": "关于备用",
+ "Add fallback": "添加备用",
+ "In use": "使用中",
+ "Add": "添加",
+ "When this bot's agent runs out of usage, is rate limited, signed out or won't start, the next agent here carries on in the same chat, with the same memory and workspace. The bot goes back to its own agent when it recovers. A fallback that uses an API key costs money. To fall back between one agent's models, set that in the agent itself (Claude Code's fallbackModel).": "这个 Bot 的 agent 用量用完、被限速、退出登录或无法启动时,下一个 agent 会在同一个对话里接着做,记忆和工作区都不变。原来的 agent 恢复后,Bot 会回到它。用 API 密钥的备用会花钱。如果只是同一个 agent 的不同模型互相备用,请在 agent 自己里面设置(Claude Code 的 fallbackModel)。",
+ "Create template": "创建模板",
+ "Close details": "关闭详情",
+ "Using the computer": "正在使用电脑",
+ "Loading memory…": "正在加载记忆…",
+ "Between chats the bot tidies its memory from your own words.": "对话之间,Bot 会根据你自己的话整理记忆。",
+ "About dreaming": "关于整理记忆",
+ "Claude Code's own notes, read-only here.": "Claude Code 自己的笔记,这里只能看。",
+ "Save": "保存",
+ "Members": "成员",
+ "Add Member": "添加成员",
+ "Copy this bot’s settings to reuse as a template. Conversation history and conversation ID are excluded.": "复制这个 Bot 的设置,做成可复用的模板。不包括对话记录和对话 ID。",
+ "Includes workspace preferences and agent configuration.": "包括工作区偏好和智能体配置。",
+ "Edit Bot avatar": "编辑 Bot 头像",
+ "Saved securely on this computer. The bot types it into the sign-in page but never sees it.": "安全地存在这台电脑上。Bot 会把它填进登录页,但自己看不到内容。",
+ "Saved securely on this computer. Never added to the conversation.": "安全地存在这台电脑上。不会写进对话。",
+ "Encrypted on the connected computer.": "加密保存在已连接的电脑上。",
+ "Storage": "存储",
+ "Keychain": "钥匙串",
+ "Secret Service": "密钥服务",
+ "System credential store": "系统凭证库",
+ "Saved connections": "已保存的连接",
+ "Sign-ins": "登录",
+ "Website or app": "网站或应用",
+ "Username or email": "用户名或邮箱",
+ "Password": "密码",
+ "Password or op:// reference": "密码或 op:// 引用",
+ "Bots type these into the matching website or app and never see the password. You can use an op:// reference.": "Bot 会在对应的网站或应用里填入这些内容,看不到密码。也可以用 op:// 引用。",
+ "Connect a shared vault": "连接共享保险库",
+ "Service account token": "服务账号令牌",
+ "Paste": "粘贴",
+ "Paste your token": "粘贴令牌",
+ "Use a service account with read access only to a dedicated shared vault. The 1Password CLI must be installed on the computer.": "使用只读权限访问专用共享保险库的服务账号。电脑上需要安装 1Password CLI。",
+ "Composio API key": "Composio API 密钥",
+ "Get a key from Composio": "从 Composio 获取密钥",
+ "Composio signs you in to apps like Gmail and Slack and runs their tools for your bots. The key stays on {name}.": "Composio 帮你登录 Gmail、Slack 等应用,并替 Bot 运行它们的工具。密钥只留在 {name} 上。",
+ "Saved (paste to replace)": "已保存(粘贴以替换)",
+ "Bots lose the apps you connected until you add a key again.": "在重新添加密钥之前,Bot 会失去已连接的应用。",
+ "New skill": "新建技能",
+ "When to use it": "何时使用",
+ "The bot sees the name and when to use it, and reads the instructions only when a task fits.": "Bot 能看到名称和何时使用,只在任务合适时才读取指令。",
+ "Step by step, in plain words…": "用白话一步步写…",
+ "Command": "命令",
+ "Config": "配置",
+ "Runs": "运行方式",
+ "Add connector": "添加连接器",
+ "Hosted by {name}": "由 {name} 托管",
+ "On {name} ({kind})": "在 {name} 上({kind})",
+ "Setup": "设置",
+ "No setup needed.": "无需设置。",
+ "Keys are saved on {name} only.": "密钥只保存在 {name} 上。",
+ "No keys needed here. If {name} wants you to sign in, its sign-in page opens next.": "这里不需要密钥。如果 {name} 要求登录,接下来会打开它的登录页。",
+ " (optional)": "(可选)",
+ "Finish signing in to {name} in the browser…": "请在浏览器里完成 {name} 的登录…",
+ "Adding {name}…": "正在添加 {name}…",
+ "Runs on {name} in the bot's project folder. Quotes work like in a shell.": "在 {name} 上、Bot 的项目文件夹里运行。引号用法和 shell 一样。",
+ "A remote MCP server, streamable HTTP or SSE.": "远程 MCP 服务器,支持 streamable HTTP 或 SSE。",
+ "Paste the MCP config from a README or another app (Claude, Cursor, VS Code). Every server in it is added. Saved on {name} only.": "粘贴 README 或其他应用(Claude、Cursor、VS Code)里的 MCP 配置。里面的每个服务器都会添加。只保存在 {name} 上。",
+ "Paste the MCP config from a README or another app (Claude, Cursor, VS Code). Every server in it is added.": "粘贴 README 或其他应用(Claude、Cursor、VS Code)里的 MCP 配置。里面的每个服务器都会添加。",
+ "Headers": "请求头",
+ "Optional, one Name: value per line. Leave empty if the service has you sign in. Saved on {name} only.": "可选,每行一个 Name: value。如果服务会让你登录,就留空。只保存在 {name} 上。",
+ "Environment": "环境变量",
+ "One KEY=value per line. Saved on {name} only.": "每行一个 KEY=value。只保存在 {name} 上。",
+ "Enter only the values you want to replace. You can use an op:// reference.": "只填写要替换的内容。也可以用 op:// 引用。",
+ "No saved connection credentials yet.": "还没有保存的连接凭证。",
+ "Values stay hidden. Select a connection to replace its credentials.": "内容保持隐藏。选一个连接来更换它的凭证。",
+ "Connect": "连接",
+ "Disconnect": "断开",
+ "Use op://vault/item/field in a connector's credential field. Codync retrieves the value when the connector runs.": "在连接器的凭证栏填 op://vault/item/field。连接器运行时,Codync 会去取这个值。",
+ "Save sign-in": "保存登录",
+ "Save credentials": "保存凭证",
+ "Load more apps": "加载更多应用",
+ "Composio settings": "Composio 设置",
+ "Remove key": "移除密钥",
+ "Connected": "已连接",
+ "Open the sign-in page": "打开登录页",
+ "Waiting for you to finish signing in…": "等你完成登录…",
+ "Asking Composio…": "正在询问 Composio…",
+ "Some agents need it to run. Codync can add a copy just for them.": "有些智能体需要它才能运行。Codync 可以只为它们装一份。",
+ "Add Node.js": "添加 Node.js",
+ "Remove saved keys": "移除已保存的密钥",
+ "Added": "已添加",
+ "No instructions.": "没有说明。",
+ "Load more agents": "加载更多智能体",
+ "Credentials": "凭证",
+ "Connectors & skills": "连接器和技能",
+ "Search agents, connectors and skills": "搜索智能体、连接器和技能",
+ "Apps": "应用",
+ "Agents": "智能体",
+ "Gmail, Slack, GitHub, Notion and 1,000 more apps": "Gmail、Slack、GitHub、Notion 等 1,000 多个应用",
+ "Set up": "设置",
+ "Installed": "已安装",
+ "Not installed": "未安装",
+ "Needs Node.js": "需要 Node.js",
+ "Sets up on first use": "首次使用时设置",
+ "Agents matching “{query}”": "匹配“{query}”的智能体",
+ "Couldn't load connectors.": "无法加载连接器。",
+ "No connectors match “{query}”.": "没有匹配“{query}”的连接器。",
+ "Couldn't load apps.": "无法加载应用。",
+ "No apps match “{query}”.": "没有匹配“{query}”的应用。",
+ "Load more connectors": "加载更多连接器",
+ "Make your own": "自己添加",
+ "Custom connector": "自定义连接器",
+ "Any MCP server: a command or a URL": "任意 MCP 服务器:一条命令或一个网址",
+ "Your own skill": "自己的技能",
+ "Write instructions a bot can follow": "写一段 Bot 可以遵循的指令",
+ "{count} installed": "已安装 {count} 个",
+ "Connectors come from the official MCP Registry, apps through Composio, skills from Anthropic, agents from the ACP registry. Everything installs on {name}.": "连接器来自官方 MCP Registry,应用通过 Composio,技能来自 Anthropic,智能体来自 ACP registry。全部安装在 {name} 上。",
+ "Connectors come from the official MCP Registry, skills from Anthropic, agents from the ACP registry. Everything installs on {name}.": "连接器来自官方 MCP Registry,技能来自 Anthropic,智能体来自 ACP registry。全部安装在 {name} 上。",
+ "Node.js isn't on {name}": "{name} 上没有 Node.js",
+ "Couldn't load more connectors.": "无法加载更多连接器。",
+ "Couldn't load skills.": "无法加载技能。",
+ "Switch computer": "切换电脑",
+ "Computer: {name}": "电脑:{name}",
+ "not installed": "未安装",
+ "needs Node.js": "需要 Node.js",
+ "signed in": "已登录",
+ "not signed in": "未登录",
+ "installed": "已安装",
+ "sets up on first use": "首次使用时设置",
+ "↵ sign in": "↵ 登录",
+ "filter": "筛选",
+ "search the MCP registry": "搜索 MCP Registry",
+ "↵ searches the registry": "按 ↵ 搜索注册表",
+ "Some agents need it to run. Codync adds a copy just for them.": "有些智能体需要它才能运行。Codync 会只为它们添加一份。",
+ "Paste any MCP server's config": "粘贴任意 MCP 服务器的配置",
+ "Loading the registry…": "正在加载注册表…",
+ "tab switch · ↵ install / sign in · ^r refresh · esc close": "Tab 切换 · ↵ 安装 / 登录 · ^r 刷新 · Esc 关闭",
+ "tab switch · ↵ add / sign in · ^x remove · ^r refresh · esc": "Tab 切换 · ↵ 添加 / 登录 · ^x 移除 · ^r 刷新 · Esc",
+ "tab switch · ↵ details · ^x remove · esc close": "Tab 切换 · ↵ 详情 · ^x 移除 · Esc 关闭",
+ "Sign in": "登录",
+ "No matching time zones": "没有匹配的时区",
+ "e.g. Morning summary": "例如:早晨摘要",
+ "Describe what this bot should do each time it runs.": "写下这个 Bot 每次运行时要做的事。",
+ "Loading schedule…": "正在加载日程…",
+ "Run settings": "运行设置",
+ "A run is stopped after this long. 1 second to 24 hours.": "运行超过这个时间会被停下。1 秒到 24 小时。",
+ "Runs each time something is posted to its URL. Save to get the URL and key.": "每次有人向它的网址提交内容时运行。保存后会得到网址和密钥。",
+ "Set up by the bot. Pick Schedule or Webhook to replace it.": "由 Bot 设置。选「日程」或「Webhook」来替换。",
+ "minute hour day month weekday": "分 时 日 月 星期",
+ "Check schedule again": "重新检查日程",
+ "Retry loading schedule": "重试加载日程",
+ "Connect to this computer to save your routine.": "先连上这台电脑,才能保存例行任务。",
+ "Enter a name and instruction above to save.": "先在上面填写名称和说明,再保存。",
+ "Delete routine": "删除例行任务",
+ "Routines": "例行任务",
+ "Set up a routine": "设置例行任务",
+ "Ask the bot for a routine": "让 Bot 设置例行任务",
+ "Replace key": "更换密钥",
+ "Loading webhook…": "正在加载 Webhook…",
+ "End call": "结束通话",
+ "Key saved": "密钥已保存",
+ "Test key": "测试密钥",
+ "Add it in Codync on that computer: Computers & devices, then Voice chat.": "在那台电脑的 Codync 里添加:电脑和设备,然后是语音。",
+ "Rotate": "轮换",
+ "Fit screen": "适应屏幕",
+ "Displays": "显示器",
+ "Clipboard": "剪贴板",
+ "View only. To allow control, open Codync → Settings → Computer access on the computer.": "目前只能看。要允许控制,在电脑上打开 Codync → 设置 → 电脑访问。",
+ "Refreshing": "正在刷新",
+ "Everyone answers in turn. @mention a bot to ask just that one.": "大家轮流回复。@ 某个 Bot 就只问那一个。",
+ "Tell it what you need. You'll get a notification when it's done or needs you.": "告诉它你要做什么。完成或需要你时会收到通知。",
+ "Loading earlier messages": "正在加载更早的消息",
+ "Details": "详情",
+ "Jump to latest": "跳到最新",
+ "Cancel reply": "取消回复",
+ "Add files": "添加文件",
+ "Sending…": "正在发送…",
+ "Failed to send": "发送失败",
+ "Resend": "重新发送",
+ "Not sent — stopped": "未发送 — 已停止",
+ "Waiting for the computer to come online": "等待电脑上线",
+ "Don't send": "不发送",
+ "Delivered to the computer": "已送到电脑",
+ "Add a fallback": "添加备用",
+ "Nothing yet.": "还没有内容。",
+ "Thinking": "思考中",
+ "Plan": "计划",
+ "No messages yet.": "还没有消息。",
+ "What it carries": "它带着什么",
+ "Keep this conversation": "保留这个对话",
+ "Edit what it carries": "编辑它带着的内容",
+ "Review": "查看",
+ "Dynamic Island": "灵动岛",
+ "Lock Screen": "锁定屏幕",
+ "Compact": "紧凑",
+ "Minimal": "最小",
+ "The Dynamic Island shows the same Live Activity as the Lock Screen, so this switch turns off both.": "灵动岛和锁定屏幕用的是同一个实时活动,所以这个开关会同时关掉两边。",
+ "Starts when you send a task from this iPhone. Follow its progress, then open the conversation when your bot needs you.": "从这台 iPhone 发出任务时开始。可以看进度,Bot 需要你时再打开对话。",
+ "The bot in its mood, its current step in the state's color, the running time and a thinking orb. When the bot needs you, Review opens the request.": "显示 Bot 的状态、当前步骤(颜色跟着状态走)、已运行时间和一个思考球。需要你时,点「查看」打开请求。",
+ "The bot and a thinking orb beside the camera, outlined in the state's color. The orb becomes a check or warning when the task ends.": "摄像头旁边是 Bot 和一个思考球,描边颜色跟着状态走。任务结束时,球会变成对勾或警告。",
+ "Just the orb when iOS displays multiple Live Activities.": "iOS 同时显示多个实时活动时,只留下这个球。",
+ "Touch and hold the Dynamic Island for the current step and the running time, or Review when the bot needs you. Tap to open the conversation.": "按住灵动岛可看当前步骤和已运行时间。Bot 需要你时会显示「查看」。点一下打开对话。",
+ "Running the test suite.": "正在运行测试。",
+ "Review the proposed changes.": "查看提议的修改。",
+ "Failed": "失败",
+ "Waiting for update": "等待更新",
+ "Need you": "需要你",
+ "All quiet": "都很安静",
+ "No access": "没有访问权限",
+ "%d connected": "%d 台已连接",
+ "%d/%d connected": "%d/%d 台已连接",
+ "%d offline": "%d 台离线",
+ "Use what your bots share": "使用 Bot 共享的内容",
+ "Provider usage": "服务用量",
+ "Team": "团队",
+ "Small widget": "小号小组件",
+ "Medium widget": "中号小组件",
+ "Large widget": "大号小组件",
+ "Small shows the tightest limit. Medium shows two windows. Large adds a summary and up to four limits.": "小号显示最紧的额度。中号显示两个窗口。大号再加上摘要,最多四个额度。",
+ "Four bots as characters with a dot for each one at work. Touch and hold the widget, then Edit Widget to choose who sits in each spot; empty spots show the bots that need you first.": "四个 Bot 显示成角色,正在工作的旁边有个点。按住小组件,点编辑小组件,选每个位置放谁;空位会优先显示需要你的 Bot。",
+ "See who needs you and who's still working. Large shows up to six bots.": "看谁需要你、谁还在工作。大号最多显示六个 Bot。",
+ "Default": "默认",
+ "Couldn't sign in. Check your connection and try again.": "登录失败。检查网络后再试一次。",
+ "Couldn't sign out. Check your connection and try again.": "退出失败。检查网络后再试一次。",
+ "Couldn't switch accounts. Check your connection or sign in again.": "切换账户失败。检查网络,或重新登录。",
+ "Couldn't finish signing in. Please try again.": "登录没有完成。请再试一次。",
+ "Sign-in setup isn't finished yet. You can continue using local pairing.": "登录还没配置好。你可以继续用本机配对。",
+ "Apple sign-in needs additional verification. Your account is not signed in yet.": "Apple 登录还需要额外验证。账户还没有登录。",
+ "Google sign-in needs additional verification. Your account is not signed in yet.": "Google 登录还需要额外验证。账户还没有登录。",
+ "Apple sign-up needs additional account information. Your account is not signed in yet.": "Apple 注册还需要补充账户信息。账户还没有登录。",
+ "Google sign-up needs additional account information. Your account is not signed in yet.": "Google 注册还需要补充账户信息。账户还没有登录。",
+ "Sign in again to reach your account.": "重新登录后才能使用账户。",
+ "Codync account": "Codync 账户",
+ "Usage analytics": "用量分析",
+ "Features you use": "你使用的功能",
+ "Opening the app and its screens, setting up and pairing (and whether you allow notifications), creating or deleting a bot, sending a message (how many attachments, never the files), running a routine or a voice call, installing a connector. Each comes with the app version, the platform, and the bot's agent and model.": "打开应用和各个页面、设置和配对(以及你是否允许通知)、创建或删除 Bot、发送消息(附件有几个,不包括文件本身)、运行例行任务或语音通话、安装连接器。每条都会带上应用版本、平台,以及 Bot 的 agent 和模型。",
+ "Crashes and errors": "崩溃和错误",
+ "When Codync crashes or an agent fails to answer: the kind of error and where in Codync's own code it happened. Never the error's message; file paths are cut down to Codync's own files.": "Codync 崩溃,或 agent 无法回答时:错误的种类,以及发生在 Codync 自己代码的哪里。不包括错误信息本身;文件路径会缩短到只剩 Codync 自己的文件。",
+ "Approximate location": "大致位置",
+ "Country and city, looked up from your IP address. The IP address itself is never stored.": "根据 IP 地址查出的国家和城市。IP 地址本身不会保存。",
+ "Who it belongs to": "属于谁",
+ "Your Codync account when you're signed in, otherwise a random ID made on this device.": "已登录时是你的 Codync 账户,否则是这台设备上生成的一个随机 ID。",
+ "Never shared": "绝不会共享",
+ "Your messages, prompts, code, files, file names or paths, bot names, credentials, or anything your agents produce.": "你的消息、提示词、代码、文件、文件名或路径、Bot 名称、凭证,以及 agent 生成的任何内容。",
+ "How it's used": "如何使用",
+ "Only to spot bugs sooner and see which features work and where people get stuck. Never sold, never used for ads or to track you across other apps and websites.": "只用来更快发现 bug,以及看哪些功能有用、人们在哪里卡住。不会出售,不会用于广告,也不会用来在其他应用和网站上跟踪你。",
+ "Your choice": "由你决定",
+ "Each iPhone and each computer has its own switch. Turning it off stops sending right away and drops anything not sent yet.": "每台 iPhone 和每台电脑各有自己的开关。关掉后会立刻停止发送,还没发出去的也会丢掉。",
+ "Each phone and each computer has its own switch. Turning it off stops sending right away and drops anything not sent yet.": "每台手机和每台电脑各有自己的开关。关掉后会立刻停止发送,还没发出去的也会丢掉。",
+ "See the Privacy Policy for details.": "详情见隐私政策。",
+ "Privacy Policy": "隐私政策",
+ "See the": "详情见",
+ "for details.": "。",
+ "Touch and hold an empty spot on the Home Screen": "按住主屏幕的空白处",
+ "Tap Edit, then Add Widget": "点「编辑」,然后点「添加小组件」",
+ "Find Codync in the list": "在列表里找到 Codync",
+ "Tap Add Widget": "点「添加小组件」",
+ "Tap Done": "点「完成」",
+ "Batteries": "电池",
+ "Calendar": "日历",
+ "Fitness": "健身",
+ "Weather": "天气",
+ "See the Privacy Policy for details: ": "详情见隐私政策:",
+ "Steps check themselves as you finish them.": "做完一步,这里会自己打勾。",
+ "Session": "会话",
+ "Weekly": "每周",
+ "highest usage": "用量最高",
+ "Open Codync to connect a computer and check {provider} usage.": "打开 Codync,连接一台电脑后即可查看 {provider} 用量。",
+ "Open Codync to pair with your computer.": "打开 Codync,与你的电脑配对。",
+ "No usage reported yet.": "还没有用量报告。",
+ "resets": "重置于",
+ "Usage reported by your computer": "用量由你的电脑报告",
+ "after reset": "后重置",
+ "day unit": "天",
+ "hour unit": "小时",
+ "minute unit": "分",
+ "Resets": "重置",
+ "5-hour": "5 小时",
+ "Ready": "就绪",
+ "Review changes": "审阅改动",
+ "Running tests": "正在跑测试",
+ "Reviewer": "审阅",
+ "Builder": "构建",
+ "Docs": "文档",
+ "codync-host install keeps it running in the background.": "codync-host install 会让它在后台一直运行。",
+ "{name} isn't set up on this computer. {hint}": "{name} 还没有在这台电脑上设置好。{hint}",
+ "Check that it's installed on this computer.": "请确认它已经安装在这台电脑上。",
+ "Codync installs it automatically. Sign in to {name} on this computer first if it needs an account.": "Codync 会自动安装。如果需要账号,请先在这台电脑上登录 {name}。",
+ "Install Claude Code and run `claude auth login`.": "安装 Claude Code,然后运行 `claude auth login`。",
+ "Install Codex CLI and run `codex login --device-auth`.": "安装 Codex CLI,然后运行 `codex login --device-auth`。",
+ "Install Cursor CLI (curl https://cursor.com/install -fsS | bash) and run `cursor-agent login`.": "安装 Cursor CLI(curl https://cursor.com/install -fsS | bash),然后运行 `cursor-agent login`。",
+ "Install pi (npm install -g @earendil-works/pi-coding-agent), run `pi` and type /login.": "安装 pi(npm install -g @earendil-works/pi-coding-agent),运行 `pi`,然后输入 /login。",
+ "Install oh-my-pi (curl -fsSL https://omp.sh/install | sh -s -- --binary) and run `omp login`.": "安装 oh-my-pi(curl -fsSL https://omp.sh/install | sh -s -- --binary),然后运行 `omp login`。",
+ "Install OpenCode (curl -fsSL https://opencode.ai/install | bash) and run `opencode auth login`.": "安装 OpenCode(curl -fsSL https://opencode.ai/install | bash),然后运行 `opencode auth login`。",
+ "Install Grok Build (curl -fsSL https://x.ai/cli/install.sh | bash) and run `grok login --device-auth`.": "安装 Grok Build(curl -fsSL https://x.ai/cli/install.sh | bash),然后运行 `grok login --device-auth`。",
+ "Install Gemini CLI (npm install -g @google/gemini-cli) and run `gemini` to sign in with Google.": "安装 Gemini CLI(npm install -g @google/gemini-cli),然后运行 `gemini`,用 Google 登录。",
+ "Install Copilot CLI (curl -fsSL https://gh.io/copilot-install | bash) and run `copilot login`.": "安装 Copilot CLI(curl -fsSL https://gh.io/copilot-install | bash),然后运行 `copilot login`。",
+ "Install Qwen Code (its standalone installer), run `qwen` and type /auth.": "安装 Qwen Code(它的独立安装程序),运行 `qwen`,然后输入 /auth。",
+ "Install goose and run `goose configure`.": "安装 goose,然后运行 `goose configure`。",
+ "Install Kimi Code (curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash) and run `kimi login`.": "安装 Kimi Code(curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash),然后运行 `kimi login`。",
+ "Install Droid (curl -fsSL https://app.factory.ai/cli | sh) and sign in with `droid`.": "安装 Droid(curl -fsSL https://app.factory.ai/cli | sh),然后用 `droid` 登录。",
+ "Install Amp (curl -fsSL https://ampcode.com/install.sh | bash) and run `amp login`.": "安装 Amp(curl -fsSL https://ampcode.com/install.sh | bash),然后运行 `amp login`。",
+ "Install Kilo CLI (npm install -g @kilocode/cli) and run `kilo auth login`.": "安装 Kilo CLI(npm install -g @kilocode/cli),然后运行 `kilo auth login`。",
+ "Install Cline CLI (npm install -g cline) and run `cline auth`.": "安装 Cline CLI(npm install -g cline),然后运行 `cline auth`。",
+ "Install Auggie (npm install -g @augmentcode/auggie) and run `auggie login`.": "安装 Auggie(npm install -g @augmentcode/auggie),然后运行 `auggie login`。",
+ "Install Mistral Vibe (curl -LsSf https://mistral.ai/vibe/install.sh | bash) and run `vibe --setup`.": "安装 Mistral Vibe(curl -LsSf https://mistral.ai/vibe/install.sh | bash),然后运行 `vibe --setup`。",
+ "Install Kiro CLI (curl -fsSL https://cli.kiro.dev/install | bash) and run `kiro-cli login`.": "安装 Kiro CLI(curl -fsSL https://cli.kiro.dev/install | bash),然后运行 `kiro-cli login`。",
+ "Install the Devin CLI (curl -fsSL https://cli.devin.ai/install.sh | bash) and run `devin auth login`.": "安装 Devin CLI(curl -fsSL https://cli.devin.ai/install.sh | bash),然后运行 `devin auth login`。",
+ "Install Qoder CLI (curl -fsSL https://qoder.com/install | bash) and run `qodercli login`.": "安装 Qoder CLI(curl -fsSL https://qoder.com/install | bash),然后运行 `qodercli login`。",
+ "Install CodeBuddy Code (npm install -g @tencent-ai/codebuddy-code) and sign in with `codebuddy`.": "安装 CodeBuddy Code(npm install -g @tencent-ai/codebuddy-code),然后用 `codebuddy` 登录。",
+ "Install MiniMax Code (npm install -g @minimax-ai/code) and run `mcode login`.": "安装 MiniMax Code(npm install -g @minimax-ai/code),然后运行 `mcode login`。",
+ "Install Junie (curl -fsSL https://junie.jetbrains.com/install.sh | bash) and sign in with `junie`.": "安装 Junie(curl -fsSL https://junie.jetbrains.com/install.sh | bash),然后用 `junie` 登录。",
+ "Install the Antigravity CLI (curl -fsSL https://antigravity.google/cli/install.sh | bash) and sign in with `agy`.": "安装 Antigravity CLI(curl -fsSL https://antigravity.google/cli/install.sh | bash),然后用 `agy` 登录。",
+ "Install Cortex Code (curl -LsS https://ai.snowflake.com/static/cc-scripts/install.sh | sh) and set up a connection with `cortex`.": "安装 Cortex Code(curl -LsS https://ai.snowflake.com/static/cc-scripts/install.sh | sh),然后用 `cortex` 设置连接。",
+ "Install Poolside (curl -fsSL https://downloads.poolside.ai/pool/install.sh | sh) and run `pool login`.": "安装 Poolside(curl -fsSL https://downloads.poolside.ai/pool/install.sh | sh),然后运行 `pool login`。",
+ "Couldn't load models: {error}": "无法加载模型:{error}",
+ "A memory of its own": "它自己的记忆",
+ "Remembered twice": "记了两次",
+ "Forgetting": "忘记",
+ "Where to see it": "在哪里看",
+ "{name} keeps notes apart from Codync's memory. It's off by default, so this bot has one memory and you see all of it here.": "{name} 的笔记和 Codync 的记忆是分开的。默认关闭,所以这个 Bot 只有一份记忆,你在这里能全部看到。",
+ "With both on, the bot may save the same thing twice, and the two can disagree after something changes.": "两个都开着时,Bot 可能把同一件事存两遍,之后有变动时两边还会对不上。",
+ "What the bot forgets in Codync stays in {name}'s notes. Codync can't change them.": "Bot 在 Codync 里忘掉的内容,仍留在 {name} 的笔记里。Codync 改不了那些笔记。",
+ "Its notes show read-only under the {name} tab.": "它的笔记在 {name} 标签下只读显示。",
+ "Codync can't show it; look in {name} itself.": "Codync 显示不了,请到 {name} 自己里面看。",
+ "Dreaming": "梦境",
+ "{name}'s own memory": "{name} 自己的记忆",
+ "About {name}'s own memory": "关于 {name} 自己的记忆",
+ "Turn on {name}'s own memory?": "打开 {name} 自己的记忆?",
+ "Tidying between chats": "对话之间整理",
+ "Adds and takes out": "添加和删去",
+ "Only your words": "只取你的原话",
+ "Kept apart": "单独进行",
+ "A record": "一份记录",
+ "After five quiet minutes or eight messages, the bot reads what you said since its last run and updates its memory.": "安静五分钟,或再过八条消息之后,Bot 会读上一次以来你说过的话,并更新记忆。",
+ "Green lines are memories it added. Red lines are ones it took out because they went out of date or moved into a note. It can also add a line to a note.": "绿行是它添加的记忆。红行是它删掉的,因为过时了,或移进了一条笔记。它也可以往笔记里加一行。",
+ "What it adds quotes something you typed yourself; pasted text, the bot's replies and other bots don't count. It never changes what you wrote. It may also put a passed date in the past tense, or move a detail into a note when memory is full.": "它添加的内容引用你亲手打出来的话;粘贴的文字、Bot 的回复和其他 Bot 都不算。它不会改你写过的内容。日期过了,它也可能改成过去时,或者在记忆满了的时候把一条细节移进笔记。",
+ "It runs in its own session, away from the chat, and fixed checks decide what it may save.": "它在自己的会话里运行,离开当前对话,由固定的检查决定可以保存什么。",
+ "This tab only shows what it did. To change a memory, tell the bot.": "这个标签只显示它做了什么。要改一条记忆,直接告诉 Bot。",
+ "Your bots run there. This phone is how you talk to them.": "你的 Bot 在那里运行。这台手机是你和它们说话的地方。",
+ "Saved (type to replace)": "已保存(输入以替换)",
+ "Next {when}": "下次 {when}",
+ "The terminal couldn't load. Update Android System WebView, then try again.": "终端加载不了。请更新 Android System WebView,然后再试。",
+ "The Codync cloud is off, so only this computer can send to it.": "Codync 云已关闭,所以只有这台电脑能向它发送。",
+ "POST with Authorization: Bearer <key>. For GitHub, use content type application/json and the key as the secret. Deliveries wait up to 72 hours while this computer is off. They pass through the Codync cloud, which can read them.": "用 POST,请求头为 Authorization: Bearer <key>。GitHub 请把内容类型设为 application/json,并把密钥当作 secret。这台电脑关机时,投递最多等待 72 小时。它们会经过 Codync 云,云端可以读到内容。",
+ "↑↓ move · ↵ run · esc back": "↑↓ 移动 · ↵ 执行 · esc 返回",
+ "A bot has an update.": "有 Bot 更新了。",
+ "A group has no memory of its own": "群聊没有自己的记忆",
+ "A group has no session of its own": "群聊没有自己的会话",
+ "ACP command, e.g. my-agent --acp": "ACP 命令,例如 my-agent --acp",
+ "API key": "API 密钥",
+ "Access request": "访问请求",
+ "Account menu": "账户菜单",
+ "Add SSH computer": "添加 SSH 电脑",
+ "Add memory": "添加记忆",
+ "Add reaction": "添加回应",
+ "Add to Home Screen": "添加到主屏幕",
+ "Agent setup terminal": "智能体设置终端",
+ "Agents refreshed": "智能体已刷新",
+ "Allow camera": "允许相机",
+ "Android chooses how Live updates appear based on your device and other tasks. These previews don't start one. Approvals are handled inside Codync.": "Android 会按你的设备和正在做的事决定实时更新怎么显示。这些预览不会真的发起一个。批准在 Codync 里处理。",
+ "Automatically check for updates": "自动检查更新",
+ "Automatically download and install": "自动下载并安装",
+ "Bot conversations are read-only": "Bot 之间的对话是只读的",
+ "Call settings": "通话设置",
+ "Camera settings": "相机设置",
+ "Checking for a saved account…": "正在查找已保存的账户…",
+ "Choose a bot": "选择一个 Bot",
+ "Choose key file": "选择密钥文件",
+ "Claude Code and Codex limits show up here once a bot has used them.": "Bot 用过之后,Claude Code 和 Codex 的限额会显示在这里。",
+ "Codync Screen": "Codync Screen",
+ "Codync is free and open source. A star on GitHub is how other people find it.": "Codync 免费且开源。在 GitHub 上加一颗星,别人就能找到它。",
+ "Codync opens an SSH tunnel to codync-host on that computer's loopback. It uses your SSH config and ssh-agent; agent forwarding stays off.": "Codync 通过 SSH 隧道连到那台电脑本机的 codync-host。它使用你的 SSH 配置和 ssh-agent,不会开启代理转发。",
+ "Connect this computer to create the bot.": "先连上这台电脑,才能创建 Bot。",
+ "Connection request updated": "连接请求已更新",
+ "Conversation details": "对话详情",
+ "Copied the last reply": "已复制上一条回复",
+ "Copy install command": "复制安装命令",
+ "Copy pairing link": "复制配对链接",
+ "Copy selection": "复制选中内容",
+ "Create your first bot in Codync.": "在 Codync 里创建你的第一个 Bot。",
+ "Credential or op:// reference": "凭证或 op:// 引用",
+ "Custom command": "自定义命令",
+ "Delete routine?": "删除例行任务?",
+ "Download cancelled · f retries": "下载已取消 · f 重试",
+ "Downloading… · f cancels": "正在下载… · f 取消",
+ "Edit the handoff": "编辑交接",
+ "Enjoying Codync?": "喜欢 Codync 吗?",
+ "Finish in the browser, then ^r refreshes": "在浏览器里完成后,按 ^r 刷新",
+ "Finish signing in in the browser on this computer": "在这台电脑的浏览器里完成登录",
+ "Forgetting something in Codync doesn't reach it.": "在 Codync 里忘掉的内容,到不了那里。",
+ "Get Codync for mobile": "获取手机版 Codync",
+ "Get a key": "获取密钥",
+ "Group chat": "群聊",
+ "Help & documentation": "帮助与文档",
+ "Host installed; connecting…": "Host 已安装,正在连接…",
+ "Installing the host…": "正在安装 Host…",
+ "Installing the skill…": "正在安装技能…",
+ "It may store things twice; the two memories can disagree.": "它可能存两遍,两份记忆会对不上。",
+ "It stops running.": "它会停止运行。",
+ "Let account devices in without a code?": "允许账户里的设备不输入验证码就进入?",
+ "Live updates on your Lock Screen": "在锁屏上显示实时更新",
+ "Loading history…": "正在加载历史…",
+ "Longer leaves time to think mid-sentence.": "长一点,方便你在句子中间想一想。",
+ "Memory history": "记忆历史",
+ "Message a bot": "给 Bot 发消息",
+ "More message actions": "更多消息操作",
+ "Name your bot": "给你的 Bot 起个名字",
+ "New code": "新验证码",
+ "No failed routine run to try again here": "这里没有失败的例行任务可以重试",
+ "No files on that message": "那条消息没有文件",
+ "No matching bots": "没有匹配的 Bot",
+ "No message to reply to yet": "还没有可以回复的消息",
+ "No other computers in your account yet.": "你的账户里还没有其他电脑。",
+ "No pending connection request here": "这里没有待处理的连接请求",
+ "No reply to copy": "没有可以复制的回复",
+ "No usage information yet.": "还没有用量信息。",
+ "No usage yet.": "还没有用量。",
+ "No usage yet. Open Codync to refresh.": "还没有用量。打开 Codync 刷新。",
+ "None yet. Pair an iPhone, or approve one from your account.": "还没有。配对一台 iPhone,或从账户里批准一台。",
+ "Not now": "暂时不要",
+ "Not working right now": "现在不可用",
+ "Nothing running right now.": "现在没有在运行的。",
+ "Nothing yet. Claude Code's notes show up here once it saves some.": "还没有。Claude Code 存了笔记之后,会显示在这里。",
+ "Older versions": "更早的版本",
+ "On device": "在本机",
+ "On this Android version a task shows as an ongoing notification. Live updates and the status bar chip need Android 16 QPR1.": "在这个 Android 版本上,任务显示为一条持续通知。实时更新和状态栏标记需要 Android 16 QPR1。",
+ "Only a routine that runs on a webhook has a URL and key": "只有通过 webhook 运行的例行任务才有网址和密钥",
+ "Only messages take replies": "只有消息可以回复",
+ "Open Android settings": "打开 Android 设置",
+ "Open Codync": "打开 Codync",
+ "Open account menu for Account": "打开账户菜单",
+ "Open conversation": "打开对话",
+ "Opening the terminal…": "正在打开终端…",
+ "Other computers in your account": "账户里的其他电脑",
+ "Other sign-in options": "其他登录方式",
+ "Over SSH": "通过 SSH",
+ "Pair iPhone": "配对 iPhone",
+ "Push isn't set up in this build. Bots and chats still update while Codync is open.": "这个版本没有设置推送。Codync 打开时,Bot 和对话仍会更新。",
+ "Reach from anywhere": "随时随地连接",
+ "Reconnect to this computer to save settings.": "重新连接这台电脑后才能保存设置。",
+ "Replace the key?": "更换密钥?",
+ "Report an issue": "报告问题",
+ "Reset all data?": "重置全部数据?",
+ "Reset everything": "全部重置",
+ "Revoke access": "撤销访问",
+ "Routines belong to a bot, not a group": "例行任务属于 Bot,不属于群聊",
+ "Runs each time something is posted to its URL.": "每次有内容发到它的网址时运行。",
+ "Saved securely; never added to chat. Esc closes.": "安全保存,不会写进对话。Esc 关闭。",
+ "Saving…": "正在保存…",
+ "Search bots": "搜索 Bot",
+ "Search widgets": "搜索小组件",
+ "Senders using the current key stop working until they get the new one.": "还在用当前密钥的发送方会失效,直到它们拿到新密钥。",
+ "Senders using the current key stop working.": "还在用当前密钥的发送方会失效。",
+ "Sending… Your draft stays here until delivered.": "正在发送…送达之前,草稿会留在这里。",
+ "Session timeline": "会话时间线",
+ "Set by bot": "由 Bot 设置",
+ "Show what it did": "显示它做了什么",
+ "Sign in on the page that opened. This updates by itself when you're done.": "在打开的页面上登录。完成后这里会自己更新。",
+ "Sign in to see the other computers in your account.": "登录后才能看到账户里的其他电脑。",
+ "Sign-in link copied: open it on this computer, then ^r refreshes": "登录链接已复制:在这台电脑上打开,然后按 ^r 刷新",
+ "Skip the 6-digit check": "跳过 6 位验证码",
+ "Skip the check": "跳过验证",
+ "Star Codync on GitHub": "在 GitHub 上给 Codync 加星",
+ "Star on GitHub": "在 GitHub 上加星",
+ "Start a new session?": "开始新会话?",
+ "Starting the sign-in…": "正在开始登录…",
+ "Stopping…": "正在停止…",
+ "That choice isn't offered; use 1–9": "没有这个选项,请用 1–9",
+ "That computer isn't in your account.": "那台电脑不在你的账户里。",
+ "The agent forgets this conversation's context.": "智能体会忘掉这段对话的上下文。",
+ "The conversation stays here, but the agent starts with a fresh context.": "对话还在,但智能体会从一个新的上下文开始。",
+ "The host is missing": "找不到 Host",
+ "The host is up to date.": "Host 已是最新。",
+ "The language you speak in calls.": "你在通话里说的语言。",
+ "The new one is copied in a curl command.": "新的密钥已经放进一条 curl 命令里。",
+ "The transcript stays here.": "记录会留在这里。",
+ "This connection request needs a newer app.": "这个连接请求需要更新的应用。",
+ "This deletes the routine and stops its future runs. This can't be undone.": "这会删除这个例行任务,并停掉以后的运行。无法撤销。",
+ "Time zone": "时区",
+ "Time zones": "时区",
+ "Timeout in seconds": "超时(秒)",
+ "Trust and connect": "信任并连接",
+ "Try again on this computer": "在这台电脑上再试一次",
+ "Trying it again": "正在重试",
+ "Use + to create a bot.": "用 + 创建一个 Bot。",
+ "Use ssh-agent": "使用 ssh-agent",
+ "View conversation details": "查看对话详情",
+ "What it already posted stays in the chat.": "它已经发出去的内容会留在对话里。",
+ "What the new conversation should know": "新对话需要知道的事",
+ "What this group works on": "这个群聊在做什么",
+ "When to run": "何时运行",
+ "Your bots will appear once a computer is connected.": "连上一台电脑之后,你的 Bot 会显示在这里。",
+ "Your launcher couldn't add it. Add it from the Home Screen instead.": "启动器加不了。请改从主屏幕添加。",
+ "Your next message starts a fresh conversation that begins with this.": "你的下一条消息会开始一段新对话,并以这段话开头。",
+ "Your next message starts a fresh conversation that begins with this. ⇧↵ new line, ↵ saves.": "你的下一条消息会开始一段新对话,并以这段话开头。⇧↵ 换行,↵ 保存。",
+ "esc then s stops the bot": "先按 esc,再按 s 停止 Bot",
+ "q quits": "q 退出",
+ "· now": "· 现在",
+ "Install Codync Dev on {name} and open it once. On Linux, install the development host as ~/.local/bin/codync-dev-host.": "在 {name} 上安装 Codync Dev 并打开一次。Linux 上请把开发用的 host 装成 ~/.local/bin/codync-dev-host。",
+ "codync-host isn't installed on {name}. Install it there:": "{name} 上还没有安装 codync-host。请在那里安装:",
+ "Version {version} is available: run codync-host update": "已有 {version}:请运行 codync-host update",
+ "Download failed: {error}": "下载失败:{error}",
+ "{error} Draft kept; Enter retries, Ctrl+C clears text.": "{error} 草稿还在;Enter 重试,Ctrl+C 清空文字。",
+ "1 s": "1 秒",
+ "1.5 s": "1.5 秒",
+ "2.5 s": "2.5 秒",
+ "At minute": "在这一分钟",
+ "Reading speed": "朗读速度",
+ "Send after a pause of": "停顿这么久之后发送",
+ "Created by": "创建者",
+ "Devices that were approved through the account lose access. Devices paired with a QR code keep it.": "通过账户批准的设备会失去访问。用二维码配对的设备仍然保留。",
+ "It disconnects right away and has to pair or ask again.": "它会立刻断开,之后必须重新配对或再次请求。",
+ "Authorization: Bearer …": "Authorization: Bearer …",
+ "API_KEY=…": "API_KEY=…",
+ "Claude Subscription": "Claude 订阅",
+ "Use Claude subscription": "使用 Claude 订阅",
+ "Anthropic Console": "Anthropic 控制台",
+ "Use Anthropic Console (API usage billing)": "使用 Anthropic 控制台(按 API 用量计费)",
+ "Log in with Claude": "使用 Claude 登录",
+ "Run `claude /login` in the terminal": "在终端里运行 `claude /login`",
+ "API Key": "API 密钥",
+ "Use an API key to authenticate": "使用 API 密钥登录",
+ "Use ChatGPT to authenticate": "使用 ChatGPT 登录",
+ "ChatGPT (device code)": "ChatGPT(设备码)",
+ "Sign in to ChatGPT by opening a verification page and entering a one-time code": "打开验证页面,输入一次性验证码,以登录 ChatGPT",
+ "Support": "支持",
+ "Voice": "语音",
+ "Engine": "引擎",
+ "Normal": "正常",
+ "Slower": "较慢",
+ "Faster": "较快",
+ "Realtime": "实时",
+ "Speech": "语音识别",
+ "Mode": "模式",
+ "Version": "版本",
+ "this Mac": "这台 Mac",
+ "this computer": "这台电脑",
+ "On-device speech, on this computer. Applies from the next call.": "使用这台电脑上的本机语音。下次通话起生效。",
+ "Apple speech, on this device. Applies from the next call.": "使用这台设备上的 Apple 语音。下次通话起生效。",
+ "Android speech, on this device. Applies from the next call.": "使用这台设备上的 Android 语音。下次通话起生效。",
+ "Your own {name} key, billed by {name}. Applies from the next call.": "使用你自己的 {name} 密钥,由 {name} 计费。下次通话起生效。",
+ "Reachable from anywhere through Cloudflare (encrypted).": "通过 Cloudflare 随时随地连接(已加密)。",
+ "Off: only Wi-Fi and Tailscale reach it, nothing goes through Cloudflare.": "关闭:只有 Wi-Fi 和 Tailscale 能连上,不会经过 Cloudflare。",
+ "Connecting to Cloudflare…": "正在连接 Cloudflare…",
+ "Sign in to add it to your account": "登录后把它加入你的账户",
+ "Not in your account": "不在你的账户里",
+ "In {name} account": "在 {name} 的账户里",
+ "another": "另一个",
+ "Add to account": "加入账户",
+ "Adding…": "正在添加…",
+ "Devices on your account get in on their own.": "你账户里的设备会自己进入。",
+ "Each new device shows a code you approve here.": "每台新设备都会显示一个验证码,由你在这里批准。",
+ "Devices that can use {name}": "可以使用 {name} 的设备",
+ "Paired with a QR code": "通过二维码配对",
+ "Paired with a QR code · seen {when}": "通过二维码配对 · {when} 见过",
+ "Paired with a QR code · connected": "通过二维码配对 · 已连接",
+ "Approved through the account": "通过账户批准",
+ "Approved through the account · seen {when}": "通过账户批准 · {when} 见过",
+ "Approved through the account · connected": "通过账户批准 · 已连接",
+ "connected": "已连接",
+ "Offline · seen {when}": "离线 · {when} 见过",
+ "Older copy": "较早的副本",
+ "Older copy · last seen {when}": "较早的副本 · 上次出现 {when}",
+ "Older copy of this computer": "这台电脑较早的副本",
+ "Older copy of this computer · last seen {when}": "这台电脑较早的副本 · 上次出现 {when}",
+ "Older copy of this computer · {status}": "这台电脑较早的副本 · {status}",
+ "Updates are available in release builds.": "正式版才会提供更新。",
+ "Last checked {when}": "上次检查 {when}",
+ "Run bots on another computer you reach with SSH. It needs codync-host installed; your SSH keys stay on {name}.": "在另一台你能用 SSH 连上的电脑上运行 Bot。那台电脑需要安装 codync-host;SSH 密钥留在{name}。",
+ "Sent when you pause, replies read aloud.": "你停顿后发送,回复会朗读出来。",
+ "A live conversation. Talk over replies.": "实时对话。可以在回复时插话。",
+ "Remove {name} from the account?": "从账户移除 {name}?",
+ "Revoke {name}?": "撤销 {name} 的访问?",
+ "Remove the older {name}?": "移除较早的 {name}?",
+ "It's an earlier identity of {name} and can't be reached anymore. Removing it only cleans up your account.": "这是 {name} 较早的身份,已经连不上了。移除它只是清理你的账户。",
+ "Any device signed in to your account gets full control of {name}: its files, terminals and bots, with no check here. If someone gets into your account, or Codync's cloud is ever compromised, they could add their own device and you'd have no chance to stop it. Devices paired with a QR code aren't affected.": "登录了你账户的任何设备都能完全控制 {name}:它的文件、终端和 Bot,这里不会再核对。如果有人进入你的账户,或 Codync 的云被攻破,对方可以自己加一台设备,你没有机会拦住。用二维码配对的设备不受影响。",
+ "Pair iPhone with {name}": "让 iPhone 与 {name} 配对",
+ "Waiting for your OK on the computer · {code}": "等你在电脑上确认 · {code}",
+ "Online · A request is waiting": "在线 · 有一个请求在等待",
+ "Offline · A request is waiting": "离线 · 有一个请求在等待",
+ "Online · In your account": "在线 · 在你的账户里",
+ "Offline · In your account": "离线 · 在你的账户里",
+ "Open {name}": "打开 {name}",
+ "Quit {name}": "退出 {name}",
+ "Pair iPhone…": "配对 iPhone…",
+ "Remote screen": "远程屏幕",
+ "Version {version}": "版本 {version}",
+ "Text Size": "文字大小",
+ "Restart host": "重启 Host",
+ "Open log": "打开日志",
+ "Uninstall host service": "卸载 Host 服务",
+ "Reset all data…": "重置全部数据…",
+ "Host not found": "找不到 Host",
+ "Host not installed": "Host 未安装",
+ "Host problem": "Host 出了问题",
+ "Rebuild Codync Dev with its development host.": "请用开发版 Host 重新编译 Codync Dev。",
+ "Reinstall Codync or install the host with Homebrew.": "请重新安装 Codync,或用 Homebrew 安装 Host。",
+ "Copy host install command": "复制 Host 安装命令",
+ "Install host": "安装 Host",
+ "Review access request from {name}…": "查看来自 {name} 的访问请求…",
+ "Stop task": "停止任务",
+ "Enable remote screen": "启用远程屏幕",
+ "Set up computer access…": "设置电脑访问…",
+ "Restarting…": "正在重启…",
+ "Restart to update": "重启以更新",
+ "Downloading… {percent}%": "正在下载… {percent}%",
+ "Update to {version}": "更新到 {version}",
+ "Retry installing update": "重试安装更新",
+ "{count} bot working": "{count} 个 Bot 正在工作",
+ "{count} bots working": "{count} 个 Bot 正在工作",
+ "Needs your response": "需要你回复",
+ "A bot needs you": "有 Bot 需要你",
+ "A device asks for access": "有设备请求访问",
+ "Control this Mac from your iPhone": "从 iPhone 控制这台 Mac",
+ "Control this computer from your iPhone": "从 iPhone 控制这台电脑",
+ "Needs approval in System Settings": "需要在系统设置里批准",
+ "Starting Codync Screen…": "正在启动 Codync Screen…",
+ "Needs permission": "需要权限",
+ "Your phone is viewing": "你的手机正在查看",
+ "{count} viewers": "{count} 人正在查看",
+ "{name} is using it": "{name} 正在使用",
+ "Ready · {display}": "就绪 · {display}",
+ "Computer access is ready.": "电脑访问已就绪。",
+ "Connecting to the screen…": "正在连接屏幕…",
+ "Reconnecting…": "正在重新连接…",
+ "This computer is offline.": "这台电脑离线了。",
+ "Update Codync on your computer to use its screen from here.": "请先更新电脑上的 Codync,才能在这里使用它的屏幕。",
+ "Set up Computer access in Codync on the computer.": "请先在电脑上的 Codync 里设置电脑访问。",
+ "On the computer, open Codync → Settings → Computer access. Permissions are set separately on each computer.": "在电脑上打开 Codync → 设置 → 电脑访问。每台电脑的权限要单独设置。",
+ "Remote screen is off. {setup}": "远程屏幕已关闭。{setup}",
+ "Codync Screen is not running. {setup}": "Codync Screen 没有在运行。{setup}",
+ "Choose a screen and allow control in the system sharing dialog. {setup}": "在系统共享对话框里选择屏幕并允许控制。{setup}",
+ "Allow screen recording for {name}. {setup}": "请允许 {name} 进行屏幕录制。{setup}",
+ "Allow computer control for {name}. macOS may call this Device Control and Data Access or Accessibility. {setup}": "请允许 {name} 控制电脑。macOS 可能把它叫作“设备控制和数据访问”或“辅助功能”。{setup}",
+ "Remote screen viewing is not available on Windows yet. Bots can still use apps on that computer.": "从手机远程看屏幕在 Windows 上还不可用。Bot 仍然可以在那台电脑上使用应用。",
+ "listing skills on GitHub: {error}": "无法列出 GitHub 上的技能:{error}",
+ "{url} answered {status}": "{url} 返回了 {status}",
+ "Theme": "主题",
+ "Light": "浅色",
+ "Dark": "深色",
+ "Only changes appearance on this device.": "只改变这台设备的外观。",
+ "Continue on this Mac": "在这台 Mac 上继续",
+ "Continue on this computer": "在这台电脑上继续",
+ "Sign-in isn't configured in this build. You can still use Codync on this Mac.": "这个版本没有配置登录。你仍可以在这台 Mac 上使用 Codync。",
+ "Sign-in isn't configured in this build. You can still use Codync on this computer.": "这个版本没有配置登录。你仍可以在这台电脑上使用 Codync。",
+ "Show in Notch": "在屏幕顶部显示",
+ "Voice input shortcut": "语音输入快捷键",
+ "Talk to a bot from any app, then tap the key once more to send.": "在任何应用里对 Bot 说话,再按一次这个键就发送。",
+ "Right ⌘ twice": "右 ⌘ 两次",
+ "Left ⌘ twice": "左 ⌘ 两次",
+ "Tip: double-tap {key} to talk from any app, then tap it once to send.": "提示:连按两次{key},就能在任何应用里说话,再按一次就发送。",
+ "the right ⌘": "右侧 ⌘",
+ "the left ⌘": "左侧 ⌘",
+ "{name} (not installed)": "{name}(未安装)",
+ "Copy template": "复制模板",
+ "Siri and Dictation are disabled": "Siri 和听写已关闭",
+ "the Codync cloud refused ({status} {code}): {message}": "Codync 云拒绝了({status} {code}):{message}",
+ "forbidden": "禁止",
+ "Sign in on the computer to use remote screen relay.": "请先在电脑上登录,才能使用远程屏幕中继。",
+ "Remote screen relay is not configured on this cloud.": "这台云没有配置远程屏幕中继。",
+ "Remote screen relay is temporarily unavailable. Try again shortly.": "远程屏幕中继暂时不可用。请稍后再试。",
+ "Too many screen connections. Try again in a minute.": "屏幕连接太多了。请过一分钟再试。"
+}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/zh-Hant.json b/apps/ios/Kit/Sources/CodyncKit/Resources/zh-Hant.json
new file mode 100644
index 00000000..9360b89a
--- /dev/null
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/zh-Hant.json
@@ -0,0 +1,1165 @@
+{
+ "About usage analytics": "關於用量分析",
+ "Access": "訪問",
+ "Account": "賬戶",
+ "Add Widget": "新增小元件",
+ "Add a Codync widget": "新增 Codync 小元件",
+ "Add a widget": "新增小元件",
+ "Add account": "新增賬戶",
+ "Appearance": "外觀",
+ "App language": "應用語言",
+ "App language…": "應用語言…",
+ "App version": "應用版本",
+ "Apple": "Apple",
+ "Apple speech on this iPhone, or OpenAI and Gemini on your own API key, kept on the computer.": "用這臺 iPhone 上的蘋果語音,或你自己的 OpenAI、Gemini 金鑰。金鑰留在電腦上。",
+ "Applies to Usage in the app and in widgets.": "應用內的用量和小元件都會跟著變。",
+ "Approved for an earlier install of Codync. Revoke it, then ask again.": "這是更早一次安裝的授權。先撤銷,再重新申請。",
+ "Ask again": "再申請一次",
+ "Ask for access": "申請訪問",
+ "Ask one of your account's computers for access, or pair one with its code.": "向賬戶裡的一臺電腦申請訪問,或用配對碼配對。",
+ "Auto: Wi-Fi or Tailscale, then Cloudflare": "自動:先 Wi-Fi 或 Tailscale,再 Cloudflare",
+ "Back": "返回",
+ "Bots": "機器人",
+ "Can't reach": "連不上",
+ "Cancel": "取消",
+ "Cancel request": "取消申請",
+ "Character": "角色",
+ "Check again": "再檢查一次",
+ "Check for updates": "檢查更新",
+ "Checking": "正在檢查",
+ "Checking your widgets…": "正在檢查小元件…",
+ "Choose": "選擇",
+ "Choose the look": "選擇樣子",
+ "Choose your widget": "選擇小元件",
+ "Clear search": "清除搜尋",
+ "Close": "關閉",
+ "Cloudflare, then Wi-Fi or Tailscale": "先 Cloudflare,再 Wi-Fi 或 Tailscale",
+ "Code": "配對碼",
+ "Collapse": "收起",
+ "Collapsed": "已收起",
+ "Color": "顏色",
+ "Compact sidebar": "緊湊側欄",
+ "Complete": "完成",
+ "Computers": "電腦",
+ "Computers & devices": "電腦和裝置",
+ "Computers & settings": "電腦與設定",
+ "Computer access": "電腦訪問",
+ "Computers in your account need your OK on the computer before this iPhone can use them.": "賬戶裡的電腦要先在電腦上同意,這臺 iPhone 才能使用。",
+ "Computers in your account need your OK on the computer before this phone can use them.": "賬戶裡的電腦要先在電腦上同意,這臺手機才能使用。",
+ "Connect a computer": "連線一臺電腦",
+ "Connects on Wi-Fi, over Tailscale, or from anywhere through Cloudflare, on its own. End-to-end encrypted.": "會自己走 Wi-Fi、Tailscale,或經 Cloudflare 從任何地方連線。端到端加密。",
+ "Connecting": "正在連線",
+ "Connecting…": "正在連線…",
+ "Connection": "連線",
+ "Continue": "繼續",
+ "Continue with Apple": "透過 Apple 繼續",
+ "Continue with Google": "透過 Google 繼續",
+ "Copied": "已複製",
+ "Copy": "複製",
+ "Create a bot for each kind of work — a reviewer, a fixer, a docs writer — and point it at a project.": "按工作各建一個 Bot,比如審查、修 bug、寫文件,並指定一個專案。",
+ "Create your first bot": "建立第一個 Bot",
+ "Customize": "自定義",
+ "Delete": "刪除",
+ "Delete bot and its conversation": "刪除 Bot 和它的對話",
+ "Delete group chat": "刪除群聊",
+ "Details of this bot…": "這個 Bot 的詳情…",
+ "Done": "完成",
+ "Each bot runs on its own computer. Sign in to see the computers in your account.": "每個 Bot 都在自己的電腦上執行。登入後可以看到賬戶裡的電腦。",
+ "Edit": "編輯",
+ "Edit group": "編輯群聊",
+ "Edit profile": "編輯資料",
+ "English": "English",
+ "Error": "出錯",
+ "Every install option": "全部安裝方式",
+ "Expand": "展開",
+ "Expanded": "已展開",
+ "Extensions": "擴充套件",
+ "Extensions: agents, connectors, skills…": "擴充套件:智慧體、聯結器和技能…",
+ "Files": "檔案",
+ "Files it changed on your computer stay as they are.": "它在電腦上改過的檔案會保留。",
+ "Follow system": "跟隨系統",
+ "General": "通用",
+ "Get a result summary, a request for input, or a failure notice. Notification previews follow your iOS settings.": "會收到結果摘要、需要你處理的請求,或失敗通知。通知預覽跟隨 iOS 設定。",
+ "Get set up": "開始設定",
+ "Get started": "開始使用",
+ "Give each one a name and a project. They work on your computer while you're away.": "給每個 Bot 起名並指定專案。你不在時,它們在電腦上繼續工作。",
+ "Go to": "前往",
+ "Google": "Google",
+ "Hidden bots": "已隱藏的 Bot",
+ "Hide from list": "從列表隱藏",
+ "In your account": "在你的賬戶裡",
+ "Install with Homebrew": "用 Homebrew 安裝",
+ "Its bots and conversations stay on that computer. You can pair again any time.": "Bot 和對話仍留在那臺電腦上。隨時可以重新配對。",
+ "Its bots and their own chats stay.": "裡面的 Bot 和各自的對話會保留。",
+ "Keys": "按鍵",
+ "Know when a bot is done or needs you.": "Bot 完成或需要你時會通知你。",
+ "Language": "語言",
+ "Large": "大",
+ "Linux": "Linux",
+ "Live Activities are turned off in iOS Settings.": "iOS 設定裡已關閉實時活動。",
+ "Live Activity": "實時活動",
+ "Loading": "正在載入",
+ "Local pairing": "本機配對",
+ "Mac": "Mac",
+ "Mark as read": "標為已讀",
+ "Medium": "中",
+ "Memory of this bot…": "這個 Bot 的記憶…",
+ "Needs update": "需要更新",
+ "Needs you": "需要你",
+ "New": "新建",
+ "New bot": "新建 Bot",
+ "New bot…": "新建 Bot…",
+ "New group chat": "新建群聊",
+ "Name your group": "給群聊起個名字",
+ "Sign in so bots can use it": "登入後 Bot 才能使用",
+ "Remove {name}?": "移除 {name}?",
+ "Bots lose this connector, and the keys saved for it are deleted.": "Bot 會失去這個聯結器,為它儲存的金鑰也會刪除。",
+ "Bots stop using this skill.": "Bot 將不再使用這個技能。",
+ "Nothing installed": "還沒有安裝",
+ "Connectors and skills you add show up here.": "你新增的聯結器和技能會顯示在這裡。",
+ "Install": "安裝",
+ "Runs the official installer on {name}.": "在 {name} 上執行官方安裝程式。",
+ "Installed on {name}.": "已安裝在 {name} 上。",
+ "Checking with {name}… The first check can download it.": "正在向 {name} 確認…第一次確認時可能會下載。",
+ "Checking…": "正在確認…",
+ "Signed in.": "已登入。",
+ "Add Node.js first.": "請先新增 Node.js。",
+ "Not signed in yet.": "尚未登入。",
+ "Couldn't tell. Skip this if you've already signed in on {name}.": "無法判斷。如果已經在 {name} 上登入過,可以跳過。",
+ "{name} runs on Node.js. Codync adds its own copy.": "{name} 執行需要 Node.js。Codync 會單獨為它準備一份。",
+ "Added on {name}.": "已新增到 {name}。",
+ "In a terminal on {name}. Links open here.": "在 {name} 的終端裡進行。連結會在這裡開啟。",
+ "In a terminal on {name}.": "在 {name} 的終端裡進行。",
+ "Saved on {name} only.": "只儲存在 {name} 上。",
+ "Finish signing in in the browser on {name}…": "請在 {name} 的瀏覽器裡完成登入…",
+ "Opens a browser on {name}.": "會在 {name} 上開啟瀏覽器。",
+ "Browser sign-ins open on {name} itself. Away from it? Use Remote screen to finish there.": "瀏覽器登入會在 {name} 本機開啟。人不在旁邊的話,用遠端螢幕在那裡完成。",
+ "This sign-in needs a newer app. Sign in on {name} for now.": "這種登入方式需要更新的應用。請先在 {name} 上登入。",
+ "Agent marketplace with 174+ AI capabilities. Browse, invoke, and pay for agent services settled in USDC on Base L2.": "智慧體市場,提供 170 多種 AI 能力。可以瀏覽、呼叫,並用 Base L2 上的 USDC 結算。",
+ "ACP wrapper for Amp - the frontier coding agent": "Amp 的 ACP 封裝,前沿程式設計智慧體",
+ "Google’s AI coding agent": "Google 的 AI 程式設計智慧體",
+ "Augment Code's powerful software agent, backed by industry-leading context engine": "Augment Code 的軟體智慧體,背後是業界領先的上下文引擎",
+ "Autohand Code - AI coding agent powered by Autohand AI": "Autohand Code,由 Autohand AI 驅動的程式設計智慧體",
+ "IBM Bob is your AI-Powered Development Partner": "IBM Bob,你的 AI 開發夥伴",
+ "ACP wrapper for Anthropic's Claude": "Anthropic Claude 的 ACP 封裝",
+ "Autonomous coding agent CLI - capable of creating/editing files, running commands, using the browser, and more": "自主程式設計智慧體命令列,可以建立和編輯檔案、執行命令、使用瀏覽器等",
+ "Tencent Cloud's official intelligent coding tool": "騰訊雲官方的智慧程式設計工具",
+ "ACP adapter for OpenAI's coding assistant": "OpenAI 程式設計助手的 ACP 介面卡",
+ "Snowflake's Cortex Code coding agent": "Snowflake 的 Cortex Code 程式設計智慧體",
+ "Co-building with a seasoned Rust partner.": "和一位資深 Rust 搭檔一起寫程式碼。",
+ "Minimal ACP Native Coding Agent": "精簡的原生 ACP 程式設計智慧體",
+ "Cursor's coding agent": "Cursor 的程式設計智慧體",
+ "Batteries-included AI coding and general purpose agent powered by LangChain.": "開箱即用的 AI 程式設計和通用智慧體,由 LangChain 驅動。",
+ "Devin CLI coding agent by Cognition": "Cognition 的 Devin CLI 程式設計智慧體",
+ "A coding agent that puts leading models at your command.": "把領先模型交給你呼叫的程式設計智慧體。",
+ "Reduces API costs by more than 50%, produces better and faster work. Uses Hash anchored parallel edits, AST manipulation and a whole lot of neat optimizations. Fully Open Source.": "API 成本可以降低一半以上,工作更快也更好。使用雜湊錨定的並行編輯、AST 操作和一系列最佳化。完全開源。",
+ "Factory Droid - AI coding agent powered by Factory AI": "Factory Droid,由 Factory AI 驅動的程式設計智慧體",
+ "Code and build agents with comprehensive multi-provider support": "編寫和構建智慧體,支援多家模型服務",
+ "Google's official CLI for Gemini": "Google 官方的 Gemini 命令列",
+ "GitHub's AI pair programmer": "GitHub 的 AI 結對程式設計師",
+ "ACP agent powered by Zhipu AI's GLM Coding Plan models (glm-5.1, glm-5-turbo, glm-4.7, glm-4.5-air). Supports streaming, tool calls, mid-session model switching, image input via Z.AI Coding Plan Vision MCP, and session load/fork/resume with on-disk persistence.": "智譜 GLM Coding Plan 模型驅動的 ACP 智慧體(glm-5.1、glm-5-turbo、glm-4.7、glm-4.5-air)。支援流式輸出、工具呼叫、會話中切換模型、透過 Z.AI Coding Plan Vision MCP 輸入圖片,以及把會話儲存、分叉和恢復到磁碟。",
+ "A local, extensible, open source AI agent that automates engineering tasks": "本地、可擴充套件的開源 AI 智慧體,用來自動完成工程任務",
+ "xAI's coding agent and CLI": "xAI 的程式設計智慧體和命令列",
+ "Harn runs .harn agent pipelines as a native ACP coding agent over stdio.": "Harn 把 .harn 智慧體流水線作為原生 ACP 程式設計智慧體,透過標準輸入輸出執行。",
+ "AI Coding Agent by JetBrains": "JetBrains 的 AI 程式設計智慧體",
+ "The open source coding agent": "開源程式設計智慧體",
+ "Coding agent powered by multi-model orchestration": "由多模型編排驅動的程式設計智慧體",
+ "Moonshot AI's coding assistant": "月之暗面的程式設計助手",
+ "MiniMax Code is an AI coding agent with Agent Client Protocol support.": "MiniMax Code,支援 Agent Client Protocol 的 AI 程式設計智慧體。",
+ "An enhanced AI code assistant built on the Minion framework with rich development tools": "基於 Minion 框架的增強型 AI 程式設計助手,帶有豐富的開發工具",
+ "Mistral's open-source coding assistant": "Mistral 的開源程式設計助手",
+ "Nova by Compass AI - a fully-fledged software engineer at your command": "Compass AI 的 Nova,一位聽你調遣的軟體工程師",
+ "The open source coding agent, version 2": "開源程式設計智慧體,第 2 版",
+ "ACP adapter for pi coding agent": "pi 程式設計智慧體的 ACP 介面卡",
+ "Poolside's coding agent": "Poolside 的程式設計智慧體",
+ "AI coding assistant with agentic capabilities": "具備智慧體能力的 AI 程式設計助手",
+ "Alibaba's Qwen coding assistant": "阿里巴巴的 Qwen 程式設計助手",
+ "Local-first coding agent. Runs entirely on your machine with optional on-device LLM inference via Onde.": "本地優先的程式設計智慧體。完全在你的電腦上執行,也可以透過 Onde 在本機推理模型。",
+ "Open-source DevOps agent in Rust with enterprise-grade security": "用 Rust 編寫的開源 DevOps 智慧體,具備企業級安全能力",
+ "An open-source coding agent with LLM-native code understanding and robust shell safety. Supports multiple LLM providers with automatic failover and efficient context management.": "開源程式設計智慧體,能按模型的方式理解程式碼,並對 shell 做嚴格的安全控制。支援多家模型服務,可以自動切換,並高效管理上下文。",
+ "New group chat…": "新建群聊…",
+ "No bots yet": "還沒有 Bot",
+ "No computer yet": "還沒有電腦",
+ "No usage yet": "還沒有用量",
+ "Not complete": "未完成",
+ "Not paired": "未配對",
+ "Not signed in": "未登入",
+ "Nothing matches": "沒有匹配項",
+ "Notifications": "通知",
+ "OK": "好",
+ "Off": "關",
+ "Off in Settings": "在設定中關閉",
+ "Offline": "離線",
+ "On": "開",
+ "Online": "線上",
+ "Open Codync and it sets up the host on its own.": "開啟 Codync,它會自己裝好 host。",
+ "Open at login": "登入時開啟",
+ "Open iOS Settings": "開啟 iOS 設定",
+ "Original": "原圖示",
+ "Original icon": "原圖示",
+ "Pair": "配對",
+ "Pair a computer": "配對一臺電腦",
+ "Pair a computer later from Computers & settings.": "稍後可以在「電腦與設定」裡配對。",
+ "Pair a phone…": "配對 iPhone…",
+ "Pause": "暫停",
+ "Personal": "個人",
+ "Photos": "照片",
+ "Pin": "置頂",
+ "Play": "播放",
+ "Please wait…": "請稍候…",
+ "Preview": "預覽",
+ "Push notifications": "推送通知",
+ "Reach your computers from anywhere": "隨時使用你的電腦",
+ "Refresh agents": "重新整理 agent",
+ "Remove": "移除",
+ "Remove from account": "從賬戶移除",
+ "Revoke": "撤銷",
+ "Revoke this iPhone's access": "撤銷這臺 iPhone 的訪問",
+ "Run the installer": "執行安裝器",
+ "Sample data": "示例資料",
+ "Scan a computer's code": "掃描電腦上的配對碼",
+ "Scan the pairing code": "掃描配對碼",
+ "Screen": "螢幕",
+ "Search": "搜尋",
+ "Search Widgets": "搜尋小元件",
+ "Sending": "正在傳送",
+ "Share usage analytics": "共享用量分析",
+ "Show Live Activities": "顯示實時活動",
+ "Show in Dock": "在程式塢中顯示",
+ "Show in Dynamic Island": "在靈動島中顯示",
+ "Sign in to reach your computers from anywhere": "登入後可以隨時使用你的電腦",
+ "Sign in to see the computers in your account.": "登入後可以看到賬戶裡的電腦。",
+ "Sign out": "退出登入",
+ "Signed in": "已登入",
+ "Signing in": "正在登入",
+ "Skip": "跳過",
+ "Small": "小",
+ "Something went wrong": "出了點問題",
+ "Source": "來源",
+ "Source code": "原始碼",
+ "Start over": "重新開始",
+ "Start over?": "重新開始?",
+ "State": "狀態",
+ "Step": "步驟",
+ "Switch account": "切換賬戶",
+ "System": "系統",
+ "System language is Chinese. \"Follow system\" matches the iPhone. You can switch this app to English.": "系統語言是中文。選「跟隨系統」時介面和 iPhone 一致,也可以改成英文。",
+ "System language is Chinese. \"Follow system\" matches the phone. You can switch this app to English.": "系統語言是中文。選「跟隨系統」時介面和手機一致,也可以改成英文。",
+ "System language is Chinese. \"Follow system\" matches this computer. You can switch this app to English.": "系統語言是中文。選「跟隨系統」時介面和這臺電腦一致,也可以改成英文。",
+ "System language is English. \"Follow system\" matches the iPhone. You can switch this app to Simplified or Traditional Chinese.": "系統語言是英文。選「跟隨系統」時介面和 iPhone 一致,也可以改成簡體中文或繁體中文。",
+ "System language is English. \"Follow system\" matches the phone. You can switch this app to Simplified or Traditional Chinese.": "系統語言是英文。選「跟隨系統」時介面和手機一致,也可以改成簡體中文或繁體中文。",
+ "System language is English. \"Follow system\" matches this computer. You can switch this app to Simplified or Traditional Chinese.": "系統語言是英文。選「跟隨系統」時介面和這臺電腦一致,也可以改成簡體中文或繁體中文。",
+ "System language is Simplified Chinese. \"Follow system\" matches the iPhone. You can switch this app to Traditional Chinese or English.": "系統語言是簡體中文。選「跟隨系統」時介面和 iPhone 一致,也可以改成繁體中文或英文。",
+ "System language is Simplified Chinese. \"Follow system\" matches the phone. You can switch this app to Traditional Chinese or English.": "系統語言是簡體中文。選「跟隨系統」時介面和手機一致,也可以改成繁體中文或英文。",
+ "System language is Simplified Chinese. \"Follow system\" matches this computer. You can switch this app to Traditional Chinese or English.": "系統語言是簡體中文。選「跟隨系統」時介面和這臺電腦一致,也可以改成繁體中文或英文。",
+ "System language is Traditional Chinese. \"Follow system\" matches the iPhone. You can switch this app to Simplified Chinese or English.": "系統語言是繁體中文。選「跟隨系統」時介面和 iPhone 一致,也可以改成簡體中文或英文。",
+ "System language is Traditional Chinese. \"Follow system\" matches the phone. You can switch this app to Simplified Chinese or English.": "系統語言是繁體中文。選「跟隨系統」時介面和手機一致,也可以改成簡體中文或英文。",
+ "System language is Traditional Chinese. \"Follow system\" matches this computer. You can switch this app to Simplified Chinese or English.": "系統語言是繁體中文。選「跟隨系統」時介面和這臺電腦一致,也可以改成簡體中文或英文。",
+ "Text size": "文字大小",
+ "This Mac": "這臺 Mac",
+ "This computer": "這臺電腦",
+ "This iPhone forgets the account's computers. Your bots stay on them.": "這臺 iPhone 會忘掉賬戶裡的電腦。Bot 仍留在那些電腦上。",
+ "Through Cloudflare": "經 Cloudflare",
+ "Try again": "再試一次",
+ "Turn on": "開啟",
+ "Turn on notifications": "開啟通知",
+ "Turn on notifications in Settings": "在設定中開啟通知",
+ "Unable to check": "無法檢查",
+ "Unhide": "取消隱藏",
+ "Unpin": "取消置頂",
+ "Update delayed": "更新延遲",
+ "Updated": "已更新",
+ "Updates": "更新",
+ "Usage": "用量",
+ "Usage icons": "用量圖示",
+ "Usage limits": "用量上限",
+ "Usage shows up once a computer is connected.": "連上電腦後會顯示用量。",
+ "Voice and API keys": "語音和 API 金鑰",
+ "Voice chat": "語音",
+ "Voice keys are kept by This Mac's host, which isn't running.": "語音金鑰由這臺 Mac 的 host 儲存,而 host 沒在執行。",
+ "Waiting for approval…": "等待電腦同意…",
+ "Waiting for computer": "等待電腦",
+ "Watch the demo": "看演示",
+ "Which features you use, never your messages, code or files. Helps us spot bugs sooner and make Codync better for you.": "只記錄你用了哪些功能,不包括訊息、程式碼或檔案。便於更快發現 bug,把 Codync 做得更好。",
+ "Wi-Fi or Tailscale": "Wi-Fi 或 Tailscale",
+ "Wi-Fi or Tailscale only, never Cloudflare": "只用 Wi-Fi 或 Tailscale,不走 Cloudflare",
+ "Widget": "小元件",
+ "Working": "正在工作",
+ "Working…": "正在工作…",
+ "Resuming session…": "正在恢復會話…",
+ "Starting agent…": "正在啟動 Agent…",
+ "Thinking…": "思考中…",
+ "Continuing…": "正在繼續…",
+ "Couldn't start": "無法啟動",
+ "Writing a reply…": "正在寫回復…",
+ "Typing…": "正在輸入…",
+ "Installing…": "正在安裝…",
+ "Downloading {name}…": "正在下載 {name}…",
+ "Installing {name}…": "正在安裝 {name}…",
+ "Needs approval: {title}": "需要批准:{title}",
+ "Summarizing the earlier conversation…": "正在總結更早的對話…",
+ "Picking up where it left off…": "正在接著上次繼續…",
+ "You can ask for access again; the computer will show a new code to confirm.": "可以再次申請。電腦會顯示一個新的配對碼供你確認。",
+ "Your bots run there. This iPhone is how you talk to them.": "Bot 在那臺電腦上執行。這臺 iPhone 用來和它們對話。",
+ "Your computer": "你的電腦",
+ "Your computer reads the limits from Claude Code and Codex.": "電腦會從 Claude Code 和 Codex 讀取用量上限。",
+ "or download the Mac app": "或下載 Mac 應用",
+ "or install with Homebrew": "或用 Homebrew 安裝",
+ "search bots": "搜尋 Bot",
+ "ACTIONS": "操作",
+ "Android speech on this phone, or OpenAI and Gemini on your own API key, kept on the computer.": "用這臺手機上的 Android 語音,或你自己的 OpenAI、Gemini 金鑰。金鑰留在電腦上。",
+ "It's this computer under an earlier identity and can't be reached anymore. Removing it only cleans up your account.": "這是同一臺電腦更早的身份,已經連不上了。移除只會清理你的賬戶。",
+ "Signs out of every account and forgets every computer on this iPhone, then shows the welcome again. Your computers keep their bots and chats; pair again to use them.": "會退出所有賬戶,並忘掉這臺 iPhone 上的每臺電腦,然後重新顯示歡迎頁。電腦上的 Bot 和對話都還在,配對後可以繼續用。",
+ "Signs out of every account and forgets every computer on this phone, then shows the welcome again. Your computers keep their bots and chats; pair again to use them.": "會退出所有賬戶,並忘掉這臺手機上的每臺電腦,然後重新顯示歡迎頁。電腦上的 Bot 和對話都還在,配對後可以繼續用。",
+ "Remove the older computer?": "移除更早的那臺電腦?",
+ "On your Mac, click Codync in the menu bar, then Pair iPhone.": "在 Mac 上點選單欄的 Codync,然後選配對 iPhone。",
+ "On your Mac, click Codync in the menu bar, then Pair iPhone. The same code pairs this phone.": "在 Mac 上點選單欄的 Codync,然後選配對 iPhone。同一個碼也能配這臺手機。",
+ "On your computer, run this in a terminal:": "在電腦上的終端裡執行:",
+ "Or paste a {scheme}://pair link": "或貼上 {scheme}://pair 連結",
+ "Find nearby barcodes.": "尋找附近的條形碼。",
+ "Camera not available. Paste the link below.": "相機不可用。請把連結貼上在下面。",
+ "Codync, at a glance.": "一眼看到 Codync。",
+ "Your bots and usage, on every surface.": "Bot 和用量,出現在各個介面上。",
+ "Approve only if the computer shows exactly this code. If it doesn't, deny it there: someone may be trying to get in.": "只有電腦上顯示的碼和這裡完全一致時才同意。不一致就在電腦上拒絕:可能有人想進入。",
+ "Install Codync\non your computer": "在電腦上\n安裝 Codync",
+ "Check that this iPhone and the computer are on the same Wi-Fi or both on Tailscale, or that “Reach from anywhere” is on in Codync on the computer.": "確認這臺 iPhone 和電腦在同一個 Wi-Fi,或都開了 Tailscale,或電腦上的 Codync 已開啟「隨處訪問」。",
+ "Check that this phone and the computer are on the same Wi-Fi or both on Tailscale, or that “Reach from anywhere” is on in Codync on the computer.": "確認這臺手機和電腦在同一個 Wi-Fi,或都開了 Tailscale,或電腦上的 Codync 已開啟「隨處訪問」。",
+ "Tailscale is on: Codync connects over it directly.": "Tailscale 已開啟:Codync 會直接透過它連線。",
+ "Use Tailscale? Direct and faster away from home.": "使用 Tailscale?離家時更直接,也更快。",
+ "Your coding agents,\nas teammates.": "你的程式設計助手,\n像隊友一樣。",
+ "Fix the flaky login test": "修一下不穩定的登入測試",
+ "Done. It raced the session refresh; tests pass on fix/login.": "好了。它和會話重新整理撞在一起了;fix/login 上測試已透過。",
+ "Couldn't check your widgets. You can still add one using the steps below.": "暫時檢查不了小元件。你仍可以按下面的步驟新增。",
+ "Keep tasks in view": "讓任務保持可見",
+ "Lock Screen widgets": "鎖定螢幕小元件",
+ "Widgets show the latest report. Open Codync for live updates and approvals.": "小元件顯示最近一次報告。開啟 Codync 看實時更新和待處理的請求。",
+ "How to add the Codync widget": "如何新增 Codync 小元件",
+ "See who needs you and who's still working.": "看誰需要你、誰還在工作。",
+ "QR pairing only in this build": "這個版本只能用二維碼配對",
+ "Move up": "上移",
+ "Move down": "下移",
+ "Sample task": "示例任務",
+ "iOS chooses the presentation based on your device and other active tasks. These previews don't start a Live Activity. Approvals are handled inside Codync.": "iOS 會按裝置和正在進行的其他任務決定怎麼顯示。這些預覽不會真的啟動實時活動。同意操作在 Codync 裡完成。",
+ "Touch and hold your Lock Screen → Customize → Lock Screen. Tap the widget area and choose Codync. Inline widgets go in the date row above the clock.": "按住鎖定螢幕 → 自定義 → 鎖定螢幕。點小元件區域,選擇 Codync。行內小元件放在時鐘上方的日期那一行。",
+ "Choose Bots for task status or Usage limits for the highest reported limit. iOS applies your Lock Screen's color and style.": "選「機器人」看任務狀態,或選「用量上限」看報得最高的額度。顏色和樣式由 iOS 鎖定螢幕決定。",
+ "Dismiss": "關閉",
+ "Computer": "電腦",
+ "No bots yet. Create a bot first.": "還沒有 Bot。請先建立一個。",
+ "Everyone answers in turn unless you @mention someone.": "大家輪流回復,除非你 @ 某一個人。",
+ "Create": "建立",
+ "All computers": "全部電腦",
+ "Show only": "只顯示",
+ "Reconnect": "重新連線",
+ "Manage computers": "管理電腦",
+ "Model": "模型",
+ "This agent doesn't advertise a model list. Leave Default or enter a model ID.": "這個 agent 沒有提供模型列表。留著「預設」,或自己填一個模型 ID。",
+ "Changing the model starts a new agent session. Chat history is kept.": "更換模型會新開一個 agent 會話。聊天記錄會保留。",
+ "Loading available models": "正在載入可用模型",
+ "Notes": "筆記",
+ "Longer notes, one topic each. The bot reads one when its topic comes up.": "較長的筆記,一條一個主題。聊到相關主題時,Bot 會讀那一條。",
+ "Loading…": "正在載入…",
+ "Switch back": "換回來",
+ "No fallbacks yet.": "還沒有備用 agent。",
+ "Personal workspace": "個人工作區",
+ "Fast mode": "快速模式",
+ "Faster replies for more usage, on models that offer it.": "回覆更快,用量也更高。僅部分模型支援。",
+ "Faster replies for more usage, on models that offer it (Claude Code, Codex)": "回覆更快,用量也更高。僅部分模型支援(Claude Code、Codex)。",
+ "Turn on for faster replies and more usage": "開啟後回覆更快,用量也更高",
+ "Turn off and return to standard speed": "關閉,回到正常速度",
+ "Turn on for every bot here: faster replies and more usage": "給這裡的每個 Bot 開啟:回覆更快,用量也更高",
+ "Turn off for every bot here and return to standard speed": "給這裡的每個 Bot 關閉,回到正常速度",
+ "Let the bot change its fallbacks": "讓 Bot 自己改備用列表",
+ "It can set this list itself, for example when you ask it to.": "它可以自己改這份列表,比如你讓它改的時候。",
+ "Let the bot change its fallbacks: it can set this list itself, for example when you ask it to.": "讓 Bot 自己改備用列表:它可以自己改這份列表,比如你讓它改的時候。",
+ "Use the computer": "使用電腦",
+ "Use computer": "使用電腦",
+ "On that computer, open Codync → Settings → Computer access to set it up first.": "先在那臺電腦上開啟 Codync → 設定 → 電腦訪問,完成設定。",
+ "Set up on the computer: Codync → Settings → Computer access": "在電腦上設定:Codync → 設定 → 電腦訪問",
+ "No routines yet. Ask the bot for one, or set it up yourself with +.": "還沒有例行任務。讓 Bot 建一個,或點 + 自己設定。",
+ "Loading routines…": "正在載入例行任務…",
+ "No routines. c asks the bot for one; n sets one up here.": "還沒有例行任務。按 c 讓 Bot 建一個;按 n 在這裡設定。",
+ "Close routines": "關閉例行任務",
+ "Choose project folder…": "選擇專案資料夾…",
+ "If {agent} runs out of usage or can't answer, the bot carries on with the next one. Chat, memory and workspace carry over.": "如果 {agent} 用量用完或無法回答,Bot 會交給下一個繼續。對話、記憶和工作區都會帶過去。",
+ "{agent} in {path}": "{agent},在 {path}",
+ "{size} pt (Default)": "{size} pt(預設)",
+ "Show in notch": "在螢幕頂部顯示",
+ "Show at top of screen": "在螢幕頂部顯示",
+ "Privacy": "隱私",
+ "Full conversation": "完整對話",
+ "Settings": "設定",
+ "New session": "新會話",
+ "Delete bot": "刪除 Bot",
+ "Delete group": "刪除群聊",
+ "Memory": "記憶",
+ "About you": "關於你",
+ "This bot": "這個 Bot",
+ "Dreams": "夢境",
+ "No dreams yet.": "還沒有夢境。",
+ "Load earlier messages": "載入更早的訊息",
+ "Today": "今天",
+ "Yesterday": "昨天",
+ "Instructions": "指令",
+ "Standing instructions": "常駐指令",
+ "Rules that always apply. Put task-specific requests in the chat instead.": "一直生效的規則。針對某次任務的要求,寫在對話裡。",
+ "e.g. Reviews PRs. Never pushes without asking.": "例如:審閱 PR。未經詢問不推送。",
+ "Agent": "智慧體",
+ "Manage the team": "管理團隊",
+ "Manage team": "管理團隊",
+ "Let this bot create bots and change any bot's setup, its own included. The bots it creates can too.": "讓這個 Bot 建立 Bot,並修改任何 Bot 的設定,包括它自己。它建立的 Bot 也可以。",
+ "Let this bot see the screen and use the mouse and keyboard. You can watch and take over from your phone.": "讓這個 Bot 看螢幕,並用滑鼠和鍵盤。你可以在手機上觀看和接管。",
+ "Let this bot see the screen and use the mouse and keyboard.": "讓這個 Bot 看螢幕,並用滑鼠和鍵盤。",
+ "Let this bot see the screen and use the mouse and keyboard. On that computer, open Codync → Settings → Computer access to set up permissions first.": "讓這個 Bot 看螢幕,並用滑鼠和鍵盤。先在那臺電腦上開啟 Codync → 設定 → 電腦訪問,完成許可權設定。",
+ "Let this bot use apps. On that computer, open Codync → Settings → Computer access to set up permissions first.": "讓這個 Bot 使用應用。先在那臺電腦上開啟 Codync → 設定 → 電腦訪問,完成許可權設定。",
+ "Connectors": "聯結器",
+ "No connectors yet. Add GitHub, Linear, Notion and more from Extensions.": "還沒有聯結器。到「擴充套件」裡新增 GitHub、Linear、Notion 等。",
+ "Skills": "技能",
+ "No skills yet. Get some from Extensions, or write your own.": "還沒有技能。到「擴充套件」裡找,或自己寫。",
+ "Your coding agents, as teammates.": "你的程式設計智慧體,像隊友一樣。",
+ "Pick a bot, or create one for each kind of work and point it at a project.": "選一個 Bot,或為每種工作新建一個,並指向一個專案。",
+ "Mark as Read": "標為已讀",
+ "Edit Profile…": "編輯資料…",
+ "Copy conversation ID": "複製對話 ID",
+ "Hide from sidebar": "從側邊欄隱藏",
+ "The host isn't running": "Host 沒有在執行",
+ "The background service didn't start. macOS couldn't load {path}.": "後臺服務沒有啟動。macOS 無法載入 {path}。",
+ "The background service didn't start.": "後臺服務沒有啟動。",
+ "Starting the host…": "正在啟動 Host…",
+ "This takes a few seconds.": "需要幾秒鐘。",
+ "The host isn't responding. See the log for details.": "Host 沒有響應。詳情見日誌。",
+ "Restart the manually started development host in its terminal.": "請在終端裡重啟手動啟動的開發版 Host。",
+ "Another build of the host is running, not this app's. Try again to replace it.": "正在執行的是另一個版本的 Host,不是這個應用自帶的。再試一次即可換上。",
+ "Your computer is ready": "這臺電腦已就緒",
+ "Work in your apps with a bot, or access your screen from your phone. You choose which bots can use this computer.": "讓 Bot 在你的應用裡工作,或從手機檢視螢幕。哪些 Bot 能用這臺電腦,由你決定。",
+ "Let a bot work in your apps. You choose which bots can use this computer.": "讓 Bot 在你的應用裡工作。哪些 Bot 能用這臺電腦,由你決定。",
+ "Waiting for your computer": "等待你的電腦",
+ "Start or restart the host from Codync’s menu to continue. We’ll check again automatically.": "從 Codync 的選單啟動或重啟 Host 後繼續。我們會自動再檢查。",
+ "Codync Screen is missing": "找不到 Codync Screen",
+ "Install the full Codync desktop app to finish setup.": "安裝完整的 Codync 桌面版以完成設定。",
+ "Couldn’t finish setup": "設定沒有完成",
+ "All set": "全部就緒",
+ "{done} of {total} ready": "已就緒 {done} / {total}",
+ "Runs in the background to share your screen and connect your controls.": "在後臺執行,用來共享螢幕並連線鍵鼠。",
+ "Needs approval": "需要批准",
+ "Starting…": "正在啟動…",
+ "Start again": "重新啟動",
+ "Enable Codync Screen": "啟用 Codync Screen",
+ "Allow Codync to run in the background in Login Items.": "在「登入項」裡允許 Codync 在後臺執行。",
+ "Open Login Items": "開啟登入項",
+ "Screen recording": "螢幕錄製",
+ "Lets Codync see your screen, including anything visible in your apps.": "允許 Codync 看到你的螢幕,包括應用里正在顯示的內容。",
+ "Allow screen recording": "允許螢幕錄製",
+ "Control apps": "控制應用",
+ "Lets Codync click, type and interact with apps on your behalf.": "允許 Codync 代你點選、輸入,並操作應用。",
+ "Allow computer control": "允許控制電腦",
+ "Screen sharing & control": "螢幕共享和控制",
+ "Choose a screen and allow mouse and keyboard access. You can stop sharing at any time.": "選擇一塊螢幕,並允許滑鼠和鍵盤訪問。你可以隨時停止共享。",
+ "Choose screen and allow control": "選擇螢幕並允許控制",
+ "Availability": "可用性",
+ "Computer control": "電腦控制",
+ "Bots can use apps on this computer. Remote screen viewing from your phone isn’t available on Windows yet.": "Bot 可以在這臺電腦上使用應用。從手機遠端看螢幕在 Windows 上還不可用。",
+ "Waiting for permission…": "正在等待許可權…",
+ "In System Settings, look for": "在系統設定裡找到",
+ "It may be listed under Device Control and Data Access or Accessibility.": "它可能列在「裝置控制和資料訪問」或「輔助功能」下面。",
+ "Return here after granting access; if asked, allow the helper to restart.": "授權後回到這裡;如果詢問,允許助手重新啟動。",
+ "Open System Settings": "開啟系統設定",
+ "Permissions stay on this computer. You can change them later in Settings → Computer access.": "許可權只留在這臺電腦上。之後可以在「設定 → 電腦訪問」裡修改。",
+ "Permissions stay on this computer. Your other computers keep their own permissions.": "許可權只留在這臺電腦上。其他電腦各自保留自己的許可權。",
+ "On iPhone, connect with a QR code or Ask Access. No SSH setup needed.": "在 iPhone 上,用二維碼或「請求訪問」連線。不需要設定 SSH。",
+ "Set up later": "稍後設定",
+ "Needs access": "需要訪問許可權",
+ "Waiting": "等待中",
+ "Computer access setup": "電腦訪問設定",
+ "Profile": "資料",
+ "Avatar": "頭像",
+ "Name": "名稱",
+ "Workspace": "工作區",
+ "Permissions": "許可權",
+ "Ask me": "每次詢問",
+ "Approve automatically": "自動批准",
+ "Activity": "活動",
+ "Get notified when this bot finishes or needs you": "這個 Bot 做完或需要你時通知你",
+ "This bot has its own space for files. It can work in other folders when you ask.": "這個 Bot 有自己的檔案空間。你讓它去別的資料夾時,它也能工作。",
+ "This project is the default starting folder. The bot can work elsewhere when you ask.": "這個專案是預設的起始資料夾。你讓它去別處時,它也能工作。",
+ "Tool requests are approved automatically. Your agent's own settings (like Claude Code's permission rules) still apply.": "工具請求會自動批准。Agent 自己的設定(比如 Claude Code 的許可權規則)仍然有效。",
+ "You'll get an approval card and a notification whenever the agent asks.": "Agent 每次請求時,你會收到一張批准卡片和一條通知。",
+ "What this bot learned about you.": "這個 Bot 瞭解到的關於你的事。",
+ "What this bot learned about you": "這個 Bot 瞭解到的關於你的事",
+ "What this bot learned about you. {used} of {cap} in use. To change it, tell the bot.": "這個 Bot 瞭解到的關於你的事。已用 {used} / {cap}。想改的話,告訴 Bot。",
+ "Your name, time zone, people and lasting preferences, shared by your bots. {used} of {cap} in use. To change it, tell the bot.": "你的名字、時區、重要的人和長期偏好,所有 Bot 共用。已用 {used} / {cap}。想改的話,告訴 Bot。",
+ "Nothing yet. What this bot learns about you shows up here.": "還沒有。這個 Bot 瞭解到的關於你會顯示在這裡。",
+ "Nothing shared yet.": "還沒有共享的內容。",
+ "Nothing shared yet. Facts every bot should know (your name, time zone, people) go here.": "還沒有共享的內容。所有 Bot 該知道的事(你的名字、時區、重要的人)會在這裡。",
+ "Said": "說了",
+ "Reply": "回覆",
+ "Stopped.": "已停止。",
+ "Ask {name}": "問 {name}",
+ "Queue a message for {name}": "給 {name} 排一條訊息",
+ "Ask everyone · @ to ask one bot": "問所有人 · 用 @ 問其中一個 Bot",
+ "Reply…": "回覆…",
+ "Connected through Cloudflare": "經 Cloudflare 連線",
+ "Connected over Wi-Fi or Tailscale": "透過 Wi-Fi 或 Tailscale 連線",
+ "What this bot learned about you · {harness}'s own memory on · m turns it off": "這個 Bot 瞭解到的關於你的事 · {harness} 自己的記憶開著 · 按 m 關掉",
+ "What this bot learned about you · {harness}'s own memory off · m turns it on": "這個 Bot 瞭解到的關於你的事 · {harness} 自己的記憶關著 · 按 m 開啟",
+ "Shared by your bots · s stops this bot using it": "所有 Bot 共用 · 按 s 讓這個 Bot 停用",
+ "This bot doesn't use what your bots share · s turns it on": "這個 Bot 不用大家共享的內容 · 按 s 開啟",
+ "Fallbacks": "備用",
+ "About fallbacks": "關於備用",
+ "Add fallback": "新增備用",
+ "In use": "使用中",
+ "Add": "新增",
+ "When this bot's agent runs out of usage, is rate limited, signed out or won't start, the next agent here carries on in the same chat, with the same memory and workspace. The bot goes back to its own agent when it recovers. A fallback that uses an API key costs money. To fall back between one agent's models, set that in the agent itself (Claude Code's fallbackModel).": "這個 Bot 的 agent 用量用完、被限速、退出登入或無法啟動時,下一個 agent 會在同一個對話裡接著做,記憶和工作區都不變。原來的 agent 恢復後,Bot 會回到它。用 API 金鑰的備用會花錢。如果只是同一個 agent 的不同模型互相備用,請在 agent 自己裡面設定(Claude Code 的 fallbackModel)。",
+ "Create template": "建立模板",
+ "Close details": "關閉詳情",
+ "Using the computer": "正在使用電腦",
+ "Loading memory…": "正在載入記憶…",
+ "Between chats the bot tidies its memory from your own words.": "對話之間,Bot 會根據你自己的話整理記憶。",
+ "About dreaming": "關於整理記憶",
+ "Claude Code's own notes, read-only here.": "Claude Code 自己的筆記,這裡只能看。",
+ "Save": "儲存",
+ "Members": "成員",
+ "Add Member": "新增成員",
+ "Copy this bot’s settings to reuse as a template. Conversation history and conversation ID are excluded.": "複製這個 Bot 的設定,做成可複用的模板。不包括對話記錄和對話 ID。",
+ "Includes workspace preferences and agent configuration.": "包括工作區偏好和智慧體配置。",
+ "Edit Bot avatar": "編輯 Bot 頭像",
+ "Saved securely on this computer. The bot types it into the sign-in page but never sees it.": "安全地存在這臺電腦上。Bot 會把它填進登入頁,但自己看不到內容。",
+ "Saved securely on this computer. Never added to the conversation.": "安全地存在這臺電腦上。不會寫進對話。",
+ "Encrypted on the connected computer.": "加密儲存在已連線的電腦上。",
+ "Storage": "儲存",
+ "Keychain": "鑰匙串",
+ "Secret Service": "金鑰服務",
+ "System credential store": "系統憑證庫",
+ "Saved connections": "已儲存的連線",
+ "Sign-ins": "登入",
+ "Website or app": "網站或應用",
+ "Username or email": "使用者名稱或郵箱",
+ "Password": "密碼",
+ "Password or op:// reference": "密碼或 op:// 引用",
+ "Bots type these into the matching website or app and never see the password. You can use an op:// reference.": "Bot 會在對應的網站或應用裡填入這些內容,看不到密碼。也可以用 op:// 引用。",
+ "Connect a shared vault": "連線共享保險庫",
+ "Service account token": "服務賬號令牌",
+ "Paste": "貼上",
+ "Paste your token": "貼上令牌",
+ "Use a service account with read access only to a dedicated shared vault. The 1Password CLI must be installed on the computer.": "使用只讀許可權訪問專用共享保險庫的服務賬號。電腦上需要安裝 1Password CLI。",
+ "Composio API key": "Composio API 金鑰",
+ "Get a key from Composio": "從 Composio 獲取金鑰",
+ "Composio signs you in to apps like Gmail and Slack and runs their tools for your bots. The key stays on {name}.": "Composio 幫你登入 Gmail、Slack 等應用,並替 Bot 執行它們的工具。金鑰只留在 {name} 上。",
+ "Saved (paste to replace)": "已儲存(貼上以替換)",
+ "Bots lose the apps you connected until you add a key again.": "在重新新增金鑰之前,Bot 會失去已連線的應用。",
+ "New skill": "新建技能",
+ "When to use it": "何時使用",
+ "The bot sees the name and when to use it, and reads the instructions only when a task fits.": "Bot 能看到名稱和何時使用,只在任務合適時才讀取指令。",
+ "Step by step, in plain words…": "用白話一步步寫…",
+ "Command": "命令",
+ "Config": "配置",
+ "Runs": "執行方式",
+ "Add connector": "新增聯結器",
+ "Hosted by {name}": "由 {name} 託管",
+ "On {name} ({kind})": "在 {name} 上({kind})",
+ "Setup": "設定",
+ "No setup needed.": "無需設定。",
+ "Keys are saved on {name} only.": "金鑰只儲存在 {name} 上。",
+ "No keys needed here. If {name} wants you to sign in, its sign-in page opens next.": "這裡不需要金鑰。如果 {name} 要求登入,接下來會開啟它的登入頁。",
+ " (optional)": "(可選)",
+ "Finish signing in to {name} in the browser…": "請在瀏覽器裡完成 {name} 的登入…",
+ "Adding {name}…": "正在新增 {name}…",
+ "Runs on {name} in the bot's project folder. Quotes work like in a shell.": "在 {name} 上、Bot 的專案資料夾裡執行。引號用法和 shell 一樣。",
+ "A remote MCP server, streamable HTTP or SSE.": "遠端 MCP 伺服器,支援 streamable HTTP 或 SSE。",
+ "Paste the MCP config from a README or another app (Claude, Cursor, VS Code). Every server in it is added. Saved on {name} only.": "貼上 README 或其他應用(Claude、Cursor、VS Code)裡的 MCP 配置。裡面的每個伺服器都會新增。只儲存在 {name} 上。",
+ "Paste the MCP config from a README or another app (Claude, Cursor, VS Code). Every server in it is added.": "貼上 README 或其他應用(Claude、Cursor、VS Code)裡的 MCP 配置。裡面的每個伺服器都會新增。",
+ "Headers": "請求頭",
+ "Optional, one Name: value per line. Leave empty if the service has you sign in. Saved on {name} only.": "可選,每行一個 Name: value。如果服務會讓你登入,就留空。只儲存在 {name} 上。",
+ "Environment": "環境變數",
+ "One KEY=value per line. Saved on {name} only.": "每行一個 KEY=value。只儲存在 {name} 上。",
+ "Enter only the values you want to replace. You can use an op:// reference.": "只填寫要替換的內容。也可以用 op:// 引用。",
+ "No saved connection credentials yet.": "還沒有儲存的連線憑證。",
+ "Values stay hidden. Select a connection to replace its credentials.": "內容保持隱藏。選一個連線來更換它的憑證。",
+ "Connect": "連線",
+ "Disconnect": "斷開",
+ "Use op://vault/item/field in a connector's credential field. Codync retrieves the value when the connector runs.": "在聯結器的憑證欄填 op://vault/item/field。聯結器執行時,Codync 會去取這個值。",
+ "Save sign-in": "儲存登入",
+ "Save credentials": "儲存憑證",
+ "Load more apps": "載入更多應用",
+ "Composio settings": "Composio 設定",
+ "Remove key": "移除金鑰",
+ "Connected": "已連線",
+ "Open the sign-in page": "開啟登入頁",
+ "Waiting for you to finish signing in…": "等你完成登入…",
+ "Asking Composio…": "正在詢問 Composio…",
+ "Some agents need it to run. Codync can add a copy just for them.": "有些智慧體需要它才能執行。Codync 可以只為它們裝一份。",
+ "Add Node.js": "新增 Node.js",
+ "Remove saved keys": "移除已儲存的金鑰",
+ "Added": "已新增",
+ "No instructions.": "沒有說明。",
+ "Load more agents": "載入更多智慧體",
+ "Credentials": "憑證",
+ "Connectors & skills": "聯結器和技能",
+ "Search agents, connectors and skills": "搜尋智慧體、聯結器和技能",
+ "Apps": "應用",
+ "Agents": "智慧體",
+ "Gmail, Slack, GitHub, Notion and 1,000 more apps": "Gmail、Slack、GitHub、Notion 等 1,000 多個應用",
+ "Set up": "設定",
+ "Installed": "已安裝",
+ "Not installed": "未安裝",
+ "Needs Node.js": "需要 Node.js",
+ "Sets up on first use": "首次使用時設定",
+ "Agents matching “{query}”": "匹配“{query}”的智慧體",
+ "Couldn't load connectors.": "無法載入聯結器。",
+ "No connectors match “{query}”.": "沒有匹配“{query}”的聯結器。",
+ "Couldn't load apps.": "無法載入應用。",
+ "No apps match “{query}”.": "沒有匹配“{query}”的應用。",
+ "Load more connectors": "載入更多聯結器",
+ "Make your own": "自己新增",
+ "Custom connector": "自定義聯結器",
+ "Any MCP server: a command or a URL": "任意 MCP 伺服器:一條命令或一個網址",
+ "Your own skill": "自己的技能",
+ "Write instructions a bot can follow": "寫一段 Bot 可以遵循的指令",
+ "{count} installed": "已安裝 {count} 個",
+ "Connectors come from the official MCP Registry, apps through Composio, skills from Anthropic, agents from the ACP registry. Everything installs on {name}.": "聯結器來自官方 MCP Registry,應用透過 Composio,技能來自 Anthropic,智慧體來自 ACP registry。全部安裝在 {name} 上。",
+ "Connectors come from the official MCP Registry, skills from Anthropic, agents from the ACP registry. Everything installs on {name}.": "聯結器來自官方 MCP Registry,技能來自 Anthropic,智慧體來自 ACP registry。全部安裝在 {name} 上。",
+ "Node.js isn't on {name}": "{name} 上沒有 Node.js",
+ "Couldn't load more connectors.": "無法載入更多聯結器。",
+ "Couldn't load skills.": "無法載入技能。",
+ "Switch computer": "切換電腦",
+ "Computer: {name}": "電腦:{name}",
+ "not installed": "未安裝",
+ "needs Node.js": "需要 Node.js",
+ "signed in": "已登入",
+ "not signed in": "未登入",
+ "installed": "已安裝",
+ "sets up on first use": "首次使用時設定",
+ "↵ sign in": "↵ 登入",
+ "filter": "篩選",
+ "search the MCP registry": "搜尋 MCP Registry",
+ "↵ searches the registry": "按 ↵ 搜尋登錄檔",
+ "Some agents need it to run. Codync adds a copy just for them.": "有些智慧體需要它才能執行。Codync 會只為它們新增一份。",
+ "Paste any MCP server's config": "貼上任意 MCP 伺服器的配置",
+ "Loading the registry…": "正在載入登錄檔…",
+ "tab switch · ↵ install / sign in · ^r refresh · esc close": "Tab 切換 · ↵ 安裝 / 登入 · ^r 重新整理 · Esc 關閉",
+ "tab switch · ↵ add / sign in · ^x remove · ^r refresh · esc": "Tab 切換 · ↵ 新增 / 登入 · ^x 移除 · ^r 重新整理 · Esc",
+ "tab switch · ↵ details · ^x remove · esc close": "Tab 切換 · ↵ 詳情 · ^x 移除 · Esc 關閉",
+ "Sign in": "登入",
+ "No matching time zones": "沒有匹配的時區",
+ "e.g. Morning summary": "例如:早晨摘要",
+ "Describe what this bot should do each time it runs.": "寫下這個 Bot 每次執行時要做的事。",
+ "Loading schedule…": "正在載入日程…",
+ "Run settings": "執行設定",
+ "A run is stopped after this long. 1 second to 24 hours.": "執行超過這個時間會被停下。1 秒到 24 小時。",
+ "Runs each time something is posted to its URL. Save to get the URL and key.": "每次有人向它的網址提交內容時執行。儲存後會得到網址和金鑰。",
+ "Set up by the bot. Pick Schedule or Webhook to replace it.": "由 Bot 設定。選「日程」或「Webhook」來替換。",
+ "minute hour day month weekday": "分 時 日 月 星期",
+ "Check schedule again": "重新檢查日程",
+ "Retry loading schedule": "重試載入日程",
+ "Connect to this computer to save your routine.": "先連上這臺電腦,才能儲存例行任務。",
+ "Enter a name and instruction above to save.": "先在上面填寫名稱和說明,再儲存。",
+ "Delete routine": "刪除例行任務",
+ "Routines": "例行任務",
+ "Set up a routine": "設定例行任務",
+ "Ask the bot for a routine": "讓 Bot 設定例行任務",
+ "Replace key": "更換金鑰",
+ "Loading webhook…": "正在載入 Webhook…",
+ "End call": "結束通話",
+ "Key saved": "金鑰已儲存",
+ "Test key": "測試金鑰",
+ "Add it in Codync on that computer: Computers & devices, then Voice chat.": "在那臺電腦的 Codync 裡新增:電腦和裝置,然後是語音。",
+ "Rotate": "輪換",
+ "Fit screen": "適應螢幕",
+ "Displays": "顯示器",
+ "Clipboard": "剪貼簿",
+ "View only. To allow control, open Codync → Settings → Computer access on the computer.": "目前只能看。要允許控制,在電腦上開啟 Codync → 設定 → 電腦訪問。",
+ "Refreshing": "正在重新整理",
+ "Everyone answers in turn. @mention a bot to ask just that one.": "大家輪流回復。@ 某個 Bot 就只問那一個。",
+ "Tell it what you need. You'll get a notification when it's done or needs you.": "告訴它你要做什麼。完成或需要你時會收到通知。",
+ "Loading earlier messages": "正在載入更早的訊息",
+ "Details": "詳情",
+ "Jump to latest": "跳到最新",
+ "Cancel reply": "取消回覆",
+ "Add files": "新增檔案",
+ "Sending…": "正在傳送…",
+ "Failed to send": "傳送失敗",
+ "Resend": "重新傳送",
+ "Not sent — stopped": "未傳送 — 已停止",
+ "Waiting for the computer to come online": "等待電腦上線",
+ "Don't send": "不傳送",
+ "Delivered to the computer": "已送到電腦",
+ "Add a fallback": "新增備用",
+ "Nothing yet.": "還沒有內容。",
+ "Thinking": "思考中",
+ "Plan": "計劃",
+ "No messages yet.": "還沒有訊息。",
+ "What it carries": "它帶著什麼",
+ "Keep this conversation": "保留這個對話",
+ "Edit what it carries": "編輯它帶著的內容",
+ "Review": "檢視",
+ "Dynamic Island": "靈動島",
+ "Lock Screen": "鎖定螢幕",
+ "Compact": "緊湊",
+ "Minimal": "最小",
+ "The Dynamic Island shows the same Live Activity as the Lock Screen, so this switch turns off both.": "靈動島和鎖定螢幕用的是同一個實時活動,所以這個開關會同時關掉兩邊。",
+ "Starts when you send a task from this iPhone. Follow its progress, then open the conversation when your bot needs you.": "從這臺 iPhone 發出任務時開始。可以看進度,Bot 需要你時再開啟對話。",
+ "The bot in its mood, its current step in the state's color, the running time and a thinking orb. When the bot needs you, Review opens the request.": "顯示 Bot 的狀態、當前步驟(顏色跟著狀態走)、已執行時間和一個思考球。需要你時,點「檢視」開啟請求。",
+ "The bot and a thinking orb beside the camera, outlined in the state's color. The orb becomes a check or warning when the task ends.": "攝像頭旁邊是 Bot 和一個思考球,描邊顏色跟著狀態走。任務結束時,球會變成對勾或警告。",
+ "Just the orb when iOS displays multiple Live Activities.": "iOS 同時顯示多個實時活動時,只留下這個球。",
+ "Touch and hold the Dynamic Island for the current step and the running time, or Review when the bot needs you. Tap to open the conversation.": "按住靈動島可看當前步驟和已執行時間。Bot 需要你時會顯示「檢視」。點一下開啟對話。",
+ "Running the test suite.": "正在執行測試。",
+ "Review the proposed changes.": "檢視提議的修改。",
+ "Failed": "失敗",
+ "Waiting for update": "等待更新",
+ "Need you": "需要你",
+ "All quiet": "都很安靜",
+ "No access": "沒有訪問許可權",
+ "%d connected": "%d 臺已連線",
+ "%d/%d connected": "%d/%d 臺已連線",
+ "%d offline": "%d 臺離線",
+ "Use what your bots share": "使用 Bot 共享的內容",
+ "Provider usage": "服務用量",
+ "Team": "團隊",
+ "Small widget": "小號小元件",
+ "Medium widget": "中號小元件",
+ "Large widget": "大號小元件",
+ "Small shows the tightest limit. Medium shows two windows. Large adds a summary and up to four limits.": "小號顯示最緊的額度。中號顯示兩個視窗。大號再加上摘要,最多四個額度。",
+ "Four bots as characters with a dot for each one at work. Touch and hold the widget, then Edit Widget to choose who sits in each spot; empty spots show the bots that need you first.": "四個 Bot 顯示成角色,正在工作的旁邊有個點。按住小元件,點編輯小元件,選每個位置放誰;空位會優先顯示需要你的 Bot。",
+ "See who needs you and who's still working. Large shows up to six bots.": "看誰需要你、誰還在工作。大號最多顯示六個 Bot。",
+ "Default": "預設",
+ "Couldn't sign in. Check your connection and try again.": "登入失敗。檢查網路後再試一次。",
+ "Couldn't sign out. Check your connection and try again.": "退出失敗。檢查網路後再試一次。",
+ "Couldn't switch accounts. Check your connection or sign in again.": "切換賬戶失敗。檢查網路,或重新登入。",
+ "Couldn't finish signing in. Please try again.": "登入沒有完成。請再試一次。",
+ "Sign-in setup isn't finished yet. You can continue using local pairing.": "登入還沒配置好。你可以繼續用本機配對。",
+ "Apple sign-in needs additional verification. Your account is not signed in yet.": "Apple 登入還需要額外驗證。賬戶還沒有登入。",
+ "Google sign-in needs additional verification. Your account is not signed in yet.": "Google 登入還需要額外驗證。賬戶還沒有登入。",
+ "Apple sign-up needs additional account information. Your account is not signed in yet.": "Apple 註冊還需要補充賬戶資訊。賬戶還沒有登入。",
+ "Google sign-up needs additional account information. Your account is not signed in yet.": "Google 註冊還需要補充賬戶資訊。賬戶還沒有登入。",
+ "Sign in again to reach your account.": "重新登入後才能使用賬戶。",
+ "Codync account": "Codync 賬戶",
+ "Usage analytics": "用量分析",
+ "Features you use": "你使用的功能",
+ "Opening the app and its screens, setting up and pairing (and whether you allow notifications), creating or deleting a bot, sending a message (how many attachments, never the files), running a routine or a voice call, installing a connector. Each comes with the app version, the platform, and the bot's agent and model.": "開啟應用和各個頁面、設定和配對(以及你是否允許通知)、建立或刪除 Bot、傳送訊息(附件有幾個,不包括檔案本身)、執行例行任務或語音通話、安裝聯結器。每條都會帶上應用版本、平臺,以及 Bot 的 agent 和模型。",
+ "Crashes and errors": "崩潰和錯誤",
+ "When Codync crashes or an agent fails to answer: the kind of error and where in Codync's own code it happened. Never the error's message; file paths are cut down to Codync's own files.": "Codync 崩潰,或 agent 無法回答時:錯誤的種類,以及發生在 Codync 自己程式碼的哪裡。不包括錯誤資訊本身;檔案路徑會縮短到只剩 Codync 自己的檔案。",
+ "Approximate location": "大致位置",
+ "Country and city, looked up from your IP address. The IP address itself is never stored.": "根據 IP 地址查出的國家和城市。IP 地址本身不會儲存。",
+ "Who it belongs to": "屬於誰",
+ "Your Codync account when you're signed in, otherwise a random ID made on this device.": "已登入時是你的 Codync 賬戶,否則是這臺裝置上生成的一個隨機 ID。",
+ "Never shared": "絕不會共享",
+ "Your messages, prompts, code, files, file names or paths, bot names, credentials, or anything your agents produce.": "你的訊息、提示詞、程式碼、檔案、檔名或路徑、Bot 名稱、憑證,以及 agent 生成的任何內容。",
+ "How it's used": "如何使用",
+ "Only to spot bugs sooner and see which features work and where people get stuck. Never sold, never used for ads or to track you across other apps and websites.": "只用來更快發現 bug,以及看哪些功能有用、人們在哪裡卡住。不會出售,不會用於廣告,也不會用來在其他應用和網站上跟蹤你。",
+ "Your choice": "由你決定",
+ "Each iPhone and each computer has its own switch. Turning it off stops sending right away and drops anything not sent yet.": "每臺 iPhone 和每臺電腦各有自己的開關。關掉後會立刻停止傳送,還沒發出去的也會丟掉。",
+ "Each phone and each computer has its own switch. Turning it off stops sending right away and drops anything not sent yet.": "每臺手機和每臺電腦各有自己的開關。關掉後會立刻停止傳送,還沒發出去的也會丟掉。",
+ "See the Privacy Policy for details.": "詳情見隱私政策。",
+ "Privacy Policy": "隱私政策",
+ "See the": "詳情見",
+ "for details.": "。",
+ "Touch and hold an empty spot on the Home Screen": "按住主螢幕的空白處",
+ "Tap Edit, then Add Widget": "點「編輯」,然後點「新增小元件」",
+ "Find Codync in the list": "在列表裡找到 Codync",
+ "Tap Add Widget": "點「新增小元件」",
+ "Tap Done": "點「完成」",
+ "Batteries": "電池",
+ "Calendar": "日曆",
+ "Fitness": "健身",
+ "Weather": "天氣",
+ "See the Privacy Policy for details: ": "詳情見隱私政策:",
+ "Steps check themselves as you finish them.": "做完一步,這裡會自己打勾。",
+ "Session": "會話",
+ "Weekly": "每週",
+ "highest usage": "用量最高",
+ "Open Codync to connect a computer and check {provider} usage.": "開啟 Codync,連線一臺電腦後即可檢視 {provider} 用量。",
+ "Open Codync to pair with your computer.": "開啟 Codync,與你的電腦配對。",
+ "No usage reported yet.": "還沒有用量報告。",
+ "resets": "重置於",
+ "Usage reported by your computer": "用量由你的電腦報告",
+ "after reset": "後重置",
+ "day unit": "天",
+ "hour unit": "小時",
+ "minute unit": "分",
+ "Resets": "重置",
+ "5-hour": "5 小時",
+ "Ready": "就緒",
+ "Review changes": "審閱改動",
+ "Running tests": "正在跑測試",
+ "Reviewer": "審閱",
+ "Builder": "構建",
+ "Docs": "文件",
+ "codync-host install keeps it running in the background.": "codync-host install 會讓它在後臺一直執行。",
+ "{name} isn't set up on this computer. {hint}": "{name} 還沒有在這臺電腦上設定好。{hint}",
+ "Check that it's installed on this computer.": "請確認它已經安裝在這臺電腦上。",
+ "Codync installs it automatically. Sign in to {name} on this computer first if it needs an account.": "Codync 會自動安裝。如果需要賬號,請先在這臺電腦上登入 {name}。",
+ "Install Claude Code and run `claude auth login`.": "安裝 Claude Code,然後執行 `claude auth login`。",
+ "Install Codex CLI and run `codex login --device-auth`.": "安裝 Codex CLI,然後執行 `codex login --device-auth`。",
+ "Install Cursor CLI (curl https://cursor.com/install -fsS | bash) and run `cursor-agent login`.": "安裝 Cursor CLI(curl https://cursor.com/install -fsS | bash),然後執行 `cursor-agent login`。",
+ "Install pi (npm install -g @earendil-works/pi-coding-agent), run `pi` and type /login.": "安裝 pi(npm install -g @earendil-works/pi-coding-agent),執行 `pi`,然後輸入 /login。",
+ "Install oh-my-pi (curl -fsSL https://omp.sh/install | sh -s -- --binary) and run `omp login`.": "安裝 oh-my-pi(curl -fsSL https://omp.sh/install | sh -s -- --binary),然後執行 `omp login`。",
+ "Install OpenCode (curl -fsSL https://opencode.ai/install | bash) and run `opencode auth login`.": "安裝 OpenCode(curl -fsSL https://opencode.ai/install | bash),然後執行 `opencode auth login`。",
+ "Install Grok Build (curl -fsSL https://x.ai/cli/install.sh | bash) and run `grok login --device-auth`.": "安裝 Grok Build(curl -fsSL https://x.ai/cli/install.sh | bash),然後執行 `grok login --device-auth`。",
+ "Install Gemini CLI (npm install -g @google/gemini-cli) and run `gemini` to sign in with Google.": "安裝 Gemini CLI(npm install -g @google/gemini-cli),然後執行 `gemini`,用 Google 登入。",
+ "Install Copilot CLI (curl -fsSL https://gh.io/copilot-install | bash) and run `copilot login`.": "安裝 Copilot CLI(curl -fsSL https://gh.io/copilot-install | bash),然後執行 `copilot login`。",
+ "Install Qwen Code (its standalone installer), run `qwen` and type /auth.": "安裝 Qwen Code(它的獨立安裝程式),執行 `qwen`,然後輸入 /auth。",
+ "Install goose and run `goose configure`.": "安裝 goose,然後執行 `goose configure`。",
+ "Install Kimi Code (curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash) and run `kimi login`.": "安裝 Kimi Code(curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash),然後執行 `kimi login`。",
+ "Install Droid (curl -fsSL https://app.factory.ai/cli | sh) and sign in with `droid`.": "安裝 Droid(curl -fsSL https://app.factory.ai/cli | sh),然後用 `droid` 登入。",
+ "Install Amp (curl -fsSL https://ampcode.com/install.sh | bash) and run `amp login`.": "安裝 Amp(curl -fsSL https://ampcode.com/install.sh | bash),然後執行 `amp login`。",
+ "Install Kilo CLI (npm install -g @kilocode/cli) and run `kilo auth login`.": "安裝 Kilo CLI(npm install -g @kilocode/cli),然後執行 `kilo auth login`。",
+ "Install Cline CLI (npm install -g cline) and run `cline auth`.": "安裝 Cline CLI(npm install -g cline),然後執行 `cline auth`。",
+ "Install Auggie (npm install -g @augmentcode/auggie) and run `auggie login`.": "安裝 Auggie(npm install -g @augmentcode/auggie),然後執行 `auggie login`。",
+ "Install Mistral Vibe (curl -LsSf https://mistral.ai/vibe/install.sh | bash) and run `vibe --setup`.": "安裝 Mistral Vibe(curl -LsSf https://mistral.ai/vibe/install.sh | bash),然後執行 `vibe --setup`。",
+ "Install Kiro CLI (curl -fsSL https://cli.kiro.dev/install | bash) and run `kiro-cli login`.": "安裝 Kiro CLI(curl -fsSL https://cli.kiro.dev/install | bash),然後執行 `kiro-cli login`。",
+ "Install the Devin CLI (curl -fsSL https://cli.devin.ai/install.sh | bash) and run `devin auth login`.": "安裝 Devin CLI(curl -fsSL https://cli.devin.ai/install.sh | bash),然後執行 `devin auth login`。",
+ "Install Qoder CLI (curl -fsSL https://qoder.com/install | bash) and run `qodercli login`.": "安裝 Qoder CLI(curl -fsSL https://qoder.com/install | bash),然後執行 `qodercli login`。",
+ "Install CodeBuddy Code (npm install -g @tencent-ai/codebuddy-code) and sign in with `codebuddy`.": "安裝 CodeBuddy Code(npm install -g @tencent-ai/codebuddy-code),然後用 `codebuddy` 登入。",
+ "Install MiniMax Code (npm install -g @minimax-ai/code) and run `mcode login`.": "安裝 MiniMax Code(npm install -g @minimax-ai/code),然後執行 `mcode login`。",
+ "Install Junie (curl -fsSL https://junie.jetbrains.com/install.sh | bash) and sign in with `junie`.": "安裝 Junie(curl -fsSL https://junie.jetbrains.com/install.sh | bash),然後用 `junie` 登入。",
+ "Install the Antigravity CLI (curl -fsSL https://antigravity.google/cli/install.sh | bash) and sign in with `agy`.": "安裝 Antigravity CLI(curl -fsSL https://antigravity.google/cli/install.sh | bash),然後用 `agy` 登入。",
+ "Install Cortex Code (curl -LsS https://ai.snowflake.com/static/cc-scripts/install.sh | sh) and set up a connection with `cortex`.": "安裝 Cortex Code(curl -LsS https://ai.snowflake.com/static/cc-scripts/install.sh | sh),然後用 `cortex` 設定連線。",
+ "Install Poolside (curl -fsSL https://downloads.poolside.ai/pool/install.sh | sh) and run `pool login`.": "安裝 Poolside(curl -fsSL https://downloads.poolside.ai/pool/install.sh | sh),然後執行 `pool login`。",
+ "Couldn't load models: {error}": "無法載入模型:{error}",
+ "A memory of its own": "它自己的記憶",
+ "Remembered twice": "記了兩次",
+ "Forgetting": "忘記",
+ "Where to see it": "在哪裡看",
+ "{name} keeps notes apart from Codync's memory. It's off by default, so this bot has one memory and you see all of it here.": "{name} 的筆記和 Codync 的記憶是分開的。預設關閉,所以這個 Bot 只有一份記憶,你在這裡能全部看到。",
+ "With both on, the bot may save the same thing twice, and the two can disagree after something changes.": "兩個都開著時,Bot 可能把同一件事存兩遍,之後有變動時兩邊還會對不上。",
+ "What the bot forgets in Codync stays in {name}'s notes. Codync can't change them.": "Bot 在 Codync 裡忘掉的內容,仍留在 {name} 的筆記裡。Codync 改不了那些筆記。",
+ "Its notes show read-only under the {name} tab.": "它的筆記在 {name} 標籤下只讀顯示。",
+ "Codync can't show it; look in {name} itself.": "Codync 顯示不了,請到 {name} 自己裡面看。",
+ "Dreaming": "夢境",
+ "{name}'s own memory": "{name} 自己的記憶",
+ "About {name}'s own memory": "關於 {name} 自己的記憶",
+ "Turn on {name}'s own memory?": "開啟 {name} 自己的記憶?",
+ "Tidying between chats": "對話之間整理",
+ "Adds and takes out": "新增和刪去",
+ "Only your words": "只取你的原話",
+ "Kept apart": "單獨進行",
+ "A record": "一份記錄",
+ "After five quiet minutes or eight messages, the bot reads what you said since its last run and updates its memory.": "安靜五分鐘,或再過八條訊息之後,Bot 會讀上一次以來你說過的話,並更新記憶。",
+ "Green lines are memories it added. Red lines are ones it took out because they went out of date or moved into a note. It can also add a line to a note.": "綠行是它新增的記憶。紅行是它刪掉的,因為過時了,或移進了一條筆記。它也可以往筆記里加一行。",
+ "What it adds quotes something you typed yourself; pasted text, the bot's replies and other bots don't count. It never changes what you wrote. It may also put a passed date in the past tense, or move a detail into a note when memory is full.": "它新增的內容引用你親手打出來的話;貼上的文字、Bot 的回覆和其他 Bot 都不算。它不會改你寫過的內容。日期過了,它也可能改成過去時,或者在記憶滿了的時候把一條細節移進筆記。",
+ "It runs in its own session, away from the chat, and fixed checks decide what it may save.": "它在自己的會話裡執行,離開當前對話,由固定的檢查決定可以儲存什麼。",
+ "This tab only shows what it did. To change a memory, tell the bot.": "這個標籤只顯示它做了什麼。要改一條記憶,直接告訴 Bot。",
+ "Your bots run there. This phone is how you talk to them.": "你的 Bot 在那裡執行。這臺手機是你和它們說話的地方。",
+ "Saved (type to replace)": "已儲存(輸入以替換)",
+ "Next {when}": "下次 {when}",
+ "The terminal couldn't load. Update Android System WebView, then try again.": "終端載入不了。請更新 Android System WebView,然後再試。",
+ "The Codync cloud is off, so only this computer can send to it.": "Codync 雲已關閉,所以只有這臺電腦能向它傳送。",
+ "POST with Authorization: Bearer <key>. For GitHub, use content type application/json and the key as the secret. Deliveries wait up to 72 hours while this computer is off. They pass through the Codync cloud, which can read them.": "用 POST,請求頭為 Authorization: Bearer <key>。GitHub 請把內容型別設為 application/json,並把金鑰當作 secret。這臺電腦關機時,投遞最多等待 72 小時。它們會經過 Codync 雲,雲端可以讀到內容。",
+ "↑↓ move · ↵ run · esc back": "↑↓ 移動 · ↵ 執行 · esc 返回",
+ "A bot has an update.": "有 Bot 更新了。",
+ "A group has no memory of its own": "群聊沒有自己的記憶",
+ "A group has no session of its own": "群聊沒有自己的會話",
+ "ACP command, e.g. my-agent --acp": "ACP 命令,例如 my-agent --acp",
+ "API key": "API 金鑰",
+ "Access request": "訪問請求",
+ "Account menu": "賬戶選單",
+ "Add SSH computer": "新增 SSH 電腦",
+ "Add memory": "新增記憶",
+ "Add reaction": "新增回應",
+ "Add to Home Screen": "新增到主螢幕",
+ "Agent setup terminal": "智慧體設定終端",
+ "Agents refreshed": "智慧體已重新整理",
+ "Allow camera": "允許相機",
+ "Android chooses how Live updates appear based on your device and other tasks. These previews don't start one. Approvals are handled inside Codync.": "Android 會按你的裝置和正在做的事決定實時更新怎麼顯示。這些預覽不會真的發起一個。批准在 Codync 裡處理。",
+ "Automatically check for updates": "自動檢查更新",
+ "Automatically download and install": "自動下載並安裝",
+ "Bot conversations are read-only": "Bot 之間的對話是隻讀的",
+ "Call settings": "通話設定",
+ "Camera settings": "相機設定",
+ "Checking for a saved account…": "正在查詢已儲存的賬戶…",
+ "Choose a bot": "選擇一個 Bot",
+ "Choose key file": "選擇金鑰檔案",
+ "Claude Code and Codex limits show up here once a bot has used them.": "Bot 用過之後,Claude Code 和 Codex 的限額會顯示在這裡。",
+ "Codync Screen": "Codync Screen",
+ "Codync is free and open source. A star on GitHub is how other people find it.": "Codync 免費且開源。在 GitHub 上加一顆星,別人就能找到它。",
+ "Codync opens an SSH tunnel to codync-host on that computer's loopback. It uses your SSH config and ssh-agent; agent forwarding stays off.": "Codync 透過 SSH 隧道連到那臺電腦本機的 codync-host。它使用你的 SSH 配置和 ssh-agent,不會開啟代理轉發。",
+ "Connect this computer to create the bot.": "先連上這臺電腦,才能建立 Bot。",
+ "Connection request updated": "連線請求已更新",
+ "Conversation details": "對話詳情",
+ "Copied the last reply": "已複製上一條回覆",
+ "Copy install command": "複製安裝命令",
+ "Copy pairing link": "複製配對連結",
+ "Copy selection": "複製選中內容",
+ "Create your first bot in Codync.": "在 Codync 裡建立你的第一個 Bot。",
+ "Credential or op:// reference": "憑證或 op:// 引用",
+ "Custom command": "自定義命令",
+ "Delete routine?": "刪除例行任務?",
+ "Download cancelled · f retries": "下載已取消 · f 重試",
+ "Downloading… · f cancels": "正在下載… · f 取消",
+ "Edit the handoff": "編輯交接",
+ "Enjoying Codync?": "喜歡 Codync 嗎?",
+ "Finish in the browser, then ^r refreshes": "在瀏覽器裡完成後,按 ^r 重新整理",
+ "Finish signing in in the browser on this computer": "在這臺電腦的瀏覽器裡完成登入",
+ "Forgetting something in Codync doesn't reach it.": "在 Codync 裡忘掉的內容,到不了那裡。",
+ "Get Codync for mobile": "獲取手機版 Codync",
+ "Get a key": "獲取金鑰",
+ "Group chat": "群聊",
+ "Help & documentation": "幫助與文件",
+ "Host installed; connecting…": "Host 已安裝,正在連線…",
+ "Installing the host…": "正在安裝 Host…",
+ "Installing the skill…": "正在安裝技能…",
+ "It may store things twice; the two memories can disagree.": "它可能存兩遍,兩份記憶會對不上。",
+ "It stops running.": "它會停止執行。",
+ "Let account devices in without a code?": "允許賬戶裡的裝置不輸入驗證碼就進入?",
+ "Live updates on your Lock Screen": "在鎖屏上顯示實時更新",
+ "Loading history…": "正在載入歷史…",
+ "Longer leaves time to think mid-sentence.": "長一點,方便你在句子中間想一想。",
+ "Memory history": "記憶歷史",
+ "Message a bot": "給 Bot 發訊息",
+ "More message actions": "更多訊息操作",
+ "Name your bot": "給你的 Bot 起個名字",
+ "New code": "新驗證碼",
+ "No failed routine run to try again here": "這裡沒有失敗的例行任務可以重試",
+ "No files on that message": "那條訊息沒有檔案",
+ "No matching bots": "沒有匹配的 Bot",
+ "No message to reply to yet": "還沒有可以回覆的訊息",
+ "No other computers in your account yet.": "你的賬戶裡還沒有其他電腦。",
+ "No pending connection request here": "這裡沒有待處理的連線請求",
+ "No reply to copy": "沒有可以複製的回覆",
+ "No usage information yet.": "還沒有用量資訊。",
+ "No usage yet.": "還沒有用量。",
+ "No usage yet. Open Codync to refresh.": "還沒有用量。開啟 Codync 重新整理。",
+ "None yet. Pair an iPhone, or approve one from your account.": "還沒有。配對一臺 iPhone,或從賬戶裡批准一臺。",
+ "Not now": "暫時不要",
+ "Not working right now": "現在不可用",
+ "Nothing running right now.": "現在沒有在執行的。",
+ "Nothing yet. Claude Code's notes show up here once it saves some.": "還沒有。Claude Code 存了筆記之後,會顯示在這裡。",
+ "Older versions": "更早的版本",
+ "On device": "在本機",
+ "On this Android version a task shows as an ongoing notification. Live updates and the status bar chip need Android 16 QPR1.": "在這個 Android 版本上,任務顯示為一條持續通知。實時更新和狀態列標記需要 Android 16 QPR1。",
+ "Only a routine that runs on a webhook has a URL and key": "只有透過 webhook 執行的例行任務才有網址和金鑰",
+ "Only messages take replies": "只有訊息可以回覆",
+ "Open Android settings": "開啟 Android 設定",
+ "Open Codync": "開啟 Codync",
+ "Open account menu for Account": "開啟賬戶選單",
+ "Open conversation": "開啟對話",
+ "Opening the terminal…": "正在開啟終端…",
+ "Other computers in your account": "賬戶裡的其他電腦",
+ "Other sign-in options": "其他登入方式",
+ "Over SSH": "透過 SSH",
+ "Pair iPhone": "配對 iPhone",
+ "Push isn't set up in this build. Bots and chats still update while Codync is open.": "這個版本沒有設定推送。Codync 開啟時,Bot 和對話仍會更新。",
+ "Reach from anywhere": "隨時隨地連線",
+ "Reconnect to this computer to save settings.": "重新連線這臺電腦後才能儲存設定。",
+ "Replace the key?": "更換金鑰?",
+ "Report an issue": "報告問題",
+ "Reset all data?": "重置全部資料?",
+ "Reset everything": "全部重置",
+ "Revoke access": "撤銷訪問",
+ "Routines belong to a bot, not a group": "例行任務屬於 Bot,不屬於群聊",
+ "Runs each time something is posted to its URL.": "每次有內容發到它的網址時執行。",
+ "Saved securely; never added to chat. Esc closes.": "安全儲存,不會寫進對話。Esc 關閉。",
+ "Saving…": "正在儲存…",
+ "Search bots": "搜尋 Bot",
+ "Search widgets": "搜尋小元件",
+ "Senders using the current key stop working until they get the new one.": "還在用當前金鑰的傳送方會失效,直到它們拿到新金鑰。",
+ "Senders using the current key stop working.": "還在用當前金鑰的傳送方會失效。",
+ "Sending… Your draft stays here until delivered.": "正在傳送…送達之前,草稿會留在這裡。",
+ "Session timeline": "會話時間線",
+ "Set by bot": "由 Bot 設定",
+ "Show what it did": "顯示它做了什麼",
+ "Sign in on the page that opened. This updates by itself when you're done.": "在開啟的頁面上登入。完成後這裡會自己更新。",
+ "Sign in to see the other computers in your account.": "登入後才能看到賬戶裡的其他電腦。",
+ "Sign-in link copied: open it on this computer, then ^r refreshes": "登入連結已複製:在這臺電腦上開啟,然後按 ^r 重新整理",
+ "Skip the 6-digit check": "跳過 6 位驗證碼",
+ "Skip the check": "跳過驗證",
+ "Star Codync on GitHub": "在 GitHub 上給 Codync 加星",
+ "Star on GitHub": "在 GitHub 上加星",
+ "Start a new session?": "開始新會話?",
+ "Starting the sign-in…": "正在開始登入…",
+ "Stopping…": "正在停止…",
+ "That choice isn't offered; use 1–9": "沒有這個選項,請用 1–9",
+ "That computer isn't in your account.": "那臺電腦不在你的賬戶裡。",
+ "The agent forgets this conversation's context.": "智慧體會忘掉這段對話的上下文。",
+ "The conversation stays here, but the agent starts with a fresh context.": "對話還在,但智慧體會從一個新的上下文開始。",
+ "The host is missing": "找不到 Host",
+ "The host is up to date.": "Host 已是最新。",
+ "The language you speak in calls.": "你在通話裡說的語言。",
+ "The new one is copied in a curl command.": "新的金鑰已經放進一條 curl 命令裡。",
+ "The transcript stays here.": "記錄會留在這裡。",
+ "This connection request needs a newer app.": "這個連線請求需要更新的應用。",
+ "This deletes the routine and stops its future runs. This can't be undone.": "這會刪除這個例行任務,並停掉以後的執行。無法撤銷。",
+ "Time zone": "時區",
+ "Time zones": "時區",
+ "Timeout in seconds": "超時(秒)",
+ "Trust and connect": "信任並連線",
+ "Try again on this computer": "在這臺電腦上再試一次",
+ "Trying it again": "正在重試",
+ "Use + to create a bot.": "用 + 建立一個 Bot。",
+ "Use ssh-agent": "使用 ssh-agent",
+ "View conversation details": "檢視對話詳情",
+ "What it already posted stays in the chat.": "它已經發出去的內容會留在對話裡。",
+ "What the new conversation should know": "新對話需要知道的事",
+ "What this group works on": "這個群聊在做什麼",
+ "When to run": "何時執行",
+ "Your bots will appear once a computer is connected.": "連上一臺電腦之後,你的 Bot 會顯示在這裡。",
+ "Your launcher couldn't add it. Add it from the Home Screen instead.": "啟動器加不了。請改從主螢幕新增。",
+ "Your next message starts a fresh conversation that begins with this.": "你的下一條訊息會開始一段新對話,並以這段話開頭。",
+ "Your next message starts a fresh conversation that begins with this. ⇧↵ new line, ↵ saves.": "你的下一條訊息會開始一段新對話,並以這段話開頭。⇧↵ 換行,↵ 儲存。",
+ "esc then s stops the bot": "先按 esc,再按 s 停止 Bot",
+ "q quits": "q 退出",
+ "· now": "· 現在",
+ "Install Codync Dev on {name} and open it once. On Linux, install the development host as ~/.local/bin/codync-dev-host.": "在 {name} 上安裝 Codync Dev 並開啟一次。Linux 上請把開發用的 host 裝成 ~/.local/bin/codync-dev-host。",
+ "codync-host isn't installed on {name}. Install it there:": "{name} 上還沒有安裝 codync-host。請在那裡安裝:",
+ "Version {version} is available: run codync-host update": "已有 {version}:請執行 codync-host update",
+ "Download failed: {error}": "下載失敗:{error}",
+ "{error} Draft kept; Enter retries, Ctrl+C clears text.": "{error} 草稿還在;Enter 重試,Ctrl+C 清空文字。",
+ "1 s": "1 秒",
+ "1.5 s": "1.5 秒",
+ "2.5 s": "2.5 秒",
+ "At minute": "在這一分鐘",
+ "Reading speed": "朗讀速度",
+ "Send after a pause of": "停頓這麼久之後傳送",
+ "Created by": "建立者",
+ "Devices that were approved through the account lose access. Devices paired with a QR code keep it.": "透過賬戶批准的裝置會失去訪問。用二維碼配對的裝置仍然保留。",
+ "It disconnects right away and has to pair or ask again.": "它會立刻斷開,之後必須重新配對或再次請求。",
+ "Authorization: Bearer …": "Authorization: Bearer …",
+ "API_KEY=…": "API_KEY=…",
+ "Claude Subscription": "Claude 訂閱",
+ "Use Claude subscription": "使用 Claude 訂閱",
+ "Anthropic Console": "Anthropic 控制檯",
+ "Use Anthropic Console (API usage billing)": "使用 Anthropic 控制檯(按 API 用量計費)",
+ "Log in with Claude": "使用 Claude 登入",
+ "Run `claude /login` in the terminal": "在終端裡執行 `claude /login`",
+ "API Key": "API 金鑰",
+ "Use an API key to authenticate": "使用 API 金鑰登入",
+ "Use ChatGPT to authenticate": "使用 ChatGPT 登入",
+ "ChatGPT (device code)": "ChatGPT(裝置碼)",
+ "Sign in to ChatGPT by opening a verification page and entering a one-time code": "開啟驗證頁面,輸入一次性驗證碼,以登入 ChatGPT",
+ "Support": "支援",
+ "Voice": "語音",
+ "Engine": "引擎",
+ "Normal": "正常",
+ "Slower": "較慢",
+ "Faster": "較快",
+ "Realtime": "實時",
+ "Speech": "語音識別",
+ "Mode": "模式",
+ "Version": "版本",
+ "this Mac": "這臺 Mac",
+ "this computer": "這臺電腦",
+ "On-device speech, on this computer. Applies from the next call.": "使用這臺電腦上的本機語音。下次通話起生效。",
+ "Apple speech, on this device. Applies from the next call.": "使用這臺裝置上的 Apple 語音。下次通話起生效。",
+ "Android speech, on this device. Applies from the next call.": "使用這臺裝置上的 Android 語音。下次通話起生效。",
+ "Your own {name} key, billed by {name}. Applies from the next call.": "使用你自己的 {name} 金鑰,由 {name} 計費。下次通話起生效。",
+ "Reachable from anywhere through Cloudflare (encrypted).": "透過 Cloudflare 隨時隨地連線(已加密)。",
+ "Off: only Wi-Fi and Tailscale reach it, nothing goes through Cloudflare.": "關閉:只有 Wi-Fi 和 Tailscale 能連上,不會經過 Cloudflare。",
+ "Connecting to Cloudflare…": "正在連線 Cloudflare…",
+ "Sign in to add it to your account": "登入後把它加入你的賬戶",
+ "Not in your account": "不在你的賬戶裡",
+ "In {name} account": "在 {name} 的賬戶裡",
+ "another": "另一個",
+ "Add to account": "加入賬戶",
+ "Adding…": "正在新增…",
+ "Devices on your account get in on their own.": "你賬戶裡的裝置會自己進入。",
+ "Each new device shows a code you approve here.": "每臺新裝置都會顯示一個驗證碼,由你在這裡批准。",
+ "Devices that can use {name}": "可以使用 {name} 的裝置",
+ "Paired with a QR code": "透過二維碼配對",
+ "Paired with a QR code · seen {when}": "透過二維碼配對 · {when} 見過",
+ "Paired with a QR code · connected": "透過二維碼配對 · 已連線",
+ "Approved through the account": "透過賬戶批准",
+ "Approved through the account · seen {when}": "透過賬戶批准 · {when} 見過",
+ "Approved through the account · connected": "透過賬戶批准 · 已連線",
+ "connected": "已連線",
+ "Offline · seen {when}": "離線 · {when} 見過",
+ "Older copy": "較早的副本",
+ "Older copy · last seen {when}": "較早的副本 · 上次出現 {when}",
+ "Older copy of this computer": "這臺電腦較早的副本",
+ "Older copy of this computer · last seen {when}": "這臺電腦較早的副本 · 上次出現 {when}",
+ "Older copy of this computer · {status}": "這臺電腦較早的副本 · {status}",
+ "Updates are available in release builds.": "正式版才會提供更新。",
+ "Last checked {when}": "上次檢查 {when}",
+ "Run bots on another computer you reach with SSH. It needs codync-host installed; your SSH keys stay on {name}.": "在另一臺你能用 SSH 連上的電腦上執行 Bot。那臺電腦需要安裝 codync-host;SSH 金鑰留在{name}。",
+ "Sent when you pause, replies read aloud.": "你停頓後傳送,回覆會朗讀出來。",
+ "A live conversation. Talk over replies.": "實時對話。可以在回覆時插話。",
+ "Remove {name} from the account?": "從賬戶移除 {name}?",
+ "Revoke {name}?": "撤銷 {name} 的訪問?",
+ "Remove the older {name}?": "移除較早的 {name}?",
+ "It's an earlier identity of {name} and can't be reached anymore. Removing it only cleans up your account.": "這是 {name} 較早的身份,已經連不上了。移除它只是清理你的賬戶。",
+ "Any device signed in to your account gets full control of {name}: its files, terminals and bots, with no check here. If someone gets into your account, or Codync's cloud is ever compromised, they could add their own device and you'd have no chance to stop it. Devices paired with a QR code aren't affected.": "登入了你賬戶的任何裝置都能完全控制 {name}:它的檔案、終端和 Bot,這裡不會再核對。如果有人進入你的賬戶,或 Codync 的雲被攻破,對方可以自己加一臺裝置,你沒有機會攔住。用二維碼配對的裝置不受影響。",
+ "Pair iPhone with {name}": "讓 iPhone 與 {name} 配對",
+ "Waiting for your OK on the computer · {code}": "等你在電腦上確認 · {code}",
+ "Online · A request is waiting": "線上 · 有一個請求在等待",
+ "Offline · A request is waiting": "離線 · 有一個請求在等待",
+ "Online · In your account": "線上 · 在你的賬戶裡",
+ "Offline · In your account": "離線 · 在你的賬戶裡",
+ "Open {name}": "開啟 {name}",
+ "Quit {name}": "退出 {name}",
+ "Pair iPhone…": "配對 iPhone…",
+ "Remote screen": "遠端螢幕",
+ "Version {version}": "版本 {version}",
+ "Text Size": "文字大小",
+ "Restart host": "重啟 Host",
+ "Open log": "開啟日誌",
+ "Uninstall host service": "解除安裝 Host 服務",
+ "Reset all data…": "重置全部資料…",
+ "Host not found": "找不到 Host",
+ "Host not installed": "Host 未安裝",
+ "Host problem": "Host 出了問題",
+ "Rebuild Codync Dev with its development host.": "請用開發版 Host 重新編譯 Codync Dev。",
+ "Reinstall Codync or install the host with Homebrew.": "請重新安裝 Codync,或用 Homebrew 安裝 Host。",
+ "Copy host install command": "複製 Host 安裝命令",
+ "Install host": "安裝 Host",
+ "Review access request from {name}…": "檢視來自 {name} 的訪問請求…",
+ "Stop task": "停止任務",
+ "Enable remote screen": "啟用遠端螢幕",
+ "Set up computer access…": "設定電腦訪問…",
+ "Restarting…": "正在重啟…",
+ "Restart to update": "重啟以更新",
+ "Downloading… {percent}%": "正在下載… {percent}%",
+ "Update to {version}": "更新到 {version}",
+ "Retry installing update": "重試安裝更新",
+ "{count} bot working": "{count} 個 Bot 正在工作",
+ "{count} bots working": "{count} 個 Bot 正在工作",
+ "Needs your response": "需要你回覆",
+ "A bot needs you": "有 Bot 需要你",
+ "A device asks for access": "有裝置請求訪問",
+ "Control this Mac from your iPhone": "從 iPhone 控制這臺 Mac",
+ "Control this computer from your iPhone": "從 iPhone 控制這臺電腦",
+ "Needs approval in System Settings": "需要在系統設定裡批准",
+ "Starting Codync Screen…": "正在啟動 Codync Screen…",
+ "Needs permission": "需要許可權",
+ "Your phone is viewing": "你的手機正在檢視",
+ "{count} viewers": "{count} 人正在檢視",
+ "{name} is using it": "{name} 正在使用",
+ "Ready · {display}": "就緒 · {display}",
+ "Computer access is ready.": "電腦訪問已就緒。",
+ "Connecting to the screen…": "正在連線螢幕…",
+ "Reconnecting…": "正在重新連線…",
+ "This computer is offline.": "這臺電腦離線了。",
+ "Update Codync on your computer to use its screen from here.": "請先更新電腦上的 Codync,才能在這裡使用它的螢幕。",
+ "Set up Computer access in Codync on the computer.": "請先在電腦上的 Codync 裡設定電腦訪問。",
+ "On the computer, open Codync → Settings → Computer access. Permissions are set separately on each computer.": "在電腦上開啟 Codync → 設定 → 電腦訪問。每臺電腦的許可權要單獨設定。",
+ "Remote screen is off. {setup}": "遠端螢幕已關閉。{setup}",
+ "Codync Screen is not running. {setup}": "Codync Screen 沒有在執行。{setup}",
+ "Choose a screen and allow control in the system sharing dialog. {setup}": "在系統共享對話方塊裡選擇螢幕並允許控制。{setup}",
+ "Allow screen recording for {name}. {setup}": "請允許 {name} 進行螢幕錄製。{setup}",
+ "Allow computer control for {name}. macOS may call this Device Control and Data Access or Accessibility. {setup}": "請允許 {name} 控制電腦。macOS 可能把它叫作“裝置控制和資料訪問”或“輔助功能”。{setup}",
+ "Remote screen viewing is not available on Windows yet. Bots can still use apps on that computer.": "從手機遠端看螢幕在 Windows 上還不可用。Bot 仍然可以在那臺電腦上使用應用。",
+ "listing skills on GitHub: {error}": "無法列出 GitHub 上的技能:{error}",
+ "{url} answered {status}": "{url} 返回了 {status}",
+ "Theme": "主題",
+ "Light": "淺色",
+ "Dark": "深色",
+ "Only changes appearance on this device.": "只改變這臺裝置的外觀。",
+ "Continue on this Mac": "在這臺 Mac 上繼續",
+ "Continue on this computer": "在這臺電腦上繼續",
+ "Sign-in isn't configured in this build. You can still use Codync on this Mac.": "這個版本沒有配置登入。你仍可以在這臺 Mac 上使用 Codync。",
+ "Sign-in isn't configured in this build. You can still use Codync on this computer.": "這個版本沒有配置登入。你仍可以在這臺電腦上使用 Codync。",
+ "Show in Notch": "在螢幕頂部顯示",
+ "Voice input shortcut": "語音輸入快捷鍵",
+ "Talk to a bot from any app, then tap the key once more to send.": "在任何應用裡對 Bot 說話,再按一次這個鍵就傳送。",
+ "Right ⌘ twice": "右 ⌘ 兩次",
+ "Left ⌘ twice": "左 ⌘ 兩次",
+ "Tip: double-tap {key} to talk from any app, then tap it once to send.": "提示:連按兩次{key},就能在任何應用裡說話,再按一次就傳送。",
+ "the right ⌘": "右側 ⌘",
+ "the left ⌘": "左側 ⌘",
+ "{name} (not installed)": "{name}(未安裝)",
+ "Copy template": "複製模板",
+ "Siri and Dictation are disabled": "Siri 和聽寫已關閉",
+ "the Codync cloud refused ({status} {code}): {message}": "Codync 雲拒絕了({status} {code}):{message}",
+ "forbidden": "禁止",
+ "Sign in on the computer to use remote screen relay.": "請先在電腦上登入,才能使用遠端螢幕中繼。",
+ "Remote screen relay is not configured on this cloud.": "這臺雲沒有配置遠端螢幕中繼。",
+ "Remote screen relay is temporarily unavailable. Try again shortly.": "遠端螢幕中繼暫時不可用。請稍後再試。",
+ "Too many screen connections. Try again in a minute.": "螢幕連線太多了。請過一分鐘再試。"
+}
diff --git a/apps/ios/Kit/Sources/CodyncUI/AnalyticsSheet.swift b/apps/ios/Kit/Sources/CodyncUI/AnalyticsSheet.swift
index 3533fc1b..d5769daa 100644
--- a/apps/ios/Kit/Sources/CodyncUI/AnalyticsSheet.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/AnalyticsSheet.swift
@@ -14,15 +14,17 @@ public struct AnalyticsSheet: View {
("power", "Your choice", "Each iPhone and each computer has its own switch. Turning it off stops sending right away and drops anything not sent yet."),
]
- /// The footer, with "Privacy Policy" an underlined link.
- private static let policy: AttributedString = {
- var text = AttributedString("See the Privacy Policy for details.")
- if let range = text.range(of: "Privacy Policy") {
+ /// The footer, with the privacy policy name an underlined link. Built when shown, so it follows the app language.
+ private static func policy() -> AttributedString {
+ let sentence = L10n.tr("See the Privacy Policy for details.")
+ let name = L10n.tr("Privacy Policy")
+ var text = AttributedString(sentence)
+ if let range = text.range(of: name) {
text[range].link = URL(string: "https://codync.dev/privacy")
text[range].underlineStyle = .single
}
return text
- }()
+ }
public init() {}
@@ -37,8 +39,8 @@ public struct AnalyticsSheet: View {
.foregroundStyle(Palette.secondary)
.frame(width: 22)
VStack(alignment: .leading, spacing: 2) {
- Text(item.title)
- Text(item.detail)
+ Text(L10n.tr(item.title))
+ Text(L10n.tr(item.detail))
.font(.footnote)
.foregroundStyle(Palette.secondary)
.fixedSize(horizontal: false, vertical: true)
@@ -46,7 +48,7 @@ public struct AnalyticsSheet: View {
}
}
}
- Text(Self.policy)
+ Text(Self.policy())
.font(.caption)
.foregroundStyle(Palette.secondary)
.tint(Palette.text)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/AgentModelPicker.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/AgentModelPicker.swift
index b6068e04..ab69e411 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/AgentModelPicker.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/AgentModelPicker.swift
@@ -92,7 +92,7 @@ struct AgentModelPicker: View {
private var modelRow: some View {
VStack(alignment: .leading, spacing: 6) {
HStack(spacing: 8) {
- Text("Model")
+ Text(L10n.tr("Model"))
.foregroundStyle(Palette.text)
.fixedSize()
Spacer(minLength: 0)
@@ -122,17 +122,17 @@ struct AgentModelPicker: View {
}
if backend != "custom", !loading {
if let failure {
- Text(failure)
+ Text(L10n.tr(failure))
.font(.caption)
.foregroundStyle(Palette.warning)
} else if catalog?.models.isEmpty == true {
- Text("This agent doesn't advertise a model list. Leave Default or enter a model ID.")
+ Text(L10n.tr("This agent doesn't advertise a model list. Leave Default or enter a model ID."))
.font(.caption)
.foregroundStyle(Palette.secondary)
}
}
if fastMode != nil {
- Text("Changing the model starts a new agent session. Chat history is kept.")
+ Text(L10n.tr("Changing the model starts a new agent session. Chat history is kept."))
.font(.caption)
.foregroundStyle(Palette.secondary)
}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/BotDetailsView.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/BotDetailsView.swift
index 85d76d57..8aae0fa1 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/BotDetailsView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/BotDetailsView.swift
@@ -119,7 +119,7 @@ struct BotDetailsView: View {
}
if let screen = model.screen, let bot {
VStack(alignment: .leading, spacing: 10) {
- Text("Computer")
+ Text(L10n.tr("Computer"))
.font(.system(size: 15, weight: .semibold))
.foregroundStyle(Palette.text)
.padding(.leading, 2)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/BotEditorView.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/BotEditorView.swift
index f6608909..a4dad3b4 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/BotEditorView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/BotEditorView.swift
@@ -110,14 +110,14 @@ struct BotSettingsForm: View {
}
.animation(Motion.reduced(Motion.layout, reduceMotion), value: bot?.agentStep)
if let error {
- Text(error).font(.footnote).foregroundStyle(Palette.danger)
+ Text(L10n.tr(error)).font(.footnote).foregroundStyle(Palette.danger)
}
}
}
private var instructions: some View {
Field("Standing instructions", detail: "Rules that always apply. Put task-specific requests in the chat instead.") {
- TextField("e.g. Reviews PRs. Never pushes without asking.", text: $draft.description, axis: .vertical)
+ TextField(L10n.tr("e.g. Reviews PRs. Never pushes without asking."), text: $draft.description, axis: .vertical)
.lineLimit(3...8)
.fieldBox()
}
@@ -221,7 +221,7 @@ struct BotSettingsForm: View {
]
} label: {
HStack(spacing: 6) {
- Text(draft.cwd.isEmpty ? "Personal" : (draft.cwd as NSString).lastPathComponent).lineLimit(1)
+ Text(draft.cwd.isEmpty ? L10n.tr("Personal") : (draft.cwd as NSString).lastPathComponent).lineLimit(1)
Image(systemName: "chevron.down").font(.caption2.weight(.semibold)).foregroundStyle(Palette.secondary)
}
.foregroundStyle(Palette.text)
@@ -271,7 +271,7 @@ struct BotSettingsForm: View {
info: { id in viewingSkill = model.installedSkills.first { $0.id == id }.map(SkillRef.init) }
)
if let error {
- Text(error).font(.footnote).foregroundStyle(Palette.danger)
+ Text(L10n.tr(error)).font(.footnote).foregroundStyle(Palette.danger)
}
}
}
@@ -293,9 +293,9 @@ struct Field<Content: View>: View {
var body: some View {
VStack(alignment: .leading, spacing: 8) {
VStack(alignment: .leading, spacing: 3) {
- Text(label).foregroundStyle(Palette.text)
+ Text(L10n.tr(label)).foregroundStyle(Palette.text)
if let detail {
- Text(detail).font(.caption).foregroundStyle(Palette.secondary).lineSpacing(2)
+ Text(L10n.tr(detail)).font(.caption).foregroundStyle(Palette.secondary).lineSpacing(2)
.lineLimit(noteLines)
.fixedSize(horizontal: false, vertical: true)
}
@@ -321,9 +321,9 @@ struct SwitchRow: View {
var body: some View {
Toggle(isOn: $isOn) {
VStack(alignment: .leading, spacing: 3) {
- Text(title).foregroundStyle(Palette.text)
+ Text(L10n.tr(title)).foregroundStyle(Palette.text)
if let detail {
- Text(detail).font(.caption).foregroundStyle(Palette.secondary).lineSpacing(2)
+ Text(L10n.tr(detail)).font(.caption).foregroundStyle(Palette.secondary).lineSpacing(2)
.lineLimit(noteLines)
.fixedSize(horizontal: false, vertical: true)
}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/BotRow.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/BotRow.swift
index f691e3ba..19f288c3 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/BotRow.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/BotRow.swift
@@ -38,7 +38,7 @@ public struct BotRow: View {
preview
Spacer(minLength: 4)
if bot.unread > 0 {
- Text("\(bot.unread)")
+ Text(L10n.tr("\(bot.unread)"))
.font(.caption2.bold())
.foregroundStyle(Palette.onAccent)
.padding(.horizontal, 6)
@@ -58,7 +58,7 @@ public struct BotRow: View {
@ViewBuilder private var preview: some View {
if bot.needsInput {
Label {
- Text(bot.activity.isEmpty ? "Needs your approval" : bot.activity)
+ Text(L10n.tr(bot.activity.isEmpty ? "Needs your approval" : bot.activity))
} icon: {
ThinkingOrb(state: .listening, size: 16, color: Palette.warning)
}
@@ -68,7 +68,7 @@ public struct BotRow: View {
} else if bot.isWorking {
HStack(spacing: 6) {
ThinkingOrb(size: 13, color: Palette.secondary)
- Text(bot.activity.isEmpty ? "Working…" : bot.activity)
+ Text(L10n.tr(bot.activity.isEmpty ? "Working…" : bot.activity))
.lineLimit(1)
}
.font(.subheadline)
@@ -79,7 +79,7 @@ public struct BotRow: View {
.foregroundStyle(Palette.danger)
.lineLimit(1)
} else {
- Text(MessagePreview.text(bot.lastMessage ?? (bot.isGroup ? "\(bot.members.count) bots" : "\(model.backendName(bot.backend)) · \(bot.folderName)")))
+ Text(MessagePreview.text(bot.lastMessage ?? (bot.isGroup ? "\(bot.members.count) bots" : "\(model.backendName(bot.backend)) · \(bot.managedWorkspace ? L10n.tr("Personal workspace") : bot.folderName)")))
.font(.subheadline)
.foregroundStyle(Palette.secondary)
.lineLimit(1)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/BotTemplateView.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/BotTemplateView.swift
index c0a8ce0f..99f58e8c 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/BotTemplateView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/BotTemplateView.swift
@@ -26,7 +26,7 @@ struct BotTemplateView: View {
ModalHeader("Create template")
VStack(alignment: .leading, spacing: 20) {
Text(template.name).font(.subheadline).foregroundStyle(Palette.secondary)
- Text("Copy this bot’s settings to reuse as a template. Conversation history and conversation ID are excluded.")
+ Text(L10n.tr("Copy this bot’s settings to reuse as a template. Conversation history and conversation ID are excluded."))
.font(.callout)
.foregroundStyle(Palette.secondary)
ScrollView {
@@ -38,14 +38,14 @@ struct BotTemplateView: View {
}
.background(Palette.surface, in: RoundedRectangle(cornerRadius: 12))
HStack {
- Text("Includes workspace preferences and agent configuration.")
+ Text(L10n.tr("Includes workspace preferences and agent configuration."))
.font(.caption).foregroundStyle(Palette.secondary)
Spacer()
Button {
Pasteboard.copy(encoded)
withAnimation(Motion.reduced(Motion.morph, reduceMotion)) { copied = true }
} label: {
- Label(copied ? "Copied" : "Copy template", systemImage: copied ? "checkmark" : "square.on.square")
+ Label(L10n.tr(copied ? "Copied" : "Copy template"), systemImage: copied ? "checkmark" : "square.on.square")
.font(.system(size: 13, weight: .semibold))
.padding(.horizontal, 14).padding(.vertical, 9)
.foregroundStyle(Palette.onAccent)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/ComputerFilterHeader.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/ComputerFilterHeader.swift
index cde7a0de..d7003293 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/ComputerFilterHeader.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/ComputerFilterHeader.swift
@@ -25,7 +25,7 @@ public struct ComputerFilterHeader: View {
public var body: some View {
Menu {
- Button("All computers", systemImage: selection.shown.count == accounts.computers.count ? "checkmark" : "desktopcomputer") { update("") }
+ Button(L10n.tr("All computers"), systemImage: selection.shown.count == accounts.computers.count ? "checkmark" : "desktopcomputer") { update("") }
ForEach(accounts.computers) { computer in
Button {
update(selection.toggling(computer.id))
@@ -35,16 +35,16 @@ public struct ComputerFilterHeader: View {
.menuActionDismissBehavior(.disabled)
}
if accounts.computers.count > 1 {
- Menu("Show only") {
+ Menu(L10n.tr("Show only")) {
ForEach(accounts.computers) { computer in
Button(computer.name) { update(selection.only(computer.id)) }
}
}
}
Divider()
- Button("Reconnect", systemImage: "arrow.clockwise", action: reconnect)
+ Button(L10n.tr("Reconnect"), systemImage: "arrow.clockwise", action: reconnect)
.disabled(stores.isEmpty)
- Button("Manage computers", systemImage: "desktopcomputer", action: manage)
+ Button(L10n.tr("Manage computers"), systemImage: "desktopcomputer", action: manage)
} label: { label }
.accessibilityLabel("Computers, \(summary). Filter conversations")
}
@@ -54,21 +54,37 @@ public struct ComputerFilterHeader: View {
if compact {
Image(systemName: "desktopcomputer")
} else {
- Text(summary).lineLimit(1).contentTransition(.opacity)
+ Text(Self.phrase(summary)).lineLimit(1).contentTransition(.opacity)
}
Image(systemName: "chevron.down").font(.system(size: 8, weight: .semibold))
}
.font(.system(size: 12, weight: .medium))
.foregroundStyle(Palette.secondary)
- .help(summary)
+ .help(Self.phrase(summary))
.padding(.vertical, 6)
.contentShape(Rectangle())
.animation(Motion.reduced(Motion.fade, reduceMotion), value: summary)
}
+ /// "3 connected" and the other summaries, in the app's language.
+ private static func phrase(_ raw: String) -> String {
+ let parts = raw.split(separator: " ", maxSplits: 1).map(String.init)
+ if parts.count == 2, let count = Int(parts[0]) {
+ if parts[1] == "connected" { return String(format: L10n.tr("%d connected"), count) }
+ if parts[1] == "offline" { return String(format: L10n.tr("%d offline"), count) }
+ }
+ if parts.count == 2, parts[1] == "connected" {
+ let ends = parts[0].split(separator: "/").map(String.init)
+ if ends.count == 2, let online = Int(ends[0]), let total = Int(ends[1]) {
+ return String(format: L10n.tr("%d/%d connected"), online, total)
+ }
+ }
+ return L10n.tr(raw)
+ }
+
private func computerTitle(_ computer: Computer) -> String {
guard let store = accounts.store(for: computer.id) else { return computer.name }
- return "\(store.hostName) · \(store.connectionLabel)"
+ return "\(store.hostName) · \(L10n.tr(store.connectionLabel))"
}
private func update(_ value: String) {
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/FallbackRows.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/FallbackRows.swift
index 65d2b605..8847d4b5 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/FallbackRows.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/FallbackRows.swift
@@ -19,7 +19,7 @@ struct FallbackBanner: View {
.foregroundStyle(Palette.text)
.fixedSize(horizontal: false, vertical: true)
Spacer(minLength: 8)
- Button("Switch back") { model.switchBack(bot.id) }
+ Button(L10n.tr("Switch back")) { model.switchBack(bot.id) }
.buttonStyle(.secondary)
.disabled(model.isOffline)
}
@@ -53,12 +53,12 @@ struct FallbackList: View {
VStack(alignment: .leading, spacing: 12) {
header
if fallbacks.isEmpty {
- Text("No fallbacks yet.").foregroundStyle(Palette.secondary).transition(.opacity)
+ Text(L10n.tr("No fallbacks yet.")).foregroundStyle(Palette.secondary).transition(.opacity)
}
ForEach(Array(fallbacks.enumerated()), id: \.element.backend) { i, fallback in
row(fallback, at: i).transition(.opacity)
}
- Text("If \(model.backendName(draft.backend)) runs out of usage or can't answer, the bot carries on with the next one. Chat, memory and workspace carry over.")
+ Text(L10n.tr("If {agent} runs out of usage or can't answer, the bot carries on with the next one. Chat, memory and workspace carry over.").replacingOccurrences(of: "{agent}", with: model.backendName(draft.backend)))
.font(.caption)
.foregroundStyle(Palette.secondary)
.lineSpacing(2)
@@ -72,7 +72,7 @@ struct FallbackList: View {
private var header: some View {
HStack(spacing: 4) {
- Text("Fallbacks").foregroundStyle(Palette.text)
+ Text(L10n.tr("Fallbacks")).foregroundStyle(Palette.text)
IconButton("About fallbacks", systemImage: "info.circle") { explaining = true }
Spacer(minLength: 8)
if fallbacks.count < BotFallback.limit, !choices.isEmpty {
@@ -84,17 +84,17 @@ struct FallbackList: View {
private func row(_ fallback: BotFallback, at i: Int) -> some View {
let name = model.hello?.backends.first { $0.id == fallback.backend }.map(model.agentLabel) ?? model.backendName(fallback.backend)
return HStack(spacing: 10) {
- Text("\(i + 1)").font(.subheadline.monospacedDigit()).foregroundStyle(Palette.secondary)
+ Text(L10n.tr("\(i + 1)")).font(.subheadline.monospacedDigit()).foregroundStyle(Palette.secondary)
AgentIcon(registry: model.agentRegistry(fallback.backend), size: 18)
VStack(alignment: .leading, spacing: 3) {
- Text("\(name) · \(fallback.model ?? "Default")").foregroundStyle(Palette.text).lineLimit(1)
+ Text("\(L10n.tr(name)) · \(L10n.tr(fallback.model ?? "Default"))").foregroundStyle(Palette.text).lineLimit(1)
if let rest = bot?.rest(of: fallback.backend) {
Text(rest.line).font(.caption).foregroundStyle(Palette.secondary)
}
}
Spacer(minLength: 8)
if bot?.agentStep?.agent == fallback.backend {
- Text("In use")
+ Text(L10n.tr("In use"))
.font(.caption.weight(.medium))
.foregroundStyle(Palette.text)
.padding(.horizontal, 8)
@@ -170,7 +170,7 @@ private struct FallbackInfoSheet: View {
VStack(spacing: 0) {
ModalHeader("Fallbacks")
CardForm {
- Text("When this bot's agent runs out of usage, is rate limited, signed out or won't start, the next agent here carries on in the same chat, with the same memory and workspace. The bot goes back to its own agent when it recovers. A fallback that uses an API key costs money. To fall back between one agent's models, set that in the agent itself (Claude Code's fallbackModel).")
+ Text(L10n.tr("When this bot's agent runs out of usage, is rate limited, signed out or won't start, the next agent here carries on in the same chat, with the same memory and workspace. The bot goes back to its own agent when it recovers. A fallback that uses an API key costs money. To fall back between one agent's models, set that in the agent itself (Claude Code's fallbackModel)."))
.foregroundStyle(Palette.secondary)
.fixedSize(horizontal: false, vertical: true)
}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/FolderPicker.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/FolderPicker.swift
index b426abed..58593574 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/FolderPicker.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/FolderPicker.swift
@@ -101,7 +101,7 @@ private struct FolderLevel: View {
}
}
} else if let error {
- Text(error).foregroundStyle(Palette.danger)
+ Text(L10n.tr(error)).foregroundStyle(Palette.danger)
} else {
Spinner(size: 20).frame(maxWidth: .infinity)
}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/GroupEditorView.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/GroupEditorView.swift
index 8f0fb911..abb30681 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/GroupEditorView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/GroupEditorView.swift
@@ -61,7 +61,7 @@ public struct GroupEditorView: View {
}
.frame(maxWidth: .infinity)
VStack(alignment: .leading, spacing: 0) {
- Text("Members")
+ Text(L10n.tr("Members"))
.font(.subheadline.weight(.semibold))
.foregroundStyle(Palette.secondary)
.padding(.bottom, 4)
@@ -89,7 +89,7 @@ public struct GroupEditorView: View {
Button { withAnimation(Motion.layout) { adding = true } } label: {
HStack(spacing: 14) {
Image(systemName: "plus").font(.system(size: 16)).foregroundStyle(Palette.secondary).frame(width: 32)
- Text("Add Member").foregroundStyle(Palette.secondary)
+ Text(L10n.tr("Add Member")).foregroundStyle(Palette.secondary)
Spacer(minLength: 0)
}
.frame(minHeight: 48)
@@ -97,17 +97,17 @@ public struct GroupEditorView: View {
}
.buttonStyle(PressScale())
}
- Text("Everyone answers in turn unless you @mention someone.")
+ Text(L10n.tr("Everyone answers in turn unless you @mention someone."))
.font(.caption)
.foregroundStyle(Palette.tertiary)
.padding(.top, 10)
}
.animation(Motion.layout, value: members)
if let error {
- Text(error).font(.footnote).foregroundStyle(Palette.danger).transition(.opacity)
+ Text(L10n.tr(error)).font(.footnote).foregroundStyle(Palette.danger).transition(.opacity)
}
if let group = model.bots[groupId] {
- Button("Delete group chat", role: .destructive) { confirmDelete = group }
+ Button(L10n.tr("Delete group chat"), role: .destructive) { confirmDelete = group }
.foregroundStyle(Palette.danger)
.buttonStyle(PressScale())
}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/MemoryFilesView.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/MemoryFilesView.swift
index 54b7cb2b..4079bcf8 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/MemoryFilesView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/MemoryFilesView.swift
@@ -12,15 +12,15 @@ struct MemoryFilesList: View {
var body: some View {
let live = (shared ? files.yours : files.bot).files.filter { !$0.deleted }
- Text("Notes").font(.footnote.weight(.semibold)).foregroundStyle(Palette.secondary)
+ Text(L10n.tr("Notes")).font(.footnote.weight(.semibold)).foregroundStyle(Palette.secondary)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.top, 6)
.codyncSheet(item: $open) { target in MemoryFileView(memory: memory, target: target) }
if live.isEmpty {
- Text("Longer notes, one topic each. The bot reads one when its topic comes up.")
+ Text(L10n.tr("Longer notes, one topic each. The bot reads one when its topic comes up."))
.font(.footnote).foregroundStyle(Palette.tertiary)
} else if live.count > files.folderCap {
- Text("\(live.count) notes, over the \(files.folderCap)-note cap. Ask the bot to merge some.")
+ Text(L10n.tr("\(live.count) notes, over the \(files.folderCap)-note cap. Ask the bot to merge some."))
.font(.footnote).foregroundStyle(Palette.attention)
}
ForEach(live) { file in row(file, cap: files.cap) }
@@ -65,7 +65,7 @@ struct MemoryFileView: View {
ModalHeader(target.name)
CardForm {
if let error = memory.error {
- CardSection { Text(error).foregroundStyle(Palette.danger).textSelection(.enabled) }
+ CardSection { Text(L10n.tr(error)).foregroundStyle(Palette.danger).textSelection(.enabled) }
}
if let detail {
CardSection(footer: detail.path) {
@@ -75,7 +75,7 @@ struct MemoryFileView: View {
.frame(maxWidth: .infinity, alignment: .leading)
}
} else {
- CardSection { Text("Loading…").foregroundStyle(Palette.secondary) }
+ CardSection { Text(L10n.tr("Loading…")).foregroundStyle(Palette.secondary) }
}
}
}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/MemoryInfoSheet.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/MemoryInfoSheet.swift
index 57844b2c..d8d77e77 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/MemoryInfoSheet.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/MemoryInfoSheet.swift
@@ -15,11 +15,15 @@ struct MemoryInfoSheet: View {
/// `readable`: Codync can show the harness's notes (Claude Code's are a file on the computer).
static func harness(_ harness: String, readable: Bool) -> MemoryInfoSheet {
- MemoryInfoSheet(title: "\(harness)'s own memory", points: [
- Point(icon: "brain", title: "A memory of its own", detail: "\(harness) keeps notes apart from Codync's memory. It's off by default, so this bot has one memory and you see all of it here."),
+ // Translate the sentence, then put the harness name in, so the name stays as written.
+ func fill(_ template: String) -> String {
+ L10n.tr(template).replacingOccurrences(of: "{name}", with: harness)
+ }
+ return MemoryInfoSheet(title: fill("{name}'s own memory"), points: [
+ Point(icon: "brain", title: "A memory of its own", detail: fill("{name} keeps notes apart from Codync's memory. It's off by default, so this bot has one memory and you see all of it here.")),
Point(icon: "square.on.square", title: "Remembered twice", detail: "With both on, the bot may save the same thing twice, and the two can disagree after something changes."),
- Point(icon: "trash", title: "Forgetting", detail: "What the bot forgets in Codync stays in \(harness)'s notes. Codync can't change them."),
- Point(icon: "eye", title: "Where to see it", detail: readable ? "Its notes show read-only under the \(harness) tab." : "Codync can't show it; look in \(harness) itself."),
+ Point(icon: "trash", title: "Forgetting", detail: fill("What the bot forgets in Codync stays in {name}'s notes. Codync can't change them.")),
+ Point(icon: "eye", title: "Where to see it", detail: fill(readable ? "Its notes show read-only under the {name} tab." : "Codync can't show it; look in {name} itself.")),
])
}
@@ -42,8 +46,8 @@ struct MemoryInfoSheet: View {
.foregroundStyle(Palette.secondary)
.frame(width: 22)
VStack(alignment: .leading, spacing: 2) {
- Text(item.title)
- Text(item.detail)
+ Text(L10n.tr(item.title))
+ Text(L10n.tr(item.detail))
.font(.footnote)
.foregroundStyle(Palette.secondary)
.fixedSize(horizontal: false, vertical: true)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/MemoryView.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/MemoryView.swift
index f7890b0d..77b002a5 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/MemoryView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/MemoryView.swift
@@ -39,7 +39,7 @@ struct MemoryCard: View {
}), options: sections(memory?.view))
CardSection {
if let memory { contents(memory) }
- else { Text("Loading memory…").foregroundStyle(Palette.secondary) }
+ else { Text(L10n.tr("Loading memory…")).foregroundStyle(Palette.secondary) }
}
}
.tracked(.screenViewed(.memory))
@@ -62,7 +62,7 @@ struct MemoryCard: View {
}
@ViewBuilder private func contents(_ memory: MemoryStore) -> some View {
- if let error = memory.error { Text(error).foregroundStyle(Palette.danger).textSelection(.enabled) }
+ if let error = memory.error { Text(L10n.tr(error)).foregroundStyle(Palette.danger).textSelection(.enabled) }
if let view = memory.view {
switch section {
case .yours, .bot: layer(memory, view: view)
@@ -70,7 +70,7 @@ struct MemoryCard: View {
case .harness: harness(view.projectMemory)
}
} else if memory.error == nil {
- Text("Loading memory…").foregroundStyle(Palette.secondary)
+ Text(L10n.tr("Loading memory…")).foregroundStyle(Palette.secondary)
}
}
@@ -83,22 +83,29 @@ struct MemoryCard: View {
let shared = section == .yours
let layer = shared ? view.yours : view.bot
if shared, let bot {
- Toggle("Use what your bots share", isOn: Binding(get: { bot.sharedMemory ?? view.shared }, set: { host.setSharedMemory(bot, $0) }))
+ Toggle(isOn: Binding(get: { bot.sharedMemory ?? view.shared }, set: { host.setSharedMemory(bot, $0) })) {
+ Text(L10n.tr("Use what your bots share"))
+ }
.toggleStyle(.codync)
}
if !shared, let bot, let on = bot.harnessMemory {
let name = host.backendName(bot.backend)
+ let own = L10n.tr("{name}'s own memory").replacingOccurrences(of: "{name}", with: name)
HStack(spacing: 4) {
- Text("\(name)'s own memory").lineLimit(1).layoutPriority(1)
- IconButton("About \(name)'s own memory", systemImage: "info.circle") {
+ Text(own).lineLimit(1).layoutPriority(1)
+ IconButton(L10n.tr("About {name}'s own memory").replacingOccurrences(of: "{name}", with: name), systemImage: "info.circle") {
withAnimation(Motion.layout) { info = .harness }
}
Toggle(isOn: Binding(get: { on }, set: { host.setHarnessMemory(bot, $0) })) { EmptyView() }
.toggleStyle(.codync)
- .accessibilityLabel("\(name)'s own memory")
+ .accessibilityLabel(own)
}
}
- Text("\(shared ? "Your name, time zone, people and lasting preferences, shared by your bots." : "What this bot learned about you.") \(layer.used) of \(layer.cap) in use. To change it, tell the bot.")
+ Text(L10n.tr(shared
+ ? "Your name, time zone, people and lasting preferences, shared by your bots. {used} of {cap} in use. To change it, tell the bot."
+ : "What this bot learned about you. {used} of {cap} in use. To change it, tell the bot.")
+ .replacingOccurrences(of: "{used}", with: "\(layer.used)")
+ .replacingOccurrences(of: "{cap}", with: "\(layer.cap)"))
.font(.footnote).foregroundStyle(Palette.secondary)
.frame(maxWidth: .infinity, alignment: .leading)
if layer.entries.isEmpty {
@@ -124,7 +131,7 @@ struct MemoryCard: View {
/// What dreaming did.
@ViewBuilder private func dreams(_ runs: [DreamRun]) -> some View {
HStack(alignment: .top, spacing: 8) {
- Text("Between chats the bot tidies its memory from your own words.")
+ Text(L10n.tr("Between chats the bot tidies its memory from your own words."))
.font(.footnote).foregroundStyle(Palette.secondary)
.frame(maxWidth: .infinity, alignment: .leading)
IconButton("About dreaming", systemImage: "info.circle") {
@@ -137,8 +144,8 @@ struct MemoryCard: View {
Text("\(Date(milliseconds: run.at).formatted(.relative(presentation: .named)))\(run.undone ? " · undone" : "")")
.fontWeight(.semibold)
let limit = lines(.dream(run.id))
- ForEach(run.added, id: \.id) { Text("+ \($0.text)").foregroundStyle(Palette.added).lineLimit(limit) }
- ForEach(run.archived, id: \.id) { Text("− \($0.text)").foregroundStyle(Palette.removed).lineLimit(limit) }
+ ForEach(run.added, id: \.id) { Text(L10n.tr("+ \($0.text)")).foregroundStyle(Palette.added).lineLimit(limit) }
+ ForEach(run.archived, id: \.id) { Text(L10n.tr("− \($0.text)")).foregroundStyle(Palette.removed).lineLimit(limit) }
ForEach(run.files ?? [], id: \.version) { Label("Added to \($0.name)", systemImage: "doc.text").foregroundStyle(Palette.secondary) }
}
.frame(maxWidth: .infinity, alignment: .leading)
@@ -150,7 +157,7 @@ struct MemoryCard: View {
@ViewBuilder private func harness(_ project: MemoryView.Project?) -> some View {
if let project {
- Text("Claude Code's own notes, read-only here.")
+ Text(L10n.tr("Claude Code's own notes, read-only here."))
.font(.footnote).foregroundStyle(Palette.secondary)
Text(project.path).font(.caption).foregroundStyle(Palette.tertiary).textSelection(.enabled)
if project.text.isEmpty { empty("brain", "Nothing yet. Claude Code's notes show up here once it saves some.") }
@@ -161,7 +168,7 @@ struct MemoryCard: View {
private func empty(_ icon: String, _ text: String) -> some View {
VStack(spacing: 8) {
Image(systemName: icon).font(.title3).foregroundStyle(Palette.tertiary)
- Text(text).multilineTextAlignment(.center).foregroundStyle(Palette.secondary)
+ Text(L10n.tr(text)).multilineTextAlignment(.center).foregroundStyle(Palette.secondary)
}
.frame(maxWidth: .infinity)
.padding(.vertical, 18)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/NewBotView.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/NewBotView.swift
index 76ea198d..363b57b0 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/NewBotView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/NewBotView.swift
@@ -100,13 +100,13 @@ public struct NewGroupView: View {
let bots = model.roster.filter { !$0.isGroup }
VStack(spacing: 14) {
if bots.isEmpty {
- Text("No bots yet. Create a bot first.").font(.subheadline).foregroundStyle(Palette.secondary)
+ Text(L10n.tr("No bots yet. Create a bot first.")).font(.subheadline).foregroundStyle(Palette.secondary)
} else {
WrapLayout(spacing: 8) {
ForEach(bots) { tile($0) }
}
}
- Text("Everyone answers in turn unless you @mention someone.")
+ Text(L10n.tr("Everyone answers in turn unless you @mention someone."))
.font(.caption)
.foregroundStyle(Palette.tertiary)
.multilineTextAlignment(.center)
@@ -185,7 +185,7 @@ private struct CreateForm<Preview: View, Content: View>: View {
VStack(spacing: 28) {
VStack(spacing: 16) {
preview
- TextField(placeholder, text: $name)
+ TextField(L10n.tr(placeholder), text: $name)
.textFieldStyle(.plain)
.font(.title2.weight(.semibold))
.foregroundStyle(Palette.text)
@@ -196,7 +196,7 @@ private struct CreateForm<Preview: View, Content: View>: View {
}
content
if let error {
- Text(error)
+ Text(L10n.tr(error))
.font(.footnote)
.foregroundStyle(Palette.danger)
.multilineTextAlignment(.center)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/PluginToggles.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/PluginToggles.swift
index fd85faee..b058f271 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/PluginToggles.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/PluginToggles.swift
@@ -13,7 +13,7 @@ struct PluginToggles: View {
var body: some View {
CardSection(title) {
if items.isEmpty {
- Text(empty).foregroundStyle(Palette.secondary)
+ Text(L10n.tr(empty)).foregroundStyle(Palette.secondary)
}
ForEach(items, id: \.id) { item in
HStack(spacing: 4) {
diff --git a/apps/ios/Kit/Sources/CodyncUI/Call/VoiceChatSettingsView.swift b/apps/ios/Kit/Sources/CodyncUI/Call/VoiceChatSettingsView.swift
index f7b6d2b9..162af104 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Call/VoiceChatSettingsView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Call/VoiceChatSettingsView.swift
@@ -185,8 +185,8 @@ private struct ProviderVoiceSettings: View {
.foregroundStyle(Palette.secondary)
.accessibilityHidden(true)
VStack(alignment: .leading, spacing: 1) {
- Text("Key saved").foregroundStyle(Palette.text).lineLimit(1)
- Text("Stays on \(store.hostName)").font(.caption).foregroundStyle(Palette.tertiary).lineLimit(1)
+ Text(L10n.tr("Key saved")).foregroundStyle(Palette.text).lineLimit(1)
+ Text(L10n.tr("Stays on \(store.hostName)")).font(.caption).foregroundStyle(Palette.tertiary).lineLimit(1)
}
Spacer(minLength: 8)
if busy {
@@ -211,8 +211,8 @@ private struct ProviderVoiceSettings: View {
.foregroundStyle(Palette.tertiary)
.accessibilityHidden(true)
VStack(alignment: .leading, spacing: 2) {
- Text("No \(provider.name) key on \(store.hostName)").foregroundStyle(Palette.text)
- Text("Add it in Codync on that computer: Computers & devices, then Voice chat.")
+ Text(L10n.tr("No \(provider.name) key on \(store.hostName)")).foregroundStyle(Palette.text)
+ Text(L10n.tr("Add it in Codync on that computer: Computers & devices, then Voice chat."))
.font(.caption)
.foregroundStyle(Palette.secondary)
.fixedSize(horizontal: false, vertical: true)
@@ -231,7 +231,7 @@ private struct ProviderVoiceSettings: View {
if busy {
Spinner()
} else {
- Button("Save", action: test)
+ Button(L10n.tr("Save"), action: test)
.buttonStyle(.primary)
.disabled(key.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)
}
@@ -240,7 +240,7 @@ private struct ProviderVoiceSettings: View {
WebLink("Get a key from \(provider.name)", url: provider.keyPage).font(.footnote)
Spacer()
if replacing {
- Button("Cancel") { replacing = false; key = ""; result = nil }
+ Button(L10n.tr("Cancel")) { replacing = false; key = ""; result = nil }
.buttonStyle(.plain)
.font(.footnote)
.foregroundStyle(Palette.secondary)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Chrome.swift b/apps/ios/Kit/Sources/CodyncUI/Chrome.swift
index b753c4b0..d30b2fca 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Chrome.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Chrome.swift
@@ -22,10 +22,10 @@ public struct IconButton: View {
}
public var body: some View {
- Button(title, systemImage: systemImage, action: action)
+ Button(L10n.tr(title), systemImage: systemImage, action: action)
.labelStyle(.iconOnly)
.buttonStyle(IconButtonStyle())
- .help(title)
+ .help(L10n.tr(title))
}
}
@@ -96,7 +96,7 @@ public struct ModalHeader<Title: View, Trailing: View>: View {
public extension ModalHeader where Title == Text {
init(_ title: String, @ViewBuilder trailing: () -> Trailing) {
- self.init(title: { Text(title) }, trailing: trailing)
+ self.init(title: { Text(L10n.tr(title)) }, trailing: trailing)
}
}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Controls.swift b/apps/ios/Kit/Sources/CodyncUI/Controls.swift
index bf78de16..3fdd1e7b 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Controls.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Controls.swift
@@ -119,7 +119,7 @@ public struct Spinner: View {
.rotationEffect(.degrees(turning ? 360 : 0))
.animation(reduceMotion ? nil : .linear(duration: 0.8).repeatForever(autoreverses: false), value: turning)
.onAppear { turning = true }
- .accessibilityLabel("Loading")
+ .accessibilityLabel(L10n.tr("Loading"))
}
}
@@ -207,11 +207,11 @@ private struct ContextActions: ViewModifier {
@ViewBuilder private func menuLabel(_ item: MenuItem) -> some View {
if let image = item.image {
- SwiftUI.Label { Text(item.title) } icon: { image }
+ SwiftUI.Label { Text(L10n.tr(item.title)) } icon: { image }
} else if let icon = item.icon {
- SwiftUI.Label(item.title, systemImage: icon)
+ SwiftUI.Label(L10n.tr(item.title), systemImage: icon)
} else {
- Text(item.title)
+ Text(L10n.tr(item.title))
}
}
@@ -266,7 +266,7 @@ public struct ChoicePicker<ID: Hashable>: View {
if let picture = image?(selection) {
picture.resizable().scaledToFit().frame(width: 16, height: 16)
}
- Text(options.first { $0.id == selection }?.label ?? "Choose").lineLimit(1)
+ Text(L10n.tr(options.first { $0.id == selection }?.label ?? "Choose")).lineLimit(1)
Image(systemName: "chevron.down").font(.caption2.weight(.semibold)).foregroundStyle(Palette.secondary)
}
.font(.body)
@@ -277,7 +277,7 @@ public struct ChoicePicker<ID: Hashable>: View {
}
}
.fixedSize(horizontal: !fitsAvailableWidth, vertical: true)
- .help(options.first { $0.id == selection }?.label ?? "Choose")
+ .help(L10n.tr(options.first { $0.id == selection }?.label ?? "Choose"))
}
}
@@ -300,7 +300,7 @@ public struct SegmentedChoice<ID: Hashable>: View {
Button {
withAnimation(Motion.reduced(Motion.morph, reduceMotion)) { selection = option.id }
} label: {
- Text(option.label)
+ Text(L10n.tr(option.label))
.font(.subheadline.weight(.medium))
.foregroundStyle(on ? Palette.text : Palette.secondary)
.lineLimit(1)
@@ -353,7 +353,7 @@ public struct TabChoice<ID: Hashable>: View {
Button {
withAnimation(Motion.reduced(Motion.morph, reduceMotion)) { selection = option.id }
} label: {
- Text(option.label)
+ Text(L10n.tr(option.label))
.font(.subheadline)
.foregroundStyle(on ? Palette.text : Palette.secondary)
.lineLimit(1)
@@ -389,9 +389,9 @@ public struct ChoiceList<ID: Hashable>: View {
Button { selection = option.id } label: {
HStack(spacing: 10) {
VStack(alignment: .leading, spacing: 2) {
- Text(option.label).foregroundStyle(Palette.text)
+ Text(L10n.tr(option.label)).foregroundStyle(Palette.text)
if let detail = option.detail, !detail.isEmpty {
- Text(detail).font(.subheadline).foregroundStyle(Palette.secondary)
+ Text(L10n.tr(detail)).font(.subheadline).foregroundStyle(Palette.secondary)
}
}
Spacer(minLength: 8)
@@ -454,7 +454,7 @@ public struct CardSection<Content: View, Accessory: View>: View {
VStack(alignment: .leading, spacing: 10) {
if let title {
HStack(spacing: 8) {
- Text(title)
+ Text(L10n.tr(title))
.font(.system(size: 15, weight: .semibold))
.foregroundStyle(Palette.text)
.accessibilityAddTraits(.isHeader)
@@ -474,7 +474,7 @@ public struct CardSection<Content: View, Accessory: View>: View {
}
}
if let footer {
- Text(footer)
+ Text(L10n.tr(footer))
.font(.caption)
.foregroundStyle(Palette.secondary)
.lineSpacing(2)
@@ -533,15 +533,15 @@ public struct ValueRow<Value: View>: View {
public init(_ label: String, detail: String? = nil, value: String) where Value == Text {
self.label = label
self.detail = detail
- self.value = Text(value)
+ self.value = Text(L10n.tr(value))
}
public var body: some View {
HStack(spacing: 12) {
VStack(alignment: .leading, spacing: 3) {
- Text(label).foregroundStyle(Palette.text)
+ Text(L10n.tr(label)).foregroundStyle(Palette.text)
if let detail {
- Text(detail)
+ Text(L10n.tr(detail))
.font(.caption)
.foregroundStyle(Palette.secondary)
.lineLimit(noteLines)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Dialog.swift b/apps/ios/Kit/Sources/CodyncUI/Dialog.swift
index 3b39a9dc..2430876b 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Dialog.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Dialog.swift
@@ -80,9 +80,9 @@ private struct DialogCard: View {
.onTapGesture { if cancel != nil { dismiss() } }
VStack(spacing: 14) {
VStack(spacing: 6) {
- Text(title).font(.headline).foregroundStyle(Palette.text)
+ Text(L10n.tr(title)).font(.headline).foregroundStyle(Palette.text)
if let message, !message.isEmpty {
- Text(message).font(.subheadline).foregroundStyle(Palette.secondary)
+ Text(L10n.tr(message)).font(.subheadline).foregroundStyle(Palette.secondary)
}
}
.multilineTextAlignment(.center)
@@ -92,12 +92,12 @@ private struct DialogCard: View {
dismiss()
action.action()
} label: {
- Text(action.title).frame(maxWidth: .infinity)
+ Text(L10n.tr(action.title)).frame(maxWidth: .infinity)
}
.buttonStyle(DialogButtonStyle(destructive: action.destructive, prominent: true))
}
if let cancel {
- Button(action: dismiss) { Text(cancel).frame(maxWidth: .infinity) }
+ Button(action: dismiss) { Text(L10n.tr(cancel)).frame(maxWidth: .infinity) }
.buttonStyle(DialogButtonStyle(destructive: false, prominent: false))
.keyboardShortcut(.cancelAction)
}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Marketplace/AgentSheet.swift b/apps/ios/Kit/Sources/CodyncUI/Marketplace/AgentSheet.swift
index 4acd82cf..21ed6a42 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Marketplace/AgentSheet.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Marketplace/AgentSheet.swift
@@ -16,13 +16,13 @@ struct NodeNotice: View {
.accessibilityHidden(true)
VStack(alignment: .leading, spacing: 10) {
VStack(alignment: .leading, spacing: 2) {
- Text("Node.js isn't on \(model.hostName)").font(.subheadline.weight(.semibold)).foregroundStyle(Palette.text)
- Text("Some agents need it to run. Codync can add a copy just for them.")
+ Text(L10n.tr("Node.js isn't on {name}").replacingOccurrences(of: "{name}", with: model.hostName)).font(.subheadline.weight(.semibold)).foregroundStyle(Palette.text)
+ Text(L10n.tr("Some agents need it to run. Codync can add a copy just for them."))
.font(.caption)
.foregroundStyle(Palette.secondary)
}
// Compact on a phone: under the text, so the text keeps the row's width.
- Button("Add Node.js", action: add)
+ Button(L10n.tr("Add Node.js"), action: add)
.buttonStyle(.plain)
.font(.subheadline.weight(.semibold))
.foregroundStyle(Palette.onAccent)
@@ -106,7 +106,7 @@ struct AgentSheet: View {
VStack(alignment: .leading, spacing: 2) {
Text(backend.name).font(.title3.weight(.semibold))
if let d = backend.description, !d.isEmpty {
- Text(d).font(.subheadline).foregroundStyle(Palette.secondary).lineLimit(3)
+ Text(L10n.tr(d)).font(.subheadline).foregroundStyle(Palette.secondary).lineLimit(3)
}
}
}
@@ -140,7 +140,7 @@ struct AgentSheet: View {
}
signInSection
if let error {
- CardSection { Text(error).foregroundStyle(Palette.danger).textSelection(.enabled) }
+ CardSection { Text(L10n.tr(error)).foregroundStyle(Palette.danger).textSelection(.enabled) }
}
}
}
@@ -160,7 +160,7 @@ struct AgentSheet: View {
if checking {
ThinkingOrb(state: .connecting, size: 16, color: Palette.secondary)
} else {
- Button("Check again", systemImage: "arrow.clockwise") { Task { await check() } }
+ Button(L10n.tr("Check again"), systemImage: "arrow.clockwise") { Task { await check() } }
.labelStyle(.iconOnly)
.buttonStyle(.plain)
.foregroundStyle(Palette.secondary)
@@ -223,8 +223,8 @@ struct AgentSheet: View {
.frame(width: 26)
.accessibilityHidden(true)
VStack(alignment: .leading, spacing: 2) {
- Text(title).font(.body.weight(.medium)).foregroundStyle(Palette.text)
- Text(detail).font(.subheadline).foregroundStyle(Palette.secondary).lineLimit(3)
+ Text(L10n.tr(title)).font(.body.weight(.medium)).foregroundStyle(Palette.text)
+ Text(L10n.tr(detail)).font(.subheadline).foregroundStyle(Palette.secondary).lineLimit(3)
}
Spacer(minLength: 8)
if busy {
@@ -292,7 +292,7 @@ private struct AgentKeysForm: View {
ScreenHeader {
BackButton(action: back).keyboardShortcut(.cancelAction)
} title: {
- Text(method.name).font(.body.weight(.semibold)).foregroundStyle(Palette.text).lineLimit(1)
+ Text(L10n.tr(method.name)).font(.body.weight(.semibold)).foregroundStyle(Palette.text).lineLimit(1)
} trailing: {
if saving {
Spinner()
@@ -327,7 +327,7 @@ private struct AgentKeysForm: View {
}
VStack(alignment: .leading, spacing: 6) {
if let d = method.description { Text(d) }
- Text("Saved on \(model.hostName) only and given to \(backend.name) when it starts.")
+ Text(L10n.tr("Saved on \(model.hostName) only and given to \(backend.name) when it starts."))
if let link = method.link, let url = URL(string: link) {
WebLink("Get a key", url: url)
}
@@ -338,7 +338,7 @@ private struct AgentKeysForm: View {
}
if !saved.isEmpty {
CardSection {
- Button("Remove saved keys", role: .destructive) {
+ Button(L10n.tr("Remove saved keys"), role: .destructive) {
save(Dictionary(uniqueKeysWithValues: vars.map { ($0.name, "") }))
}
.buttonStyle(.plain)
@@ -346,7 +346,7 @@ private struct AgentKeysForm: View {
}
}
if let error {
- CardSection { Text(error).foregroundStyle(Palette.danger) }
+ CardSection { Text(L10n.tr(error)).foregroundStyle(Palette.danger) }
}
}
.textFieldStyle(.plain)
@@ -385,18 +385,18 @@ private struct SetupStepRow: View {
if done {
Image(systemName: "checkmark").font(.caption.weight(.bold)).foregroundStyle(Palette.onAccent)
} else {
- Text("\(number)").font(.caption.weight(.semibold)).foregroundStyle(Palette.secondary)
+ Text(L10n.tr("\(number)")).font(.caption.weight(.semibold)).foregroundStyle(Palette.secondary)
}
}
.frame(width: 26, height: 26)
.accessibilityHidden(true)
VStack(alignment: .leading, spacing: 2) {
- Text(title).font(.body.weight(.medium)).foregroundStyle(Palette.text)
- Text(detail).font(.subheadline).foregroundStyle(Palette.secondary).textSelection(.enabled)
+ Text(L10n.tr(title)).font(.body.weight(.medium)).foregroundStyle(Palette.text)
+ Text(L10n.tr(detail)).font(.subheadline).foregroundStyle(Palette.secondary).textSelection(.enabled)
}
Spacer(minLength: 8)
if let action {
- Button(action.label, action: action.run)
+ Button(L10n.tr(action.label), action: action.run)
.buttonStyle(.plain)
.font(.subheadline.weight(.semibold))
.foregroundStyle(Palette.text)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Marketplace/ComposioViews.swift b/apps/ios/Kit/Sources/CodyncUI/Marketplace/ComposioViews.swift
index a5bbb917..5a21ca07 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Marketplace/ComposioViews.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Marketplace/ComposioViews.swift
@@ -72,7 +72,7 @@ struct ComposioConnectSheet: View {
}
if connected {
CardSection(footer: "Turn \(app.name) on for a bot in the bot's settings, under Connectors.") {
- Label("Connected", systemImage: "checkmark.circle.fill").foregroundStyle(Palette.added)
+ Label(L10n.tr("Connected"), systemImage: "checkmark.circle.fill").foregroundStyle(Palette.added)
}
} else if let plan, plan.status == "needsFields" {
CardSection(footer: "Sent to Composio, which keeps it for \(app.name).") {
@@ -95,24 +95,24 @@ struct ComposioConnectSheet: View {
} else if let plan, plan.status == "redirect" {
CardSection(footer: "Sign in on the page that opened. This updates by itself when you're done.") {
if let url = plan.url.flatMap(URL.init(string:)) {
- Button("Open the sign-in page", systemImage: "safari") { openURL(url) }
+ Button(L10n.tr("Open the sign-in page"), systemImage: "safari") { openURL(url) }
.buttonStyle(.secondary)
}
HStack(spacing: 8) {
Spinner()
- Text("Waiting for you to finish signing in…").foregroundStyle(Palette.secondary)
+ Text(L10n.tr("Waiting for you to finish signing in…")).foregroundStyle(Palette.secondary)
}
}
} else if error == nil {
CardSection {
HStack(spacing: 8) {
Spinner()
- Text("Asking Composio…").foregroundStyle(Palette.secondary)
+ Text(L10n.tr("Asking Composio…")).foregroundStyle(Palette.secondary)
}
}
}
if let error {
- CardSection { Text(error).foregroundStyle(Palette.danger).textSelection(.enabled) }
+ CardSection { Text(L10n.tr(error)).foregroundStyle(Palette.danger).textSelection(.enabled) }
}
}
.textFieldStyle(.plain)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Marketplace/ConnectionRequestCard.swift b/apps/ios/Kit/Sources/CodyncUI/Marketplace/ConnectionRequestCard.swift
index 21e24c41..56433f29 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Marketplace/ConnectionRequestCard.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Marketplace/ConnectionRequestCard.swift
@@ -34,13 +34,13 @@ struct ConnectionRequestCard: View {
}
// The card has no fill, so each field gets one.
if pending, request.kind == "login" {
- TextField("Username or email", text: $username)
+ TextField(L10n.tr("Username or email"), text: $username)
.plainTextInput()
.pill(fill: Palette.bubbleAgent)
- SecureField("Password or op:// reference", text: $value)
+ SecureField(L10n.tr("Password or op:// reference"), text: $value)
.plainTextInput()
.pill(fill: Palette.bubbleAgent)
- Text("Saved securely on this computer. The bot types it into the sign-in page but never sees it.")
+ Text(L10n.tr("Saved securely on this computer. The bot types it into the sign-in page but never sees it."))
.font(.caption).foregroundStyle(Palette.secondary)
} else if pending, request.kind == "secret" {
Text("\(request.field ?? "Credential") · \(request.location ?? "")")
@@ -48,10 +48,10 @@ struct ConnectionRequestCard: View {
SecureField("Credential or op:// reference", text: $value)
.plainTextInput()
.pill(fill: Palette.bubbleAgent)
- Text("Saved securely on this computer. Never added to the conversation.")
+ Text(L10n.tr("Saved securely on this computer. Never added to the conversation."))
.font(.caption).foregroundStyle(Palette.secondary)
}
- if let error { Text(error).font(.footnote).foregroundStyle(Palette.danger) }
+ if let error { Text(L10n.tr(error)).font(.footnote).foregroundStyle(Palette.danger) }
}
.padding(.horizontal, 16)
.padding(.vertical, 14)
@@ -172,8 +172,8 @@ struct CredentialsView: View {
ModalHeader("Credentials") {}
CardForm {
CardSection("Storage") {
- Text(status?.provider ?? "System credential store")
- Text("Encrypted on the connected computer.")
+ Text(L10n.tr(status?.provider ?? "System credential store"))
+ Text(L10n.tr("Encrypted on the connected computer."))
.foregroundStyle(Palette.secondary)
}
CardSection("Saved connections") {
@@ -184,27 +184,27 @@ struct CredentialsView: View {
.buttonStyle(.plain)
}
if !model.installedConnectors.contains(where: { !$0.keys.isEmpty }) {
- Text("No saved connection credentials yet.")
+ Text(L10n.tr("No saved connection credentials yet."))
.font(.caption).foregroundStyle(Palette.secondary)
}
- Text("Values stay hidden. Select a connection to replace its credentials.")
+ Text(L10n.tr("Values stay hidden. Select a connection to replace its credentials."))
.font(.caption).foregroundStyle(Palette.secondary)
}
LoginsSection()
CardSection("1Password", footer: "Use a service account with read access only to a dedicated shared vault. The 1Password CLI must be installed on the computer.") {
- Text(status?.onePasswordConnected == true ? "Connected" : "Connect a shared vault")
+ Text(L10n.tr(status?.onePasswordConnected == true ? "Connected" : "Connect a shared vault"))
CredentialFieldRow("Service account token") {
- SecureField("Paste your token", text: $token).plainTextInput()
+ SecureField(L10n.tr("Paste your token"), text: $token).plainTextInput()
}
- Button("Connect") { save(token) }.buttonStyle(PrimaryButtonStyle()).disabled(busy || token.isEmpty)
+ Button(L10n.tr("Connect")) { save(token) }.buttonStyle(PrimaryButtonStyle()).disabled(busy || token.isEmpty)
if status?.onePasswordConnected == true {
- Button("Disconnect") { save("") }.buttonStyle(SecondaryButtonStyle()).disabled(busy)
+ Button(L10n.tr("Disconnect")) { save("") }.buttonStyle(SecondaryButtonStyle()).disabled(busy)
}
- Text("Use op://vault/item/field in a connector's credential field. Codync retrieves the value when the connector runs.")
+ Text(L10n.tr("Use op://vault/item/field in a connector's credential field. Codync retrieves the value when the connector runs."))
.font(.footnote).foregroundStyle(Palette.secondary)
}
if busy { Spinner() }
- if let error { Text(error).foregroundStyle(Palette.danger) }
+ if let error { Text(L10n.tr(error)).foregroundStyle(Palette.danger) }
}
}
.background(Palette.background)
@@ -259,12 +259,12 @@ private struct LoginsSection: View {
TextField("[email protected]", text: $username).plainTextInput()
}
CredentialFieldRow("Password") {
- SecureField("Password or op:// reference", text: $password).plainTextInput()
+ SecureField(L10n.tr("Password or op:// reference"), text: $password).plainTextInput()
}
- Button("Save sign-in") { save() }
+ Button(L10n.tr("Save sign-in")) { save() }
.buttonStyle(PrimaryButtonStyle())
.disabled(busy || site.isEmpty || password.isEmpty)
- if let error { Text(error).font(.footnote).foregroundStyle(Palette.danger) }
+ if let error { Text(L10n.tr(error)).font(.footnote).foregroundStyle(Palette.danger) }
}
.task { await load() }
.onDisappear { password = "" }
@@ -319,7 +319,7 @@ private struct ConnectorCredentialEditor: View {
SecureField(key, text: Binding(get: { fields[key] ?? "" }, set: { fields[key] = $0 })).plainTextInput()
}
}
- if let error { Text(error).foregroundStyle(Palette.danger) }
+ if let error { Text(L10n.tr(error)).foregroundStyle(Palette.danger) }
}
}
.background(Palette.background)
@@ -352,8 +352,8 @@ private struct CredentialFieldRow<Content: View>: View {
var body: some View {
VStack(alignment: .leading, spacing: 8) {
- Text(title).font(.caption).foregroundStyle(Palette.secondary)
- content.accessibilityLabel(title)
+ Text(L10n.tr(title)).font(.caption).foregroundStyle(Palette.secondary)
+ content.accessibilityLabel(L10n.tr(title))
}
}
}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Marketplace/CustomConnectorSheet.swift b/apps/ios/Kit/Sources/CodyncUI/Marketplace/CustomConnectorSheet.swift
index c445a6c4..e5b0a19d 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Marketplace/CustomConnectorSheet.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Marketplace/CustomConnectorSheet.swift
@@ -40,9 +40,9 @@ struct CustomConnectorSheet: View {
private var footer: String {
switch mode {
- case .command: "Runs on \(model.hostName) in the bot's project folder. Quotes work like in a shell."
+ case .command: L10n.tr("Runs on {name} in the bot's project folder. Quotes work like in a shell.").replacingOccurrences(of: "{name}", with: model.hostName)
case .url: "A remote MCP server, streamable HTTP or SSE."
- case .config: "Paste the MCP config from a README or another app (Claude, Cursor, VS Code). Every server in it is added. Saved on \(model.hostName) only."
+ case .config: L10n.tr("Paste the MCP config from a README or another app (Claude, Cursor, VS Code). Every server in it is added. Saved on {name} only.").replacingOccurrences(of: "{name}", with: model.hostName)
}
}
@@ -56,21 +56,21 @@ struct CustomConnectorSheet: View {
.font(.callout.monospaced())
.plainTextInput()
} else {
- TextField("Name", text: $name)
+ TextField(L10n.tr("Name"), text: $name)
TextField(mode == .url ? "https://example.com/mcp" : "npx -y @scope/server", text: $target)
.font(.callout.monospaced())
.plainTextInput()
}
}
if mode == .url {
- CardSection("Headers", footer: "Optional, one Name: value per line. Leave empty if the service has you sign in. Saved on \(model.hostName) only.") {
+ CardSection("Headers", footer: L10n.tr("Optional, one Name: value per line. Leave empty if the service has you sign in. Saved on {name} only.").replacingOccurrences(of: "{name}", with: model.hostName)) {
TextField("Authorization: Bearer …", text: $envText, axis: .vertical)
.lineLimit(2...6)
.font(.callout.monospaced())
.plainTextInput()
}
} else if mode == .command {
- CardSection("Environment", footer: "One KEY=value per line. Saved on \(model.hostName) only.") {
+ CardSection("Environment", footer: L10n.tr("One KEY=value per line. Saved on {name} only.").replacingOccurrences(of: "{name}", with: model.hostName)) {
TextField("API_KEY=…", text: $envText, axis: .vertical)
.lineLimit(2...6)
.font(.callout.monospaced())
@@ -78,7 +78,7 @@ struct CustomConnectorSheet: View {
}
}
if let error {
- CardSection { Text(error).foregroundStyle(Palette.danger) }
+ CardSection { Text(L10n.tr(error)).foregroundStyle(Palette.danger) }
}
}
.textFieldStyle(.plain)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Marketplace/InstallConnectorSheet.swift b/apps/ios/Kit/Sources/CodyncUI/Marketplace/InstallConnectorSheet.swift
index 5787139c..25d5b6eb 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Marketplace/InstallConnectorSheet.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Marketplace/InstallConnectorSheet.swift
@@ -57,16 +57,19 @@ struct InstallConnectorSheet: View {
if item.options.count > 1 {
CardSection("Runs") {
ChoiceList(selection: $optionId, options: item.options.map { o in
- (id: o.id, label: o.kind == "remote" ? "Hosted by \(item.title)" : "On \(model.hostName) (\(o.kind))", detail: nil)
+ (id: o.id, label: o.kind == "remote"
+ ? L10n.tr("Hosted by {name}").replacingOccurrences(of: "{name}", with: item.title)
+ : L10n.tr("On {name} ({kind})").replacingOccurrences(of: "{name}", with: model.hostName).replacingOccurrences(of: "{kind}", with: o.kind),
+ detail: nil)
})
}
}
if let option {
- CardSection("Setup", footer: "Keys are saved on \(model.hostName) only.") {
+ CardSection("Setup", footer: L10n.tr("Keys are saved on {name} only.").replacingOccurrences(of: "{name}", with: model.hostName)) {
if option.inputs.isEmpty {
Text(option.kind == "remote"
- ? "No keys needed here. If \(item.title) wants you to sign in, its sign-in page opens next."
- : "No setup needed.")
+ ? L10n.tr("No keys needed here. If {name} wants you to sign in, its sign-in page opens next.").replacingOccurrences(of: "{name}", with: item.title)
+ : L10n.tr("No setup needed."))
.foregroundStyle(Palette.secondary)
}
ForEach(option.inputs) { input in
@@ -80,14 +83,14 @@ struct InstallConnectorSheet: View {
}
.plainTextInput()
if let d = input.description {
- Text(d + (input.required ? "" : " (optional)")).font(.caption).foregroundStyle(Palette.secondary)
+ Text(d + (input.required ? "" : L10n.tr(" (optional)"))).font(.caption).foregroundStyle(Palette.secondary)
}
}
}
}
}
if let error {
- CardSection { Text(error).foregroundStyle(Palette.danger) }
+ CardSection { Text(L10n.tr(error)).foregroundStyle(Palette.danger) }
}
}
.textFieldStyle(.plain)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Marketplace/InstalledView.swift b/apps/ios/Kit/Sources/CodyncUI/Marketplace/InstalledView.swift
index 1f70bfab..b38740ee 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Marketplace/InstalledView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Marketplace/InstalledView.swift
@@ -22,7 +22,7 @@ struct InstalledView: View {
ScreenHeader {
BackButton(action: back).keyboardShortcut(.cancelAction)
} title: {
- Text("Connectors & skills").font(.body.weight(.semibold)).foregroundStyle(Palette.text)
+ Text(L10n.tr("Connectors & skills")).font(.body.weight(.semibold)).foregroundStyle(Palette.text)
} trailing: {
EmptyView()
}
@@ -50,7 +50,7 @@ struct InstalledView: View {
if signingIn == c.id {
Spinner()
} else if c.needsSignIn {
- Button("Sign in") { signIn(c.id) }
+ Button(L10n.tr("Sign in")) { signIn(c.id) }
.buttonStyle(PrimaryButtonStyle())
.controlSize(.small)
}
@@ -75,7 +75,7 @@ struct InstalledView: View {
}
}
.codyncDialog(
- "Remove \(removing?.name ?? "")?",
+ L10n.tr("Remove {name}?").replacingOccurrences(of: "{name}", with: removing?.name ?? ""),
isPresented: Binding(get: { removing != nil }, set: { if !$0 { removing = nil } }),
message: removing.map { $0.isSkill ? "Bots stop using this skill." : "Bots lose this connector, and the keys saved for it are deleted." }
) {
@@ -114,8 +114,8 @@ private struct EmptyState: View {
var body: some View {
VStack(spacing: 8) {
Image(systemName: icon).font(.system(size: 28)).foregroundStyle(Palette.tertiary).accessibilityHidden(true)
- Text(title).font(.body.weight(.semibold)).foregroundStyle(Palette.text)
- Text(detail).font(.subheadline).foregroundStyle(Palette.secondary).multilineTextAlignment(.center)
+ Text(L10n.tr(title)).font(.body.weight(.semibold)).foregroundStyle(Palette.text)
+ Text(L10n.tr(detail)).font(.subheadline).foregroundStyle(Palette.secondary).multilineTextAlignment(.center)
}
.frame(maxWidth: .infinity)
.padding(.vertical, 40)
@@ -156,7 +156,7 @@ private struct InstalledRow<Icon: View, Accessory: View>: View {
icon
VStack(alignment: .leading, spacing: 2) {
Text(title).foregroundStyle(Palette.text).lineLimit(1)
- Text(subtitle).font(.caption).foregroundStyle(Palette.secondary).lineLimit(1)
+ Text(L10n.tr(subtitle)).font(.caption).foregroundStyle(Palette.secondary).lineLimit(1)
}
}
.contentShape(Rectangle())
diff --git a/apps/ios/Kit/Sources/CodyncUI/Marketplace/MarketRows.swift b/apps/ios/Kit/Sources/CodyncUI/Marketplace/MarketRows.swift
index baee532b..d8036a5a 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Marketplace/MarketRows.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Marketplace/MarketRows.swift
@@ -7,7 +7,7 @@ struct MarketSection<Content: View>: View {
var body: some View {
VStack(alignment: .leading, spacing: 12) {
- Text(title).font(.headline).foregroundStyle(Palette.text).padding(.leading, 4)
+ Text(L10n.tr(title)).font(.headline).foregroundStyle(Palette.text).padding(.leading, 4)
content
}
}
@@ -42,7 +42,7 @@ struct AgentCard: View {
.background(Palette.bubbleAgent, in: RoundedRectangle(cornerRadius: 18, style: .continuous))
VStack(spacing: 2) {
Text(backend.name).font(.subheadline.weight(.semibold)).foregroundStyle(Palette.text).lineLimit(1)
- Text(status)
+ Text(L10n.tr(status))
.font(.caption)
.foregroundStyle(Palette.secondary)
.lineLimit(1)
@@ -78,21 +78,21 @@ struct MarketRow<Icon: View>: View {
HStack(spacing: 14) {
icon.frame(width: 46, height: 46)
VStack(alignment: .leading, spacing: 2) {
- Text(title).font(.body.weight(.medium)).foregroundStyle(Palette.text).lineLimit(1)
- Text(subtitle).font(.subheadline).foregroundStyle(Palette.secondary).lineLimit(1)
+ Text(L10n.tr(title)).font(.body.weight(.medium)).foregroundStyle(Palette.text).lineLimit(1)
+ Text(L10n.tr(subtitle)).font(.subheadline).foregroundStyle(Palette.secondary).lineLimit(1)
}
Spacer(minLength: 8)
if busy {
ThinkingOrb(size: 18, color: Palette.secondary).frame(width: 60)
} else if added {
- Label("Added", systemImage: "checkmark")
+ Label(L10n.tr("Added"), systemImage: "checkmark")
.labelStyle(.iconOnly)
.font(.subheadline.weight(.semibold))
.foregroundStyle(Palette.secondary)
.frame(width: 60)
- .accessibilityLabel("Added")
+ .accessibilityLabel(L10n.tr("Added"))
} else {
- Button(addLabel, action: add)
+ Button(L10n.tr(addLabel), action: add)
.buttonStyle(.plain)
.font(.subheadline.weight(.semibold))
.foregroundStyle(Palette.text)
@@ -216,7 +216,7 @@ struct WebLink: View {
}
var body: some View {
- Button(title) { openURL(url) }
+ Button(L10n.tr(title)) { openURL(url) }
.buttonStyle(.plain)
.foregroundStyle(Palette.text)
.underline()
diff --git a/apps/ios/Kit/Sources/CodyncUI/Marketplace/MarketplaceView.swift b/apps/ios/Kit/Sources/CodyncUI/Marketplace/MarketplaceView.swift
index 525b2304..42056569 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Marketplace/MarketplaceView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Marketplace/MarketplaceView.swift
@@ -91,7 +91,7 @@ public struct MarketplaceView: View {
header
searchField
if !agents.isEmpty {
- MarketSection(title: query.isEmpty ? "Agents" : "Agents matching “\(query)”") {
+ MarketSection(title: query.isEmpty ? "Agents" : L10n.tr("Agents matching “{query}”").replacingOccurrences(of: "{query}", with: query)) {
if model.hello?.backends.contains(where: \.needsNode) == true {
NodeNotice { addingNode = true }
}
@@ -103,7 +103,7 @@ public struct MarketplaceView: View {
}
.padding(.horizontal, -24)
if agents.count > agentLimit {
- Button("Load more agents") {
+ Button(L10n.tr("Load more agents")) {
withAnimation(Motion.fade) { agentLimit += 10 }
}
.buttonStyle(SecondaryButtonStyle())
@@ -115,7 +115,7 @@ public struct MarketplaceView: View {
if loadingConnectors {
SkeletonGrid()
} else if connectors.isEmpty {
- Text(query.isEmpty ? "Couldn't load connectors." : "No connectors match “\(query)”.")
+ Text(query.isEmpty ? L10n.tr("Couldn't load connectors.") : L10n.tr("No connectors match “{query}”.").replacingOccurrences(of: "{query}", with: query))
.foregroundStyle(Palette.secondary)
} else {
ItemGrid {
@@ -128,7 +128,7 @@ public struct MarketplaceView: View {
}
}
if connectors.hasHiddenItems || connectorCursor != nil {
- Button(loadingMore ? "Loading…" : "Load more connectors") { Task { await loadMoreConnectors() } }
+ Button(L10n.tr(loadingMore ? "Loading…" : "Load more connectors")) { Task { await loadMoreConnectors() } }
.buttonStyle(SecondaryButtonStyle())
.disabled(loadingMore)
.frame(maxWidth: .infinity)
@@ -157,7 +157,7 @@ public struct MarketplaceView: View {
}
}
Button { withAnimation(Motion.layout) { showCredentials = true } } label: {
- Label("Credentials", systemImage: "lock.shield")
+ Label(L10n.tr("Credentials"), systemImage: "lock.shield")
}
.buttonStyle(SecondaryButtonStyle())
MarketSection(title: "Make your own") {
@@ -175,9 +175,9 @@ public struct MarketplaceView: View {
}
}
if let error {
- Text(error).font(.footnote).foregroundStyle(Palette.danger)
+ Text(L10n.tr(error)).font(.footnote).foregroundStyle(Palette.danger)
}
- Text("Connectors come from the official MCP Registry, skills from Anthropic, agents from the ACP registry. Everything installs on \(model.hostName).")
+ Text(L10n.tr("Connectors come from the official MCP Registry, skills from Anthropic, agents from the ACP registry. Everything installs on {name}.").replacingOccurrences(of: "{name}", with: model.hostName))
.font(.footnote)
.foregroundStyle(Palette.tertiary)
}
@@ -201,7 +201,7 @@ public struct MarketplaceView: View {
HStack(spacing: 10) {
ComputerBadge(model.computer, size: 32)
VStack(alignment: .leading, spacing: 0) {
- Text("Extensions")
+ Text(L10n.tr("Extensions"))
.font(.title2.weight(.semibold))
.foregroundStyle(Palette.text)
if let computer, computers.count > 1 {
@@ -218,8 +218,8 @@ public struct MarketplaceView: View {
.foregroundStyle(Palette.secondary)
.contentShape(Rectangle())
}
- .accessibilityLabel("Computer: \(model.hostName)")
- .help("Switch computer")
+ .accessibilityLabel(L10n.tr("Computer: {name}").replacingOccurrences(of: "{name}", with: model.hostName))
+ .help(L10n.tr("Switch computer"))
} else {
Text(model.hostName)
.font(.subheadline)
@@ -239,8 +239,8 @@ public struct MarketplaceView: View {
}
}
VStack(alignment: .leading, spacing: 2) {
- Text("\(installedCount) installed")
- Text("Connectors & skills").font(.caption)
+ Text(L10n.tr("{count} installed").replacingOccurrences(of: "{count}", with: String(installedCount)))
+ Text(L10n.tr("Connectors & skills")).font(.caption)
}
.foregroundStyle(Palette.secondary)
Image(systemName: "chevron.right").font(.caption.weight(.semibold)).foregroundStyle(Palette.tertiary)
@@ -256,7 +256,7 @@ public struct MarketplaceView: View {
private var searchField: some View {
HStack(spacing: 10) {
Image(systemName: "magnifyingglass").foregroundStyle(Palette.secondary)
- TextField("Search agents, connectors and skills", text: $search)
+ TextField(L10n.tr("Search agents, connectors and skills"), text: $search)
.textFieldStyle(.plain)
.plainTextInput()
.onSubmit { Task { await loadConnectors() } }
@@ -266,7 +266,7 @@ public struct MarketplaceView: View {
Image(systemName: "xmark.circle.fill").foregroundStyle(Palette.tertiary)
}
.buttonStyle(.plain)
- .accessibilityLabel("Clear search")
+ .accessibilityLabel(L10n.tr("Clear search"))
}
}
.padding(.horizontal, 14)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Marketplace/NewSkillSheet.swift b/apps/ios/Kit/Sources/CodyncUI/Marketplace/NewSkillSheet.swift
index f747be71..04606c02 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Marketplace/NewSkillSheet.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Marketplace/NewSkillSheet.swift
@@ -39,15 +39,15 @@ struct NewSkillSheet: View {
private var form: some View {
CardForm {
CardSection(footer: "The bot sees the name and when to use it, and reads the instructions only when a task fits.") {
- TextField("Name", text: $name)
- TextField("When to use it", text: $summary, axis: .vertical).lineLimit(2...4)
+ TextField(L10n.tr("Name"), text: $name)
+ TextField(L10n.tr("When to use it"), text: $summary, axis: .vertical).lineLimit(2...4)
}
CardSection("Instructions") {
- TextField("Step by step, in plain words…", text: $instructions, axis: .vertical)
+ TextField(L10n.tr("Step by step, in plain words…"), text: $instructions, axis: .vertical)
.lineLimit(6...20)
}
if let error {
- CardSection { Text(error).foregroundStyle(Palette.danger) }
+ CardSection { Text(L10n.tr(error)).foregroundStyle(Palette.danger) }
}
}
.textFieldStyle(.plain)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Marketplace/SetupTerminal.swift b/apps/ios/Kit/Sources/CodyncUI/Marketplace/SetupTerminal.swift
index 82059ab9..d215d75d 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Marketplace/SetupTerminal.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Marketplace/SetupTerminal.swift
@@ -55,7 +55,7 @@ struct SetupTerminalView: View {
private var footer: some View {
HStack(spacing: 8) {
if let error = session.error {
- Text(error).foregroundStyle(Palette.danger)
+ Text(L10n.tr(error)).foregroundStyle(Palette.danger)
} else if let code = session.exitCode {
Image(systemName: code == 0 ? "checkmark.circle.fill" : "exclamationmark.circle.fill")
.foregroundStyle(code == 0 ? Palette.added : Palette.warning)
@@ -63,12 +63,12 @@ struct SetupTerminalView: View {
.foregroundStyle(Palette.secondary)
} else {
ThinkingOrb(size: 14, color: Palette.secondary)
- Text("Running on \(model.hostName). Links open on this device.")
+ Text(L10n.tr("Running on \(model.hostName). Links open on this device."))
.foregroundStyle(Palette.secondary)
}
Spacer(minLength: 0)
if session.exitCode != nil {
- Button("Done", action: back).buttonStyle(.primary)
+ Button(L10n.tr("Done"), action: back).buttonStyle(.primary)
}
}
.font(.footnote)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Marketplace/SkillSheet.swift b/apps/ios/Kit/Sources/CodyncUI/Marketplace/SkillSheet.swift
index 7343abd8..802c8702 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Marketplace/SkillSheet.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Marketplace/SkillSheet.swift
@@ -60,7 +60,7 @@ struct SkillSheet: View {
CardSection("Instructions", footer: added ? "Bots read these before using the skill." : "Add it to let bots use these instructions.") {
if let markdown {
if markdown.isEmpty {
- Text("No instructions.").foregroundStyle(Palette.secondary)
+ Text(L10n.tr("No instructions.")).foregroundStyle(Palette.secondary)
} else {
MarkdownText(markdown)
}
@@ -70,7 +70,7 @@ struct SkillSheet: View {
}
if let error {
CardSection {
- Text(error).font(.footnote).foregroundStyle(Palette.danger)
+ Text(L10n.tr(error)).font(.footnote).foregroundStyle(Palette.danger)
}
}
}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Routines/RoutineEditorView.swift b/apps/ios/Kit/Sources/CodyncUI/Routines/RoutineEditorView.swift
index 092d1eed..5a951244 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Routines/RoutineEditorView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Routines/RoutineEditorView.swift
@@ -95,10 +95,10 @@ struct RoutineEditorView: View {
VStack(alignment: .leading, spacing: 24) {
VStack(alignment: .leading, spacing: 14) {
Field("Name") {
- TextField("Name", text: $name, prompt: Text("e.g. Morning summary").foregroundStyle(Palette.secondary)).routineInput().focused($typing)
+ TextField("Name", text: $name, prompt: Text(L10n.tr("e.g. Morning summary")).foregroundStyle(Palette.secondary)).routineInput().focused($typing)
}
Field("Instruction") {
- TextField("Instruction", text: $instruction, prompt: Text("Describe what this bot should do each time it runs.").foregroundStyle(Palette.secondary), axis: .vertical)
+ TextField("Instruction", text: $instruction, prompt: Text(L10n.tr("Describe what this bot should do each time it runs.")).foregroundStyle(Palette.secondary), axis: .vertical)
.lineLimit(3...8).routineInput().focused($typing)
}
}
@@ -107,18 +107,18 @@ struct RoutineEditorView: View {
ChoicePicker(selection: $schedule.kind, options: options.map { (id: $0.0, label: $0.1) }, fitsAvailableWidth: true)
}
if loaded { triggerFields }
- else { Label("Loading schedule…", systemImage: "clock").foregroundStyle(Palette.secondary) }
+ else { Label(L10n.tr("Loading schedule…"), systemImage: "clock").foregroundStyle(Palette.secondary) }
}
VStack(alignment: .leading, spacing: 12) {
Button {
withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { advanced.toggle() }
} label: {
HStack(spacing: 6) {
- Text("Run settings")
+ Text(L10n.tr("Run settings"))
Image(systemName: "chevron.down").font(.caption2.weight(.semibold))
.rotationEffect(.degrees(advanced ? 180 : 0))
Spacer()
- if !advanced { Text("Timeout \(Routine.timeoutText(timeout))").foregroundStyle(Palette.tertiary) }
+ if !advanced { Text(L10n.tr("Timeout \(Routine.timeoutText(timeout))")).foregroundStyle(Palette.tertiary) }
}
.font(.subheadline)
.foregroundStyle(Palette.secondary)
@@ -129,7 +129,7 @@ struct RoutineEditorView: View {
.accessibilityValue(advanced ? "Expanded" : "Collapsed")
if advanced {
Field("Timeout (seconds)") { TextField("3600", text: $timeout).routineInput().focused($typing) }
- Text("A run is stopped after this long. 1 second to 24 hours.")
+ Text(L10n.tr("A run is stopped after this long. 1 second to 24 hours."))
.font(.caption).foregroundStyle(Palette.secondary).padding(.leading, 4)
}
}
@@ -176,12 +176,12 @@ struct RoutineEditorView: View {
if let routine, routine.triggers.contains(where: { $0.type == "webhook" || $0.type == "event" }) {
RoutineWebhookPanel(botId: botId, routineId: routine.id)
} else {
- Text("Runs each time something is posted to its URL. Save to get the URL and key.")
+ Text(L10n.tr("Runs each time something is posted to its URL. Save to get the URL and key."))
.font(.caption).foregroundStyle(Palette.secondary).padding(.leading, 4)
.fixedSize(horizontal: false, vertical: true)
}
default:
- Text("Set up by the bot. Pick Schedule or Webhook to replace it.")
+ Text(L10n.tr("Set up by the bot. Pick Schedule or Webhook to replace it."))
.font(.caption).foregroundStyle(Palette.secondary).padding(.leading, 4)
}
}
@@ -246,7 +246,7 @@ struct RoutineEditorView: View {
private var expressionField: some View {
Field("Cron") {
- TextField("Cron", text: $schedule.expression, prompt: Text("0 9 * * 1-5").foregroundStyle(Palette.secondary))
+ TextField("Cron", text: $schedule.expression, prompt: Text(L10n.tr("0 9 * * 1-5")).foregroundStyle(Palette.secondary))
.font(.body.monospaced()).autocorrectionDisabled().routineInput().focused($typing)
.frame(minWidth: 220)
}
@@ -277,7 +277,7 @@ struct RoutineEditorView: View {
VStack(alignment: .leading, spacing: 2) {
Text(preview.summary).font(.caption.weight(.medium))
if let next = preview.nextRunAt {
- Text("Next \(Date(milliseconds: next).formatted(date: .abbreviated, time: .shortened))")
+ Text(L10n.tr("Next \(Date(milliseconds: next).formatted(date: .abbreviated, time: .shortened))"))
.font(.caption).foregroundStyle(Palette.secondary)
}
if let warning = preview.warning {
@@ -285,18 +285,18 @@ struct RoutineEditorView: View {
}
}
} else if schedule.calendarStyle == "custom" {
- Text("minute hour day month weekday").font(.caption.monospaced()).foregroundStyle(Palette.tertiary)
+ Text(L10n.tr("minute hour day month weekday")).font(.caption.monospaced()).foregroundStyle(Palette.tertiary)
}
}
private var footer: some View {
VStack(alignment: .leading, spacing: 12) {
if previewError != nil {
- Button("Check schedule again") { Task { await checkSchedule() } }
+ Button(L10n.tr("Check schedule again")) { Task { await checkSchedule() } }
.buttonStyle(.plain).disabled(model.isOffline)
}
if !loaded, error != nil {
- Button("Retry loading schedule") { Task { await loadSchedule() } }.buttonStyle(.plain)
+ Button(L10n.tr("Retry loading schedule")) { Task { await loadSchedule() } }.buttonStyle(.plain)
}
if schedule.kind != "cron", let previewError {
Text(previewError).font(.caption).foregroundStyle(Palette.danger)
@@ -306,13 +306,13 @@ struct RoutineEditorView: View {
.font(.callout).foregroundStyle(Palette.danger).textSelection(.enabled)
}
if model.isOffline {
- Label("Connect to this computer to save your routine.", systemImage: "wifi.slash")
+ Label(L10n.tr("Connect to this computer to save your routine."), systemImage: "wifi.slash")
.font(.caption).foregroundStyle(Palette.danger)
}
if loaded, !model.isOffline,
name.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty ||
instruction.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
- Text("Enter a name and instruction above to save.")
+ Text(L10n.tr("Enter a name and instruction above to save."))
.font(.caption).foregroundStyle(Palette.secondary)
}
HStack(spacing: 16) { routineActions; saveButton }
diff --git a/apps/ios/Kit/Sources/CodyncUI/Routines/RoutineWebhookPanel.swift b/apps/ios/Kit/Sources/CodyncUI/Routines/RoutineWebhookPanel.swift
index 81005686..048c798a 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Routines/RoutineWebhookPanel.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Routines/RoutineWebhookPanel.swift
@@ -33,9 +33,9 @@ struct RoutineWebhookPanel: View {
.font(.caption).foregroundStyle(Palette.secondary).padding(.leading, 4)
.fixedSize(horizontal: false, vertical: true)
} else if let error {
- Text(error).font(.caption).foregroundStyle(Palette.danger).padding(.leading, 4)
+ Text(L10n.tr(error)).font(.caption).foregroundStyle(Palette.danger).padding(.leading, 4)
} else {
- Text("Loading webhook…").font(.caption).foregroundStyle(Palette.secondary).padding(.leading, 4)
+ Text(L10n.tr("Loading webhook…")).font(.caption).foregroundStyle(Palette.secondary).padding(.leading, 4)
}
}
.task(id: routineId) { await load(rotate: false) }
diff --git a/apps/ios/Kit/Sources/CodyncUI/Routines/RoutinesView.swift b/apps/ios/Kit/Sources/CodyncUI/Routines/RoutinesView.swift
index 1727bbcc..22b91510 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Routines/RoutinesView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Routines/RoutinesView.swift
@@ -21,7 +21,7 @@ struct RoutinesView: View {
var body: some View {
VStack(alignment: .leading, spacing: 10) {
HStack {
- Text("Routines")
+ Text(L10n.tr("Routines"))
.font(.system(size: 15, weight: .semibold))
.foregroundStyle(Palette.text)
.padding(.leading, 2)
@@ -31,7 +31,7 @@ struct RoutinesView: View {
.disabled(model.isOffline)
}
if let loadError { Text(loadError).font(.caption).foregroundStyle(Palette.danger) }
- if let error { Text(error).font(.caption).foregroundStyle(.red).textSelection(.enabled) }
+ if let error { Text(L10n.tr(error)).font(.caption).foregroundStyle(.red).textSelection(.enabled) }
listing
}
.foregroundStyle(Palette.text)
@@ -67,7 +67,7 @@ struct RoutinesView: View {
private var listing: some View {
VStack(alignment: .leading, spacing: 0) {
if routines.isEmpty {
- Text(loaded ? "No routines yet. Ask the bot for one, or set it up yourself with +." : "Loading routines…")
+ Text(L10n.tr(loaded ? "No routines yet. Ask the bot for one, or set it up yourself with +." : "Loading routines…"))
.font(.system(size: 12))
.lineSpacing(3)
.foregroundStyle(Palette.secondary)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Routines/TimeZonePicker.swift b/apps/ios/Kit/Sources/CodyncUI/Routines/TimeZonePicker.swift
index 6bd0e6f7..12f00e73 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Routines/TimeZonePicker.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Routines/TimeZonePicker.swift
@@ -20,7 +20,7 @@ struct TimeZonePicker: View {
VStack(spacing: 0) {
Color.clear.frame(height: 0).id(Self.top)
if zones.isEmpty {
- Text("No matching time zones").foregroundStyle(Palette.secondary).padding(.top, 8)
+ Text(L10n.tr("No matching time zones")).foregroundStyle(Palette.secondary).padding(.top, 8)
}
LazyVStack(alignment: .leading, spacing: 0) {
ForEach(zones, id: \.self) { zone in
diff --git a/apps/ios/Kit/Sources/CodyncUI/Screen/ScreenView.swift b/apps/ios/Kit/Sources/CodyncUI/Screen/ScreenView.swift
index 597c92f2..cd020d9b 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Screen/ScreenView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Screen/ScreenView.swift
@@ -191,12 +191,12 @@ public struct ScreenView: View {
}
case .live, .closed:
if screen?.input != true {
- Text("View only. To allow control, open Codync → Settings → Computer access on the computer.")
+ Text(L10n.tr("View only. To allow control, open Codync → Settings → Computer access on the computer."))
.font(.caption).padding(12)
.background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 12))
.frame(maxHeight: .infinity, alignment: .bottom).padding(.bottom, 24)
} else if let error = session.lastError {
- Text(error)
+ Text(L10n.tr(error))
.font(.caption)
.padding(8)
.background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 8))
@@ -228,9 +228,9 @@ private struct Overlay: View {
} else {
Spinner(size: 22)
}
- Text(text).font(.callout).multilineTextAlignment(.center).foregroundStyle(.secondary)
+ Text(L10n.tr(text)).font(.callout).multilineTextAlignment(.center).foregroundStyle(.secondary)
if let retry {
- Button("Try again", systemImage: "arrow.clockwise", action: retry)
+ Button(L10n.tr("Try again"), systemImage: "arrow.clockwise", action: retry)
.labelStyle(.iconOnly)
.buttonStyle(.secondary)
}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/BotConversation.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/BotConversation.swift
index 8421c4fd..901bfaa9 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Thread/BotConversation.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/BotConversation.swift
@@ -82,10 +82,10 @@ struct BotConversationView: View {
ScrollView {
LazyVStack(alignment: .leading, spacing: 4) {
if let error {
- Text(error).font(.footnote).foregroundStyle(Palette.danger)
+ Text(L10n.tr(error)).font(.footnote).foregroundStyle(Palette.danger)
.frame(maxWidth: .infinity).padding(.top, 24)
} else if rows.isEmpty, fetched != nil {
- Text("No messages yet.").font(.footnote).foregroundStyle(Palette.tertiary)
+ Text(L10n.tr("No messages yet.")).font(.footnote).foregroundStyle(Palette.tertiary)
.frame(maxWidth: .infinity).padding(.top, 24)
}
ForEach(rows) { rowView($0) }
@@ -123,7 +123,7 @@ struct BotConversationView: View {
@ViewBuilder private func caption(_ outcome: BotExchange.Outcome, awaiting: String) -> some View {
switch outcome {
case .pending:
- Text("Waiting for \(model.authorName(awaiting))…").font(.footnote).foregroundStyle(Palette.secondary)
+ Text(L10n.tr("Waiting for \(model.authorName(awaiting))…")).font(.footnote).foregroundStyle(Palette.secondary)
.padding(.leading, 12)
case .failed(let detail):
Text(detail.isEmpty ? "Didn't complete." : detail).font(.footnote).foregroundStyle(Palette.danger)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift
index 79c90aa0..6b8a0935 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift
@@ -95,7 +95,7 @@ struct QuoteLine: View {
var body: some View {
Label {
- Text("“\(MessagePreview.text(text))”").lineLimit(1)
+ Text(L10n.tr("“\(MessagePreview.text(text))”")).lineLimit(1)
} icon: {
Image(systemName: "text.bubble")
}
@@ -147,25 +147,25 @@ struct UserBubble: View {
@ViewBuilder private var status: some View {
switch entry.data.status {
case "sending":
- Text("Sending…").font(.caption2).foregroundStyle(Palette.tertiary)
+ Text(L10n.tr("Sending…")).font(.caption2).foregroundStyle(Palette.tertiary)
case "queued":
Text(botWorking ? "Queued until this response finishes" : "Queued")
.font(.caption2)
.foregroundStyle(Palette.tertiary)
case "failed":
HStack(spacing: 10) {
- Text("Failed to send").foregroundStyle(Palette.danger)
- Button("Resend", systemImage: "arrow.clockwise") { model.retry(entry) }.labelStyle(.iconOnly).help("Resend")
- Button("Delete", systemImage: "trash") { model.discard(entry) }.labelStyle(.iconOnly).help("Delete")
+ Text(L10n.tr("Failed to send")).foregroundStyle(Palette.danger)
+ Button(L10n.tr("Resend"), systemImage: "arrow.clockwise") { model.retry(entry) }.labelStyle(.iconOnly).help("Resend")
+ Button(L10n.tr("Delete"), systemImage: "trash") { model.discard(entry) }.labelStyle(.iconOnly).help("Delete")
}
.buttonStyle(.plain)
.font(.caption2.bold())
case "cancelled":
- Text("Not sent — stopped").font(.caption2).foregroundStyle(Palette.tertiary)
+ Text(L10n.tr("Not sent — stopped")).font(.caption2).foregroundStyle(Palette.tertiary)
case "waiting":
HStack(spacing: 10) {
- Text("Waiting for the computer to come online").foregroundStyle(Palette.tertiary)
- Button("Cancel", systemImage: "xmark.circle") { model.cancelQueued(entry) }
+ Text(L10n.tr("Waiting for the computer to come online")).foregroundStyle(Palette.tertiary)
+ Button(L10n.tr("Cancel"), systemImage: "xmark.circle") { model.cancelQueued(entry) }
.labelStyle(.iconOnly)
.help("Don't send")
.accessibilityLabel("Don't send")
@@ -173,7 +173,7 @@ struct UserBubble: View {
.buttonStyle(.plain)
.font(.caption2)
case "delivering":
- Text("Delivered to the computer").font(.caption2).foregroundStyle(Palette.tertiary)
+ Text(L10n.tr("Delivered to the computer")).font(.caption2).foregroundStyle(Palette.tertiary)
default:
EmptyView()
}
@@ -234,19 +234,19 @@ struct NoticeRow: View {
case "error":
VStack(alignment: .leading, spacing: 10) {
Label {
- Text(text).font(.footnote).foregroundStyle(Palette.text).textSelection(.enabled)
+ Text(L10n.tr(text)).font(.footnote).foregroundStyle(Palette.text).textSelection(.enabled)
} icon: {
Image(systemName: "exclamationmark.triangle.fill").foregroundStyle(Palette.danger)
}
if entry.data.addFallback == true, let addFallback {
- Button("Add a fallback", action: addFallback).buttonStyle(.secondary)
+ Button(L10n.tr("Add a fallback"), action: addFallback).buttonStyle(.secondary)
}
}
.padding(12)
.frame(maxWidth: .infinity, alignment: .leading)
.background(Palette.danger.opacity(0.12), in: RoundedRectangle(cornerRadius: 12))
default:
- Text(text)
+ Text(L10n.tr(text))
.font(.footnote)
.foregroundStyle(Palette.secondary)
.multilineTextAlignment(.center)
@@ -262,7 +262,7 @@ struct WorkingIndicator: View {
var body: some View {
HStack(spacing: 8) {
ThinkingOrb(state: bot.needsInput ? .listening : .working, size: 16, color: bot.needsInput ? Palette.warning : Palette.secondary)
- Text(bot.activity.isEmpty ? "Working…" : bot.activity)
+ Text(L10n.tr(bot.activity.isEmpty ? "Working…" : bot.activity))
.font(.subheadline)
.foregroundStyle(bot.needsInput ? Palette.warning : Palette.secondary)
.lineLimit(1)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/Composer.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/Composer.swift
index e368a912..880e5884 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Thread/Composer.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/Composer.swift
@@ -45,9 +45,10 @@ struct Composer: View {
private var placeholder: String {
let name = bot?.name ?? ""
- if replyingTo != nil { return "Reply…" }
- if bot?.isGroup == true { return "Ask everyone · @ to ask one bot" }
- return working ? "Queue a message for \(name)" : "Ask \(name)"
+ if replyingTo != nil { return L10n.tr("Reply…") }
+ if bot?.isGroup == true { return L10n.tr("Ask everyone · @ to ask one bot") }
+ let key = working ? "Queue a message for {name}" : "Ask {name}"
+ return L10n.tr(key).replacingOccurrences(of: "{name}", with: name)
}
/// The `@partial` being typed at the end, if any.
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/ConversationList.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/ConversationList.swift
index f88cdb17..718dfc2b 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Thread/ConversationList.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/ConversationList.swift
@@ -394,7 +394,7 @@ struct JumpToLatest: View {
ZStack {
if visible {
jumpButton
- .help("Jump to latest")
+ .help(L10n.tr("Jump to latest"))
.padding(.bottom, 10)
.transition(.scale(scale: 0.8).combined(with: .opacity))
}
@@ -404,14 +404,14 @@ struct JumpToLatest: View {
@ViewBuilder private var jumpButton: some View {
if #available(iOS 26, *) {
- Button("Jump to latest", systemImage: "arrow.down", action: action)
+ Button(L10n.tr("Jump to latest"), systemImage: "arrow.down", action: action)
.labelStyle(.iconOnly)
.font(.system(size: 18, weight: .medium))
.controlSize(.large)
.buttonStyle(.glass)
.buttonBorderShape(.circle)
} else {
- Button("Jump to latest", systemImage: "arrow.down", action: action)
+ Button(L10n.tr("Jump to latest"), systemImage: "arrow.down", action: action)
.labelStyle(.iconOnly)
.buttonStyle(IconButtonStyle())
.glass(in: Circle())
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/HandoffRows.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/HandoffRows.swift
index 49742113..de7f8af2 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Thread/HandoffRows.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/HandoffRows.swift
@@ -18,13 +18,13 @@ struct HandoffCardRow: View {
Disclosure(isExpanded: $expanded) {
carried
} label: {
- Text("What it carries").font(.footnote.weight(.medium)).foregroundStyle(Palette.text)
+ Text(L10n.tr("What it carries")).font(.footnote.weight(.medium)).foregroundStyle(Palette.text)
}
HStack(spacing: 8) {
if model.answering[entry.id] != nil {
Spinner()
} else {
- Button("Keep this conversation") { model.keepConversation(entry) }
+ Button(L10n.tr("Keep this conversation")) { model.keepConversation(entry) }
.buttonStyle(SecondaryButtonStyle())
IconButton("Edit what it carries", systemImage: "pencil") {
withAnimation(Motion.layout) { editing = true }
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/PermissionCard.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/PermissionCard.swift
index 63e70a0e..0235486c 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Thread/PermissionCard.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/PermissionCard.swift
@@ -53,7 +53,7 @@ struct PermissionCard: View {
}
.padding(.top, 6)
} label: {
- Text("Details").font(.caption.weight(.medium)).foregroundStyle(Palette.secondary)
+ Text(L10n.tr("Details")).font(.caption.weight(.medium)).foregroundStyle(Palette.secondary)
}
}
@@ -159,8 +159,8 @@ struct DiffView: View {
Image(systemName: diff.isNew ? "doc.badge.plus" : "doc.text")
Text((diff.path as NSString).lastPathComponent).lineLimit(1)
Spacer()
- Text("+\(diff.added)").foregroundStyle(Palette.added)
- Text("−\(diff.removed)").foregroundStyle(Palette.removed)
+ Text(L10n.tr("+\(diff.added)")).foregroundStyle(Palette.added)
+ Text(L10n.tr("−\(diff.removed)")).foregroundStyle(Palette.removed)
}
.font(.caption.monospaced())
.foregroundStyle(Palette.secondary)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift
index 2317eea3..c4658835 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift
@@ -128,15 +128,15 @@ public struct ThreadView: View {
}
.frame(width: 12)
.accessibilityHidden(true)
- Text(model.connectionLabel)
+ Text(L10n.tr(model.connectionLabel))
.lineLimit(1)
.truncationMode(.middle)
}
.font(.system(size: 10, weight: .medium))
.foregroundStyle(Palette.secondary)
.accessibilityElement(children: .ignore)
- .accessibilityLabel("\(model.hostName), \(connectionDescription)")
- .help("\(model.hostName) · \(connectionDescription)")
+ .accessibilityLabel("\(model.hostName), \(L10n.tr(connectionDescription))")
+ .help("\(model.hostName) · \(L10n.tr(connectionDescription))")
}
private var connectionSymbol: String {
@@ -276,7 +276,7 @@ struct GroupIntroCard: View {
.foregroundStyle(Palette.secondary)
.multilineTextAlignment(.center)
}
- Text("Everyone answers in turn. @mention a bot to ask just that one.")
+ Text(L10n.tr("Everyone answers in turn. @mention a bot to ask just that one."))
.font(.subheadline)
.foregroundStyle(Palette.secondary)
.multilineTextAlignment(.center)
@@ -295,7 +295,11 @@ struct IntroCard: View {
VStack(spacing: 12) {
CharacterAvatar(bot: bot, size: 72)
Text(bot.name).font(.title2.weight(.semibold)).foregroundStyle(Palette.text)
- Text(bot.managedWorkspace ? "\(model.backendName(bot.backend)) · Personal workspace" : "\(model.backendName(bot.backend)) in \(bot.cwd)")
+ Text(bot.managedWorkspace
+ ? "\(model.backendName(bot.backend)) · \(L10n.tr("Personal workspace"))"
+ : L10n.tr("{agent} in {path}")
+ .replacingOccurrences(of: "{agent}", with: model.backendName(bot.backend))
+ .replacingOccurrences(of: "{path}", with: bot.cwd))
.font(.subheadline)
.foregroundStyle(Palette.secondary)
.multilineTextAlignment(.center)
@@ -305,7 +309,7 @@ struct IntroCard: View {
.foregroundStyle(Palette.secondary)
.multilineTextAlignment(.center)
}
- Text("Tell it what you need. You'll get a notification when it's done or needs you.")
+ Text(L10n.tr("Tell it what you need. You'll get a notification when it's done or needs you."))
.font(.subheadline)
.foregroundStyle(Palette.secondary)
.multilineTextAlignment(.center)
@@ -396,14 +400,14 @@ extension ThreadView {
var header: some View {
// Like Grok Bot: the title pill holds the bot's actions; the corner is the computer.
Menu {
- Text("\(model.hostName) · \(model.connectionLabel)")
- Button("Reconnect", systemImage: "arrow.clockwise") { model.restartStream() }
+ Text("\(model.hostName) · \(L10n.tr(model.connectionLabel))")
+ Button(L10n.tr("Reconnect"), systemImage: "arrow.clockwise") { model.restartStream() }
Divider()
- Button("Details", systemImage: "info.circle", action: openDetails)
+ Button(L10n.tr("Details"), systemImage: "info.circle", action: openDetails)
ForEach(menuItems) { item in
if item.divider { Divider() }
Button(role: item.destructive ? .destructive : nil, action: item.action) {
- if let icon = item.icon { Label(item.title, systemImage: icon) } else { Text(item.title) }
+ if let icon = item.icon { Label(L10n.tr(item.title), systemImage: icon) } else { Text(L10n.tr(item.title)) }
}
}
} label: {
@@ -419,7 +423,7 @@ extension ThreadView {
/// Opens the computer's screen; pulses while this bot is operating it (watch, then take over).
private var computerButton: some View {
let operating = model.screen?.agentBot == botId
- return Button("Computer", systemImage: "desktopcomputer") {
+ return Button(L10n.tr("Computer"), systemImage: "desktopcomputer") {
model.screenRequest = operating ? ScreenRequest(watching: botId) : ScreenRequest()
}
.symbolEffect(.pulse, options: .repeating, isActive: operating)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/TraceView.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/TraceView.swift
index a3d5a3d6..b391c017 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Thread/TraceView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/TraceView.swift
@@ -20,7 +20,7 @@ public struct TraceView: View {
ScrollView {
LazyVStack(alignment: .leading, spacing: 22) {
if turns.isEmpty {
- Text("Nothing yet.").foregroundStyle(Palette.tertiary)
+ Text(L10n.tr("Nothing yet.")).foregroundStyle(Palette.tertiary)
}
ForEach(turns, id: \.key) { turn, entries in
VStack(alignment: .leading, spacing: 8) {
@@ -69,14 +69,14 @@ private struct TraceRow: View {
.font(.subheadline)
case "agent":
VStack(alignment: .leading, spacing: 4) {
- Text(d.final == true ? "Reply" : "Said").font(.caption2.bold()).foregroundStyle(Palette.tertiary)
+ Text(L10n.tr(d.final == true ? "Reply" : "Said")).font(.caption2.bold()).foregroundStyle(Palette.tertiary)
MarkdownText(d.text ?? "")
}
case "thought":
Disclosure(isExpanded: $expanded) {
Text(d.text ?? "").font(.footnote).foregroundStyle(Palette.secondary).textSelection(.enabled)
} label: {
- Label { Text("Thinking") } icon: {
+ Label { Text(L10n.tr("Thinking")) } icon: {
ThinkingOrb(size: 16, color: Palette.secondary, animated: false)
}.font(.subheadline).foregroundStyle(Palette.secondary)
}
@@ -84,7 +84,7 @@ private struct TraceRow: View {
ToolRow(data: d)
case "plan":
VStack(alignment: .leading, spacing: 6) {
- Label("Plan", systemImage: "checklist").font(.subheadline.bold())
+ Label(L10n.tr("Plan"), systemImage: "checklist").font(.subheadline.bold())
ForEach(Array((d.entries ?? []).enumerated()), id: \.offset) { _, item in
Label {
Text(item.content).strikethrough(item.status == "completed").foregroundStyle(Palette.text)
@@ -100,7 +100,7 @@ private struct TraceRow: View {
.font(.subheadline)
.foregroundStyle(Palette.secondary)
default:
- Text(d.text ?? "").font(.footnote).foregroundStyle(Palette.tertiary)
+ Text(L10n.tr(d.text ?? "")).font(.footnote).foregroundStyle(Palette.tertiary)
}
}
}
diff --git a/apps/ios/Kit/Tests/CodyncKitTests/AppLanguageTests.swift b/apps/ios/Kit/Tests/CodyncKitTests/AppLanguageTests.swift
new file mode 100644
index 00000000..bc189f58
--- /dev/null
+++ b/apps/ios/Kit/Tests/CodyncKitTests/AppLanguageTests.swift
@@ -0,0 +1,123 @@
+import Foundation
+import Testing
+@testable import CodyncKit
+
+struct AppLanguageTests {
+ @Test func theLanguageChoiceIsReadFromTheStoreItWasWrittenTo() {
+ let name = "AppLanguageTests.\(UUID().uuidString)"
+ let suite = UserDefaults(suiteName: name)!
+ defer { suite.removePersistentDomain(forName: name) }
+ #expect(AppLanguage.preference(in: suite) == .system)
+ suite.set(AppLanguage.zh.rawValue, forKey: AppLanguage.storageKey)
+ #expect(AppLanguage.preference(in: suite) == .zh)
+ #expect(L10n.tr("Pair a computer", preference: AppLanguage.preference(in: suite), systemIsChinese: false) == "配对一台电脑")
+ }
+
+ @Test func theSharedLanguageStoreIsTheAppGroup() {
+ let probe = "appLanguageProbe.\(UUID().uuidString)"
+ defer { AppLanguage.defaults.removeObject(forKey: probe) }
+ AppLanguage.defaults.set("1", forKey: probe)
+ let group = UserDefaults(suiteName: SharedStore.appGroup)
+ #expect(group?.string(forKey: probe) == "1")
+ #expect(UserDefaults.standard.string(forKey: probe) == nil)
+ }
+
+ @Test func chineseFollowsTheChoiceNotTheOtherLanguage() {
+ #expect(AppLanguage.usesChinese(preference: .zh, systemIsChinese: false))
+ #expect(AppLanguage.usesChinese(preference: .zhHant, systemIsChinese: false))
+ #expect(!AppLanguage.usesChinese(preference: .en, systemIsChinese: true))
+ #expect(AppLanguage.usesChinese(preference: .system, systemIsChinese: true))
+ #expect(!AppLanguage.usesChinese(preference: .system, systemIsChinese: false))
+ }
+
+ @Test func systemChineseIsThePreferredLanguagePrefix() {
+ #expect(AppLanguage.systemIsChinese(languages: ["zh-Hans-CN", "en"]))
+ #expect(AppLanguage.systemIsChinese(languages: ["zh-Hant-TW"]))
+ #expect(AppLanguage.systemScript(languages: ["zh-Hant-TW"]) == .hant)
+ #expect(AppLanguage.systemScript(languages: ["zh-TW"]) == .hant)
+ #expect(AppLanguage.systemScript(languages: ["zh-HK"]) == .hant)
+ #expect(AppLanguage.systemScript(languages: ["zh-Hans-CN"]) == .hans)
+ #expect(AppLanguage.systemScript(languages: ["zh-CN"]) == .hans)
+ #expect(AppLanguage.systemScript(languages: ["en-US"]) == nil)
+ #expect(!AppLanguage.systemIsChinese(languages: ["en-US", "zh-Hans"]))
+ #expect(!AppLanguage.systemIsChinese(languages: []))
+ }
+
+ @Test func phrasesUseSimplifiedChineseOnlyWhenThatLanguageIsActive() {
+ #expect(L10n.tr("Pair a computer", preference: .zh, systemIsChinese: false) == "配对一台电脑")
+ #expect(L10n.tr("Pair a computer", preference: .en, systemIsChinese: true) == "Pair a computer")
+ #expect(L10n.tr("Pair a computer", preference: .system, systemIsChinese: true, systemLanguages: ["zh-Hans-CN"]) == "配对一台电脑")
+ #expect(L10n.tr("Settings", preference: .system, systemIsChinese: true, systemLanguages: ["zh-Hant-TW"]) == "設定")
+ #expect(L10n.tr("Not a phrase", preference: .zh, systemIsChinese: false) == "Not a phrase")
+ #expect(AppLanguage.menuTitle(.zh, preference: .en, systemIsChinese: true) == "简体中文")
+ #expect(AppLanguage.menuTitle(.zhHant, preference: .en, systemIsChinese: true) == "繁體中文")
+ #expect(AppLanguage.menuTitle(.system, preference: .zh, systemIsChinese: false) == "跟随系统")
+ }
+
+ @Test func usageCaptionAndScannerHintTranslateAsTheirOwnPhrases() {
+ #expect(L10n.tr("Weekly", preference: .zh, systemIsChinese: false) == "每周")
+ #expect(L10n.tr("highest usage", preference: .zh, systemIsChinese: false) == "用量最高")
+ #expect(L10n.tr("Weekly · highest usage", preference: .zh, systemIsChinese: false) == "Weekly · highest usage")
+ #expect(L10n.tr("Find nearby barcodes.", preference: .zh, systemIsChinese: false) == "寻找附近的条形码。")
+ #expect(L10n.tr("Open Codync to connect a computer and check {provider} usage.", preference: .zh, systemIsChinese: false)
+ == "打开 Codync,连接一台电脑后即可查看 {provider} 用量。")
+ }
+
+ @Test func settingsAndBotChromeTranslateAsTheirOwnPhrases() {
+ #expect(L10n.tr("Personal", preference: .zh, systemIsChinese: false) == "个人")
+ #expect(L10n.tr("This Mac", preference: .zh, systemIsChinese: false) == "这台 Mac")
+ #expect(L10n.tr("Show in notch", preference: .zh, systemIsChinese: false) == "在屏幕顶部显示")
+ #expect(L10n.tr("Show in Notch", preference: .zh, systemIsChinese: false) == "在屏幕顶部显示")
+ #expect(L10n.tr("Voice input shortcut", preference: .zh, systemIsChinese: false) == "语音输入快捷键")
+ #expect(L10n.tr("Right ⌘ twice", preference: .zh, systemIsChinese: false) == "右 ⌘ 两次")
+ #expect(L10n.tr("Claude Code (not installed)", preference: .zh, systemIsChinese: false) == "Claude Code(未安装)")
+ #expect(L10n.tr("Copy template", preference: .zh, systemIsChinese: false) == "复制模板")
+ #expect(L10n.tr("Siri and Dictation are disabled", preference: .zh, systemIsChinese: false) == "Siri 和听写已关闭")
+ #expect(L10n.tr("the Codync cloud refused (403 forbidden): Sign in on the computer to use remote screen relay.", preference: .zh, systemIsChinese: false) == "Codync 云拒绝了(403 禁止):请先在电脑上登录,才能使用远程屏幕中继。")
+ #expect(L10n.tr("Privacy", preference: .zh, systemIsChinese: false) == "隐私")
+ #expect(L10n.tr("Share usage analytics", preference: .zh, systemIsChinese: false) == "共享用量分析")
+ #expect(L10n.tr("Personal workspace", preference: .zh, systemIsChinese: false) == "个人工作区")
+ #expect(L10n.tr("Fast mode", preference: .zh, systemIsChinese: false) == "快速模式")
+ #expect(L10n.tr("Use the computer", preference: .zh, systemIsChinese: false) == "使用电脑")
+ #expect(L10n.tr("{size} pt (Default)", preference: .zh, systemIsChinese: false) == "{size} pt(默认)")
+ #expect(L10n.tr("Cursor · Personal workspace", preference: .zh, systemIsChinese: false) == "Cursor · Personal workspace")
+ }
+
+ @Test func chatMenuAndMemoryTranslateAsTheirOwnPhrases() {
+ #expect(L10n.tr("Full conversation", preference: .zh, systemIsChinese: false) == "完整对话")
+ #expect(L10n.tr("Settings", preference: .zh, systemIsChinese: false) == "设置")
+ #expect(L10n.tr("Settings", preference: .zhHant, systemIsChinese: false) == "設定")
+ #expect(L10n.tr("Files", preference: .zhHant, systemIsChinese: false) == "檔案")
+ #expect(L10n.tr("New session", preference: .zh, systemIsChinese: false) == "新会话")
+ #expect(L10n.tr("Delete bot", preference: .zh, systemIsChinese: false) == "删除 Bot")
+ #expect(L10n.tr("Connected", preference: .zh, systemIsChinese: false) == "已连接")
+ #expect(L10n.tr("Ask {name}", preference: .zh, systemIsChinese: false) == "问 {name}")
+ #expect(L10n.tr("Said", preference: .zh, systemIsChinese: false) == "说了")
+ #expect(L10n.tr("Stopped.", preference: .zh, systemIsChinese: false) == "已停止。")
+ #expect(L10n.tr("Today", preference: .zh, systemIsChinese: false) == "今天")
+ #expect(L10n.tr("Yesterday", preference: .zh, systemIsChinese: false) == "昨天")
+ #expect(L10n.tr("No dreams yet.", preference: .zh, systemIsChinese: false) == "还没有梦境。")
+ #expect(L10n.tr("Standing instructions", preference: .zh, systemIsChinese: false) == "常驻指令")
+ #expect(L10n.tr("Agent", preference: .zh, systemIsChinese: false) == "智能体")
+ #expect(L10n.tr("Manage the team", preference: .zh, systemIsChinese: false) == "管理团队")
+ #expect(L10n.tr("Skills", preference: .zh, systemIsChinese: false) == "技能")
+ #expect(L10n.tr("Search agents, connectors and skills", preference: .zh, systemIsChinese: false) == "搜索智能体、连接器和技能")
+ #expect(L10n.tr("Apps", preference: .zh, systemIsChinese: false) == "应用")
+ #expect(L10n.tr("Agents", preference: .zh, systemIsChinese: false) == "智能体")
+ #expect(L10n.tr("Installed", preference: .zh, systemIsChinese: false) == "已安装")
+ #expect(L10n.tr("Not installed", preference: .zh, systemIsChinese: false) == "未安装")
+ #expect(L10n.tr("Set up", preference: .zh, systemIsChinese: false) == "设置")
+ #expect(L10n.tr("Writing a reply…", preference: .zh, systemIsChinese: false) == "正在写回复…")
+ #expect(L10n.tr("Downloading Codebuddy Code…", preference: .zh, systemIsChinese: false) == "正在下载 Codebuddy Code…")
+ #expect(L10n.tr("Needs approval: Bash", preference: .zh, systemIsChinese: false) == "需要批准:Bash")
+ #expect(L10n.tr("Storage", preference: .zh, systemIsChinese: false) == "存储")
+ #expect(L10n.tr("New skill", preference: .zh, systemIsChinese: false) == "新建技能")
+ #expect(L10n.tr("Composio API key", preference: .zh, systemIsChinese: false) == "Composio API 密钥")
+ #expect(L10n.tr("When to use it", preference: .zh, systemIsChinese: false) == "何时使用")
+ #expect(L10n.tr("Add connector", preference: .zh, systemIsChinese: false) == "添加连接器")
+ #expect(L10n.tr("Name your group", preference: .zh, systemIsChinese: false) == "给群聊起个名字")
+ #expect(L10n.tr("Nothing installed", preference: .zh, systemIsChinese: false) == "还没有安装")
+ #expect(L10n.tr("No setup needed.", preference: .zh, systemIsChinese: false) == "无需设置。")
+ #expect(L10n.tr("FORWARDXU-MC3 · Connected", preference: .zh, systemIsChinese: false) == "FORWARDXU-MC3 · Connected")
+ }
+}
diff --git a/apps/ios/Views/AccessRequestView.swift b/apps/ios/Views/AccessRequestView.swift
index 72bca4d2..d04310bb 100644
--- a/apps/ios/Views/AccessRequestView.swift
+++ b/apps/ios/Views/AccessRequestView.swift
@@ -55,7 +55,7 @@ struct AccessRequestView: View {
.foregroundStyle(Palette.added)
} else if let ticket {
VStack(spacing: 10) {
- Text("Check the code on \(computer.name)")
+ Text(L10n.tr("Check the code on \(computer.name)"))
.font(.headline)
.foregroundStyle(Palette.text)
Text(spaced(ticket.code))
@@ -63,14 +63,14 @@ struct AccessRequestView: View {
.foregroundStyle(Palette.text)
.textSelection(.enabled)
.accessibilityLabel("Code \(ticket.code.map(String.init).joined(separator: " "))")
- Text("Approve only if the computer shows exactly this code. If it doesn't, deny it there: someone may be trying to get in.")
+ Text(L10n.tr("Approve only if the computer shows exactly this code. If it doesn't, deny it there: someone may be trying to get in."))
.font(.subheadline)
.foregroundStyle(Palette.secondary)
.multilineTextAlignment(.center)
}
HStack(spacing: 8) {
Spinner()
- Text("Waiting for approval…").foregroundStyle(Palette.secondary)
+ Text(L10n.tr("Waiting for approval…")).foregroundStyle(Palette.secondary)
IconButton("Cancel request", systemImage: "xmark.circle.fill") {
Task {
await accounts.cancelAccess(computer.computerId)
@@ -83,13 +83,13 @@ struct AccessRequestView: View {
Text(error)
.foregroundStyle(Palette.danger)
.multilineTextAlignment(.center)
- Button("Try again") { withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { self.error = nil } }
+ Button(L10n.tr("Try again")) { withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { self.error = nil } }
.buttonStyle(.secondary)
} else if sawTicket {
Text(outcome ?? "\(computer.name) didn't approve this request.")
.foregroundStyle(Palette.secondary)
.multilineTextAlignment(.center)
- Button("Ask again") {
+ Button(L10n.tr("Ask again")) {
withAnimation(Motion.reduced(Motion.layout, reduceMotion)) {
outcome = nil
sawTicket = false
diff --git a/apps/ios/Views/AccountSwitcherView.swift b/apps/ios/Views/AccountSwitcherView.swift
index 35151674..54af2e4b 100644
--- a/apps/ios/Views/AccountSwitcherView.swift
+++ b/apps/ios/Views/AccountSwitcherView.swift
@@ -33,7 +33,7 @@ struct AccountSwitcherView: View {
Button { pairing = true } label: {
HStack(spacing: 12) {
Image(systemName: "qrcode.viewfinder").font(.system(size: 22))
- Text("Scan a computer's code").font(.body.weight(.medium))
+ Text(L10n.tr("Scan a computer's code")).font(.body.weight(.medium))
Spacer(minLength: 8)
Image(systemName: "chevron.right").font(.caption.weight(.semibold)).foregroundStyle(Palette.tertiary)
}
@@ -68,7 +68,7 @@ struct AccountSwitcherView: View {
}
if let message = account.errorMessage {
- Label(message, systemImage: "exclamationmark.triangle.fill")
+ Label(L10n.tr(message), systemImage: "exclamationmark.triangle.fill")
.font(.footnote)
.foregroundStyle(Palette.danger)
.transition(.opacity)
@@ -78,7 +78,7 @@ struct AccountSwitcherView: View {
ModalHeader("Account") {
if account.isBusy {
ThinkingOrb(state: .connecting, size: 20)
- .accessibilityHidden(false).accessibilityLabel("Signing in")
+ .accessibilityHidden(false).accessibilityLabel(L10n.tr("Signing in"))
.transition(.opacity)
}
}
@@ -122,7 +122,7 @@ struct AccountSwitcherView: View {
if account.isConfigured {
SignInButtons()
} else {
- Label("QR pairing only in this build", systemImage: "qrcode")
+ Label(L10n.tr("QR pairing only in this build"), systemImage: "qrcode")
.font(.footnote)
.foregroundStyle(Palette.secondary)
}
@@ -176,7 +176,7 @@ struct GoogleSignInButton: View {
ZStack {
HStack(spacing: 10) {
Image("google").resizable().frame(width: 20, height: 20)
- Text("Continue with Google")
+ Text(L10n.tr("Continue with Google"))
}
.opacity(account.isBusy ? 0 : 1)
if account.isBusy { Spinner(size: 18) }
@@ -209,7 +209,7 @@ private struct RowLabel: View {
Image(systemName: systemImage)
.font(.system(size: 17))
.frame(width: 26)
- Text(title)
+ Text(L10n.tr(title))
Spacer(minLength: 8)
if chevron {
Image(systemName: "chevron.right").font(.caption.weight(.semibold)).foregroundStyle(Palette.tertiary)
diff --git a/apps/ios/Views/ActivityGalleryView.swift b/apps/ios/Views/ActivityGalleryView.swift
index aceef3b3..36da6733 100644
--- a/apps/ios/Views/ActivityGalleryView.swift
+++ b/apps/ios/Views/ActivityGalleryView.swift
@@ -35,20 +35,22 @@ struct ActivityGalleryView: View {
VStack(alignment: .leading, spacing: 24) {
VStack(alignment: .leading, spacing: 10) {
// Recorded from the switch itself: both galleries share the setting and stay alive.
- Toggle(island ? "Show in Dynamic Island" : "Show Live Activities", isOn: Binding(get: { enabled }, set: { on in
+ Toggle(isOn: Binding(get: { enabled }, set: { on in
enabled = on
Analytics.shared.capture(.settingChanged(.liveActivities, on: on))
- }))
+ })) {
+ Text(L10n.tr(island ? "Show in Dynamic Island" : "Show Live Activities"))
+ }
.toggleStyle(.codync)
.font(.subheadline.weight(.medium))
- Text(island
+ Text(L10n.tr(island
? "The Dynamic Island shows the same Live Activity as the Lock Screen, so this switch turns off both."
- : "Starts when you send a task from this iPhone. Follow its progress, then open the conversation when your bot needs you.")
+ : "Starts when you send a task from this iPhone. Follow its progress, then open the conversation when your bot needs you."))
.font(.footnote).foregroundStyle(Palette.secondary)
if !allowed {
- Text("Live Activities are turned off in iOS Settings.")
+ Text(L10n.tr("Live Activities are turned off in iOS Settings."))
.font(.footnote).foregroundStyle(Palette.secondary)
- Button("Open iOS Settings") { openURL(URL(string: UIApplication.openSettingsURLString)!) }
+ Button(L10n.tr("Open iOS Settings")) { openURL(URL(string: UIApplication.openSettingsURLString)!) }
.buttonStyle(.plain)
.font(.footnote.weight(.medium))
.foregroundStyle(Palette.accent)
@@ -58,9 +60,9 @@ struct ActivityGalleryView: View {
VStack(alignment: .leading, spacing: 14) {
HStack {
- Text("Preview").font(.subheadline.weight(.medium))
+ Text(L10n.tr("Preview")).font(.subheadline.weight(.medium))
Spacer()
- Text("Sample task").font(.caption).foregroundStyle(Palette.secondary)
+ Text(L10n.tr("Sample task")).font(.caption).foregroundStyle(Palette.secondary)
}
if forms.count > 1 {
ChoicePicker(selection: Binding(get: { form ?? forms[0] }, set: { form = $0 }), options: forms.map { ($0, $0.rawValue) })
@@ -80,7 +82,7 @@ struct ActivityGalleryView: View {
VStack(alignment: .leading, spacing: 14) {
ForEach(forms, id: \.self) { explanation($0) }
}
- Text("iOS chooses the presentation based on your device and other active tasks. These previews don't start a Live Activity. Approvals are handled inside Codync.")
+ Text(L10n.tr("iOS chooses the presentation based on your device and other active tasks. These previews don't start a Live Activity. Approvals are handled inside Codync."))
.font(.footnote).foregroundStyle(Palette.secondary)
}
.padding(18).frame(maxWidth: 560).frame(maxWidth: .infinity)
@@ -102,8 +104,8 @@ struct ActivityGalleryView: View {
case .expanded: "Touch and hold the Dynamic Island for the current step and the running time, or Review when the bot needs you. Tap to open the conversation."
}
return VStack(alignment: .leading, spacing: 4) {
- Text(form.rawValue).font(.subheadline.weight(.medium)).accessibilityAddTraits(.isHeader)
- Text(detail).font(.footnote).foregroundStyle(Palette.secondary)
+ Text(L10n.tr(form.rawValue)).font(.subheadline.weight(.medium)).accessibilityAddTraits(.isHeader)
+ Text(L10n.tr(detail)).font(.footnote).foregroundStyle(Palette.secondary)
}
}
}
@@ -115,7 +117,7 @@ struct LockWidgetGalleryView: View {
ScrollView {
VStack(alignment: .leading, spacing: 22) {
ChoicePicker(selection: $kind, options: [("bots", "Bots"), ("usage", "Usage limits")])
- Text("Sample data").font(.caption).foregroundStyle(Palette.secondary)
+ Text(L10n.tr("Sample data")).font(.caption).foregroundStyle(Palette.secondary)
ForEach(AccessoryWidgetCard.Family.allCases, id: \.self) { family in
VStack(alignment: .leading, spacing: 10) {
Text(family.rawValue).font(.subheadline.weight(.medium))
@@ -128,9 +130,9 @@ struct LockWidgetGalleryView: View {
.environment(\.colorScheme, .dark)
}
}
- Text("Touch and hold your Lock Screen → Customize → Lock Screen. Tap the widget area and choose Codync. Inline widgets go in the date row above the clock.")
+ Text(L10n.tr("Touch and hold your Lock Screen → Customize → Lock Screen. Tap the widget area and choose Codync. Inline widgets go in the date row above the clock."))
.font(.footnote).foregroundStyle(Palette.secondary)
- Text("Choose Bots for task status or Usage limits for the highest reported limit. iOS applies your Lock Screen's color and style.")
+ Text(L10n.tr("Choose Bots for task status or Usage limits for the highest reported limit. iOS applies your Lock Screen's color and style."))
.font(.footnote).foregroundStyle(Palette.secondary)
}
.padding(18).frame(maxWidth: 560).frame(maxWidth: .infinity)
diff --git a/apps/ios/Views/BotListView.swift b/apps/ios/Views/BotListView.swift
index 11751440..d3698a6c 100644
--- a/apps/ios/Views/BotListView.swift
+++ b/apps/ios/Views/BotListView.swift
@@ -108,7 +108,7 @@ struct BotListView: View {
.scrollContentBackground(.hidden)
.environment(\.defaultMinListRowHeight, 0)
.background(Palette.background)
- .navigationTitle("Bots")
+ .navigationTitle(L10n.tr("Bots"))
.navigationBarTitleDisplayMode(.inline)
.toolbar(.visible, for: .navigationBar)
.toolbar {
@@ -121,9 +121,9 @@ struct BotListView: View {
ToolbarItem(placement: .topBarTrailing) {
// A native menu: the bar hosts toolbar buttons outside SwiftUI's layout,
// so an anchored Codync menu can't find where the button is.
- Menu("New", systemImage: "plus") {
- Button("New bot", systemImage: "plus", action: newBot)
- Button("New group chat", systemImage: "person.2", action: newGroup)
+ Menu(L10n.tr("New"), systemImage: "plus") {
+ Button(L10n.tr("New bot"), systemImage: "plus", action: newBot)
+ Button(L10n.tr("New group chat"), systemImage: "person.2", action: newGroup)
.disabled(onlineStores.isEmpty)
}
// A computer that needs an update can't take a new bot.
@@ -241,8 +241,8 @@ struct BotListView: View {
.itemProvider { lift(line) }
.accessibilityLabel(accounts.computers.count > 1 ? "\(bot.name), on \(store.hostName)" : bot.name)
.accessibilityActions {
- Button("Move up") { withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { store.move(bot.id, by: -1) } }
- Button("Move down") { withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { store.move(bot.id, by: 1) } }
+ Button(L10n.tr("Move up")) { withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { store.move(bot.id, by: -1) } }
+ Button(L10n.tr("Move down")) { withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { store.move(bot.id, by: 1) } }
}
.contextActions {
[
@@ -331,7 +331,7 @@ private struct ComputerSection: View {
VStack(alignment: .leading, spacing: 6) {
heading
if empty && !collapsed {
- Text("No bots yet")
+ Text(L10n.tr("No bots yet"))
.font(.footnote)
.foregroundStyle(Palette.tertiary)
.padding(.horizontal, 8)
@@ -350,8 +350,8 @@ private struct ComputerSection: View {
.accessibilityAction(named: collapsed ? "Expand" : "Collapse", toggle)
.accessibilityAction(.default) { toggle() }
.accessibilityActions {
- Button("Move up") { move(store.computer.id, -1) }
- Button("Move down") { move(store.computer.id, 1) }
+ Button(L10n.tr("Move up")) { move(store.computer.id, -1) }
+ Button(L10n.tr("Move down")) { move(store.computer.id, 1) }
}
}
@@ -362,7 +362,7 @@ private struct ComputerSection: View {
.font(.footnote.weight(.semibold))
.foregroundStyle(Palette.secondary)
.lineLimit(1)
- Text(store.statusText)
+ Text(L10n.tr(store.statusText))
.font(.footnote)
.foregroundStyle(store.isOffline ? Palette.warning : Palette.tertiary)
.lineLimit(1)
@@ -411,18 +411,18 @@ private struct EmptyRoster: View {
var body: some View {
VStack(spacing: 14) {
CharacterAvatar(shape: "cloud", color: "green", size: 72)
- Text("No bots yet").font(.title3.weight(.semibold)).foregroundStyle(Palette.text)
- Text(hasComputer
+ Text(L10n.tr("No bots yet")).font(.title3.weight(.semibold)).foregroundStyle(Palette.text)
+ Text(L10n.tr(hasComputer
? "Create a bot for each kind of work — a reviewer, a fixer, a docs writer — and point it at a project."
- : "Ask one of your account's computers for access, or pair one with its code.")
+ : "Ask one of your account's computers for access, or pair one with its code."))
.font(.subheadline)
.foregroundStyle(Palette.secondary)
.multilineTextAlignment(.center)
if canCreate {
- Button("Create your first bot", action: create)
+ Button(L10n.tr("Create your first bot"), action: create)
.buttonStyle(.primary)
} else if !hasComputer {
- Button("Computers", action: showComputers)
+ Button(L10n.tr("Computers"), action: showComputers)
.buttonStyle(.primary)
}
}
diff --git a/apps/ios/Views/PairingView.swift b/apps/ios/Views/PairingView.swift
index da124e5a..31fec926 100644
--- a/apps/ios/Views/PairingView.swift
+++ b/apps/ios/Views/PairingView.swift
@@ -52,7 +52,7 @@ struct PairingView<Leading: View>: View {
if inModal { dismissModal() } else { onSkip?() }
}
} label: {
- Text("Skip").font(.headline).frame(maxWidth: .infinity, minHeight: 50)
+ Text(L10n.tr("Skip")).font(.headline).frame(maxWidth: .infinity, minHeight: 50)
}
.buttonStyle(.secondary)
.accessibilityHint("Pair a computer later from Computers & settings.")
@@ -99,11 +99,11 @@ private struct InstallPage: View {
.padding(.top, 8)
VStack(alignment: .leading, spacing: 10) {
- Text("Install Codync\non your computer")
+ Text(L10n.tr("Install Codync\non your computer"))
.font(.system(size: 30, weight: .semibold))
.tracking(-0.5)
.foregroundStyle(Palette.text)
- Text("Your bots run there. This iPhone is how you talk to them.")
+ Text(L10n.tr("Your bots run there. This iPhone is how you talk to them."))
.font(.body)
.foregroundStyle(Palette.secondary)
}
@@ -123,9 +123,9 @@ private struct InstallPage: View {
Hint("or install with Homebrew")
CommandBlock("brew install leepokai/codync/codync-host\ncodync-host install", records: .installCommand)
}
- Text(os == .mac
+ Text(L10n.tr(os == .mac
? "Open Codync and it sets up the host on its own."
- : "codync-host install keeps it running in the background.")
+ : "codync-host install keeps it running in the background."))
.font(.subheadline)
.foregroundStyle(Palette.secondary)
.contentTransition(.opacity)
@@ -141,7 +141,7 @@ private struct InstallPage: View {
}
Button(action: next) {
- Text("Continue").font(.headline).frame(maxWidth: .infinity, minHeight: 50)
+ Text(L10n.tr("Continue")).font(.headline).frame(maxWidth: .infinity, minHeight: 50)
}
.buttonStyle(.primary)
.padding(.horizontal, 24)
@@ -156,7 +156,7 @@ private struct Hint: View {
init(_ text: String) { self.text = text }
var body: some View {
- Text(text).font(.footnote).foregroundStyle(Palette.secondary).transition(.opacity)
+ Text(L10n.tr(text)).font(.footnote).foregroundStyle(Palette.secondary).transition(.opacity)
}
}
@@ -220,13 +220,13 @@ private struct ScanPage: View {
ScrollView {
VStack(alignment: .leading, spacing: 24) {
VStack(alignment: .leading, spacing: 10) {
- Text("Scan the pairing code")
+ Text(L10n.tr("Scan the pairing code"))
.font(.system(size: 30, weight: .semibold))
.tracking(-0.5)
.foregroundStyle(Palette.text)
Text(os == .mac
- ? "On your Mac, click Codync in the menu bar, then Pair iPhone."
- : "On your computer, run this in a terminal:")
+ ? L10n.tr("On your Mac, click Codync in the menu bar, then Pair iPhone.")
+ : L10n.tr("On your computer, run this in a terminal:"))
.font(.body)
.foregroundStyle(Palette.secondary)
if os == .linux { CommandBlock("codync-host pair") }
@@ -235,7 +235,7 @@ private struct ScanPage: View {
viewfinder
HStack {
- TextField("Or paste a \(AppEnvironment.current.urlScheme)://pair link", text: $pasted)
+ TextField(L10n.tr("Or paste a {scheme}://pair link").replacingOccurrences(of: "{scheme}", with: AppEnvironment.current.urlScheme), text: $pasted)
.textInputAutocapitalization(.never)
.autocorrectionDisabled()
.font(.callout.monospaced())
@@ -252,7 +252,7 @@ private struct ScanPage: View {
VStack(alignment: .leading, spacing: 6) {
Text(error).font(.footnote).foregroundStyle(Palette.danger)
// The usual cause: the phone has no road to the computer yet.
- Label("Check that this iPhone and the computer are on the same Wi-Fi or both on Tailscale, or that “Reach from anywhere” is on in Codync on the computer.",
+ Label(L10n.tr("Check that this iPhone and the computer are on the same Wi-Fi or both on Tailscale, or that “Reach from anywhere” is on in Codync on the computer."),
systemImage: "wifi.exclamationmark")
.font(.footnote)
.foregroundStyle(Palette.secondary)
@@ -265,16 +265,16 @@ private struct ScanPage: View {
// How it connects is never a choice here: every paired computer gets every route.
VStack(alignment: .leading, spacing: 8) {
- Label("Connects on Wi-Fi, over Tailscale, or from anywhere through Cloudflare, on its own. End-to-end encrypted.",
+ Label(L10n.tr("Connects on Wi-Fi, over Tailscale, or from anywhere through Cloudflare, on its own. End-to-end encrypted."),
systemImage: "lock.fill")
if tailscaleOn {
- Label("Tailscale is on: Codync connects over it directly.", systemImage: "checkmark.circle.fill")
+ Label(L10n.tr("Tailscale is on: Codync connects over it directly."), systemImage: "checkmark.circle.fill")
} else {
Button {
Analytics.shared.capture(.linkOpened(.tailscale))
openURL(Tailscale.downloadURL)
} label: {
- Label("Use Tailscale? Direct and faster away from home.", systemImage: "arrow.up.right")
+ Label(L10n.tr("Use Tailscale? Direct and faster away from home."), systemImage: "arrow.up.right")
}
.buttonStyle(PressScale())
}
@@ -296,10 +296,20 @@ private struct ScanPage: View {
if DataScannerViewController.isSupported {
QRScanner { code in pair(code) }
.id(attempt)
+ // VisionKit's own hint follows the app's localizations, which stay English.
+ if !pairing {
+ Text(L10n.tr("Find nearby barcodes."))
+ .font(.subheadline)
+ .foregroundStyle(.white)
+ .shadow(color: .black.opacity(0.55), radius: 8)
+ .multilineTextAlignment(.center)
+ .padding(.horizontal, 20)
+ .allowsHitTesting(false)
+ }
} else {
VStack(spacing: 10) {
Image(systemName: "qrcode.viewfinder").font(.system(size: 44, weight: .light))
- Text("Camera not available. Paste the link below.").font(.footnote)
+ Text(L10n.tr("Camera not available. Paste the link below.")).font(.footnote)
}
.foregroundStyle(Palette.tertiary)
.frame(maxWidth: .infinity, maxHeight: .infinity)
@@ -351,6 +361,7 @@ struct QRScanner: UIViewControllerRepresentable {
let vc = DataScannerViewController(
recognizedDataTypes: [.barcode(symbologies: [.qr])],
qualityLevel: .fast,
+ isGuidanceEnabled: false,
isHighlightingEnabled: true
)
vc.delegate = context.coordinator
diff --git a/apps/ios/Views/RootView.swift b/apps/ios/Views/RootView.swift
index 453c5db6..26984d74 100644
--- a/apps/ios/Views/RootView.swift
+++ b/apps/ios/Views/RootView.swift
@@ -73,7 +73,7 @@ struct RootView: View {
/// thread is open.
private var tabs: some View {
TabView(selection: Bindable(app).tab) {
- Tab("Bots", systemImage: "bubble.left.and.bubble.right.fill", value: AppTab.bots) {
+ Tab(L10n.tr("Bots"), systemImage: "bubble.left.and.bubble.right.fill", value: AppTab.bots) {
NavigationStack(path: path) {
BotListView()
.safeAreaInset(edge: .bottom, spacing: 0) { AccessBanners() }
@@ -82,7 +82,7 @@ struct RootView: View {
}
}
}
- Tab("State", systemImage: "rectangle.stack.fill", value: AppTab.state) {
+ Tab(L10n.tr("State"), systemImage: "rectangle.stack.fill", value: AppTab.state) {
StateTab()
.safeAreaInset(edge: .bottom, spacing: 0) { AccessBanners() }
}
@@ -178,7 +178,7 @@ private struct StateTab: View {
ScreenHeader {
EmptyView()
} title: {
- Text("State").font(.body.weight(.semibold)).foregroundStyle(Palette.text)
+ Text(L10n.tr("State")).font(.body.weight(.semibold)).foregroundStyle(Palette.text)
} trailing: {
IconButton("Usage limits", systemImage: "chart.bar") { app.showUsage = true }
}
@@ -218,7 +218,7 @@ private struct UsageSheet: View {
ScreenHeader {
IconButton("Close", systemImage: "xmark") { dismiss() }
} title: {
- Text("Usage").font(.body.weight(.semibold)).foregroundStyle(Palette.text)
+ Text(L10n.tr("Usage")).font(.body.weight(.semibold)).foregroundStyle(Palette.text)
} trailing: {
if let store, accounts.computers.count > 1 {
DropdownMenu {
@@ -258,9 +258,9 @@ struct EmptyState: View {
var body: some View {
VStack(spacing: 8) {
Image(systemName: systemImage).font(.system(size: 40)).foregroundStyle(Palette.tertiary)
- Text(title).font(.title3.weight(.semibold)).foregroundStyle(Palette.text)
+ Text(L10n.tr(title)).font(.title3.weight(.semibold)).foregroundStyle(Palette.text)
if let message {
- Text(message).font(.subheadline).foregroundStyle(Palette.secondary)
+ Text(L10n.tr(message)).font(.subheadline).foregroundStyle(Palette.secondary)
}
}
.multilineTextAlignment(.center)
@@ -288,7 +288,7 @@ struct PageHeader<Trailing: View>: View {
ScreenHeader {
BackButton { pop() }
} title: {
- Text(title).font(.body.weight(.semibold)).foregroundStyle(Palette.text).lineLimit(1)
+ Text(L10n.tr(title)).font(.body.weight(.semibold)).foregroundStyle(Palette.text).lineLimit(1)
} trailing: {
trailing
}
@@ -334,8 +334,8 @@ private struct AccessBanners: View {
HStack(spacing: 12) {
Spinner(size: 16)
VStack(alignment: .leading, spacing: 1) {
- Text("Approve on \(name)").font(.subheadline.weight(.medium)).foregroundStyle(Palette.text)
- Text("Code \(ticket.code.prefix(3)) \(ticket.code.suffix(3))")
+ Text(L10n.tr("Approve on \(name)")).font(.subheadline.weight(.medium)).foregroundStyle(Palette.text)
+ Text(L10n.tr("Code \(ticket.code.prefix(3)) \(ticket.code.suffix(3))"))
.font(.footnote.monospacedDigit()).foregroundStyle(Palette.secondary)
}
Spacer(minLength: 8)
diff --git a/apps/ios/Views/SettingsView.swift b/apps/ios/Views/SettingsView.swift
index c40f6b01..add96a02 100644
--- a/apps/ios/Views/SettingsView.swift
+++ b/apps/ios/Views/SettingsView.swift
@@ -21,6 +21,7 @@ struct SettingsView: View {
@State private var confirmStartOver = false
@State private var voice: VoiceTarget?
@State private var aboutAnalytics = false
+ @AppStorage(AppLanguage.storageKey, store: AppLanguage.defaults) private var appLanguageRaw = AppLanguage.system.rawValue
var body: some View {
CardForm {
@@ -49,7 +50,7 @@ struct SettingsView: View {
Button {
addingComputer = true
} label: {
- Label("Pair a computer", systemImage: "qrcode.viewfinder")
+ Label(L10n.tr("Pair a computer"), systemImage: "qrcode.viewfinder")
.foregroundStyle(Palette.text)
.frame(maxWidth: .infinity, alignment: .leading)
.contentShape(Rectangle())
@@ -63,7 +64,7 @@ struct SettingsView: View {
ForEach(online, id: \.computer.id) { store in
Button { voice = VoiceTarget(store: store) } label: {
LinkRow {
- Label(online.count > 1 ? "Voice chat on \(store.hostName)" : "Voice and API keys", systemImage: "waveform")
+ Label(online.count > 1 ? "Voice chat on \(store.hostName)" : L10n.tr("Voice and API keys"), systemImage: "waveform")
}
}
.buttonStyle(.plain)
@@ -73,8 +74,16 @@ struct SettingsView: View {
AppearanceSettings()
+ CardSection("Language", footer: languageFooter) {
+ ValueRow("App language") {
+ ChoicePicker(selection: appLanguage, options: AppLanguage.allCases.map {
+ ($0, AppLanguage.menuTitle($0, preference: appLanguage.wrappedValue, systemIsChinese: AppLanguage.systemIsChinese()))
+ })
+ }
+ }
+
CardSection("Notifications", footer: "Get a result summary, a request for input, or a failure notice. Notification previews follow your iOS settings.") {
- Toggle("Push notifications", isOn: $notificationsEnabled)
+ Toggle(isOn: $notificationsEnabled) { Text(L10n.tr("Push notifications")) }
.toggleStyle(.codync)
.onChange(of: notificationsEnabled) { _, on in
PushRegistrar.shared.resync()
@@ -85,11 +94,11 @@ struct SettingsView: View {
CardSection(footer: "Which features you use, never your messages, code or files. Helps us spot bugs sooner and make Codync better for you.") {
HStack(spacing: 4) {
- Text("Share usage analytics").lineLimit(1).layoutPriority(1)
+ Text(L10n.tr("Share usage analytics")).lineLimit(1).layoutPriority(1)
IconButton("About usage analytics", systemImage: "info.circle") { aboutAnalytics = true }
Toggle(isOn: Binding(get: { analyticsEnabled }, set: { Analytics.shared.setEnabled($0) })) { EmptyView() }
.toggleStyle(.codync)
- .accessibilityLabel("Share usage analytics")
+ .accessibilityLabel(L10n.tr("Share usage analytics"))
}
}
@@ -114,9 +123,11 @@ struct SettingsView: View {
CardSection {
ValueRow("App version", value: Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "")
- Button("Source code") {
+ Button {
Analytics.shared.capture(.linkOpened(.github))
openURL(URL(string: "https://github.com/leepokai/Codync")!)
+ } label: {
+ Text(L10n.tr("Source code"))
}
.buttonStyle(.plain)
.foregroundStyle(Palette.text)
@@ -124,7 +135,7 @@ struct SettingsView: View {
CardSection {
Button { confirmStartOver = true } label: {
- Label("Start over", systemImage: "arrow.counterclockwise")
+ Label(L10n.tr("Start over"), systemImage: "arrow.counterclockwise")
.foregroundStyle(Palette.danger)
.frame(maxWidth: .infinity, alignment: .leading)
.contentShape(Rectangle())
@@ -149,7 +160,7 @@ struct SettingsView: View {
.codyncSheet(item: $access) { target in
AccessRequestView(computer: target.computer, pending: accounts.pendingAccess[target.id])
}
- .codyncDialog("Remove \(confirmForget?.name ?? "computer")?",
+ .codyncDialog(L10n.tr("Remove {name}?").replacingOccurrences(of: "{name}", with: confirmForget?.name ?? "computer"),
isPresented: Binding(get: { confirmForget != nil }, set: { if !$0 { confirmForget = nil } }),
message: "Its bots and conversations stay on that computer. You can pair again any time.") {
[DialogAction("Remove", destructive: true) {
@@ -173,6 +184,25 @@ struct SettingsView: View {
}
+ /// Follow system names the script the iPhone is using, so Traditional is a choice of its own.
+ private var languageFooter: String {
+ switch AppLanguage.systemScript() {
+ case .hant:
+ "System language is Traditional Chinese. \"Follow system\" matches the iPhone. You can switch this app to Simplified Chinese or English."
+ case .hans:
+ "System language is Simplified Chinese. \"Follow system\" matches the iPhone. You can switch this app to Traditional Chinese or English."
+ case nil:
+ "System language is English. \"Follow system\" matches the iPhone. You can switch this app to Simplified or Traditional Chinese."
+ }
+ }
+
+ private var appLanguage: Binding<AppLanguage> {
+ Binding(
+ get: { AppLanguage(rawValue: appLanguageRaw) ?? .system },
+ set: { appLanguageRaw = $0.rawValue }
+ )
+ }
+
private struct VoiceTarget: Identifiable {
let store: BotStore
let id: String
@@ -262,7 +292,7 @@ private struct ComputerRow: View {
if inAccount != nil {
Image(systemName: "person.crop.circle.badge.checkmark")
.foregroundStyle(Palette.tertiary)
- .accessibilityLabel("In your account")
+ .accessibilityLabel(L10n.tr("In your account"))
}
}
if store.connection == .online {
@@ -326,7 +356,7 @@ private struct ComputerRow: View {
}
private var connectionDetail: some View {
- Text(detail).font(.footnote)
+ Text(L10n.tr(detail)).font(.footnote)
.foregroundStyle(store.isOffline ? Palette.warning : Palette.secondary)
.fixedSize(horizontal: false, vertical: true)
}
@@ -384,15 +414,15 @@ private struct AccountComputerRow: View {
.opacity(0.5)
VStack(alignment: .leading, spacing: 2) {
Text(computer.name).font(.body.weight(.semibold)).foregroundStyle(Palette.text)
- Text(detail).font(.subheadline).foregroundStyle(Palette.secondary).lineLimit(2)
+ Text(L10n.tr(detail)).font(.subheadline).foregroundStyle(Palette.secondary).lineLimit(2)
}
Spacer()
if ticket != nil {
- Button("Code", action: ask).buttonStyle(.secondary)
+ Button(L10n.tr("Code"), action: ask).buttonStyle(.secondary)
} else if computer.isGranted {
- Button("Revoke", role: .destructive, action: revoke).buttonStyle(.secondary)
+ Button(L10n.tr("Revoke"), role: .destructive, action: revoke).buttonStyle(.secondary)
} else {
- Button("Ask for access", action: ask).buttonStyle(.secondary)
+ Button(L10n.tr("Ask for access"), action: ask).buttonStyle(.secondary)
}
}
.padding(.vertical, 2)
@@ -419,7 +449,7 @@ private struct OlderCopyRow: View {
.opacity(0.35)
VStack(alignment: .leading, spacing: 2) {
Text(computer.name).font(.body.weight(.semibold)).foregroundStyle(Palette.secondary)
- Text(detail).font(.subheadline).foregroundStyle(Palette.tertiary).lineLimit(2)
+ Text(L10n.tr(detail)).font(.subheadline).foregroundStyle(Palette.tertiary).lineLimit(2)
}
Spacer()
}
diff --git a/apps/ios/Views/SignInButtons.swift b/apps/ios/Views/SignInButtons.swift
index 3d844642..e49c4084 100644
--- a/apps/ios/Views/SignInButtons.swift
+++ b/apps/ios/Views/SignInButtons.swift
@@ -12,7 +12,7 @@ struct SignInButtons: View {
ZStack {
HStack(spacing: 10) {
Image(systemName: "apple.logo").font(.system(size: 20))
- Text("Continue with Apple")
+ Text(L10n.tr("Continue with Apple"))
}
.opacity(account.isBusy ? 0 : 1)
if account.isBusy { Spinner(size: 18) }
diff --git a/apps/ios/Views/UsageView.swift b/apps/ios/Views/UsageView.swift
index 4e732f66..ffbcd823 100644
--- a/apps/ios/Views/UsageView.swift
+++ b/apps/ios/Views/UsageView.swift
@@ -19,8 +19,8 @@ struct UsageView: View {
if model.usage.providers.isEmpty {
VStack(spacing: 8) {
Image(systemName: "chart.bar").font(.system(size: 40)).foregroundStyle(Palette.tertiary)
- Text("No usage yet").font(.title3.weight(.semibold)).foregroundStyle(Palette.text)
- Text("Your computer reads the limits from Claude Code and Codex.")
+ Text(L10n.tr("No usage yet")).font(.title3.weight(.semibold)).foregroundStyle(Palette.text)
+ Text(L10n.tr("Your computer reads the limits from Claude Code and Codex."))
.font(.subheadline).foregroundStyle(Palette.secondary)
}
.multilineTextAlignment(.center)
@@ -59,15 +59,15 @@ private struct ProviderCard: View {
if let top = provider.tightest {
VStack(alignment: .leading, spacing: 6) {
HStack {
- Text(top.label)
+ Text(L10n.tr(top.title))
Spacer()
- Text("\(Int(top.percent.rounded()))%").monospacedDigit()
+ Text(L10n.tr("\(Int(top.percent.rounded()))%")).monospacedDigit()
}
.font(.subheadline)
.foregroundStyle(Palette.text)
UsageTicks(percent: top.percent, tint: provider.widgetTint, height: 15)
if let reset = top.resetsShort() {
- Text(reset).font(.caption.monospacedDigit()).foregroundStyle(Palette.tertiary)
+ Text(L10n.resetLine(reset)).font(.caption.monospacedDigit()).foregroundStyle(Palette.tertiary)
.frame(maxWidth: .infinity, alignment: .trailing)
}
}
@@ -76,8 +76,8 @@ private struct ProviderCard: View {
if !collapsed {
VStack(spacing: 8) {
ForEach(provider.windows) { w in
- row(w.label, "\(Int(w.percent.rounded()))%")
- if let reset = w.resetsShort() { row("\(w.label) reset", reset.replacingOccurrences(of: "resets ", with: "")) }
+ row(L10n.tr(w.title), "\(Int(w.percent.rounded()))%")
+ if let reset = w.resetsShort() { row(L10n.tr("Resets"), L10n.resetLine(reset)) }
}
row("Source", source)
row("Updated", Date(milliseconds: provider.updatedAt).formatted(date: .abbreviated, time: .shortened))
@@ -101,7 +101,7 @@ private struct ProviderCard: View {
private func row(_ label: String, _ value: String) -> some View {
HStack {
- Text(label).foregroundStyle(Palette.secondary)
+ Text(L10n.tr(label)).foregroundStyle(Palette.secondary)
Spacer()
Text(value).foregroundStyle(Palette.text).monospacedDigit()
}
diff --git a/apps/ios/Views/WelcomeView.swift b/apps/ios/Views/WelcomeView.swift
index 82b44247..22624533 100644
--- a/apps/ios/Views/WelcomeView.swift
+++ b/apps/ios/Views/WelcomeView.swift
@@ -42,12 +42,12 @@ struct WelcomeView: View {
.padding(.bottom, 24)
VStack(alignment: .leading, spacing: 10) {
- Text("Your coding agents,\nas teammates.")
+ Text(L10n.tr("Your coding agents,\nas teammates."))
.font(.system(size: 34, weight: .semibold))
.tracking(-0.6)
.foregroundStyle(Palette.text)
.fixedSize(horizontal: false, vertical: true)
- Text("Give each one a name and a project. They work on your computer while you're away.")
+ Text(L10n.tr("Give each one a name and a project. They work on your computer while you're away."))
.font(.body)
.foregroundStyle(Palette.secondary)
DemoButton().padding(.top, 4)
@@ -58,7 +58,7 @@ struct WelcomeView: View {
VStack(spacing: 10) {
Button(action: start) {
- Text("Get started").font(.headline).frame(maxWidth: .infinity, minHeight: 50)
+ Text(L10n.tr("Get started")).font(.headline).frame(maxWidth: .infinity, minHeight: 50)
}
.buttonStyle(.primary)
// Signed in, the computers on the account show up without scanning a code.
@@ -114,7 +114,7 @@ private struct ChatGlimpse: View {
var body: some View {
VStack(alignment: .leading, spacing: 10) {
- Text("Fix the flaky login test")
+ Text(L10n.tr("Fix the flaky login test"))
.bubble(Palette.bubbleUser)
.frame(maxWidth: .infinity, alignment: .trailing)
.rise(shown)
@@ -122,11 +122,11 @@ private struct ChatGlimpse: View {
HStack(alignment: .bottom, spacing: 8) {
CharacterAvatar(shape: "blob", color: "blue", size: 28, mood: replied ? .idle : .working)
if replied {
- Text("Done. It raced the session refresh; tests pass on fix/login.")
+ Text(L10n.tr("Done. It raced the session refresh; tests pass on fix/login."))
.bubble(Palette.bubbleAgent)
.transition(.opacity.combined(with: .scale(scale: 0.92, anchor: .bottomLeading)))
} else {
- Text("Working…")
+ Text(L10n.tr("Working…"))
.font(.subheadline)
.foregroundStyle(Palette.tertiary)
.transition(.opacity)
@@ -149,7 +149,7 @@ private struct ChatGlimpse: View {
struct DemoButton: View {
var body: some View {
Link(destination: URL(string: "https://youtube.com/shorts/xtZ5WeyOewU")!) {
- Label("Watch the demo", systemImage: "play.circle.fill")
+ Label(L10n.tr("Watch the demo"), systemImage: "play.circle.fill")
.font(.subheadline.weight(.medium))
.foregroundStyle(Palette.text)
}
diff --git a/apps/ios/Views/WidgetGalleryView.swift b/apps/ios/Views/WidgetGalleryView.swift
index 4fe9e36f..cb7129ab 100644
--- a/apps/ios/Views/WidgetGalleryView.swift
+++ b/apps/ios/Views/WidgetGalleryView.swift
@@ -42,9 +42,9 @@ struct WidgetGalleryView: View {
.frame(width: 58, height: 58)
.background(Palette.bubbleUser, in: RoundedRectangle(cornerRadius: 16))
VStack(alignment: .leading, spacing: 4) {
- Text("Codync, at a glance.")
+ Text(L10n.tr("Codync, at a glance."))
.font(.title3.weight(.semibold)).tracking(-0.4)
- Text("Your bots and usage, on every surface.")
+ Text(L10n.tr("Your bots and usage, on every surface."))
.font(.footnote).foregroundStyle(Palette.secondary)
}
}
@@ -72,14 +72,14 @@ struct WidgetGalleryView: View {
.background(Palette.surface, in: RoundedRectangle(cornerRadius: 18))
if widgetCheckFailed {
VStack(alignment: .leading, spacing: 6) {
- Text("Couldn't check your widgets. You can still add one using the steps below.")
+ Text(L10n.tr("Couldn't check your widgets. You can still add one using the steps below."))
.foregroundStyle(Palette.secondary)
- Button("Check again") { checkWidgets() }
+ Button(L10n.tr("Check again")) { checkWidgets() }
.buttonStyle(.secondary)
}
.font(.caption)
} else {
- Text(hasWidget == nil ? "Checking your widgets…" : "Steps check themselves as you finish them.")
+ Text(L10n.tr(hasWidget == nil ? "Checking your widgets…" : "Steps check themselves as you finish them."))
.font(.caption2).foregroundStyle(Palette.tertiary)
}
}
@@ -88,7 +88,7 @@ struct WidgetGalleryView: View {
HStack {
sectionLabel("Choose your widget")
Spacer()
- Text("Sample data").font(.caption2).foregroundStyle(Palette.secondary)
+ Text(L10n.tr("Sample data")).font(.caption2).foregroundStyle(Palette.secondary)
}
if typeSize.isAccessibilitySize {
ChoicePicker(selection: $kind, options: Self.kinds)
@@ -120,14 +120,14 @@ struct WidgetGalleryView: View {
get: { usageIconStyle },
set: { usageIconStyle = $0; WidgetCenter.shared.reloadTimelines(ofKind: "CodyncProviderUsage") }
), options: [(UsageIconStyle.character.rawValue, "Character"), (UsageIconStyle.original.rawValue, "Original icon")])
- Text("Applies to Usage in the app and in widgets.")
+ Text(L10n.tr("Applies to Usage in the app and in widgets."))
.font(.caption).foregroundStyle(Palette.secondary)
}
VStack(alignment: .leading, spacing: 12) {
sectionLabel("Keep tasks in view")
Button { page = .lockScreen } label: {
- Label("Lock Screen widgets", systemImage: "lock.rectangle").foregroundStyle(Palette.accent)
+ Label(L10n.tr("Lock Screen widgets"), systemImage: "lock.rectangle").foregroundStyle(Palette.accent)
}
.buttonStyle(PressScale())
}
@@ -138,7 +138,7 @@ struct WidgetGalleryView: View {
sectionLabel("Add a widget")
WidgetSetupDemo()
}
- Text("Widgets show the latest report. Open Codync for live updates and approvals.")
+ Text(L10n.tr("Widgets show the latest report. Open Codync for live updates and approvals."))
.font(.caption2).foregroundStyle(Palette.tertiary)
}
.padding(18)
@@ -169,10 +169,10 @@ struct WidgetGalleryView: View {
private var previewDescription: some View {
VStack(alignment: .leading, spacing: 6) {
- Text(kind == "team" ? "Small widget" : "\(size.capitalized) widget").font(.subheadline.weight(.medium))
- Text(kind == "usage" ? "Small shows the tightest limit. Medium shows two windows. Large adds a summary and up to four limits."
+ Text(L10n.tr(kind == "team" ? "Small widget" : "\(size.capitalized) widget")).font(.subheadline.weight(.medium))
+ Text(L10n.tr(kind == "usage" ? "Small shows the tightest limit. Medium shows two windows. Large adds a summary and up to four limits."
: kind == "team" ? "Four bots as characters with a dot for each one at work. Touch and hold the widget, then Edit Widget to choose who sits in each spot; empty spots show the bots that need you first."
- : "See who needs you and who's still working. Large shows up to six bots.")
+ : "See who needs you and who's still working. Large shows up to six bots."))
.font(.caption).foregroundStyle(Palette.secondary)
}
.frame(maxWidth: .infinity, alignment: .leading)
@@ -195,7 +195,7 @@ struct WidgetGalleryView: View {
}
private func sectionLabel(_ title: String) -> some View {
- Text(title).font(.caption.weight(.medium)).foregroundStyle(Palette.secondary)
+ Text(L10n.tr(title)).font(.caption.weight(.medium)).foregroundStyle(Palette.secondary)
.accessibilityAddTraits(.isHeader)
}
@@ -204,13 +204,13 @@ struct WidgetGalleryView: View {
Image(systemName: complete ? "checkmark.circle.fill" : "circle")
.foregroundStyle(complete ? Palette.added : Palette.tertiary)
.font(.system(size: 15))
- Text(title).font(.footnote).foregroundStyle(complete ? Palette.secondary : Palette.text)
+ Text(L10n.tr(title)).font(.footnote).foregroundStyle(complete ? Palette.secondary : Palette.text)
Spacer()
}
.padding(14)
.accessibilityElement(children: .ignore)
- .accessibilityLabel(title)
- .accessibilityValue(status ?? (complete ? "Complete" : "Not complete"))
+ .accessibilityLabel(L10n.tr(title))
+ .accessibilityValue(L10n.tr(status ?? (complete ? "Complete" : "Not complete")))
}
private func checkNotifications() async {
diff --git a/apps/ios/Views/WidgetSetupDemo.swift b/apps/ios/Views/WidgetSetupDemo.swift
index f8fb1d27..0047c574 100644
--- a/apps/ios/Views/WidgetSetupDemo.swift
+++ b/apps/ios/Views/WidgetSetupDemo.swift
@@ -23,9 +23,9 @@ struct WidgetSetupDemo: View {
VStack(spacing: 14) {
DemoPhone(t: t)
.accessibilityElement(children: .ignore)
- .accessibilityLabel("How to add the Codync widget")
- .accessibilityValue(Self.step(at: t).text)
- Text(Self.step(at: t).text)
+ .accessibilityLabel(L10n.tr("How to add the Codync widget"))
+ .accessibilityValue(L10n.tr(Self.step(at: t).text))
+ Text(L10n.tr(Self.step(at: t).text))
.font(.footnote.weight(.medium))
.foregroundStyle(Palette.text)
.contentTransition(.opacity)
@@ -96,8 +96,8 @@ struct WidgetSetupDemo: View {
}
.frame(height: 32)
.accessibilityElement()
- .accessibilityLabel("Step")
- .accessibilityValue(Self.step(at: t).text)
+ .accessibilityLabel(L10n.tr("Step"))
+ .accessibilityValue(L10n.tr(Self.step(at: t).text))
.accessibilityAdjustableAction { direction in
let i = Self.step(at: t).index + (direction == .increment ? 1 : -1)
guard Self.steps.indices.contains(i) else { return }
@@ -196,7 +196,7 @@ private struct DemoPhone: View {
ZStack {
Capsule().fill(.black).frame(width: 54, height: 16)
HStack {
- Text("9:41").font(.system(size: 9, weight: .semibold))
+ Text(L10n.tr("9:41")).font(.system(size: 9, weight: .semibold))
Spacer()
Image(systemName: "battery.75percent").font(.system(size: 9))
}
@@ -273,7 +273,7 @@ private struct DemoPhone: View {
}
private func pill(_ title: String, highlighted: Bool) -> some View {
- Text(title)
+ Text(L10n.tr(title))
.font(.system(size: 9, weight: .semibold))
.foregroundStyle(.white)
.padding(.horizontal, 9)
@@ -296,7 +296,7 @@ private struct DemoPhone: View {
private func menuRow(_ title: String, _ symbol: String, highlighted: Bool) -> some View {
HStack(spacing: 6) {
- Text(title).font(.system(size: 9, weight: .medium))
+ Text(L10n.tr(title)).font(.system(size: 9, weight: .medium))
Spacer(minLength: 0)
Image(systemName: symbol).font(.system(size: 9))
}
@@ -327,7 +327,7 @@ private struct DemoPhone: View {
Capsule().fill(.white.opacity(0.3)).frame(width: 28, height: 3).padding(.vertical, 6)
HStack(spacing: 5) {
Image(systemName: "magnifyingglass")
- Text("Search Widgets")
+ Text(L10n.tr("Search Widgets"))
Spacer()
}
.font(.system(size: 9))
@@ -356,7 +356,7 @@ private struct DemoPhone: View {
CharacterAvatar(shape: "hex", color: "gray", size: 20)
}
}
- Text(title).font(.system(size: 10, weight: .medium)).foregroundStyle(.white)
+ Text(L10n.tr(title)).font(.system(size: 10, weight: .medium)).foregroundStyle(.white)
Spacer()
Image(systemName: "chevron.right").font(.system(size: 7, weight: .semibold)).foregroundStyle(.white.opacity(0.35))
}
@@ -370,9 +370,9 @@ private struct DemoPhone: View {
Capsule().fill(.white.opacity(0.3)).frame(width: 28, height: 3).padding(.top, 6)
HStack(spacing: 6) {
CharacterAvatar(shape: "hex", color: "gray", size: 18)
- Text("Codync").font(.system(size: 11, weight: .semibold)).foregroundStyle(.white)
+ Text(L10n.tr("Codync")).font(.system(size: 11, weight: .semibold)).foregroundStyle(.white)
}
- Text("See who needs you and who's still working.")
+ Text(L10n.tr("See who needs you and who's still working."))
.font(.system(size: 8)).foregroundStyle(.white.opacity(0.6))
.multilineTextAlignment(.center)
.padding(.horizontal, 20)
@@ -387,7 +387,7 @@ private struct DemoPhone: View {
ForEach(0..<3) { i in Circle().fill(.white.opacity(i == 1 ? 0.9 : 0.3)).frame(width: 4, height: 4) }
}
Spacer()
- Label("Add Widget", systemImage: "plus")
+ Label(L10n.tr("Add Widget"), systemImage: "plus")
.font(.system(size: 10, weight: .semibold))
.foregroundStyle(.black)
.frame(width: 140, height: 28)
diff --git a/apps/ios/Widgets/CodyncWidgets.swift b/apps/ios/Widgets/CodyncWidgets.swift
index 091e0ce9..bfe9f2b5 100644
--- a/apps/ios/Widgets/CodyncWidgets.swift
+++ b/apps/ios/Widgets/CodyncWidgets.swift
@@ -18,6 +18,15 @@ struct CodyncWidgets: WidgetBundle {
}
}
+private extension View {
+ /// Widgets read the language the app saved in the shared App Group.
+ func deviceLanguage() -> some View {
+ environment(\.locale, AppLanguage.locale(
+ preference: AppLanguage.preference(),
+ systemIsChinese: AppLanguage.systemIsChinese()))
+ }
+}
+
// MARK: - Bots at a glance
struct BotsEntry: TimelineEntry {
@@ -67,6 +76,7 @@ struct BotsWidget: Widget {
var body: some WidgetConfiguration {
StaticConfiguration(kind: "CodyncBots", provider: BotsTimeline()) { entry in
BotsWidgetView(entry: entry)
+ .deviceLanguage()
.containerBackground(Palette.surface, for: .widget)
}
.configurationDisplayName("Bots")
@@ -91,7 +101,7 @@ struct BotsWidgetView: View {
Label("Connect a computer", systemImage: "desktopcomputer")
.font(.caption)
default:
- EmptyWidget(text: "Open Codync to pair with your computer.")
+ EmptyWidget(text: L10n.tr("Open Codync to pair with your computer."))
}
} else {
switch family {
@@ -123,9 +133,10 @@ struct BotsTeamWidget: Widget {
// Each spot opens its own bot; the gaps between them open the app.
BotsTeamCard(bots: entry.bots.bots, picks: entry.picks, opens: entry.bots.links.mapValues { OpenBotIntent($0) })
} else {
- EmptyWidget(text: "Open Codync to pair with your computer.")
+ EmptyWidget(text: L10n.tr("Open Codync to pair with your computer."))
}
}
+ .deviceLanguage()
.containerBackground(Palette.surface, for: .widget)
}
.configurationDisplayName("Team")
@@ -347,6 +358,7 @@ struct UsageWidget: Widget {
var body: some WidgetConfiguration {
AppIntentConfiguration(kind: "CodyncUsage", intent: UsageIntent.self, provider: UsageTimeline()) { entry in
UsageWidgetView(entry: entry)
+ .deviceLanguage()
.containerBackground(Palette.surface, for: .widget)
}
.configurationDisplayName("Usage limits")
@@ -400,13 +412,13 @@ struct UsageWidgetView: View {
} else if family == .accessoryInline || family == .accessoryCircular || family == .accessoryRectangular {
Text("No usage yet")
} else {
- EmptyWidget(text: SharedStore.activeContext.computers.isEmpty ? "Open Codync to pair with your computer." : "No usage reported yet.")
+ EmptyWidget(text: L10n.tr(SharedStore.activeContext.computers.isEmpty ? "Open Codync to pair with your computer." : "No usage reported yet."))
}
}
private func hero(_ item: (provider: String, window: UsageWindow)) -> some View {
VStack(alignment: .leading, spacing: 2) {
- Text("\(item.provider) · \(item.window.label)").font(.caption).foregroundStyle(Palette.secondary).lineLimit(1)
+ Text("\(item.provider) · \(L10n.tr(item.window.title))").font(.caption).foregroundStyle(Palette.secondary).lineLimit(1)
Text(percent(item.window))
.font(.system(size: 34, weight: .semibold, design: .rounded))
.monospacedDigit()
@@ -419,7 +431,7 @@ struct UsageWidgetView: View {
private func bar(_ item: (provider: String, window: UsageWindow)) -> some View {
VStack(alignment: .leading, spacing: 4) {
HStack {
- Text("\(item.provider) \(item.window.label)").lineLimit(1)
+ Text("\(item.provider) \(L10n.tr(item.window.title))").lineLimit(1)
Spacer(minLength: 4)
Text(percent(item.window)).monospacedDigit()
}
@@ -433,9 +445,9 @@ struct UsageWidgetView: View {
@ViewBuilder private func resetLine(_ w: UsageWindow) -> some View {
if let date = w.resetDate, date > entry.date {
- Text("resets \(Text(date, style: .relative))")
+ (Text(L10n.tr("resets")) + Text(" ") + Text(date, style: .relative))
} else if let text = w.resetDescription {
- Text(text)
+ Text(L10n.resetLine(text))
} else {
Text(" ")
}
@@ -569,10 +581,11 @@ struct ProviderUsageView: View {
if let provider, !provider.windows.isEmpty {
ProviderWidgetCard(provider: provider, layout: family == .systemSmall ? .small : family == .systemLarge ? .large : .medium, date: entry.date)
} else {
- EmptyWidget(text: "Open Codync to connect a computer and check \(entry.provider.capitalized) usage.")
+ EmptyWidget(text: L10n.tr("Open Codync to connect a computer and check {provider} usage.").replacingOccurrences(of: "{provider}", with: entry.provider.capitalized))
}
}
.containerBackground(Palette.surface, for: .widget)
+ .deviceLanguage()
.widgetURL(AppEnvironment.current.link("usage"))
}
}
diff --git a/host/src/tui/app/mod.rs b/host/src/tui/app/mod.rs
index 7e71af17..e3b5207f 100644
--- a/host/src/tui/app/mod.rs
+++ b/host/src/tui/app/mod.rs
@@ -24,6 +24,7 @@ pub use ui::{
Width,
};
+use crate::tui::l10n::tr;
use serde_json::{Value, json};
use std::collections::{BTreeMap, HashMap, HashSet};
use std::io::Write as _;
@@ -333,7 +334,7 @@ impl App {
}
pub fn flash(&mut self, s: &str) {
- self.hint = Some((s.to_owned(), Instant::now() + Duration::from_secs(3)));
+ self.hint = Some((tr(s).into_owned(), Instant::now() + Duration::from_secs(3)));
}
fn toast(&mut self, text: String, need: bool) {
diff --git a/host/src/tui/app/overlay_keys.rs b/host/src/tui/app/overlay_keys.rs
index 308b074f..307a9def 100644
--- a/host/src/tui/app/overlay_keys.rs
+++ b/host/src/tui/app/overlay_keys.rs
@@ -25,7 +25,13 @@ impl App {
let mut items: Vec<GotoItem> = bots.into_iter().map(|b| GotoItem::Bot(b.id.clone())).collect();
if want.is_none() {
items.extend(
- ACTIONS.iter().filter(|(label, _, _)| fuzzy(q, &[label])).map(|(_, _, a)| GotoItem::Action(*a)),
+ ACTIONS
+ .iter()
+ .filter(|(label, _, _)| {
+ let translated = super::super::l10n::tr(label);
+ fuzzy(q, &[label, translated.as_ref()])
+ })
+ .map(|(_, _, a)| GotoItem::Action(*a)),
);
}
items
@@ -48,6 +54,10 @@ impl App {
Ok(()) => self.flash(&format!("Appearance: {}", mode.name())),
Err(error) => self.flash(&format!("Couldn't save appearance: {error}")),
},
+ Action::Language => {
+ let title = super::super::l10n::cycle_language();
+ self.flash(title.as_ref());
+ }
Action::Keys => self.overlays.push(Overlay::Help(Editor::default())),
}
}
diff --git a/host/src/tui/app/ui.rs b/host/src/tui/app/ui.rs
index 20200217..f3514011 100644
--- a/host/src/tui/app/ui.rs
+++ b/host/src/tui/app/ui.rs
@@ -57,11 +57,12 @@ pub enum Action {
CheckUpdate,
Analytics,
AboutAnalytics,
+ Language,
Keys,
Appearance(super::super::appearance::Appearance),
}
-pub const ACTIONS: [(&str, &str, Action); 15] = [
+pub const ACTIONS: [(&str, &str, Action); 16] = [
("New bot…", "n", Action::NewBot),
("New group chat…", "m", Action::NewGroup),
("Extensions: agents, connectors, skills…", "A", Action::Market),
@@ -76,6 +77,7 @@ pub const ACTIONS: [(&str, &str, Action); 15] = [
("Appearance: System", "", Action::Appearance(super::super::appearance::Appearance::System)),
("Appearance: Light", "", Action::Appearance(super::super::appearance::Appearance::Light)),
("Appearance: Dark", "", Action::Appearance(super::super::appearance::Appearance::Dark)),
+ ("App language…", "", Action::Language),
("Keys", "?", Action::Keys),
];
diff --git a/host/src/tui/l10n.rs b/host/src/tui/l10n.rs
new file mode 100644
index 00000000..51338d9d
--- /dev/null
+++ b/host/src/tui/l10n.rs
@@ -0,0 +1,389 @@
+//! This terminal's interface language. The phrase table is the one the phone apps ship.
+
+use std::borrow::Cow;
+use std::collections::HashMap;
+use std::sync::{LazyLock, Mutex};
+
+use crate::LockExt;
+
+#[derive(Clone, Copy, PartialEq, Eq, Debug)]
+enum ChineseScript {
+ Hans,
+ Hant,
+}
+
+#[derive(Clone, Copy, PartialEq, Eq, Debug)]
+enum AppLanguage {
+ System,
+ Zh,
+ ZhHant,
+ En,
+}
+
+impl AppLanguage {
+ fn parse(raw: &str) -> Self {
+ match raw {
+ "zh" | "zh-Hans" => Self::Zh,
+ "zh-Hant" => Self::ZhHant,
+ "en" => Self::En,
+ _ => Self::System,
+ }
+ }
+
+ fn stored(self) -> &'static str {
+ match self {
+ Self::System => "system",
+ Self::Zh => "zh",
+ Self::ZhHant => "zh-Hant",
+ Self::En => "en",
+ }
+ }
+
+ fn next(self) -> Self {
+ match self {
+ Self::System => Self::Zh,
+ Self::Zh => Self::ZhHant,
+ Self::ZhHant => Self::En,
+ Self::En => Self::System,
+ }
+ }
+}
+
+static HANS: LazyLock<HashMap<String, String>> = LazyLock::new(|| {
+ serde_json::from_str(include_str!("../../../apps/ios/Kit/Sources/CodyncKit/Resources/zh-Hans.json"))
+ .expect("zh-Hans.json is a string map")
+});
+
+static HANT: LazyLock<HashMap<String, String>> = LazyLock::new(|| {
+ serde_json::from_str(include_str!("../../../apps/ios/Kit/Sources/CodyncKit/Resources/zh-Hant.json"))
+ .expect("zh-Hant.json is a string map")
+});
+
+static PREFERENCE: LazyLock<Mutex<AppLanguage>> = LazyLock::new(|| Mutex::new(read_preference()));
+
+fn read_preference() -> AppLanguage {
+ match std::fs::read_to_string(crate::service::data_dir().join("tui-language")) {
+ Ok(text) => AppLanguage::parse(text.trim()),
+ Err(error) if error.kind() == std::io::ErrorKind::NotFound => AppLanguage::System,
+ Err(error) => {
+ tracing::warn!(%error, "couldn't read the terminal language");
+ AppLanguage::System
+ }
+ }
+}
+
+fn system_locale() -> Option<String> {
+ std::env::var("LC_ALL").or_else(|_| std::env::var("LC_MESSAGES")).or_else(|_| std::env::var("LANG")).ok()
+}
+
+/// `zh-Hant`, `zh_TW`, `zh_HK` and `zh_MO` read Traditional. Other Chinese locales read Simplified.
+fn system_script_of(value: &str) -> Option<ChineseScript> {
+ let id = value.to_ascii_lowercase().split('.').next().unwrap_or("").replace('_', "-");
+ if !id.starts_with("zh") {
+ return None;
+ }
+ if id.contains("hant") || id.contains("-tw") || id.contains("-hk") || id.contains("-mo") {
+ Some(ChineseScript::Hant)
+ } else {
+ Some(ChineseScript::Hans)
+ }
+}
+
+fn system_script() -> Option<ChineseScript> {
+ system_locale().as_deref().and_then(system_script_of)
+}
+
+/// The table for the saved choice. Traditional falls back to Simplified for a missing line.
+fn active_phrases() -> Option<&'static HashMap<String, String>> {
+ match *PREFERENCE.locked() {
+ AppLanguage::Zh => Some(&HANS),
+ AppLanguage::ZhHant => Some(&HANT),
+ AppLanguage::En => None,
+ AppLanguage::System => match system_script() {
+ Some(ChineseScript::Hant) => Some(&HANT),
+ Some(ChineseScript::Hans) => Some(&HANS),
+ None => None,
+ },
+ }
+}
+
+/// "resets 3h 20m" / "resets in 2d 6h". Compact times become "3小时20分后重置".
+pub(in crate::tui) fn reset_line(raw: &str) -> String {
+ let Some(time) = raw.strip_prefix("resets in ").or_else(|| raw.strip_prefix("resets ")) else {
+ return tr(raw).into_owned();
+ };
+ let Some(table) = active_phrases() else { return raw.to_owned() };
+ match compact_time_in(time, table) {
+ Some(spoken) => format!("{spoken}{}", translate_with("after reset", table)),
+ None => format!("{} {time}", translate_with("resets", table)),
+ }
+}
+
+/// "3h 20m", "2d 6h", "45m", on the Simplified table. The live reset line uses the active table.
+#[cfg(test)]
+fn compact_time(time: &str) -> Option<String> {
+ compact_time_in(time, &HANS)
+}
+
+fn compact_time_in(time: &str, table: &HashMap<String, String>) -> Option<String> {
+ let mut spoken = String::new();
+ let mut matched = false;
+ for token in time.split(' ') {
+ let mut chars = token.chars();
+ let unit = chars.next_back()?;
+ let n: u32 = chars.as_str().parse().ok()?;
+ let word = match unit {
+ 'd' => translate_with("day unit", table),
+ 'h' => translate_with("hour unit", table),
+ 'm' => translate_with("minute unit", table),
+ _ => return None,
+ };
+ matched = true;
+ if n == 0 {
+ continue;
+ }
+ spoken.push_str(&n.to_string());
+ spoken.push_str(word.as_ref());
+ }
+ if !matched {
+ return None;
+ }
+ if spoken.is_empty() {
+ spoken = format!("0{}", translate_with("minute unit", table));
+ }
+ Some(spoken)
+}
+
+/// An exact chrome phrase. Chat text that is not one of those phrases stays as written.
+pub(in crate::tui) fn tr(text: &str) -> Cow<'_, str> {
+ match active_phrases() {
+ Some(table) => translate_with(text, table),
+ None => Cow::Borrowed(text),
+ }
+}
+
+/// One piece of a phrase key such as "Runs the official installer on {name}."
+struct Piece {
+ literal: Option<String>,
+ token: Option<String>,
+}
+
+struct Template {
+ key: String,
+ pieces: Vec<Piece>,
+ literal: usize,
+}
+
+/// Phrase keys that already contain `{token}` slots, longest fixed text first.
+static TEMPLATES: LazyLock<Vec<Template>> = LazyLock::new(|| {
+ let mut out = Vec::new();
+ for key in HANS.keys() {
+ let Some(pieces) = parse_template(key) else { continue };
+ let literal: usize = pieces.iter().map(|piece| piece.literal.as_ref().map_or(0, String::len)).sum();
+ if literal < 6 {
+ continue;
+ }
+ out.push(Template { key: key.clone(), pieces, literal });
+ }
+ out.sort_by(|a, b| b.literal.cmp(&a.literal).then(b.key.len().cmp(&a.key.len())));
+ out
+});
+
+/// `{name}` and the same shape. A `{` that is not a slot makes the key unusable as a template.
+fn parse_template(template: &str) -> Option<Vec<Piece>> {
+ let mut pieces = Vec::new();
+ let mut rest = template;
+ while let Some(open) = rest.find('{') {
+ if open > 0 {
+ pieces.push(Piece { literal: Some(rest[..open].to_owned()), token: None });
+ }
+ let close = rest[open..].find('}')?;
+ let token = &rest[open..=open + close];
+ let name = &token[1..token.len() - 1];
+ if name.is_empty()
+ || !name.chars().all(|c| c.is_ascii_alphanumeric())
+ || pieces.last().is_some_and(|piece| piece.token.is_some())
+ {
+ return None;
+ }
+ pieces.push(Piece { literal: None, token: Some(token.to_owned()) });
+ rest = &rest[open + close + 1..];
+ }
+ if !rest.is_empty() {
+ pieces.push(Piece { literal: Some(rest.to_owned()), token: None });
+ }
+ pieces.iter().any(|piece| piece.token.is_some()).then_some(pieces)
+}
+
+fn phrase_of<'a>(table: &'a HashMap<String, String>, key: &str) -> Option<&'a String> {
+ table.get(key).or_else(|| HANS.get(key))
+}
+
+/// A sentence the host or a view already filled in, matched back to its `{token}` phrase.
+fn templated(text: &str, table: &HashMap<String, String>) -> Option<String> {
+ templated_at(text, table, 0)
+}
+
+fn templated_at(text: &str, table: &HashMap<String, String>, depth: u8) -> Option<String> {
+ for template in TEMPLATES.iter() {
+ let Some(caps) = captures(text, &template.pieces) else { continue };
+ let Some(phrase) = phrase_of(table, &template.key) else { continue };
+ let mut result = phrase.clone();
+ for (token, value) in caps {
+ let shown = if let Some(hit) = phrase_of(table, &value) {
+ hit.clone()
+ } else if depth == 0 {
+ templated_at(&value, table, 1).unwrap_or(value)
+ } else {
+ value
+ };
+ result = result.replace(&token, &shown);
+ }
+ return Some(result);
+ }
+ None
+}
+
+fn captures(text: &str, pieces: &[Piece]) -> Option<Vec<(String, String)>> {
+ let mut pos = 0;
+ let mut caps = Vec::new();
+ for (index, piece) in pieces.iter().enumerate() {
+ if let Some(literal) = &piece.literal {
+ if !text[pos..].starts_with(literal) {
+ return None;
+ }
+ pos += literal.len();
+ continue;
+ }
+ let token = piece.token.as_deref()?;
+ let end = if let Some(next) = pieces.get(index + 1).and_then(|next| next.literal.as_deref()) {
+ let rel = text[pos..].find(next)?;
+ if rel == 0 {
+ return None;
+ }
+ pos + rel
+ } else if pos >= text.len() {
+ return None;
+ } else {
+ text.len()
+ };
+ caps.push((token.to_owned(), text[pos..end].to_owned()));
+ pos = end;
+ }
+ (pos == text.len()).then_some(caps)
+}
+
+#[cfg(test)]
+fn translate(text: &str, chinese: bool) -> Cow<'_, str> {
+ if chinese { translate_with(text, &HANS) } else { Cow::Borrowed(text) }
+}
+
+fn translate_with<'a>(text: &'a str, table: &HashMap<String, String>) -> Cow<'a, str> {
+ if let Some(hit) = phrase_of(table, text).cloned().or_else(|| templated(text, table)) {
+ return Cow::Owned(hit);
+ }
+ let trimmed = text.trim();
+ if trimmed == text {
+ return Cow::Borrowed(text);
+ }
+ phrase_of(table, trimmed).cloned().or_else(|| templated(trimmed, table)).map_or(Cow::Borrowed(text), Cow::Owned)
+}
+
+/// The choice shown beside the palette row.
+pub(in crate::tui) fn language_title() -> Cow<'static, str> {
+ // Copy the choice out first. A second lock of `PREFERENCE` while this one is held freezes
+ // the terminal, and the palette asks for this title on every row.
+ let preference = *PREFERENCE.locked();
+ match preference {
+ AppLanguage::Zh => Cow::Borrowed("简体中文"),
+ AppLanguage::ZhHant => Cow::Borrowed("繁體中文"),
+ AppLanguage::En => Cow::Borrowed("English"),
+ AppLanguage::System => match system_script() {
+ Some(ChineseScript::Hant) => translate_with("Follow system", &HANT),
+ Some(ChineseScript::Hans) => translate_with("Follow system", &HANS),
+ None => Cow::Borrowed("Follow system"),
+ },
+ }
+}
+
+/// Follow system, then Simplified, then Traditional, then English. The choice is kept for the next run.
+pub(in crate::tui) fn cycle_language() -> Cow<'static, str> {
+ let next = {
+ let mut preference = PREFERENCE.locked();
+ let next = preference.next();
+ *preference = next;
+ next
+ };
+ let dir = crate::service::data_dir();
+ if let Err(error) =
+ std::fs::create_dir_all(&dir).and_then(|()| std::fs::write(dir.join("tui-language"), next.stored()))
+ {
+ tracing::warn!(%error, "couldn't save the terminal language");
+ }
+ language_title()
+}
+
+#[cfg(test)]
+mod tests {
+ use super::{AppLanguage, translate};
+
+ #[test]
+ fn chinese_replaces_a_known_phrase_and_leaves_the_rest() {
+ assert_eq!(translate("Pair a computer", true).as_ref(), "配对一台电脑");
+ assert_eq!(translate("Pair a computer", false).as_ref(), "Pair a computer");
+ assert_eq!(translate("Not a phrase", true).as_ref(), "Not a phrase");
+ assert_eq!(translate("Follow system", true).as_ref(), "跟随系统");
+ assert_eq!(translate("Writing a reply…", true).as_ref(), "正在写回复…");
+ assert_eq!(translate("Downloading Codebuddy Code…", true).as_ref(), "正在下载 Codebuddy Code…");
+ assert_eq!(translate("Needs approval: Bash", true).as_ref(), "需要批准:Bash");
+ assert_eq!(translate("Storage", true).as_ref(), "存储");
+ assert_eq!(translate("New skill", true).as_ref(), "新建技能");
+ assert_eq!(translate("Add connector", true).as_ref(), "添加连接器");
+ assert_eq!(translate("Name your group", true).as_ref(), "给群聊起个名字");
+ assert_eq!(translate("Nothing installed", true).as_ref(), "还没有安装");
+ assert_eq!(translate("No setup needed.", true).as_ref(), "无需设置。");
+ assert_eq!(
+ translate("Runs the official installer on this Mac.", true).as_ref(),
+ "在 这台 Mac 上运行官方安装程序。"
+ );
+ assert_eq!(
+ translate(
+ "Claude Code isn't set up on this computer. Install Claude Code and run `claude auth login`.",
+ true
+ )
+ .as_ref(),
+ "Claude Code 还没有在这台电脑上设置好。安装 Claude Code,然后运行 `claude auth login`。"
+ );
+ assert_eq!(super::compact_time("3h 20m").as_deref(), Some("3小时20分"));
+ assert_eq!(super::compact_time("2d 6h").as_deref(), Some("2天6小时"));
+ assert_eq!(super::compact_time("Sep 26"), None);
+ }
+
+ #[test]
+ fn the_palette_label_reads_the_choice_without_locking_twice() {
+ let title = super::language_title();
+ assert!(matches!(
+ title.as_ref(),
+ "跟随系统" | "跟隨系統" | "Follow system" | "简体中文" | "繁體中文" | "English"
+ ));
+ }
+
+ #[test]
+ fn a_missing_choice_follows_the_computer() {
+ assert_eq!(AppLanguage::parse(""), AppLanguage::System);
+ assert_eq!(AppLanguage::parse("zh"), AppLanguage::Zh);
+ assert_eq!(AppLanguage::parse("zh-Hans"), AppLanguage::Zh);
+ assert_eq!(AppLanguage::parse("zh-Hant"), AppLanguage::ZhHant);
+ assert_eq!(AppLanguage::parse("en"), AppLanguage::En);
+ assert_eq!(AppLanguage::System.next(), AppLanguage::Zh);
+ assert_eq!(AppLanguage::Zh.next(), AppLanguage::ZhHant);
+ assert_eq!(AppLanguage::ZhHant.next(), AppLanguage::En);
+ assert_eq!(AppLanguage::En.next(), AppLanguage::System);
+ assert_eq!(super::system_script_of("zh_TW.UTF-8"), Some(super::ChineseScript::Hant));
+ assert_eq!(super::system_script_of("zh-HK"), Some(super::ChineseScript::Hant));
+ assert_eq!(super::system_script_of("zh_CN.UTF-8"), Some(super::ChineseScript::Hans));
+ assert_eq!(super::system_script_of("en_US.UTF-8"), None);
+ assert_eq!(super::translate_with("Settings", &super::HANT).as_ref(), "設定");
+ assert_eq!(super::translate_with("Files", &super::HANT).as_ref(), "檔案");
+ }
+}
diff --git a/host/src/tui/manage/market.rs b/host/src/tui/manage/market.rs
index 3df997dc..b44834bc 100644
--- a/host/src/tui/manage/market.rs
+++ b/host/src/tui/manage/market.rs
@@ -4,6 +4,7 @@ use crossterm::event::{KeyCode, KeyEvent};
use serde_json::{Value, json};
use super::super::app::{After, App, Confirm, ConfirmAct, Editor, Overlay, fuzzy};
+use super::super::l10n::tr;
use super::{Fields, Input, Market, Reply, Row, Submit, TABS, Tab, ctrl, s};
impl App {
@@ -116,12 +117,13 @@ impl App {
_ => return Some(Overlay::Market(m)),
};
let c = Confirm {
- title: format!("Remove {name}?"),
- detail: if skill {
- "Bots stop using this skill.".into()
+ title: tr("Remove {name}?").replace("{name}", &name),
+ detail: tr(if skill {
+ "Bots stop using this skill."
} else {
- "Bots lose it, and the keys saved for it are deleted.".into()
- },
+ "Bots lose this connector, and the keys saved for it are deleted."
+ })
+ .into_owned(),
note: String::new(),
button: "Remove",
act: if skill { ConfirmAct::RemoveSkill(id) } else { ConfirmAct::RemoveConnector(id) },
@@ -201,7 +203,7 @@ impl App {
Act::Install(item) => {
let options = item["options"].as_array().cloned().unwrap_or_default();
if options.len() == 1 && options[0]["inputs"].as_array().is_none_or(Vec::is_empty) {
- self.flash(&format!("Adding {}…", s(&item, "title")));
+ self.flash(&tr("Adding {name}…").replace("{name}", &s(&item, "title")));
self.sheet(
"installConnector",
json!({"registryName": item["name"], "option": options[0]["id"], "inputs": {}}),
@@ -213,15 +215,15 @@ impl App {
.iter()
.map(|o| {
if o["kind"] == "remote" {
- format!("Hosted by {}", s(&item, "title"))
+ tr("Hosted by {name}").replace("{name}", &s(&item, "title"))
} else {
- format!("On {host} ({})", s(o, "kind"))
+ tr("On {name} ({kind})").replace("{name}", &host).replace("{kind}", &s(o, "kind"))
}
})
.collect();
let mut f = Fields {
- title: format!("Add {}", s(&item, "title")),
- note: format!("Keys are saved on {host} only."),
+ title: tr("Add connector").into_owned(),
+ note: tr("Keys are saved on {name} only.").replace("{name}", &host),
choices,
choice: 0,
inputs: vec![],
diff --git a/host/src/tui/manage/memory.rs b/host/src/tui/manage/memory.rs
index edbd6e91..682d1ca4 100644
--- a/host/src/tui/manage/memory.rs
+++ b/host/src/tui/manage/memory.rs
@@ -3,6 +3,7 @@
//! telling the bot.
use super::super::app::{App, Confirm, ConfirmAct, Overlay};
+use super::super::l10n::tr;
use super::s;
use super::{Page, Reply, ctrl};
use crossterm::event::{KeyCode, KeyEvent};
@@ -272,7 +273,7 @@ impl App {
Some(false) => {
// One line each in the confirmation: the info sheets' points, short.
let c = Confirm {
- title: format!("Turn on {}'s own memory?", self.harness_name(&m.bot)),
+ title: tr("Turn on {name}'s own memory?").replace("{name}", &self.harness_name(&m.bot)),
detail: "It may store things twice; the two memories can disagree.".into(),
note: "Forgetting something in Codync doesn't reach it.".into(),
button: "Turn on",
diff --git a/host/src/tui/mod.rs b/host/src/tui/mod.rs
index f143e04a..3c7f9ba5 100644
--- a/host/src/tui/mod.rs
+++ b/host/src/tui/mod.rs
@@ -5,6 +5,7 @@ mod app;
mod appearance;
mod connections;
mod drafts;
+mod l10n;
mod manage;
mod md;
mod net;
diff --git a/host/src/tui/sheets.rs b/host/src/tui/sheets.rs
index 3e9515bf..922fbde7 100644
--- a/host/src/tui/sheets.rs
+++ b/host/src/tui/sheets.rs
@@ -6,6 +6,8 @@
use ratatui::buffer::Buffer;
use ratatui::layout::{Position, Rect};
use ratatui::style::{Modifier, Style};
+
+use crate::tui::l10n::tr;
use serde_json::Value;
mod memory_view;
@@ -45,9 +47,18 @@ fn footer(buf: &mut Buffer, inner: Rect, error: Option<&str>, keys: &str) {
let t = theme();
let by = inner.bottom() - 1;
if let Some(e) = error {
- put(buf, inner.x, by - 1, inner.width, &truncate(e, usize::from(inner.width)), t.red.patch(t.panel));
+ let shown = tr(e);
+ put(
+ buf,
+ inner.x,
+ by - 1,
+ inner.width,
+ &truncate(shown.as_ref(), usize::from(inner.width)),
+ t.red.patch(t.panel),
+ );
}
- put(buf, inner.x, by, inner.width, keys, t.dim.patch(t.panel));
+ let keys = tr(keys);
+ put(buf, inner.x, by, inner.width, keys.as_ref(), t.dim.patch(t.panel));
}
fn name_of(app: &App, bot: &str) -> String {
@@ -61,7 +72,8 @@ pub fn page_tabs(buf: &mut Buffer, inner: Rect, current: Page) -> Rect {
let mut x = inner.x;
for page in Page::ALL {
let style = if page == current { t.text.patch(t.sel) } else { t.secondary.patch(t.panel) };
- x = put(buf, x, inner.y, inner.right().saturating_sub(x), &format!(" {} ", page.label()), style) + 1;
+ let tab = tr(page.label());
+ x = put(buf, x, inner.y, inner.right().saturating_sub(x), &format!(" {tab} "), style) + 1;
}
rput(buf, inner.right(), inner.y, "⇧←→ page", t.dim.patch(t.panel));
Rect::new(inner.x, inner.y + 2, inner.width, inner.height.saturating_sub(2))
@@ -104,16 +116,16 @@ pub fn routines(buf: &mut Buffer, area: Rect, app: &App, l: &RoutineList) {
}
if !app.screen.is_null() {
let on = app.bots.get(&l.bot).is_some_and(|b| b.computer);
- put(buf, inner.x, inner.y, inner.width, "Use the computer", t.text.patch(t.panel));
+ put(buf, inner.x, inner.y, inner.width, &tr("Use the computer"), t.text.patch(t.panel));
let x = rput(buf, inner.right(), inner.y, " u switches", t.dim.patch(t.panel));
rput(buf, x, inner.y, if on { "◉ On" } else { "○ Off" }, if on { t.text } else { t.secondary }.patch(t.panel));
inner = Rect::new(inner.x, inner.y + 2, inner.width, inner.height.saturating_sub(2));
}
- put(buf, inner.x, inner.y, inner.width, "Routines", t.bold.patch(t.panel));
+ put(buf, inner.x, inner.y, inner.width, &tr("Routines"), t.bold.patch(t.panel));
let list_h = usize::from(inner.height.saturating_sub(3)) / 2;
match &l.items {
None => {
- put(buf, inner.x, inner.y + 1, inner.width, "Loading…", t.dim.patch(t.panel));
+ put(buf, inner.x, inner.y + 1, inner.width, &tr("Loading…"), t.dim.patch(t.panel));
}
Some(v) if v.is_empty() => {
put(
@@ -121,7 +133,7 @@ pub fn routines(buf: &mut Buffer, area: Rect, app: &App, l: &RoutineList) {
inner.x,
inner.y + 1,
inner.width,
- "No routines. c asks the bot for one; n sets one up here.",
+ &tr("No routines. c asks the bot for one; n sets one up here."),
t.secondary.patch(t.panel),
);
}
@@ -177,7 +189,7 @@ pub fn routine(buf: &mut Buffer, area: Rect, f: &RoutineForm) {
let vx = inner.x + 9;
let vw = inner.width.saturating_sub(9);
let at = |y: u16| Rect::new(vx, y, vw, 1);
- put(buf, inner.x, inner.y, 9, "Name", label(f.field == RoutineField::Name));
+ put(buf, inner.x, inner.y, 9, tr("Name").as_ref(), label(f.field == RoutineField::Name));
input_line(buf, at(inner.y), inner.y, &f.name, "Morning summary", f.field == RoutineField::Name, false);
put(buf, inner.x, inner.y + 2, 9, "Do", label(f.field == RoutineField::Instruction));
multiline(
@@ -233,24 +245,25 @@ fn multiline(buf: &mut Buffer, r: Rect, e: &Editor, placeholder: &str, active: b
pub fn market(buf: &mut Buffer, area: Rect, app: &App, m: &Market) {
let t = theme();
let r = centered(area, 96, 30);
- let title = format!("Extensions · {}", app.host);
+ let title = format!("{} · {}", tr("Extensions"), app.host);
let inner = frame_box(buf, r, t.text, t.panel, Some((&title, t.text)));
let mut x = inner.x;
for (tab, label) in TABS {
let style = if tab == m.tab { t.btn_primary } else { t.secondary.patch(t.btn) };
- x = put(buf, x, inner.y, 20, &format!(" {label} "), style) + 1;
+ let tab_label = tr(label);
+ x = put(buf, x, inner.y, 20, &format!(" {tab_label} "), style) + 1;
}
let search = Rect::new(x + 2, inner.y, inner.right().saturating_sub(x + 2), 1);
let placeholder = match m.tab {
- Tab::Connectors => "search the MCP registry",
- _ => "filter",
+ Tab::Connectors => tr("search the MCP registry"),
+ _ => tr("filter"),
};
- field_line(buf, search, inner.y, &m.query, placeholder, true);
+ field_line(buf, search, inner.y, &m.query, &placeholder, true);
let rows = app.market_rows(m);
let list_h = usize::from(inner.height.saturating_sub(5));
let mut y = inner.y + 2;
if App::market_stale(m) {
- put(buf, inner.x, y, inner.width, "↵ searches the registry", t.secondary.patch(t.panel));
+ put(buf, inner.x, y, inner.width, &tr("↵ searches the registry"), t.secondary.patch(t.panel));
y += 1;
}
for (i, item) in rows.iter().enumerate().skip(window(m.cursor, list_h)).take(list_h) {
@@ -258,8 +271,8 @@ pub fn market(buf: &mut Buffer, area: Rect, app: &App, m: &Market) {
let (mark, name, detail, right): (&str, String, String, String) = match item {
Row::Node => (
"+",
- "Add Node.js".into(),
- "Some agents need it to run. Codync adds a copy just for them.".into(),
+ tr("Add Node.js").into_owned(),
+ tr("Some agents need it to run. Codync adds a copy just for them.").into_owned(),
String::new(),
),
Row::Agent(b) => {
@@ -271,22 +284,28 @@ pub fn market(buf: &mut Buffer, area: Rect, app: &App, m: &Market) {
(true, None) => "installed",
(false, _) => "sets up on first use",
};
+ let status = tr(status);
let mark = if b["signedIn"] == true || b["installed"] == true { "✓" } else { "↓" };
- (mark, s(b, "name").into(), s(b, "description").into(), status.into())
+ (mark, s(b, "name").into(), s(b, "description").into(), status.into_owned())
}
Row::Installed(c) => {
let right = match s(c, "auth") {
- "signedOut" => "↵ sign in",
- _ if c["kind"] == "composio" => "Composio",
- _ => "installed",
+ "signedOut" => tr("↵ sign in"),
+ _ if c["kind"] == "composio" => std::borrow::Cow::Borrowed("Composio"),
+ _ => tr("installed"),
};
let detail = c["command"].as_str().or(c["url"].as_str()).unwrap_or(s(c, "description"));
- ("✓", s(c, "name").into(), detail.into(), right.into())
+ ("✓", s(c, "name").into(), detail.into(), right.into_owned())
}
- Row::Custom => ("+", "Custom connector".into(), "Paste any MCP server's config".into(), String::new()),
+ Row::Custom => (
+ "+",
+ tr("Custom connector").into_owned(),
+ tr("Paste any MCP server's config").into_owned(),
+ String::new(),
+ ),
Row::Registry(c) => ("↓", s(c, "title").into(), s(c, "description").into(), String::new()),
- Row::More => ("…", "Load more connectors".into(), String::new(), String::new()),
- Row::OwnSkill(v) => ("✓", s(v, "name").into(), s(v, "description").into(), "installed".into()),
+ Row::More => ("…", tr("Load more connectors").into_owned(), String::new(), String::new()),
+ Row::OwnSkill(v) => ("✓", s(v, "name").into(), s(v, "description").into(), tr("installed").into_owned()),
Row::Skill(v) => ("↓", s(v, "name").into(), s(v, "description").into(), String::new()),
};
let ok = mark == "✓";
@@ -298,16 +317,17 @@ pub fn market(buf: &mut Buffer, area: Rect, app: &App, m: &Market) {
y += 1;
}
if rows.is_empty() {
- let msg = if m.loading { "Loading…" } else { "Nothing matches" };
- put(buf, inner.x, y, inner.width, msg, t.dim.patch(t.panel));
+ let msg = if m.loading { tr("Loading…") } else { tr("Nothing matches") };
+ put(buf, inner.x, y, inner.width, &msg, t.dim.patch(t.panel));
}
let keys = match m.tab {
- Tab::Agents => "tab switch · ↵ install / sign in · ^r refresh · esc close",
- Tab::Connectors => "tab switch · ↵ add / sign in · ^x remove · ^r refresh · esc",
- Tab::Skills => "tab switch · ↵ details · ^x remove · esc close",
+ Tab::Agents => tr("tab switch · ↵ install / sign in · ^r refresh · esc close"),
+ Tab::Connectors => tr("tab switch · ↵ add / sign in · ^x remove · ^r refresh · esc"),
+ Tab::Skills => tr("tab switch · ↵ details · ^x remove · esc close"),
};
let loading = m.loading && m.tab == Tab::Connectors && !rows.is_empty();
- footer(buf, inner, m.error.as_deref().or(loading.then_some("Loading the registry…")), keys);
+ let registry = tr("Loading the registry…");
+ footer(buf, inner, m.error.as_deref().or(loading.then_some(registry.as_ref())), &keys);
}
pub fn agent(buf: &mut Buffer, area: Rect, app: &App, a: &AgentSetup) {
@@ -319,16 +339,24 @@ pub fn agent(buf: &mut Buffer, area: Rect, app: &App, a: &AgentSetup) {
let inner = frame_box(buf, r, t.text, t.panel, Some((name, t.text)));
let mut y = inner.y;
if let Some(d) = b.map(|b| s(b, "description")).filter(|d| !d.is_empty()) {
- put(buf, inner.x, y, inner.width, &truncate(d, usize::from(inner.width)), t.secondary.patch(t.panel));
+ let shown = tr(d);
+ put(
+ buf,
+ inner.x,
+ y,
+ inner.width,
+ &truncate(shown.as_ref(), usize::from(inner.width)),
+ t.secondary.patch(t.panel),
+ );
y += 2;
}
let signed_in =
a.auth.as_ref().map_or_else(|| b.and_then(|b| b["signedIn"].as_bool()), |v| v["signedIn"].as_bool());
let status = if a.busy {
if a.auth.is_none() {
- format!("Checking with {name}… the first check can download it.")
+ format!("Checking with {name}… The first check can download it.")
} else {
- "Working…".into()
+ tr("Working…").into_owned()
}
} else if signed_in != Some(true) && b.is_some_and(|b| b["node"] == "missing") {
"Add Node.js first.".into()
@@ -340,12 +368,14 @@ pub fn agent(buf: &mut Buffer, area: Rect, app: &App, a: &AgentSetup) {
}
};
let style = if signed_in == Some(true) { t.green } else { t.text };
- put(buf, inner.x, y, inner.width, &status, style.patch(t.panel).add_modifier(Modifier::BOLD));
+ let status = tr(&status);
+ put(buf, inner.x, y, inner.width, status.as_ref(), style.patch(t.panel).add_modifier(Modifier::BOLD));
y += 1;
if signed_in != Some(true)
&& let Some(d) = a.auth.as_ref().and_then(|v| v["detail"].as_str()).filter(|d| !d.is_empty())
{
- put(buf, inner.x, y, inner.width, &truncate(d, usize::from(inner.width)), t.dim.patch(t.panel));
+ let shown = tr(d);
+ put(buf, inner.x, y, inner.width, &truncate(shown.as_ref(), usize::from(inner.width)), t.dim.patch(t.panel));
y += 1;
}
y += 1;
@@ -371,14 +401,16 @@ pub fn agent(buf: &mut Buffer, area: Rect, app: &App, a: &AgentSetup) {
}
SetupRow::Check => ("↻", "Check again".to_owned(), String::new()),
};
+ let title = tr(&title);
+ let detail = tr(&detail);
put(buf, inner.x, y, 3, icon, t.secondary.patch(base));
- let nx = put(buf, inner.x + 3, y, 30, &title, t.bold.patch(base)) + 2;
+ let nx = put(buf, inner.x + 3, y, 30, title.as_ref(), t.bold.patch(base)) + 2;
put(
buf,
nx,
y,
inner.right().saturating_sub(nx),
- &truncate(&detail, usize::from(inner.right().saturating_sub(nx))),
+ &truncate(detail.as_ref(), usize::from(inner.right().saturating_sub(nx))),
t.secondary.patch(base),
);
y += 1;
@@ -391,9 +423,11 @@ pub fn fields(buf: &mut Buffer, area: Rect, f: &Fields) {
let tall = f.inputs.iter().any(|i| i.multiline);
let h = if tall { 20 } else { u(f.inputs.len() * 2 + usize::from(f.choices.len() > 1) * 2 + 8) };
let r = centered(area, 84, h);
- let inner = frame_box(buf, r, t.text, t.panel, Some((&f.title, t.text)));
+ let title = tr(&f.title);
+ let note = tr(&f.note);
+ let inner = frame_box(buf, r, t.text, t.panel, Some((title.as_ref(), t.text)));
let mut y = inner.y;
- put(buf, inner.x, y, inner.width, &truncate(&f.note, usize::from(inner.width)), t.dim.patch(t.panel));
+ put(buf, inner.x, y, inner.width, &truncate(note.as_ref(), usize::from(inner.width)), t.dim.patch(t.panel));
y += 2;
let label_w = 18u16;
let vx = inner.x + label_w;
@@ -401,7 +435,8 @@ pub fn fields(buf: &mut Buffer, area: Rect, f: &Fields) {
let mut row_i = 0;
if f.choices.len() > 1 {
let on = f.cursor == 0;
- put(buf, inner.x, y, label_w, "Runs", if on { t.bold } else { t.secondary }.patch(t.panel));
+ let runs = tr("Runs");
+ put(buf, inner.x, y, label_w, runs.as_ref(), if on { t.bold } else { t.secondary }.patch(t.panel));
let base = if on { t.sel } else { t.panel };
put(buf, vx, y, vw, &format!("‹ {} ›", f.choices[f.choice]), t.text.patch(base));
y += 2;
@@ -410,12 +445,13 @@ pub fn fields(buf: &mut Buffer, area: Rect, f: &Fields) {
for (i, input) in f.inputs.iter().enumerate() {
let on = f.cursor == row_i + i;
let star = if input.required { " *" } else { "" };
+ let label = tr(&input.label);
put(
buf,
inner.x,
y,
label_w - 1,
- &truncate(&format!("{}{star}", input.label), usize::from(label_w - 1)),
+ &truncate(&format!("{label}{star}"), usize::from(label_w - 1)),
if on { t.bold } else { t.secondary }.patch(t.panel),
);
if input.multiline {
diff --git a/host/src/tui/sheets/memory_view.rs b/host/src/tui/sheets/memory_view.rs
index 368a1e96..db664ee4 100644
--- a/host/src/tui/sheets/memory_view.rs
+++ b/host/src/tui/sheets/memory_view.rs
@@ -1,6 +1,7 @@
//! A bot's memory: about you, this bot's own, its dreams and Claude Code's own memory where it is kept on.
use super::{App, Buffer, Rect, centered, footer, frame_box, name_of, page_tabs, put, row, s, theme, u, window};
+use crate::tui::l10n::tr;
use crate::tui::manage::{MemoryMode, MemorySheet, Page, Scroll, Section};
use crate::tui::md::{truncate, wrap};
use crate::tui::view::when;
@@ -47,7 +48,7 @@ fn tabs(buf: &mut Buffer, inner: Rect, memory: &MemorySheet) {
let palette = theme();
let mut x = inner.x;
for section in memory.sections() {
- let mut label = section.label().to_owned();
+ let mut label = tr(section.label()).into_owned();
let layer = match section {
Section::Yours => Some("yours"),
Section::Bot => Some("bot"),
@@ -64,7 +65,7 @@ fn tabs(buf: &mut Buffer, inner: Rect, memory: &MemorySheet) {
x = put(buf, x, inner.y, inner.right().saturating_sub(x), &format!(" {label} "), style) + 1;
}
if memory.busy {
- put(buf, x, inner.y, inner.right().saturating_sub(x), "Loading…", palette.dim.patch(palette.panel));
+ put(buf, x, inner.y, inner.right().saturating_sub(x), &tr("Loading…"), palette.dim.patch(palette.panel));
}
}
@@ -74,21 +75,23 @@ fn entries(buf: &mut Buffer, body: Rect, app: &App, memory: &MemorySheet) {
let bot = app.bots.get(&memory.bot);
let harness = app.harness_name(&memory.bot);
let note = match (memory.section, view["shared"] == true, bot.and_then(|b| b.harness_memory)) {
- (Section::Yours, true, _) => "Shared by your bots · s stops this bot using it".to_owned(),
- (Section::Yours, false, _) => "This bot doesn't use what your bots share · s turns it on".to_owned(),
- (_, _, Some(true)) => format!("What this bot learned about you · {harness}'s own memory on · m turns it off"),
- (_, _, Some(false)) => format!("What this bot learned about you · {harness}'s own memory off · m turns it on"),
- (_, _, None) => "What this bot learned about you".to_owned(),
+ (Section::Yours, true, _) => tr("Shared by your bots · s stops this bot using it").into_owned(),
+ (Section::Yours, false, _) => tr("This bot doesn't use what your bots share · s turns it on").into_owned(),
+ (_, _, Some(true)) => tr("What this bot learned about you · {harness}'s own memory on · m turns it off")
+ .replace("{harness}", &harness),
+ (_, _, Some(false)) => tr("What this bot learned about you · {harness}'s own memory off · m turns it on")
+ .replace("{harness}", &harness),
+ (_, _, None) => tr("What this bot learned about you").into_owned(),
};
put(buf, body.x, body.y, body.width, &note, palette.secondary.patch(palette.panel));
let rows = memory.rows();
if rows.is_empty() {
- let empty = if memory.section == Section::Yours {
+ let empty = tr(if memory.section == Section::Yours {
"Nothing shared yet. Facts every bot should know (your name, time zone, people) go here."
} else {
"Nothing yet. What this bot learns about you shows up here."
- };
- put(buf, body.x, body.y + 2, body.width, empty, palette.secondary);
+ });
+ put(buf, body.x, body.y + 2, body.width, &empty, palette.secondary);
return;
}
let height = usize::from(body.height.saturating_sub(2)) / 2;
@@ -131,7 +134,8 @@ fn dreams(buf: &mut Buffer, body: Rect, memory: &MemorySheet) {
Paragraph::new(lines).style(muted).render(Rect::new(body.x, body.y, body.width, top - 1), buf);
let rows = memory.rows();
if rows.is_empty() {
- put(buf, body.x, body.y + top, body.width, "No dreams yet.", palette.secondary);
+ let empty = tr("No dreams yet.");
+ put(buf, body.x, body.y + top, body.width, &empty, palette.secondary);
return;
}
let height = usize::from(body.height.saturating_sub(top)) / 2;
@@ -165,14 +169,8 @@ fn dreams(buf: &mut Buffer, body: Rect, memory: &MemorySheet) {
fn notes(buf: &mut Buffer, body: Rect, memory: &MemorySheet) {
let palette = theme();
let Some(view) = &memory.view else { return };
- put(
- buf,
- body.x,
- body.y,
- body.width,
- "Longer notes, one topic each. The bot reads one when its topic comes up.",
- palette.secondary.patch(palette.panel),
- );
+ let caption = tr("Longer notes, one topic each. The bot reads one when its topic comes up.");
+ put(buf, body.x, body.y, body.width, &caption, palette.secondary.patch(palette.panel));
let rows = memory.rows();
if rows.is_empty() {
put(buf, body.x, body.y + 2, body.width, "No notes yet.", palette.secondary);
@@ -197,7 +195,7 @@ fn notes(buf: &mut Buffer, body: Rect, memory: &MemorySheet) {
fn note(buf: &mut Buffer, body: Rect, detail: Option<&Value>, scroll: &Scroll) {
let Some(detail) = detail else {
let palette = theme();
- put(buf, body.x, body.y, body.width, "Loading…", palette.dim.patch(palette.panel));
+ put(buf, body.x, body.y, body.width, tr("Loading…").as_ref(), palette.dim.patch(palette.panel));
return;
};
read(buf, body, s(detail, "path"), detail["content"].as_str().unwrap_or("Deleted."), scroll);
diff --git a/host/src/tui/view/activity.rs b/host/src/tui/view/activity.rs
index 8d301202..44e1a2cf 100644
--- a/host/src/tui/view/activity.rs
+++ b/host/src/tui/view/activity.rs
@@ -3,6 +3,7 @@
use ratatui::text::{Line, Span};
use super::super::app::{App, Bot, Entry, Kind};
+use super::super::l10n::tr;
use super::super::md::truncate;
use super::style::{spin, theme};
use super::transcript::{Built, gap, name_style};
@@ -11,10 +12,10 @@ pub(super) fn activity(out: &mut Built, app: &App, bot: &Bot, entries: &[&Entry]
let t = theme();
gap(out);
out.lines.push(Line::from(Span::styled(format!(" {}", bot.name), name_style(&bot.color))));
- let text = if bot.activity.is_empty() { "Working…" } else { &bot.activity };
+ let text = if bot.activity.is_empty() { tr("Working…") } else { tr(&bot.activity) };
out.lines.push(Line::from(vec![
Span::styled(format!(" {} ", spin(app)), t.secondary),
- Span::styled(truncate(text, width.saturating_sub(4)), t.secondary),
+ Span::styled(truncate(text.as_ref(), width.saturating_sub(4)), t.secondary),
]));
let turn = entries.iter().filter(|e| e.data["status"] != "queued").map(|e| e.turn).max();
let steps = entries.iter().filter(|entry| Some(entry.turn) == turn && entry.kind == Kind::Tool).count();
diff --git a/host/src/tui/view/analytics.rs b/host/src/tui/view/analytics.rs
index 96407914..800f1811 100644
--- a/host/src/tui/view/analytics.rs
+++ b/host/src/tui/view/analytics.rs
@@ -5,6 +5,7 @@ use ratatui::layout::Rect;
use ratatui::style::Modifier;
use ratatui::text::{Line, Span};
+use super::super::l10n::tr;
use super::super::manage::AnalyticsSheet;
use super::super::md;
use super::buffer::{centered, frame_box, hline, put, put_line, u};
@@ -43,7 +44,7 @@ const DETAILS: [(&str, &str); 7] = [
pub(super) fn analytics(buf: &mut Buffer, area: Rect, s: &AnalyticsSheet) {
let t = theme();
let r = centered(area, 72, area.height.saturating_sub(4).min(44));
- let inner = frame_box(buf, r, t.text, t.panel, Some(("Usage analytics", t.text)));
+ let inner = frame_box(buf, r, t.text, t.panel, Some((tr("Usage analytics").as_ref(), t.text)));
if inner.height < 5 {
return;
}
@@ -54,12 +55,15 @@ pub(super) fn analytics(buf: &mut Buffer, area: Rect, s: &AnalyticsSheet) {
let width = usize::from(body.width);
let mut lines = Vec::new();
for (title, detail) in DETAILS {
+ let title = tr(title).into_owned();
+ let detail = tr(detail).into_owned();
lines.push(Line::from(Span::styled(format!(" {title}"), t.bold)));
lines.extend(md::wrap(&[Span::styled(detail, t.secondary)], width, &[Span::raw(" ")], &[Span::raw(" ")]));
lines.push(Line::default());
}
+ let policy = tr("See the Privacy Policy for details: ").into_owned();
lines.push(Line::from(vec![
- Span::styled(" See the Privacy Policy for details: ", t.dim),
+ Span::styled(format!(" {policy}"), t.dim),
Span::styled("https://codync.dev/privacy", t.dim.add_modifier(Modifier::UNDERLINED)),
]));
let h = usize::from(body.height);
diff --git a/host/src/tui/view/buffer.rs b/host/src/tui/view/buffer.rs
index 1e4b9e71..69aa8c0c 100644
--- a/host/src/tui/view/buffer.rs
+++ b/host/src/tui/view/buffer.rs
@@ -12,6 +12,7 @@ pub(in crate::tui) fn put(buf: &mut Buffer, x: u16, y: u16, max: u16, s: &str, s
if max == 0 || y >= buf.area.bottom() {
return x;
}
+ // Callers translate interface labels. Names, drafts and message previews stay as written.
let (end, _) = buf.set_stringn(x, y, s, usize::from(max), style);
end
}
diff --git a/host/src/tui/view/chat.rs b/host/src/tui/view/chat.rs
index abea8677..432eb047 100644
--- a/host/src/tui/view/chat.rs
+++ b/host/src/tui/view/chat.rs
@@ -6,6 +6,7 @@ use ratatui::style::{Modifier, Style};
use ratatui::text::{Line, Span};
use super::super::app::{App, Click, Editor, Entry, Mark, SlashAction, Status};
+use super::super::l10n::tr;
use super::super::md::{truncate, width as w};
use super::buffer::{fill, hline, put, put_line, rput, u};
use super::set_cursor;
@@ -127,9 +128,9 @@ pub(super) fn chat(buf: &mut Buffer, r: Rect, app: &mut App, narrow: bool) {
let placeholder = if app.pick.is_some() {
"j k pick · ↵ reply · 1–6 react · f save files · c copy · esc".to_owned()
} else if app.reply.is_some() {
- "Reply…".to_owned()
+ tr("Reply…").into_owned()
} else if b.group {
- "Ask everyone · @ to ask one bot".to_owned()
+ tr("Ask everyone · @ to ask one bot").into_owned()
} else {
format!("Message {}…", b.name)
};
diff --git a/host/src/tui/view/forms.rs b/host/src/tui/view/forms.rs
index 3061a87a..136929e1 100644
--- a/host/src/tui/view/forms.rs
+++ b/host/src/tui/view/forms.rs
@@ -5,6 +5,7 @@ use ratatui::layout::{Position, Rect};
use ratatui::style::{Modifier, Style};
use super::super::app::{App, COLORS, Editor, FIELDS, Field, Form, GroupField, GroupForm, SHAPES, tilde};
+use super::super::l10n::tr;
use super::super::manage::Page;
use super::super::md::{truncate, width as w};
use super::super::sheets::page_tabs;
@@ -65,7 +66,8 @@ pub(super) fn form_view(buf: &mut Buffer, area: Rect, app: &App, f: &Form) {
Field::Connectors => "Connectors",
Field::Skills => "Skills",
};
- put(buf, fx, y, label_w, lab, if active { t.bold } else { t.secondary }.patch(t.panel));
+ let label = tr(lab);
+ put(buf, fx, y, label_w, &label, if active { t.bold } else { t.secondary }.patch(t.panel));
let rows = if *field == Field::Instructions { 3 } else { 1 };
if active {
restyle(buf, Rect::new(vx.saturating_sub(1), y, vw + 1, rows), t.sel);
@@ -89,7 +91,7 @@ pub(super) fn form_view(buf: &mut Buffer, area: Rect, app: &App, f: &Form) {
};
match field {
Field::Name => {
- text_field(buf, &f.name, "Name", y);
+ text_field(buf, &f.name, tr("Name").as_ref(), y);
if let Some(by) = created_by(app, &f.bot_id)
&& w(&f.name.text) + w(&by) + 2 < usize::from(vw)
{
@@ -97,7 +99,8 @@ pub(super) fn form_view(buf: &mut Buffer, area: Rect, app: &App, f: &Form) {
}
}
Field::Instructions => {
- text_field(buf, &f.instructions, "e.g. Reviews PRs. Never pushes without asking.", y);
+ let hint = tr("e.g. Reviews PRs. Never pushes without asking.");
+ text_field(buf, &f.instructions, &hint, y);
}
Field::Model => {
text_field(buf, &f.model, "default", y);
@@ -182,7 +185,11 @@ pub(super) fn form_view(buf: &mut Buffer, area: Rect, app: &App, f: &Form) {
&format!(
"{} ▸",
truncate(
- &if f.cwd.is_empty() { "Personal workspace".to_owned() } else { tilde(&f.cwd, &app.home) },
+ &if f.cwd.is_empty() {
+ tr("Personal workspace").into_owned()
+ } else {
+ tilde(&f.cwd, &app.home)
+ },
usize::from(vw.saturating_sub(4))
)
),
@@ -251,7 +258,9 @@ pub(super) fn form_view(buf: &mut Buffer, area: Rect, app: &App, f: &Form) {
let refusal = app.bots.get(&f.bot_id).and_then(super::super::app::Bot::fast_refusal);
let (line, style) = match refusal {
Some(why) => (why, t.amber),
- None => ("Faster replies for more usage, on models that offer it (Claude Code, Codex)".to_owned(), t.dim),
+ None => {
+ (tr("Faster replies for more usage, on models that offer it (Claude Code, Codex)").into_owned(), t.dim)
+ }
};
put(buf, inner.x, by - 1, inner.width, &line, style.patch(t.panel));
} else if f.current() == Field::Computer {
@@ -260,17 +269,16 @@ pub(super) fn form_view(buf: &mut Buffer, area: Rect, app: &App, f: &Form) {
inner.x,
by - 1,
inner.width,
- "Set up on the computer: Codync → Settings → Computer access",
+ &tr("Set up on the computer: Codync → Settings → Computer access"),
t.dim.patch(t.panel),
);
} else if f.current() == Field::Fallbacks {
- let line = format!(
- "If {agent_name} runs out of usage or can't answer, the bot carries on with the next one. Chat, memory and workspace carry over."
- );
+ let line = tr("If {agent} runs out of usage or can't answer, the bot carries on with the next one. Chat, memory and workspace carry over.")
+ .replace("{agent}", &agent_name);
put(buf, inner.x, by - 1, inner.width, &line, t.dim.patch(t.panel));
} else if f.current() == Field::SelfFallbacks {
- let line = "Let the bot change its fallbacks: it can set this list itself, for example when you ask it to.";
- put(buf, inner.x, by - 1, inner.width, line, t.dim.patch(t.panel));
+ let line = tr("Let the bot change its fallbacks: it can set this list itself, for example when you ask it to.");
+ put(buf, inner.x, by - 1, inner.width, &line, t.dim.patch(t.panel));
} else if f.current() == Field::Team {
let line =
"Let this bot create bots and change any bot's setup, its own included. The bots it creates can too.";
@@ -308,13 +316,14 @@ pub(super) fn group_view(buf: &mut Buffer, area: Rect, app: &App, g: &GroupForm)
let about = g.group_id.is_some();
let top = if about { 4 } else { 2 };
let r = centered(area, 74, u(bots.len() + 8).saturating_add(top).max(16));
- let title = if about { "Group chat" } else { "New group chat" };
- let inner = frame_box(buf, r, t.text, t.panel, Some((title, t.text)));
+ let title = tr(if about { "Group chat" } else { "New group chat" });
+ let inner = frame_box(buf, r, t.text, t.panel, Some((title.as_ref(), t.text)));
let label = |on: bool| if on { t.bold } else { t.secondary }.patch(t.panel);
let on_bots = g.field == GroupField::Bots;
- put(buf, inner.x, inner.y, 8, "Name", label(g.field == GroupField::Name));
+ put(buf, inner.x, inner.y, 8, tr("Name").as_ref(), label(g.field == GroupField::Name));
let default = app.group_default_name(&g.members);
- let placeholder = if default.is_empty() { "Name your group" } else { default.as_str() };
+ let fallback = tr("Name your group");
+ let placeholder = if default.is_empty() { fallback.as_ref() } else { default.as_str() };
input_line(
buf,
Rect::new(inner.x + 8, inner.y, inner.width.saturating_sub(8), 1),
@@ -340,7 +349,14 @@ pub(super) fn group_view(buf: &mut Buffer, area: Rect, app: &App, g: &GroupForm)
let list_h = usize::from(inner.height.saturating_sub(top + 5));
let off = g.cursor.saturating_sub(list_h.saturating_sub(1));
if bots.is_empty() {
- put(buf, inner.x, inner.y + top + 1, inner.width, "No bots yet. Create a bot first.", t.dim.patch(t.panel));
+ put(
+ buf,
+ inner.x,
+ inner.y + top + 1,
+ inner.width,
+ tr("No bots yet. Create a bot first.").as_ref(),
+ t.dim.patch(t.panel),
+ );
}
for (y, (i, b)) in (inner.y + top + 1..).zip(bots.iter().enumerate().skip(off).take(list_h)) {
let sel = on_bots && i == g.cursor;
@@ -368,7 +384,7 @@ pub(super) fn group_view(buf: &mut Buffer, area: Rect, app: &App, g: &GroupForm)
inner.x,
by - 1,
inner.width,
- "Everyone answers in turn unless you @mention someone.",
+ tr("Everyone answers in turn unless you @mention someone.").as_ref(),
t.dim.patch(t.panel),
);
}
diff --git a/host/src/tui/view/goto.rs b/host/src/tui/view/goto.rs
index daef43ee..aa1bf665 100644
--- a/host/src/tui/view/goto.rs
+++ b/host/src/tui/view/goto.rs
@@ -5,6 +5,7 @@ use ratatui::layout::Rect;
use ratatui::style::Modifier;
use super::super::app::{ACTIONS, Action, App, Click, FILTERS, GotoItem, Mark};
+use super::super::l10n::tr;
use super::super::md::truncate;
use super::buffer::{centered, frame_box, hline, put, put_line, restyle, rput};
use super::overlay::field_line;
@@ -14,7 +15,7 @@ use super::style::{avatar, glyph, theme};
pub(super) fn goto(buf: &mut Buffer, area: Rect, app: &mut App, g: &super::super::app::Goto, items: &[GotoItem]) {
let t = theme();
let r = centered(area, 80, 24);
- let inner = frame_box(buf, r, t.text, t.panel, Some(("Go to", t.text)));
+ let inner = frame_box(buf, r, t.text, t.panel, Some((tr("Go to").as_ref(), t.text)));
let nbots = items.iter().filter(|i| matches!(i, GotoItem::Bot(_))).count();
rput(buf, inner.right(), inner.y, &format!("{nbots} of {}", app.bots.len()), t.dim.patch(t.panel));
field_line(
@@ -75,18 +76,28 @@ pub(super) fn goto(buf: &mut Buffer, area: Rect, app: &mut App, g: &super::super
if y > list_top {
y += 1;
}
- put(buf, inner.x, y, inner.width, "ACTIONS", t.dim.patch(t.panel).add_modifier(Modifier::BOLD));
+ put(
+ buf,
+ inner.x,
+ y,
+ inner.width,
+ tr("ACTIONS").as_ref(),
+ t.dim.patch(t.panel).add_modifier(Modifier::BOLD),
+ );
y += 1;
}
if sel {
restyle(buf, Rect::new(inner.x - 1, y, inner.width + 2, 1), t.sel);
}
if let Some((label, key, _)) = ACTIONS.iter().find(|x| x.2 == *a) {
- put(buf, inner.x + 2, y, inner.width, label, if sel { t.bold } else { t.secondary }.patch(base));
+ let shown = tr(label);
+ put(buf, inner.x + 2, y, inner.width, &shown, if sel { t.bold } else { t.secondary }.patch(base));
+ let language = super::super::l10n::language_title();
let hint = match (a, app.analytics) {
(Action::Analytics, Some(true)) => "on",
(Action::Analytics, Some(false)) => "off",
(Action::Analytics, None) => "",
+ (Action::Language, _) => language.as_ref(),
_ => key,
};
rput(buf, inner.right(), y, hint, t.dim.patch(base));
@@ -99,7 +110,7 @@ pub(super) fn goto(buf: &mut Buffer, area: Rect, app: &mut App, g: &super::super
}
}
if items.is_empty() {
- put(buf, inner.x, list_top, inner.width, "Nothing matches", t.dim.patch(t.panel));
+ put(buf, inner.x, list_top, inner.width, tr("Nothing matches").as_ref(), t.dim.patch(t.panel));
}
hline(buf, inner.x, inner.bottom() - 3, inner.width, t.line.patch(t.panel));
if let Some(GotoItem::Bot(id)) = items.get(g.cursor)
diff --git a/host/src/tui/view/help.rs b/host/src/tui/view/help.rs
index 8a49f55a..3b79a7e7 100644
--- a/host/src/tui/view/help.rs
+++ b/host/src/tui/view/help.rs
@@ -5,11 +5,12 @@ use ratatui::layout::Rect;
use ratatui::style::Modifier;
use super::super::app::Editor;
+use super::super::l10n::tr;
use super::buffer::{centered, frame_box, put, u};
use super::overlay::field_line;
use super::style::theme;
-const HELP: [(&str, &str, &str); 63] = [
+const HELP: [(&str, &str, &str); 64] = [
("MOVE", "j k ↑ ↓", "next / previous bot"),
("MOVE", "[ ]", "previous / next bot"),
("MOVE", "1…9", "jump to bot 1–9"),
@@ -69,6 +70,7 @@ const HELP: [(&str, &str, &str); 63] = [
("VIEW", "P", "pair a phone"),
("VIEW", "^k share", "share usage analytics on / off"),
("VIEW", "^k about", "what usage analytics include"),
+ ("VIEW", "language", "app language: follow system, Simplified, Traditional, or English"),
("VIEW", "esc", "close / go back"),
("VIEW", "q", "quit; bots keep going"),
("MOUSE", "click", "open, press a button"),
@@ -79,7 +81,7 @@ pub(super) fn help(buf: &mut Buffer, area: Rect, filter: &Editor) {
let t = theme();
// Two columns fit everything from 42 rows up; shorter windows get a third.
let r = centered(area, if area.height >= 42 { 80 } else { 120 }, 40);
- let inner = frame_box(buf, r, t.text, t.panel, Some(("Keys", t.text)));
+ let inner = frame_box(buf, r, t.text, t.panel, Some((tr("Keys").as_ref(), t.text)));
field_line(buf, inner, inner.y, filter, "filter actions and keys", true);
let q = filter.text.to_lowercase();
let items: Vec<&(&str, &str, &str)> = HELP
diff --git a/host/src/tui/view/new_bot.rs b/host/src/tui/view/new_bot.rs
index a2625335..74aca069 100644
--- a/host/src/tui/view/new_bot.rs
+++ b/host/src/tui/view/new_bot.rs
@@ -5,6 +5,7 @@ use ratatui::layout::Rect;
use ratatui::style::{Modifier, Style};
use super::super::app::{COLORS, NewBot, NewBotField, SHAPES};
+use super::super::l10n::tr;
use super::super::md::width as w;
use super::buffer::{centered, frame_box, put, rput, u};
use super::overlay::input_line;
@@ -16,7 +17,7 @@ const LOOKS_W: usize = 6 + 2 + COLORS.len() * 3 + 1;
pub(super) fn new_bot_view(buf: &mut Buffer, area: Rect, n: &NewBot) {
let t = theme();
let r = centered(area, 56, 18);
- let inner = frame_box(buf, r, t.text, t.panel, Some(("New bot", t.text)));
+ let inner = frame_box(buf, r, t.text, t.panel, Some((tr("New bot").as_ref(), t.text)));
let mid = |width: usize| inner.x + inner.width.saturating_sub(u(width)) / 2;
for (y, row) in (inner.y + 1..).zip(FACE) {
put(buf, mid(w(row)), y, inner.width, row, face_style(COLORS[n.color]).patch(t.panel));
@@ -33,7 +34,7 @@ pub(super) fn new_bot_view(buf: &mut Buffer, area: Rect, n: &NewBot) {
let on_color = n.field == NewBotField::Color;
let x0 = mid(LOOKS_W);
let y = inner.y + 11;
- let mut x = put(buf, x0, y, 6, "Color ", label(NewBotField::Color));
+ let mut x = put(buf, x0, y, 6, tr("Color ").as_ref(), label(NewBotField::Color));
x = put(buf, x, y, 2, if on_color { "‹ " } else { " " }, label(NewBotField::Color));
for (ci, c) in COLORS.iter().enumerate() {
let s = if t.color { Style::default().bg(bot_color(c)) } else { t.text };
diff --git a/host/src/tui/view/overlay.rs b/host/src/tui/view/overlay.rs
index 5299d1f0..088a2afc 100644
--- a/host/src/tui/view/overlay.rs
+++ b/host/src/tui/view/overlay.rs
@@ -44,16 +44,22 @@ pub(super) fn overlay(buf: &mut Buffer, area: Rect, app: &mut App, top: &Overlay
let t = theme();
let r = centered(area, 62, 8);
let inner = frame_box(buf, r, t.red, t.panel, None);
+ // The title already includes a bot or device name. Translating it
+ // here would also translate a name that is itself a phrase.
+ let detail = super::super::l10n::tr(&c.detail);
+ let note = super::super::l10n::tr(&c.note);
+ let button = super::super::l10n::tr(c.button);
+ let cancel = super::super::l10n::tr("Cancel");
put(buf, inner.x, inner.y, inner.width, &c.title, t.red.patch(t.panel).add_modifier(Modifier::BOLD));
- put(buf, inner.x, inner.y + 1, inner.width, &c.detail, t.text.patch(t.panel));
- put(buf, inner.x, inner.y + 2, inner.width, &c.note, t.secondary.patch(t.panel));
+ put(buf, inner.x, inner.y + 1, inner.width, detail.as_ref(), t.text.patch(t.panel));
+ put(buf, inner.x, inner.y + 2, inner.width, note.as_ref(), t.secondary.patch(t.panel));
let danger = if t.color {
Style::default().fg(t.on_color).bg(rgb(0xF0A7A7)).add_modifier(Modifier::BOLD)
} else {
t.sel
};
- let x = put(buf, inner.x, inner.y + 4, 30, &format!(" ↵ {} ", c.button), danger) + 1;
- put(buf, x, inner.y + 4, 14, " esc Cancel ", t.text.patch(t.btn).add_modifier(Modifier::BOLD));
+ let x = put(buf, inner.x, inner.y + 4, 30, &format!(" ↵ {button} "), danger) + 1;
+ put(buf, x, inner.y + 4, 14, &format!(" esc {cancel} "), t.text.patch(t.btn).add_modifier(Modifier::BOLD));
}
Overlay::NewBot(n) => new_bot_view(buf, area, n),
Overlay::Folder(p) => {
@@ -154,7 +160,8 @@ pub(in crate::tui) fn input_line(
if active {
set_cursor(Position::new(x, y));
}
- put(buf, x, y, r.right().saturating_sub(x), placeholder, t.dim.patch(t.panel));
+ let hint = super::super::l10n::tr(placeholder);
+ put(buf, x, y, r.right().saturating_sub(x), hint.as_ref(), t.dim.patch(t.panel));
} else {
let room = usize::from(r.right().saturating_sub(x + 1));
let text = e.text.replace('\n', " ");
diff --git a/host/src/tui/view/roster.rs b/host/src/tui/view/roster.rs
index e628dd71..4a01dc97 100644
--- a/host/src/tui/view/roster.rs
+++ b/host/src/tui/view/roster.rs
@@ -6,6 +6,7 @@ use ratatui::style::{Modifier, Style};
use ratatui::text::Span;
use super::super::app::{App, Bot, Click, Focus, Mark, Status};
+use super::super::l10n::tr;
use super::super::md::{self, truncate, width as w};
use super::buffer::{fill, hline, put, put_line, restyle, rput, u};
use super::style::{avatar, glyph, theme};
@@ -125,13 +126,20 @@ pub(super) fn preview(b: &Bot) -> (String, Style) {
fn preview_raw(b: &Bot) -> (String, Style) {
let t = theme();
match b.mark() {
- Mark::Need => (if b.activity.is_empty() { "Needs your approval".into() } else { b.activity.clone() }, t.amber),
- Mark::Work => (if b.activity.is_empty() { "Working…".into() } else { b.activity.clone() }, t.secondary),
- Mark::Error => {
- (if b.last_message.is_empty() { "Something went wrong".into() } else { b.last_message.clone() }, t.red)
- }
+ Mark::Need => (
+ if b.activity.is_empty() { tr("Needs your approval").into_owned() } else { tr(&b.activity).into_owned() },
+ t.amber,
+ ),
+ Mark::Work => (
+ if b.activity.is_empty() { tr("Working…").into_owned() } else { tr(&b.activity).into_owned() },
+ t.secondary,
+ ),
+ Mark::Error => (
+ if b.last_message.is_empty() { tr("Something went wrong").into_owned() } else { b.last_message.clone() },
+ t.red,
+ ),
Mark::Unread => (b.last_message.clone(), t.text),
- Mark::Idle if b.last_message.is_empty() => ("No messages yet".into(), t.dim),
+ Mark::Idle if b.last_message.is_empty() => (tr("No messages yet").into_owned(), t.dim),
Mark::Idle => (b.last_message.clone(), t.secondary),
}
}
diff --git a/host/src/tui/view/usage.rs b/host/src/tui/view/usage.rs
index c7c9b64f..07cf90c1 100644
--- a/host/src/tui/view/usage.rs
+++ b/host/src/tui/view/usage.rs
@@ -4,6 +4,7 @@ use ratatui::buffer::Buffer;
use ratatui::layout::Rect;
use super::super::app::App;
+use super::super::l10n::tr;
use super::super::md::truncate;
use super::buffer::{centered, frame_box, put, rput, u};
use super::filled;
@@ -15,7 +16,7 @@ pub(super) fn usage(buf: &mut Buffer, area: Rect, app: &App) {
let providers = app.usage["providers"].as_array().cloned().unwrap_or_default();
let rows: usize = providers.iter().map(|p| 2 + p["windows"].as_array().map_or(0, Vec::len)).sum();
let r = centered(area, 78, u(rows + 5).max(8));
- let inner = frame_box(buf, r, t.text, t.panel, Some(("Usage", t.text)));
+ let inner = frame_box(buf, r, t.text, t.panel, Some((tr("Usage").as_ref(), t.text)));
let mut y = inner.y + 1;
if providers.is_empty() {
put(buf, inner.x, y, inner.width, "No usage numbers yet.", t.secondary.patch(t.panel));
@@ -52,6 +53,7 @@ pub(super) fn usage(buf: &mut Buffer, area: Rect, app: &App) {
win["resetsText"].as_str().map(|s| truncate(s.split(" (").next().unwrap_or(s), 24))
})
.unwrap_or_default();
+ let reset = crate::tui::l10n::reset_line(&reset);
rput(buf, inner.right(), y, &reset, t.dim.patch(t.panel));
y += 1;
}