Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

23.4 KB
Raw Blame
// Every string of the app shell that the user sees, in one table: the start page and the system
// dialogs of the main process (choosing a folder, moving the data, the import, updates). Product
// names in dialog titles (DS Bot, DSH Desktop, DSH Web) are constants, not copy.
// docs/plans/2026-10-29-start-copy.md decides the keys and the layers; zh is the source, en
// mirrors it key by key with the same placeholders.
//
// A key is <layer>.<thing>[.<part>]; the layer says where the line is on screen:
//   voice   the whale's line: one line, at most 16 characters, no full stop (a question mark is fine)
//   say     a card's first line: at most 12 characters, no full stop
//   hint    the hint row: the one thing to know next, at most 22 characters, no full stop
//   card    card text: whole sentences ending in 。 or ?; card.<card>.<part>
//   reason  reasons reused in card text: whole sentences end in 。 (reason.place.*,
//           reason.start.*), fragments set into a sentence have no punctuation (reason.copy.*)
//   btn     buttons: at most 10 characters, a verb first; one that opens a system picker or
//           leaves the card ends in …; no full stop
//   note    card footnotes: one sentence ending in 。 that says where to change it later
//   foot    the footer row: no full stop
//   status  screen readers only: no full stop
//   dialog  system dialogs: sentences ending in 。 or ?, picker titles without a full stop
//
// Placeholders are {name}; paths, sizes, names and versions come from the snapshot or the
// caller, never from here. {name|one|many} picks the English singular or plural by the value.
export const TEXT = {
  zh: {
    // voice
    'voice.watchdog': '等太久了,要不要重试?',
    'voice.failed': 'DS Bot 没能启动',
    'voice.viewFailed': '团队界面没有加载出来',
    // say
    'say.space': '{drive} 盘有点挤',
    'say.permission': '这里不让我放东西',
    'say.rejected': '这里放不了',
    'say.picked': '我多加了一层文件夹',
    'say.missing': '数据不在原来的地方了',
    'say.importSpace': '地方不够放',
    'say.inUse': 'DeepSeek Harness 还在用这个团队',
    'say.newer': '这些对话比我新',
    'say.move': '搬到这个文件夹?',
    'say.moveFailed': '没有搬成',
    // hint
    'hint.space': '{drive} 盘只剩 {free}',
    // card
    'card.recommend.ask': '放到 {rec} 盘(剩 {recFree})?',
    'card.missing.lead': '找不到数据文件夹 {path}。可能是移动硬盘没插上,或者文件夹被移走、删除了。旧数据不会被改动。',
    'card.missing.retryMissed': '还是找不到这个文件夹。',
    'card.picked.lead': '会放在 {path}。',
    'card.move.lead': '会把数据复制到 {path},然后重新启动。原来的 {dataDir} 原样留着,确认没问题后可以自己删掉。',
    'card.moveFailed.inUse': '另一个 DeepSeek Harness 正在使用这份数据。关掉它以后,这里会自动接着搬。',
    'card.moveFailed.copy': '数据没有复制完:{reason}。',
    'card.moveFailed.stay': '原来的 {dataDir} 没有变化。',
    'card.import.extra': '复制后会多占 {total},DeepSeek Harness 里的原件不动。',
    'card.import.line': '找到你以前的团队了:{bots} 个 Bot、{groups} 个群聊',
    'card.import.extraBare': 'DeepSeek Harness 里的原件不动,复制以后两边各用各的。',
    'card.import.model': '模型设置:{model}',
    'card.import.optRegen': '不复制可以重新生成的文件夹',
    'card.import.optSkipWork': '先不复制工作文件',
    'card.importSpace.lead': '空间不够:复制要约 {need},{drive} 盘只剩 {free},还差 {short}。',
    'card.inUse.lead': '请完全退出 DSH Desktop(任务栏右下角的托盘图标也要退出),并关掉 DSH Web,这里会自动继续。',
    'card.newerUpdating.lead': 'DS Bot {version} 能读它们,正在下载({p}%)。装好后会重新打开,再复制团队。',
    'card.newer.lead': '这些对话是更新版本的 DeepSeek Harness 写的,DS Bot 现在读不了。',
    'card.importFailed.lead': '团队没有复制完:{reason}。DeepSeek Harness 里的团队没有变化。',
    'card.importFailed.do': '可以重试,或者先不带团队开始,以后在 设置 → 通用 → 位置 里再复制。',
    'card.viewFailed.lead': '引擎已经起来了,但团队界面 20 秒内没有画出来。',
    'card.viewFailed.do': '重新载入一次;还不行,就复制详细信息去反馈。',
    'card.update.available': 'DS Bot {version} 已经发布,可能修好了这个问题。',
    'card.update.downloading': '正在下载 {version}({p}%,{a}/{b} MB)',
    'card.update.installing': '正在安装,装好后会重新打开。',
    'card.update.failed': '下载失败。',
    'card.update.slow': '下载太慢?',
    // reason
    'reason.place.space': '{drive} 盘只剩 {free}。',
    'reason.place.permission': 'DS Bot 没有权限在 {path} 里写文件。',
    'reason.place.onedrive': '{path} 在 OneDrive 里,同步会打断正在写入的对话。',
    'reason.place.foreign': '{path} 里已经有别的文件。',
    'reason.place.dsh': '{path} 是 DeepSeek Harness 的数据。',
    'reason.place.program': '{path} 在程序文件夹里,卸载时会删掉。',
    'reason.place.nested': '{path} 和现在放数据的位置重叠。',
    'reason.place.drive': '{path} 是整块磁盘,要选它里面的一个文件夹。',
    'reason.place.workspace': '{path} 和总工作区互相包含。',
    'reason.start.permission': '没有写入权限。',
    'reason.start.space': '磁盘空间不够。',
    'reason.start.files': '程序文件不完整,可能被杀毒软件拦掉了一部分。',
    'reason.start.engine': '本机引擎启动到一半停下了。',
    'reason.start.other': '出了点意外。',
    'reason.start.missing': '找不到放数据的文件夹,可能是移动硬盘没插上。',
    'card.failed.do.permission': '给这个文件夹写入权限后重试。',
    'card.failed.do.space': '清理出一些空间后重试。',
    'card.failed.do.files': '重新安装 DS Bot 后再打开。',
    'card.failed.do.engine': '先重试一次;还不行,就复制详细信息去反馈。',
    'card.failed.do.other': '先重试一次;还不行,就复制详细信息去反馈。',
    'card.failed.do.missing': '插上那块硬盘,或者把文件夹放回原处后重试。',
    'reason.copy.inUse': '文件被别的程序占用',
    'reason.copy.permission': '没有权限读取',
    'reason.copy.full': '磁盘满了',
    'reason.copy.other': '出了点意外',
    // btn
    'btn.retry': '重试',
    'btn.wait': '继续等待',
    'btn.freshStart': '用新的空白团队开始…',
    'btn.useRec': '放到 {rec} 盘',
    'btn.keepDrive': '仍然放在 {drive} 盘',
    'btn.otherPlace': '其他位置…',
    'btn.pickPlace': '选择其他位置…',
    'btn.changePlace': '换个位置…',
    'btn.relocate': '重新找到它…',
    'btn.continue': '继续',
    'btn.repick': '重新选…',
    'btn.copy': '复制过来',
    'btn.skipCopy': '先不复制',
    'btn.more': '详细',
    'btn.changeModel': '更换',
    'btn.startWithout': '先不带团队开始',
    'btn.copyDetails': '复制详细信息',
    'btn.copied': '已复制',
    'btn.saveLog': '保存日志…',
    'btn.details': '详细信息',
    'btn.manualDownload': '手动下载',
    'btn.reload': '重新载入',
    'btn.move': '移动并重启',
    'btn.startOld': '用原来的位置启动',
    'btn.cancel': '取消',
    'btn.quit': '退出',
    'btn.restart': '立即重启',
    'btn.download': '下载',
    'btn.notNowRestart': '先不重启',
    'btn.notNowDownload': '先不下载',
    'btn.ok': '确定',
    // note
    'note.changeLater': '以后可以在 设置 → 通用 → 位置 里改。',
    'note.copyLater': '也可以在 设置 → 通用 → 位置 里复制。',
    'note.copyAgain': '以后可以在 设置 → 通用 → 位置 里复制。',
    // foot
    'foot.place.drive': '数据放在 {drive} 盘(剩 {free})',
    'foot.place.driveOnly': '数据放在 {drive} 盘',
    'foot.place.path': '数据放在 {path}(剩 {free})',
    'foot.place.pathOnly': '数据放在 {path}',
    // status
    'status.track': '启动进度',
    'status.phase.data': '准备数据文件夹',
    'status.phase.import': '复制以前的团队',
    'status.phase.engine': '启动本机引擎',
    'status.phase.team': '打开团队',
    'status.state.pending': '未开始',
    'status.state.active': '进行中',
    'status.state.done': '已完成',
    'status.state.failed': '没有完成',
    'status.sr.active': '{phase}:进行中',
    'status.sr.done': '{phase}:已完成',
    // dialog
    'dialog.pickRoot': '选择 DS Bot 放数据的位置',
    'dialog.pickMove': '选择 DS Bot 数据的新文件夹',
    'dialog.pickCookies': '选择 cookie 文件',
    'dialog.saveAs': '保存下载的文件',
    'dialog.saveLog': '保存日志',
    // The app's own picker (preload.cjs showPicker): labels, then what went wrong, in place.
    'picker.places': '位置',
    'picker.drives': '磁盘',
    'picker.home': '主文件夹',
    'picker.desktop': '桌面',
    'picker.documents': '文档',
    'picker.downloads': '下载',
    'picker.path': '路径',
    'picker.go': '前往',
    'picker.up': '上一级',
    'picker.newFolder': '新建文件夹',
    'picker.newName': '新建文件夹',
    'picker.create': '新建',
    'picker.name': '文件名',
    'picker.cancel': '取消',
    'picker.chooseFolder': '选择这个文件夹',
    'picker.open': '打开',
    'picker.save': '保存',
    'picker.replace': '替换',
    'picker.loading': '正在读取',
    'dialog.picker.empty': '这个文件夹是空的。',
    'dialog.picker.noFolders': '这里没有文件夹。',
    'dialog.picker.more': '这里只列出前 {count} 项。',
    'dialog.picker.missing': '找不到这个文件夹。',
    'dialog.picker.drive': '这个磁盘现在不在。请连接它,或者换一个位置。',
    'dialog.picker.denied': '没有权限打开这个文件夹。',
    'dialog.picker.notFolder': '这不是一个文件夹。',
    'dialog.picker.notFile': '请选择一个文件。',
    'dialog.picker.tooLong': '这个路径太长,打不开。',
    'dialog.picker.unreadable': '这个文件夹打不开。',
    'dialog.picker.name': '这个名字不能用作文件名。',
    'dialog.picker.exists': '已经有同名的文件夹了。',
    'dialog.picker.isFolder': '这里有一个同名的文件夹,请换个名字。',
    'dialog.picker.replace': '已经有「{name}」了。要替换它吗?',
    'dialog.move.inDsh': '请选择 DeepSeek Harness 数据({home})以外的文件夹。',
    'dialog.move.inProgram': '请选择程序文件夹以外的位置:卸载时会删掉程序文件夹。',
    'dialog.move.drive': '请选择一个文件夹,不要选整个磁盘。',
    'dialog.move.nested': '请选择现在的数据文件夹以外的位置。',
    'dialog.move.workspace': '数据文件夹和总工作区不能互相包含。',
    'dialog.move.notEmpty': '请选择一个空文件夹,或者新建一个。',
    'dialog.move.confirm': '把 DS Bot 的数据移到 {to} 吗?',
    'dialog.move.detail': 'DS Bot 会把数据复制过去,然后重新启动。{from} 会原样保留,确认一切正常后可以自己删掉。',
    'dialog.move.inUse': '另一个 DeepSeek Harness 正在使用这份数据,所以没有移动。请先关掉它,再重试。',
    'dialog.move.failed': '数据没有复制成功:{message}\n\nDS Bot 会继续使用原来位置的数据。',
    'dialog.update.ready': 'DS Bot {version} 已经下载好。',
    'dialog.update.readyDetail': '现在重启就能更新;不重启的话,下次退出时安装。',
    'dialog.update.available': 'DS Bot {version} 已经发布。',
    'dialog.update.availableDetail': '这个版本不能自己更新。请到发布页下载新版,再用它替换「应用程序」里的 DS Bot。',
    'dialog.update.onFailure': 'DS Bot {version} 下载完会自动安装,然后重新打开。',
    'dialog.update.onFailurePage': 'DS Bot {version} 已经发布。关掉这个对话框后,会打开它的下载页面。',
  },
  en: {
    // voice
    'voice.watchdog': 'This is taking too long. Try again?',
    'voice.failed': 'DS Bot couldn’t start',
    'voice.viewFailed': 'The team view didn’t load',
    // say
    'say.space': 'Drive {drive} is a bit full',
    'say.permission': 'I’m not allowed to put things here',
    'say.rejected': 'That place won’t work',
    'say.picked': 'I added one more folder',
    'say.missing': 'Your data isn’t where it was',
    'say.importSpace': 'Not enough room',
    'say.inUse': 'DeepSeek Harness is still using this team',
    'say.newer': 'These chats are newer than me',
    'say.move': 'Move the data here?',
    'say.moveFailed': 'The data didn’t move',
    // hint
    'hint.space': 'Only {free} left on drive {drive}',
    // card
    'card.recommend.ask': 'Put it on drive {rec} ({recFree} free)?',
    'card.missing.lead': 'Can’t find the data folder {path}. The external drive may be unplugged, or the folder was moved or deleted. The old data won’t be changed.',
    'card.missing.retryMissed': 'Still can’t find this folder.',
    'card.picked.lead': 'It will go in {path}.',
    'card.move.lead': 'DS Bot copies its data to {path} and starts again. {dataDir} stays as it is; once all is well you can delete it yourself.',
    'card.moveFailed.inUse': 'Another DeepSeek Harness is using this data. Once it is closed, the move goes on by itself.',
    'card.moveFailed.copy': 'The data wasn’t fully copied: {reason}.',
    'card.moveFailed.stay': '{dataDir} is unchanged.',
    'card.import.extra': 'The copy takes another {total}; the originals in DeepSeek Harness stay untouched.',
    'card.import.line': 'Found your old team: {bots|Bot|Bots}, {groups|group chat|group chats}',
    'card.import.extraBare': 'The originals in DeepSeek Harness stay untouched; after the copy each side goes its own way.',
    'card.import.model': 'Model settings: {model}',
    'card.import.optRegen': 'Skip folders that can be regenerated',
    'card.import.optSkipWork': 'Don’t copy work files yet',
    'card.importSpace.lead': 'Not enough space: the copy needs about {need}, drive {drive} has {free} left, {short} short.',
    'card.inUse.lead': 'Quit DSH Desktop completely (its tray icon at the bottom right of the taskbar too) and close DSH Web; this continues by itself.',
    'card.newerUpdating.lead': 'DS Bot {version} can read them and is downloading ({p}%). After installing it reopens and copies the team.',
    'card.newer.lead': 'These chats were written by a newer DeepSeek Harness, which DS Bot can’t read yet.',
    'card.importFailed.lead': 'The team wasn’t fully copied: {reason}. The team in DeepSeek Harness is unchanged.',
    'card.importFailed.do': 'Try again, or start without the team and copy it later in Settings → General → Location.',
    'card.viewFailed.lead': 'The engine is up, but the team view didn’t draw within 20 seconds.',
    'card.viewFailed.do': 'Reload it; if it still doesn’t show, copy the details and report it.',
    'card.update.available': 'DS Bot {version} is out and may fix this.',
    'card.update.downloading': 'Downloading {version} ({p}%, {a}/{b} MB)',
    'card.update.installing': 'Installing; it reopens when done.',
    'card.update.failed': 'The download failed.',
    'card.update.slow': 'Download too slow?',
    // reason
    'reason.place.space': 'Only {free} left on drive {drive}.',
    'reason.place.permission': 'DS Bot can’t write files in {path}.',
    'reason.place.onedrive': '{path} is in OneDrive; syncing interrupts chats while they are being written.',
    'reason.place.foreign': '{path} already has other files in it.',
    'reason.place.dsh': '{path} is DeepSeek Harness’s data.',
    'reason.place.program': '{path} is in the program folder, which uninstalling removes.',
    'reason.place.nested': '{path} overlaps where the data is now.',
    'reason.place.drive': '{path} is a whole drive; choose a folder on it.',
    'reason.place.workspace': '{path} and the team workspace contain each other.',
    'reason.start.permission': 'No permission to write.',
    'reason.start.space': 'Not enough disk space.',
    'reason.start.files': 'Program files are incomplete; antivirus software may have blocked some of them.',
    'reason.start.engine': 'The local engine stopped halfway through starting.',
    'reason.start.other': 'Something unexpected happened.',
    'reason.start.missing': 'The data folder can’t be found; the external drive may be unplugged.',
    'card.failed.do.permission': 'Allow writing to this folder and try again.',
    'card.failed.do.space': 'Free up some space and try again.',
    'card.failed.do.files': 'Reinstall DS Bot and open it again.',
    'card.failed.do.engine': 'Try again; if it still fails, copy the details and report it.',
    'card.failed.do.other': 'Try again; if it still fails, copy the details and report it.',
    'card.failed.do.missing': 'Plug the drive back in, or put the folder back, and try again.',
    'reason.copy.inUse': 'a file is in use by another program',
    'reason.copy.permission': 'no permission to read',
    'reason.copy.full': 'the disk is full',
    'reason.copy.other': 'something unexpected happened',
    // btn
    'btn.retry': 'Try again',
    'btn.wait': 'Keep waiting',
    'btn.freshStart': 'Start with a new blank team…',
    'btn.useRec': 'Put it on drive {rec}',
    'btn.keepDrive': 'Keep it on drive {drive}',
    'btn.otherPlace': 'Another location…',
    'btn.pickPlace': 'Choose another location…',
    'btn.changePlace': 'Change the location…',
    'btn.relocate': 'Find it again…',
    'btn.continue': 'Continue',
    'btn.repick': 'Choose again…',
    'btn.copy': 'Copy them over',
    'btn.skipCopy': 'Don’t copy yet',
    'btn.more': 'Details',
    'btn.changeModel': 'Change',
    'btn.startWithout': 'Start without the team',
    'btn.copyDetails': 'Copy details',
    'btn.copied': 'Copied',
    'btn.saveLog': 'Save log…',
    'btn.details': 'Details',
    'btn.manualDownload': 'Download manually',
    'btn.reload': 'Reload',
    'btn.move': 'Move and restart',
    'btn.startOld': 'Start in the old folder',
    'btn.cancel': 'Cancel',
    'btn.quit': 'Quit',
    'btn.restart': 'Restart now',
    'btn.download': 'Download',
    'btn.notNowRestart': 'Not now',
    'btn.notNowDownload': 'Not now',
    'btn.ok': 'OK',
    // note
    'note.changeLater': 'You can change this later in Settings → General → Location.',
    'note.copyLater': 'You can also copy the team in Settings → General → Location.',
    'note.copyAgain': 'You can copy the team later in Settings → General → Location.',
    // foot
    'foot.place.drive': 'Data on drive {drive}, {free} free',
    'foot.place.driveOnly': 'Data on drive {drive}',
    'foot.place.path': 'Data in {path}, {free} free',
    'foot.place.pathOnly': 'Data in {path}',
    // status
    'status.track': 'Start progress',
    'status.phase.data': 'Prepare the data folder',
    'status.phase.import': 'Copy your old team',
    'status.phase.engine': 'Start the local engine',
    'status.phase.team': 'Open the team',
    'status.state.pending': 'Not started',
    'status.state.active': 'In progress',
    'status.state.done': 'Done',
    'status.state.failed': 'Not finished',
    'status.sr.active': '{phase}: in progress',
    'status.sr.done': '{phase}: done',
    // dialog
    'dialog.pickRoot': 'Choose where DS Bot keeps its data',
    'dialog.pickMove': 'Choose a new folder for DS Bot’s data',
    'dialog.pickCookies': 'Choose a cookie file',
    'dialog.saveAs': 'Save the download',
    'dialog.saveLog': 'Save the log',
    'picker.places': 'Places',
    'picker.drives': 'Drives',
    'picker.home': 'Home',
    'picker.desktop': 'Desktop',
    'picker.documents': 'Documents',
    'picker.downloads': 'Downloads',
    'picker.path': 'Path',
    'picker.go': 'Go',
    'picker.up': 'Up one level',
    'picker.newFolder': 'New folder',
    'picker.newName': 'New folder',
    'picker.create': 'Create',
    'picker.name': 'File name',
    'picker.cancel': 'Cancel',
    'picker.chooseFolder': 'Choose this folder',
    'picker.open': 'Open',
    'picker.save': 'Save',
    'picker.replace': 'Replace',
    'picker.loading': 'Reading',
    'dialog.picker.empty': 'This folder is empty.',
    'dialog.picker.noFolders': 'There are no folders here.',
    'dialog.picker.more': 'Only the first {count} items are listed.',
    'dialog.picker.missing': 'This folder does not exist.',
    'dialog.picker.drive': 'This drive is not there. Connect it, or choose another place.',
    'dialog.picker.denied': 'You don’t have permission to open this folder.',
    'dialog.picker.notFolder': 'This is not a folder.',
    'dialog.picker.notFile': 'Choose a file.',
    'dialog.picker.tooLong': 'This path is too long to open.',
    'dialog.picker.unreadable': 'This folder can’t be opened.',
    'dialog.picker.name': 'This name can’t be used for a file.',
    'dialog.picker.exists': 'A folder with this name already exists.',
    'dialog.picker.isFolder': 'A folder here has this name. Choose another name.',
    'dialog.picker.replace': '{name} already exists. Do you want to replace it?',
    'dialog.move.inDsh': 'Choose a folder outside the DeepSeek Harness data ({home}).',
    'dialog.move.inProgram': 'Choose a place outside the program folder: uninstalling removes the program folder.',
    'dialog.move.drive': 'Choose a folder, not a whole drive.',
    'dialog.move.nested': 'Choose a place outside the current data folder.',
    'dialog.move.workspace': 'The data folder and the team workspace cannot hold each other.',
    'dialog.move.notEmpty': 'Choose an empty folder or make a new one.',
    'dialog.move.confirm': 'Move DS Bot’s data to {to}?',
    'dialog.move.detail': 'DS Bot copies its data there and starts again. {from} stays as it is; you can delete it yourself once everything works.',
    'dialog.move.inUse': 'Another DeepSeek Harness is using this data, so it was not moved. Close it, then try again.',
    'dialog.move.failed': 'The data was not copied: {message}\n\nDS Bot goes on with its data where it was.',
    'dialog.update.ready': 'DS Bot {version} has finished downloading.',
    'dialog.update.readyDetail': 'Restart now to update; if you don’t, it installs the next time you quit.',
    'dialog.update.available': 'DS Bot {version} is out.',
    'dialog.update.availableDetail': 'This version can’t update itself. Download the new version from its release page, then replace DS Bot in Applications with it.',
    'dialog.update.onFailure': 'DS Bot {version} installs itself when its download is done, and then opens again.',
    'dialog.update.onFailurePage': 'DS Bot {version} is out. Once this box is closed, its download page opens.',
  },
}

const PLACEHOLDER = /\{(\w+)(?:\|([^|}]*)\|([^}]*))?\}/gu

/** Fill {name} and {name|one|many} from vars; a placeholder without a value stays as it is. */
export function fill(text, vars) {
  return text.replace(PLACEHOLDER, (all, name, one, many) => {
    if (!(name in vars)) return all
    const value = String(vars[name])
    return one === undefined ? value : `${value} ${value === '1' ? one : many}`
  })
}

export function t(lang, key, vars) {
  const text = TEXT[lang]?.[key] ?? TEXT.zh[key] ?? key
  return vars ? fill(text, vars) : text
}

export const langOf = locale => (String(locale ?? '').toLowerCase().startsWith('zh') ? 'zh' : 'en')