Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

8.5 KB
Raw Blame
// LAN WebUI copy. English is the source; other locales fall back to it.
window.LAN_LOCALES = {
  en: {
    appTitle: "PI-Desktop",
    pairTitle: "Pair this device",
    pairHint: "On the computer, open Settings → System → LAN WebUI and choose Add device. Enter the code shown there.",
    codeLabel: "Pairing code",
    deviceLabel: "Device name",
    pairSubmit: "Pair",
    pairConnecting: "Connecting…",
    pairFormat: "Enter the six digits shown on the computer.",
    pairRestart: "This computer is running an older pairing service. Restart PI-Desktop and try again with a new code.",
    pairCookieBlocked: "The code was accepted, but the browser did not save the sign-in. Allow cookies for this site and use a new code.",
    pairFailed: "That code is wrong or expired. Show a new code on the computer.",
    pairClosed: "Show a pairing code on the computer first.",
    projects: "Projects",
    temporary: "Temporary conversations",
    search: "Search",
    clearSearch: "Clear search",
    showArchived: "Archived",
    noProjects: "No local projects.",
    noMatches: "Nothing matches.",
    noSessions: "No conversations yet.",
    newSession: "New conversation",
    untitled: "Untitled",
    back: "Back",
    more: "More actions for {name}",
    rename: "Rename",
    renamePrompt: "New name",
    save: "Save",
    pin: "Pin",
    unpin: "Unpin",
    archive: "Archive",
    restore: "Restore",
    cancel: "Cancel",
    pinned: "Pinned",
    archived: "Archived",
    running: "Running",
    waiting: "Waiting",
    readOnly: "Read-only here",
    loadOlder: "Load older messages",
    loading: "Loading…",
    you: "You",
    assistant: "Assistant",
    tool: "Tool",
    composer: "Message",
    selectModel: "Choose model",
    selectModelCurrent: "Choose model, current: {name}",
    searchModels: "Search models",
    loadingModels: "Loading models…",
    savingModel: "Changing model…",
    noModels: "Set up a chat model in Settings → Models on the computer.",
    retry: "Try again",
    send: "Send",
    queue: "Queue",
    stop: "Stop",
    queued: "Queued",
    replyDone: "Reply finished",
    recent: "Recent",
    conversations: "Conversations",
    archivedView: "Archived",
    noArchived: "Nothing archived.",
    newIn: "New conversation in",
    signOutConfirm: "Disconnect this device? Pairing again needs a new code.",
    composerFollowUp: "Queue a follow-up",
    queueMessage: "Queue message",
    working: "Working…",
    steps: "{count} steps",
    copy: "Copy",
    copyCode: "Copy code",
    copied: "Copied",
    copyFailed: "Couldn't copy. Long-press the text to select it.",
    imagePlaceholder: "Image",
    jumpLatest: "Jump to latest",
    cancelQueued: "Cancel queued message",
    waitingApproval: "Waiting for approval on the computer.",
    waitingInput: "Input needed on the computer.",
    archivedSession: "This conversation is archived. Restore it to continue.",
    archivedProject: "This project is archived. Restore the project to continue its conversations.",
    restoreProject: "Restore project",
    readOnlySession: "Continue this conversation on the computer.",
    offline: "Connection lost. Reconnecting…",
    signOut: "Disconnect this device",
    thisDevice: "This device: {name}",
    errors: {
      BUSY: "A reply is still running. Queue your message or stop it first.",
      MODEL_BUSY: "Wait for the current and queued work to finish before changing models.",
      MODEL_UNAVAILABLE: "This model is no longer available. Refresh the list and choose another.",
      CONFLICT: "This changed on another device. The latest version is shown; try again.",
      ARCHIVED: "Restore it first.",
      PERMISSION_CEILING_UNAVAILABLE: "The computer could not limit this device's permissions, so nothing ran. Try again or continue on the computer.",
      READ_ONLY: "Continue this conversation on the computer.",
      FORBIDDEN: "This device is not allowed to do that.",
      NOT_FOUND: "This is no longer available.",
      DESKTOP_UNAVAILABLE: "PI-Desktop is not ready. Try again shortly.",
      PAYLOAD_TOO_LARGE: "The message is too long.",
      UNAUTHORIZED: "This device was signed out. Pair again.",
      RATE_LIMITED: "Device limit reached. Remove a device on the computer, then try again.",
      FAILED: "Something went wrong. Try again.",
      NETWORK: "Cannot reach the computer. Check that it is awake and on the same network.",
    },
  },
  "zh-CN": {
    appTitle: "PI-Desktop",
    pairTitle: "配对此设备",
    pairHint: "在电脑的「设置 → 系统 → 局域网 WebUI」中点击「添加设备」,然后输入配对码。",
    codeLabel: "配对码",
    deviceLabel: "设备名称",
    pairSubmit: "配对",
    pairConnecting: "正在连接…",
    pairFormat: "请输入电脑上显示的六位数字。",
    pairRestart: "电脑仍在运行旧版配对服务。请完整退出并重启 PI-Desktop,再使用新码。",
    pairCookieBlocked: "配对码已验证,但浏览器没有保存登录状态。请允许此站点使用 Cookie,再使用新码。",
    pairFailed: "配对码错误或已过期,请在电脑上重新显示配对码。",
    pairClosed: "请先在电脑上显示配对码。",
    projects: "项目",
    temporary: "临时会话",
    search: "搜索",
    clearSearch: "清除搜索",
    showArchived: "已归档",
    noProjects: "没有本机项目。",
    noMatches: "没有匹配项。",
    noSessions: "还没有会话。",
    newSession: "新建会话",
    untitled: "未命名",
    back: "返回",
    more: "{name} 的更多操作",
    rename: "重命名",
    renamePrompt: "新名称",
    save: "保存",
    pin: "置顶",
    unpin: "取消置顶",
    archive: "归档",
    restore: "恢复",
    cancel: "取消",
    pinned: "已置顶",
    archived: "已归档",
    running: "运行中",
    waiting: "等待中",
    readOnly: "此处只读",
    loadOlder: "加载更早的消息",
    loading: "正在加载…",
    you: "你",
    assistant: "助手",
    tool: "工具",
    composer: "消息",
    selectModel: "选择模型",
    selectModelCurrent: "选择模型,当前:{name}",
    searchModels: "搜索模型",
    loadingModels: "正在加载模型…",
    savingModel: "正在切换模型…",
    noModels: "请在电脑的「设置 → 模型」中配置聊天模型。",
    retry: "重试",
    send: "发送",
    queue: "排队",
    stop: "停止",
    queued: "排队中",
    replyDone: "回复已完成",
    recent: "最近",
    conversations: "会话",
    archivedView: "已归档",
    noArchived: "没有已归档的内容。",
    newIn: "新建会话到",
    signOutConfirm: "断开此设备?重新连接需要新的配对码。",
    composerFollowUp: "排队追加消息",
    queueMessage: "排队发送",
    working: "正在处理…",
    steps: "{count} 个步骤",
    copy: "复制",
    copyCode: "复制代码",
    copied: "已复制",
    copyFailed: "无法复制,请长按文字手动选择。",
    imagePlaceholder: "图片",
    jumpLatest: "回到最新",
    cancelQueued: "取消排队消息",
    waitingApproval: "等待电脑上审批。",
    waitingInput: "需要在电脑上输入。",
    archivedSession: "该会话已归档,恢复后才能继续。",
    archivedProject: "该项目已归档,恢复项目后才能继续其中的会话。",
    restoreProject: "恢复项目",
    readOnlySession: "请在电脑上继续该会话。",
    offline: "连接已断开,正在重连…",
    signOut: "断开此设备",
    thisDevice: "本设备:{name}",
    errors: {
      BUSY: "回复仍在进行。可以排队发送,或先停止。",
      MODEL_BUSY: "请等当前任务和排队任务结束后再切换模型。",
      MODEL_UNAVAILABLE: "此模型已不可用,请刷新列表后重新选择。",
      CONFLICT: "已在其他设备上修改,已显示最新内容,请重试。",
      ARCHIVED: "请先恢复。",
      PERMISSION_CEILING_UNAVAILABLE: "电脑无法为此设备限制权限,消息未运行。请重试,或在电脑上继续。",
      READ_ONLY: "请在电脑上继续该会话。",
      FORBIDDEN: "此设备没有该权限。",
      NOT_FOUND: "该内容已不可用。",
      DESKTOP_UNAVAILABLE: "PI-Desktop 尚未就绪,请稍后重试。",
      PAYLOAD_TOO_LARGE: "消息过长。",
      UNAUTHORIZED: "此设备已退出,请重新配对。",
      RATE_LIMITED: "设备数量已达上限。请在电脑上移除一台设备后重试。",
      FAILED: "出错了,请重试。",
      NETWORK: "无法连接电脑,请确认电脑已唤醒且在同一网络。",
    },
  },
};