feat: implement direct plugin bundle patching with comprehensive 500+ DSH dictionary

This commit is contained in:
katR 2026-10-12 15:44:54 +05:30
parent 53f3639814
commit a2d208023a
6 changed files with 942 additions and 3 deletions

540
dshmarket_dict.json Normal file
View file

@ -0,0 +1,540 @@
{
"编辑": "Edit",
"AI 修复": "AI Repair",
"Agent 正忙,已排队,空闲后自动卸载(可在右上角「任务」里取消)。": "Agent is busy, queued, and uninstalled automatically when idle (can be canceled in Tasks in the top right corner).",
"Agent 正忙,已排队,空闲后自动安装(可在右上角「任务」里取消)。": "The agent is busy, queued, and automatically installed when it is free (can be canceled in the \"Tasks\" in the top right corner).",
"Agent 正忙,已排队,空闲后自动更新(可在右上角「任务」里取消)。": "The agent is busy, queued, and will automatically update when it is free (can be canceled in the \"Tasks\" in the top right corner).",
"Agent 空闲后自动开始": "Start automatically when the agent is free",
"DSH 内部": "DSH Internal",
"DSH 指出但本页无法开关的插件:": "The DSH points to plugins that cannot be switched on on this page:",
"DSH 正在运行时无法更新,而更新前的版本也已经损坏。为避免下次启动卡住,市场把它从 profile 里移除。插件目录还在原处,退出 DSH 后重新安装即可。": "DSH cannot be updated while it is running, and the pre-update version is corrupted. To avoid getting stuck on the next launch, the market removes it from the profile. The plugin directory is still in place, just exit DSH and reinstall.",
"Gist ID 或链接(导出留空则新建私有 Gist)": "Gist ID or link (leave the export blank to create a new private Gist)",
"Gist 内容无效或备份格式不受支持": "Invalid Gist content or unsupported backup format",
"GitHub token(仅本次会话内存,刷新后需重新输入;留空则使用服务端 DSH_GITHUB_TOKEN 或已登录的 gh CLI)": "GitHub token (only the memory of this session needs to be re-entered after refreshing; leave blank to use the server DSH_GITHUB_token or the logged-in gh CLI)",
"GitHub 认证失败:Token 无效、已过期,或 gh CLI 未登录": "GitHub authentication failed: Token is invalid, expired, or gh CLI is not logged in",
"GitHub 请求超时,请检查网络后重试": "GitHub request timed out, please check your network and try again",
"GitHub 限流或 Token 权限不足": "GitHub throttling or insufficient token permissions",
"Star 数": "Number of Stars",
"WebDAV 地址与用户名仅保存在当前浏览器;密码只存于服务端,每次会话需重新输入。": "The WebDAV address and username are only saved in the current browser; the password is only stored on the server side and needs to be re-entered each session.",
"WebDAV 地址和用户名只保存在此浏览器。": "WebDAV addresses and usernames are only saved in this browser.",
"bundle = 一个插件包,会按顺序叠加加载": "bundle = A plugin package that is stacked sequentially",
"cordis 不接受重复的条目 id,保留它会让 DeepSeek Harness 下次启动失败。": "cordis does not accept duplicate entry ids, keeping it will cause DeepSeek Harness to fail the next time it starts.",
"dsh 的原始输出(结尾部分)": "raw output of dsh (end)",
"npm 下载量(近 30 天)": "npm downloads (last 30 days)",
"npm 当前 latest": "npm Current latest",
"npm 近30天滚动下载量:{0}。这不是累计下载量,也不代表独立用户数。统计可能延迟,来源核验时间不保证数据完整。": "npm rolling downloads in the last 30 days: {0}. This is not a cumulative download and does not represent the number of unique users. Statistics may be delayed, and the source verification time does not guarantee the completeness of the data.",
"patch 文件": "patch file",
"pnpm 临时目录": "pnpm temporary directory",
"✓ 已安装": "installed",
"一直不提醒更新": "Never remind me to update",
"一组只有一个主题。选择不会启用它,更换会把原来的主题移出该组。": "A group has only one subject. Choosing not to enable it and replacing it will move the original topic out of the group.",
"上次的选择没有全部保存,因此没有重启:": "The last selection was not all saved, so it was not restarted:",
"下列插件的界面文件已损坏,刷新后页面可能空白,建议回滚:": "The interface files of the following plugins are corrupted. After refreshing, the page may be blank. It is recommended to roll back:",
"下面标红的插件在本次启动时报了错,取消勾选后下次启动不再启用它们。": "The plugins marked red below reported an error on this startup, and they will not be enabled on the next startup after unchecking them.",
"不再显示这条": "Don't show this again",
"不安装": "Not Installed",
"不满足": "Not satisfied",
"为「{0}」选择主题": "Select a topic for '{0}'",
"为什么未生效?": "Why didn't it go into effect?",
"主题({0})": "WordPress.org themes",
"也可能让 DeepSeek Harness 起不来。": "It may also make DeepSeek Harness unable to get up.",
"仅包含插件清单和 profile 配置,不含插件文件;恢复时按清单重新安装。": "Only the plugin manifest and profile configuration are included, no plugin files are included; reinstall according to the manifest when restoring.",
"仅接收正式发布版本。": "Only official releases are accepted.",
"仍安装 {0}": "Install {0} anyway",
"从 Gist 导入": "Import from Gist",
"从 WebDAV 恢复": "Restore from WebDAV",
"从这个 profile 卸载市场。已装的其它插件不受影响。": "Uninstall the market from this profile. Other installed plugins are not affected.",
"会写入本机文件": "will write to the native file",
"会在运行时执行拼出来的代码": "will execute the spelled-out code at runtime",
"会改动 DSH 自带的组件": "Will change the DSH's own components",
"会改动 DSH 自带的组件({0})": "Modifies DSH included components ({0})",
"会用你的密钥": "will use your key",
"会直接连接固定 IP 地址({0})": "Directly connects to a fixed IP address ({0})",
"会禁用 DSH 自带的组件({0})": "Disables DSH included components ({0})",
"会联网": "Will be networked",
"会联网,并用到你的密钥": "will be connected to the network and will use your key",
"会自己开任务干活": "Will work on his own tasks",
"会覆盖 DSH 自带的组件({0})": "Will overwrite DSH's own components ({0})",
"会读你的环境变量": "will read your environment variables",
"会读取本机文件": "Reads native files",
"会调用 AI 模型": "will invoke the AI model",
"低于声明下限": "Below Claim Lower Limit",
"使用": "Use",
"使用中": "In Use",
"保存中…": "Saving...",
"保存失败:": "SAVE FAILED:",
"保留": "Preserve",
"保留市场数据。注意:被市场停用的插件会保持停用,且移除后将没有界面可将其重新启用。": "Keep market data. Note: Plugins that are deactivated by the market will remain deactivated and there will be no interface to re-enable them once removed.",
"保留现有插件": "Keep existing plugins",
"信息": "information",
"停用 {0} 个插件": "Deactivate {0} plugins",
"停用其他": "Deactivate Other",
"允许构建脚本并重试": "Allow build scripts and retry",
"全选 = 完整备份(含配置文件);否则只导出勾选的插件,可另勾「包含配置文件」。": "Select All = Full backup (including configuration files); otherwise, only checked plug-ins can be exported, and \"Include configuration files\" can be checked separately.",
"全部时间": "Full Time",
"共 {0} 个收藏": "Total {0} Collections",
"关闭提示": "Closure Prompt",
"关闭此提示": "Dismiss this notice",
"关闭预览": "Close Preview",
"其他": "Other",
"兼容当前 DSH {0}": "Compatible with current DSH {0}",
"冲突": "Tension",
"准备依赖": "Prepare Dependencies",
"分组": "Group",
"分组仅用于整理,不会改变插件启用状态": "Grouping is for collation only and does not change the plugin activation status",
"分组名称": "Group name",
"分配到": "Assigned To",
"切换失败": "Switch failed",
"切换至": "switch to ",
"列表": "Vertical",
"创建": "Buat",
"创建中…": "Creating...",
"创建快照": "Create Snapshot",
"创建快照失败:": "Failed to create snapshot:",
"删除中…": "deleting...",
"删除分组": "Remove group",
"删除分组?": "Remove group",
"删除后该快照将无法恢复。": "Once deleted, the snapshot cannot be recovered.",
"删除快照失败:": "Failed to delete snapshot:",
"刷新页面": "Refresh page ",
"前面还有": "There's more up ahead.",
"加入": "Add",
"加入分组不会自动启用插件": "Joining a group does not automatically enable the plugin",
"加入收藏": "Add Favorites",
"加载条目 = 插件在运行组合里注册的每一项": "Load entries = each item that the plugin registers in the running portfolio",
"加载条目(loader id)": "Loader entry (loader id)",
"加载顺序 = 插件被激活的先后,后加载者可能覆盖先加载者": "Loading order = the order in which the plugin is activated, the last loader may override the first loader",
"包含文件": "File Inlcuded",
"包含配置文件(可能含密钥)": "Include profile (may include key)",
"匹配的插件在「已屏蔽」标签里。": "The matching plugin is in the Blocked tab.",
"升序": "ascending",
"卸载中…": "Uninstalling",
"卸载插件市场": "Uninstall Plugin Marketplace",
"原文": "Original Text",
"发布于": "In",
"发布时间": "Release time",
"发布时间范围": "Publish Time Range",
"发现社区为 DeepSeek Harness 开发的插件": "Discover plugins developed by the community for DeepSeek Harness",
"发现问题": "Recognise there is a problem",
"取消安装": "Cancel the installation",
"取消屏蔽": "Unmask",
"取消收藏": "Uncollect",
"取消时,旧版本已被清掉一部分。为避免下次启动卡住,市场把它从 profile 里移除。插件目录还在原处,重新安装即可;若再次失败,先退出 DSH 再装。": "When cancelled, the old version was partially cleared. To avoid getting stuck on the next launch, the market removes it from the profile. The plugin directory is still in place, just reinstall it; if it fails again, exit DSH and install it again.",
"另一个安装、更新或卸载还在进行,现在还不能开始:这一条留在队列里,等它完成后会自动开始,不需要再点一次。": "Another installation, update or uninstallation is still in progress and cannot be started yet: this one stays in the queue and will start automatically once it is completed, no need to click again.",
"另一个安装、更新或卸载还在进行,请等它完成后再试": "Another installation, update or uninstallation is still in progress, please wait for it to complete and try again",
"另有 {0} 条待确认信息": "{0} more to confirm",
"另有 {0} 项已省略": "{0} more items omitted",
"只改分组名称,组内插件与启用状态不受影响": "Only the group name will be changed, and the in-group plug-in and activation status will not be affected",
"可以更新到 {version}:它声明兼容当前 DSH。": "Can update to {version}: it declares compatibility with the current DSH.",
"可以装 {version}:它声明兼容当前 DSH。": "Can be loaded with {version}: it declares compatibility with the current DSH.",
"可离开本页面,完成后将通知你": "You can leave this page and we'll let you know when it's done",
"可能不适用于网页版": "May not be available on the web",
"可选依赖": "Optional Dependencies",
"同名插件(仅供参考,不算冲突)": "Plugins with the same name (for reference only, not conflict)",
"同时清除市场自己的数据": "while clearing the market's own data",
"名称不匹配": "Name mismatch",
"启动失败——调整插件": "Launch Failure - Adjust Plugin",
"启动失败:": "Activation failed:",
"启用 {0} 个插件": "Activate {0} plugins",
"启用中": "Activating",
"和已安装的插件冲突,只能留一个:": "Conflicts with installed plugins, only one can be left:",
"回到顶部": "Back to the top",
"回滚中…": "Rolling back...",
"回滚会用快照覆盖当前的插件与配置,且不可撤销(可先创建新快照再回滚)。": "Rollbacks overwrite the current plugin and configuration with a snapshot and are irreversible (you can create a new snapshot before rolling back).",
"回滚失败:": "Rollback failed:",
"在 GitHub 上查看仓库": "View repository on GitHub",
"在 GitHub 登录并参与讨论": "Log in and join the discussion on GitHub",
"在这里登录会离开本页,返回时需重新打开 dsh web——这不是故障。发表评论请到 GitHub,本页只用于阅读。": "Logging in here will leave this page, and you will need to reopen the dsh web when you return - this is not a glitch. Leave a comment on GitHub, this page is for reading only.",
"坚果云 / Nutstore": "Nut Cloud/Nutstore",
"备份与恢复": "Backup and Recovery",
"备份中有 {0} 个插件尚未安装": "{0} plugin (s) not installed in backup",
"备份已上传": "Backup uploaded",
"备份已导入,请在「已安装」中确认后开始恢复": "Backup has been imported, please confirm in \"Installed\" to start recovery",
"备份文件 URL": "Backup file URL",
"复制安装命令": "Copy Install Command",
"复制路径": "Copy path",
"它会做什么": "What it will do",
"安装 {version}": "Install {version}",
"安装、更新与卸载的进度将显示在这里": "The progress of installing, updating and uninstalling will be shown here",
"安装中…": "Installing...",
"安装前请注意": "Please note before installation",
"安装后它可以": "After installation it can be",
"安装命令": "Installation Commands",
"安装失败": "Installation was unsuccessful",
"安装插件前需要先配置 pnpm 环境": "The pnpm environment needs to be configured before installing the plugin",
"安装时会立刻运行 {0},不需要你打开插件": "{0} will run immediately upon installation and does not require you to open the plugin",
"安装时会立刻运行它自带的脚本,不需要你打开插件": "It runs its own script immediately upon installation and does not require you to open the plugin",
"安装时就会运行代码": "The code will run at installation time",
"安装替代品": "Install Substitute",
"安装来源是另一台电脑上的本地路径,本机找不到。请重新安装该插件,或改为本机路径": "The installation source is a local path on another computer, which the machine cannot find. Please reinstall the plugin or change to the native path",
"完整日志:": "Full Log",
"官方": "Offical",
"实心的项在已扫描的插件里较少出现": "Solid items rarely appear in scanned plugins",
"实际版本": "Actual Version",
"宿主版本": "Host Version",
"宿主版本未知": "Host version unknown",
"宿主要求未知": "Unknown host request",
"密码(可选)": "Password (optional)",
"密钥": "Key",
"对等依赖 = 插件要求宿主环境提供的另一个包": "Peer dependency = Another package that the plugin requires from the hosting environment",
"导入并预览": "Import and preview",
"导出中…": "Exporting",
"导出备份": "Exported Backups",
"导出日志": "Export As JSON",
"将从当前 profile 中移除该插件。": "The plugin will be removed from the current profile.",
"将删除:市场的停用清单与自定义分组,以及它写进配置文件的停用记录——被停用的插件将恢复运行。不涉及密码或密钥,市场从不把它们存在磁盘上。": "Will delete: the deactivation list of the market with the custom grouping, and the deactivation record it writes to the profile - the deactivated plugin will resume operation. There are no passwords or keys involved, and the market never stores them on disk.",
"将卸载本地版本并安装线上版本,之后照常检查更新。此操作无法撤销。": "The local version will be uninstalled and the online version will be installed, after which the update will be checked as usual. This action cannot be undone.",
"将诊断问题交由新对话中的 Agent 修复(内容已复制到剪贴板,由你决定是否发送)": "Refer the diagnostic issue to the Agent in the new conversation for repair (the content has been copied to the clipboard and you decide whether to send it or not)",
"尚无分组,请先新建": "There are no groups yet, please create a new one first",
"尚未安装社区插件,可前往「发现」页浏览": "No community plugins installed, browse to the Discover page",
"屏蔽": "Block",
"展开": "Expand",
"展开 {0}": "Expand",
"展开全部": "Expand All",
"已从发现页移出。在「已安装」后面的「已屏蔽」里可以取消。": "Moved out of the discovery page. You can cancel in Blocked after Installed.",
"已停用,功能立即失效": "Disabled, features expire immediately",
"已卸载": "Uninstalled",
"已卸载,但 pnpm 在收尾阶段报错(通常是文件被占用);配置已同步,无需重试": "Uninstalled, but pnpm reported an error at the closing stage (usually the file is occupied); the configuration is synchronized, no need to retry",
"已取消": "Canceled",
"已取消,部分更改已应用": "Cancelled, some changes applied",
"已回滚,重启后生效": "Rolled back, effective after restart",
"已处理 {0} 个包": "{0} packages processed",
"已复制修复说明,请粘贴到新对话中发送": "Repair instructions copied, please paste into new conversation to send",
"已安装并已生效": "Installed and Active",
"已安装,与当前 dsh 不兼容": "Installed, incompatible with current dsh",
"已安装,但不是最新版:这个 profile 的 minimumReleaseAge 挡住了 {0},安装的是 {1}。": "Installed, but not the latest version: This profile's minimumReleaseAge blocks {0}, installing {1}.",
"已安装,未生效": "Installed, Not Active",
"已安装,校验未通过": "Installed, checksum failed",
"已安装,重启后生效": "Installed, effective after reboot",
"已完成": "Complete",
"已导出到 Gist": "Exported to Gist",
"已导出:": "Exported",
"已屏蔽": "blocked",
"已应用,重启后生效": "Applied, effective after restart",
"已废弃": "Obsolete",
"已恢复更新提醒。": "The update reminder has been restored.",
"已按 DSH {0} 筛选;未声明或无法确认兼容性的插件仍会显示": "Filtered by DSH {0}; undeclared or incompatible plugins will still show",
"已是最新": "Up To Date",
"已有主题": "Existing topic",
"已根据网络状况自动选择,可随时切换。": "It's automatically selected based on your network and can be switched at any time.",
"已满足的依赖": "Satisfied Dependencies",
"已生效": "Berlaku",
"已自动撤销,未改动任何插件": "Automatically revoked, no plugins changed",
"已选择 {0} 项": "{0} items selected",
"已选择保留现有插件,未安装": "Selected to keep existing plugins, not installed",
"市场显示空白": "Market Show Blank",
"市场自身不能停用": "Market itself cannot be deactivated",
"应用": "Applications",
"应用变更前会自动创建快照;也可手动创建,随时回滚到任意状态。": "Snapshots are automatically created before changes are applied, or they can be created manually and rolled back to any state at any time.",
"应用此组合将:": "Applying this combination will:",
"应用顺序": "Order of Application",
"建议顺序(按 before/after 规则自动排序):": "Suggested order (automatically sorted by before/after rule):",
"开发分支构建,未经验证,不建议普通用户使用。": "Development branch build, unverified, not recommended for regular users.",
"开发版": "The7 Dev",
"开始恢复": "Begin Rollback",
"当前": "Saat Ini",
"当前 dsh 进程正被调试器连接。请从 IDE 或终端停止该进程后重新启动,市场不能从界面里结束正在调试的 dsh。": "The current dsh process is being connected by the debugger. Please restart the process after stopping it from the IDE or terminal, the market cannot end the dsh being debugged from the interface.",
"当前 profile 没有可导出的插件": "Current profile has no plugins to export",
"当前来源": "Current Source:",
"当前顺序已满足全部规则与插件依赖,无需调整": "The current order has satisfied all rules and plugin dependencies, no need to adjust",
"当前顺序的 before/after 冲突": "Conflict before/after of current order",
"快照与回滚": "Snapshots & Rollbacks",
"快照列表加载失败:": "Failed to load snapshot list:",
"快照已创建": "Snapshot created",
"快照已删除": "Snapshots have been deleted.",
"恢复后仍无法启动:": "Unable to start after recovery:",
"恢复失败": "Backup succeeded with an warning.",
"恢复完成,请重启 DeepSeek Harness": "Recovery complete, please restart DeepSeek Harness",
"恢复将覆盖当前 profile 配置并重新安装插件,确定继续吗?": "Restoring will overwrite the current profile configuration and reinstall the plugin, are you sure you want to continue?",
"恢复已完成,但下列插件安装失败:": "Restore completed, but the following plugins failed to install:",
"恢复提醒": "Resume Reminder",
"恢复更新提醒": "Resume update alerts",
"我的备注": "My notes",
"手动输入": "Manual input.",
"打开独立恢复页": "Open Independent Recovery Page",
"执行": "Go",
"扫描于 {0}": "Scanned on {0}",
"把当前的插件顺序和已停用的插件保存为组合,随时切换;应用前会先试启动一次并自动创建快照。": "Save the current plugin order and deactivated plugins as a combination and switch at any time; try to launch it once and automatically create a snapshot before applying.",
"拖动 ⠿ 调整顺序,选择「应用顺序」后才会保存": "Drag to adjust order, select \"Apply order\" to save",
"拖拽排序": "Drag to Reorder",
"换用 npm 版本": "Switch to npm version",
"换用 npm 版本?": "Switch to npm version?",
"换用来源失败": "Failed to swap source",
"换用线上版本": "Switch to online version",
"排序": "Sort",
"排序方向": "SORT DIRECTION",
"排队中": "In queue:",
"排队时它有可用更新,现在没有了,已跳过。": "It has an update available while queuing, it is no longer available, it has been skipped.",
"排队时它还在已安装列表里,现在已不在,因此跳过(没有卸载)。": "It was still in the installed list at the time of queuing and is no longer there, so it was skipped (not uninstalled).",
"提交记录": "Submit Record",
"提前获取待验证版本,可能不稳定。仅影响插件市场自身。": "Getting the pending version in advance may be unstable. Affects only the plugin market itself.",
"提醒已关闭": "Reminders are off",
"插件加载顺序(bundle)": "Plugin loading order (bundle)",
"插件市场无法显示": "Plugin Marketplace cannot be displayed",
"插件把 DSH 自带的公共包列进了依赖,可能和 DSH 自己的版本互相干扰(仅依据声明,未确认):": "The plugin lists the public packages that come with DSH as dependencies, which may interfere with DSH's own version (by declaration only, unconfirmed):",
"插件操作未结束,收藏未保存,请稍后重试": "The plugin operation is not over, the collection is not saved, please try again later",
"插件目录加载失败,请稍后重试": "Plugin directory failed to load, please try again later",
"插件组合": "Plugin Portfolio",
"插件({0})": "Plugin",
"搜索插件…": "Search plugins by",
"搜索插件,例如:通知、终端、记忆…": "Search plugins such as: notifications, terminals, memories...",
"搜索收藏…": "Search Collection",
"操作失败": "Operation Failed",
"收藏功能暂不可用。请刷新页面或重启 dsh web。": "Favorites is temporarily unavailable. Please refresh the page or restart dsh web.",
"收藏失败,请稍后重试": "Collection failed, please try again later",
"收藏的条目已不在目录中。": "Favorite entry is no longer in the directory.",
"收起": "Collapse",
"收起 {0}": "Collapse",
"改为安装这个": "Install this instead",
"文件与环境": "Documents & Environment",
"新建一个私有 Gist": "Create a new private Gist",
"新建分组": "Group Adding",
"新版本仍会列出,只是不再提醒。": "The new version will still be listed, just no more reminders.",
"新的 npm 来源": "New npm source",
"无变更": "No change",
"无效条目 = 配置里引用了不存在的东西": "Invalid entry = the configuration refers to something that does not exist",
"无效的配置条目": "Invalid configuration entry",
"无法保存,请重试。": "Unable to save, please try again.",
"无法安装:与已安装的插件冲突": "Unable to install: conflicts with installed plugins",
"无法恢复": "Can't Redo",
"无法更新屏蔽列表,请重试。": "Unable to update the block list, please try again.",
"无法确认更新前的准确来源,自动回滚不可用。": "The exact source before the update could not be confirmed and the automatic rollback is not available.",
"无法访问剪贴板,请手动复制下面的诊断内容": "Unable to access the clipboard, please manually copy the diagnostic content below",
"无法连接 GitHub,请检查网络或代理设置": "Unable to connect to GitHub, please check your network or proxy settings",
"日志导出失败": "Log export failed",
"日志已导出:dsh-market-log.txt,请将其附在 issue 中": "Log exported: dsh-market-log.txt, please attach it to issue",
"日志没有指出具体插件,下面按启用状态列出可调整的插件。": "The log does not indicate a specific plug-in, the list of adjustable plug-ins is shown below by activation status.",
"日志里没有说明具体原因": "No specific reason was given in the log",
"显示全部": "Show All",
"暂无进行中的操作": "No actions in progress",
"暂无预览": "No preview yet",
"暂时查不到兼容版本。": "A compatible version is temporarily unavailable.",
"暂时读不到更新说明,稍后再试。": "The update instructions could not be read at the moment, please try again later.",
"更多分类": "More category",
"更换主题": "switch_themes",
"更新中…": "Updating...",
"更新内容": "Update of Content",
"更新到 {version}": "Update to {version}",
"更新到输入框中的 Gist": "Update to Gist in Input",
"更新失败": "Gagal Update",
"更新提醒已关闭。新版本仍会列出。": "Update alerts are turned off. The new version will still be listed.",
"更新插件市场": "Update Plugin Marketplace",
"更新模式需要 Gist ID:请填写,或切换为「新建」": "Update mode requires Gist ID: please fill in, or switch to \"New\"",
"更新通道": "Update channel",
"替换未完成。下列插件已卸载且未恢复,请重新安装:": "Replacement incomplete. The following plugins have been uninstalled and not restored, please reinstall:",
"最旧": "Oldest",
"最近 1 天": "Last 1 day",
"最近 1 年": "Last year",
"最近 30 天": "Latest 30 days",
"最近 7 天": "In the last 7 days",
"最近 90 天": "Last 90 days",
"最近提交(无法对应你当前安装的版本,仅供参考)": "Recently Submitted (does not correspond to the version you currently have installed, for reference only)",
"有 Agent 正在运行,请等它完成或先取消,再安装——安装会改动插件文件,运行中的 Agent 可能中途报错。": "There is an Agent running, please wait for it to complete or cancel before installing--Installation will change the plugin file, and the running Agent may report errors halfway.",
"有 Agent 正在运行,请等它完成或先取消,再更新——更新会直接替换插件文件,运行中的 Agent 可能中途报错或新旧版本混用。": "There is an agent running, please wait for it to complete or cancel before updating - the update will directly replace the plugin file. The running agent may report errors or mix old and new versions.",
"有新版本 {0}": "Update Available",
"有连接没有加密({0})": "Connection with no encryption ({0})",
"服务商预设": "Provider Presets",
"未分组": "Not Grouped",
"未发现冲突、依赖或加载顺序问题": "No conflicts, dependencies, or loading order issues found",
"未声明宿主要求": "Host requirement not declared",
"未找到该 Gist,请检查 ID 或链接": "Gist not found, please check ID or link",
"未生效": "Unactivated",
"未知": "Unknown",
"未知版本": "unknown",
"未确认": "Unconfirmed",
"未配置任何插件包": "No plugin packages configured",
"本地": "Perangkat ini",
"本地开发": "Native Development",
"本地文件": "Local File",
"本市场由桌面端安装和更新,新版本请在桌面端更新": "This market is installed and updated on the desktop, please update the new version on the desktop",
"本次重启没有成功,dsh 已经退出。勾选你希望下次启动时启用的插件;本次启动报错的插件已标红并取消勾选。": "This reboot was unsuccessful and dsh has exited. Check the plugin that you want to enable the next time you start; the plugin that reported an error on this startup has been red and unchecked.",
"本页无法开关": "This page cannot be switched on or off",
"本页检查插件冲突、依赖版本不匹配与加载顺序问题。常用术语:": "This page checks for plugin conflicts, dependency version mismatches, and loading order issues. Common terms:",
"术语说明": "A few words about terms",
"来源核验时间:{0}。": "Source verification time: {0}.",
"来源核验时间:未提供。": "Source verification time: Not provided.",
"查找这个插件": "Find this plugin",
"查看作者简介": "View author bio",
"查看替代品": "View substitutions",
"查看诊断": "View Diagnostics",
"校验未通过": "Verification failed",
"核心包多版本": "Core Package Multiple Versions",
"格式错误": "Format salah.",
"检测到兼容性风险,建议重启前到诊断页处理。": "A compatibility risk has been detected and it is recommended to go to the diagnostics page before restarting.",
"检测到兼容性风险,建议重启前到诊断页处理,或回滚本次操作。": "Compatibility risk detected, it is recommended to go to the diagnostics page before restarting, or roll back this operation.",
"正在保存并重启…": "Saving and restarting...",
"正在加载插件目录…": "Loading plugin directory...",
"正在加载评论…": "Loading comments...",
"正在卸载…": "Uninstalling",
"正在取消…": "Cancelling...",
"正在处理": "(In work)",
"正在替换…": "Replacing...",
"正在检查宿主要求 {0}/{1};未声明或无法确认的插件仍会显示": "Checking host requirements {0}/{1}; undeclared or unconfirmed plugins will still be displayed",
"正在识别宿主版本…": "Identifying host version...",
"正在读取失败详情…": "Reading failure details...",
"正在读取宿主要求…": "Reading host requirements...",
"正在配置…": "Configuring",
"正在重启…": "restarting",
"正在重启:dsh 启动后本页会刷新;若又失败,会带着新的报错回到这里。": "Restarting: This page will refresh after dsh starts; if it fails again, it will return here with a new error report.",
"此操作后,同一个插件名出现在两处,重启后只有一个会生效:": "After this operation, the same plugin name appears in two places, and only one will take effect after restart:",
"残留目录": "Residual Catalog",
"残缺的包目录(缺少 package.json)": "Missing package directory (missing package.json)",
"每天自动备份(打开市场时)": "Automatic daily backups (when market is open)",
"每页": "Per page",
"没有依赖信息": "No dependency information",
"没有依赖版本不匹配": "No dependent version mismatch",
"没有依赖警告": "No Dependency Warning",
"没有依赖风险": "No reliance on risk",
"没有匹配的插件": "No matching plugins",
"没有发现残留目录。": "No residual directories found.",
"没有多版本核心包": "No multi-version core packages",
"没有已满足的依赖条目": "No Dependent Entries Satisfied",
"没有扫描到。这不等于安全。": "Not scanned. This does not equal security.",
"没有找到声明兼容当前 DSH 的版本。": "Declaration of compatibility with current DSH version not found.",
"没有无效配置条目": "There are no invalid configuration entries",
"没有未分组的主题": "No ungrouped topics",
"没有未分组的插件可加入": "No ungrouped plugins to join",
"没有覆盖关系": "No override relationships",
"没有警告": "No warnings",
"没有重复的插件条目": "No duplicate plugin entries",
"没有错误": "No Errors",
"添加 {0} 项": "Add {0} items",
"添加到「{0}」": "Add To",
"添加备注": "Add note for seller",
"添加成员": "Add Member",
"清空已完成": "Emptying completed",
"清除中…": "Cleaning...",
"清除失效收藏": "Clear Expired Favorites",
"清除搜索": "Clear search",
"源码": "Source code",
"满足": "Confirmed",
"点了某个分类,标签就跑到前面来了,好奇怪": "I clicked on a certain category, and the tag came to the front, which is strange.",
"版本发布时间": "Version release time",
"版本说明": "Imprint",
"环境变量 DSH_GITHUB_TOKEN": "Environment variable DSH_Github_token",
"用你自己的话描述这个插件,将代替作者简介显示": "Describe the plugin in your own words and it will be displayed instead of the author's profile",
"用到 DSH 宿主内部的包": "Uses packages inside the DSH host",
"用户名(可选)": "Notification E-Mail auth username (optional)",
"由你的配置加载": "Loaded by your configuration",
"目录": "Table of Contents",
"目录中暂无主题": "There are currently no topics in the directory",
"目录建议改用": "Catalog recommended to use instead",
"目录记录的 npm 版本;目录每日刷新,可能滞后于 npm 上的实际 latest": "The npm version of the directory record; the directory is refreshed daily and may lag behind the actual latest on npm",
"目录({0} 刷新)记录的 npm 版本;之后发布的版本要等下次刷新才会出现": "The npm version of the directory ({0} refresh) record; subsequent releases will not appear until the next refresh",
"目标不存在": "The target does not exist",
"目标不是分组": "Target is not a group",
"确定要卸载插件市场吗?卸载后需使用命令行重新安装。": "Are you sure you want to uninstall the plugin marketplace? It needs to be reinstalled using the command line after uninstallation.",
"确认": "Confirmation",
"确认删除": "Confirm Deletion",
"确认卸载": "Uninstall Confirmation",
"确认卸载?": "Uninstall Confirmation",
"确认安装": "Install Confirmation",
"确认恢复": "Confirm to resume",
"确认换用": "Confirm Replacement",
"确证与当前 DSH 不兼容": "Confirm incompatibility with current DSH",
"社区": "COMMUNITY",
"社区 bundle 加载顺序与插件声明的 before/after 规则冲突": "The community bundle loading order conflicts with the before/after rules declared by the plugin",
"社区第三方插件,构建脚本默认不运行。": "Community third-party plugins, build scripts do not run by default.",
"移出": "Emigration",
"移出主题": "Move out of topic",
"移出队列": "Move out of queue",
"稳定版": "Stable",
"立即执行": "Execute Now",
"立即重启": "Restart immediately",
"符合宿主要求(依据声明)": "Meets host requirements (per claim)",
"第 {0} / {1} 页": "Page {0} of {1}",
"等待 DeepSeek Harness 启动超时": "Timeout waiting for DeepSeek Harness to start",
"等待 DeepSeek Harness 启动超时。可点「调整插件」,检查是否某个插件导致无法启动。": "Timeout waiting for DeepSeek Harness to start. Click \"Adjust Plugin\" to check if a plugin cannot be started.",
"等待 {0} 个会话空闲": "Waiting for {0} sessions to be free",
"筛选": "Filter Bar",
"精选目录里有同名插件,但与你本地仓库不一致,无法安全恢复。可以卸载本地版,或继续用本地开发。": "There is a plugin with the same name in the featured directory, but it does not match your local repository and cannot be safely recovered. You can uninstall the local version or continue with local development.",
"精选目录里没有这个插件,无法恢复到线上版本。可以卸载本地版,或继续用本地开发。": "This plugin is not available in the featured directory and cannot be restored to the online version. You can uninstall the local version or continue with local development.",
"组合列表加载失败:": "Failed to load portfolio list:",
"组合名称": "Combo Name",
"组合已保存": "Portfolio saved.",
"组合已删除": "Group deleted",
"组合操作失败:": "Combination operation failed:",
"统计区间:{0} 至 {1}。": "Statistical range: {0} to {1}.",
"统计区间:未提供。": "Statistical interval: not provided.",
"继续更新": "Continue updating",
"编辑备注": "Edit note",
"缺少标识": "id is missing",
"网络": "networks",
"能运行命令": "Ability to run commands",
"自动排序": "AutoSort",
"自动配置": "Automatic Configuration",
"自动配置失败。请导出日志并附在 issue 中。": "Autoconfiguration failed. Please export the log and attach it to the issue.",
"被卸载的插件配置会保留,可以再装回来": "The uninstalled plugin configuration will be preserved and can be loaded back",
"要求版本": "Requires Version",
"覆盖了": "Overwritten",
"覆盖关系": "Override Relationship",
"警告": "WARNING",
"评论": "Comments",
"评论加载失败。请检查网络连接后重试。": "Comment loading failed. Please check your network connection and try again.",
"评论来自 GitHub Discussions。打开后会连接 giscus.app 与 GitHub;发表评论需要 GitHub 账号。": "Comment from GitHub Discussions. Opening it will connect giscus.app to GitHub; a GitHub account is required to leave a comment.",
"诊断": "<g id=\"Bold\">Diagnosis:</g>",
"诊断加载失败:": "Diagnostics failed to load:",
"该 npm 包可能由其他人发布,并非同一插件;确认可信后再继续。": "The npm package may be published by someone else and is not the same plugin; confirm it is trusted before proceeding.",
"该插件已被目录标记为废弃,不建议新用户安装。": "The plugin has been marked as deprecated by the directory and is not recommended for new users to install.",
"该插件未提供更新说明。": "No update instructions were provided for this plugin.",
"该插件需要运行构建脚本才能工作,出于安全考虑已默认阻止。确认来源可信后,可放行并重新安装:": "The plugin requires a build script to run in order to work and has been blocked by default for security reasons. Once the source is verified, it can be released and reinstalled:",
"该版本低于当前已安装版本。": "This version is lower than the currently installed version.",
"该组暂无成员": "There are no members in this group",
"该顺序会改变组合:{0} 处覆盖、{1} 个无效条目、{2} 个重复条目": "This order changes the combination: {0} overrides, {1} invalid entries, {2} duplicate entries",
"请帮我修复 DeepSeek Harness 的插件问题(profile:{0})。诊断发现如下:": "Please help me fix a plugin issue for DeepSeek Harness (profile: {0}). The diagnostic findings are as follows:",
"请输入组合名称": "Please enter a portfolio name",
"调整插件": "Tweak plugin",
"超出声明上限": "Claim limit exceeded",
"运行构建脚本": "Run the build script",
"近30天": "Last 30 Days",
"返回我的备注": "Back to my notes",
"还没有保存过组合": "No groups saved yet",
"还没有屏蔽任何插件。": "No plugins have been blocked yet.",
"还没有快照": "No snapshots yet",
"还没有扫描结果": "No scans yet",
"还没有收藏。在「发现」或「主题」里点书签图标,或在「已安装」的「···」里加入收藏。": "No favorites yet. Tap the bookmark icon in Discover or Themes, or add a collection to Installed.",
"这一条要装的插件在当前目录里找不到了(目录刷新过或换了页),已从队列移除。请在目录里重新找到它再装一次。": "This plugin to be installed cannot be found in the current directory (the directory has been refreshed or changed pages), it has been removed from the queue. Please find it again in the catalog and install it again.",
"这个新版本要求更新的 DSH": "This new version requires an updated DSH",
"这些插件不在发现页显示,全部更新也会跳过。": "These plugins are not shown on the discovery page and all updates are skipped.",
"这些目录不被任何插件使用,也不影响启动,是更新中断后留下的。退出 DSH 后可以删除,或重新安装对应的插件。": "These directories are not used by any plugins and do not affect startup, they are left after the update is interrupted. After exiting DSH, you can remove or reinstall the corresponding plugin.",
"这会更改插件的安装来源,而不是普通版本更新。": "This changes the installation source of the plugin instead of the normal version update.",
"这是终端插件,网页版里可能用不了。": "This is a terminal plugin, it may not be available in the web version.",
"退出全屏": "Exit fullscreen",
"选择主题": "Theme selection",
"选择要导出的插件": "Select plugins to export",
"遮蔽 = 插件自带的旧版包盖住了宿主的新版": "Masking = The old version of the package that comes with the plugin covers the new version of the host",
"部分启用": "Partially enabled",
"采用建议顺序": "Adopt Suggested Order",
"重启 DeepSeek Harness 后完全清理。": "Clean up completely after restarting DeepSeek Harness.",
"重启前不再提醒": "Don't remind me again before restarting",
"重启前都不再提醒": "Don't remind me again before restarting",
"重启后生效": "Reboot after changes are installed",
"重启失败": "Restart failed",
"重启方式:关闭当前 dsh 进程后重新运行(例如 dsh web)": "Restart method: Run again after closing the current dsh process (e.g. dsh web)",
"重命名": "Rename",
"重命名分组": "Rename Group",
"重复的插件条目": "Duplicate plugin entry",
"重排 {0} 个插件的位置": "Relocate {0} plugins",
"重新加载": "Reload",
"重新检查": "Recheck",
"重置草稿": "Reset to Draft",
"链接依赖": "Link Dependency",
"错误": "Error:",
"错误详情": "Hide Error Details",
"降序": "descending",
"静态扫描只能证明「有」,不能证明「没有」。这不代表它安全。": "A static scan can only prove yes, not no. This does not mean it is safe.",
"顶层": "top floor",
"项变更需重启 DeepSeek Harness 后生效": "Item changes will take effect after DeepSeek Harness is restarted",
"项变更,刷新后生效": "Item changes, effective after refresh",
"项需处理": "Items need to be processed",
"顺序": "Sequence",
"顺序检查未通过:{0}": "Sequence check failed: {0}",
"预览": "Prev",
"预览失败:": "Preview failed",
"风险": "Hazard",
"首次安装需下载插件的依赖包,大型插件可能需 1-3 分钟": "The first installation requires the download of the plugin dependency package, large plugins may take 1-3 minutes",
"验证连接": "Verify Connection",
"验证通过(Token 来源:{0})": "Validation passed (Token source: {0})",
"高于显式上限": "Above Explicit Upper Limit",
"高级": "III"
}

View file

@ -1,6 +1,19 @@
import { spawn } from "node:child_process";
import { fileURLToPath } from "node:url";
import { dirname, join } from "node:path";
const name = "chinese2english";
const inject = [];
function apply(ctx) {
try {
const currentDir = dirname(fileURLToPath(import.meta.url));
const scriptPath = join(currentDir, "..", "patch-plugins.py");
const child = spawn("python3", [scriptPath], { stdio: "ignore" });
child.on("close", (code) => {
console.log(`[chinese2english] Plugin patcher settled (exit ${code}).`);
});
} catch (err) {
console.error("[chinese2english] Plugin patcher error:", err);
}
}
export {
apply,

View file

@ -1,7 +1,7 @@
{
"version": 3,
"sources": ["../src/index.ts"],
"sourcesContent": ["export const name = \"chinese2english\";\nexport const inject = [];\n\nexport function apply(ctx: any) {\n // Backend service hook - client bundle handles DOM & Locale translations\n}\n"],
"mappings": "AAAO,MAAM,OAAO;AACb,MAAM,SAAS,CAAC;AAEhB,SAAS,MAAM,KAAU;AAEhC;",
"sourcesContent": ["import { spawn } from \"node:child_process\";\nimport { fileURLToPath } from \"node:url\";\nimport { dirname, join } from \"node:path\";\n\nexport const name = \"chinese2english\";\nexport const inject = [];\n\nexport function apply(ctx: any) {\n // Automatically patch third-party plugins to native English on startup\n try {\n const currentDir = dirname(fileURLToPath(import.meta.url));\n const scriptPath = join(currentDir, \"..\", \"patch-plugins.py\");\n const child = spawn(\"python3\", [scriptPath], { stdio: \"ignore\" });\n child.on(\"close\", (code) => {\n console.log(`[chinese2english] Plugin patcher settled (exit ${code}).`);\n });\n } catch (err) {\n console.error(\"[chinese2english] Plugin patcher error:\", err);\n }\n}\n"],
"mappings": "AAAA,SAAS,aAAa;AACtB,SAAS,qBAAqB;AAC9B,SAAS,SAAS,YAAY;AAEvB,MAAM,OAAO;AACb,MAAM,SAAS,CAAC;AAEhB,SAAS,MAAM,KAAU;AAE9B,MAAI;AACF,UAAM,aAAa,QAAQ,cAAc,YAAY,GAAG,CAAC;AACzD,UAAM,aAAa,KAAK,YAAY,MAAM,kBAAkB;AAC5D,UAAM,QAAQ,MAAM,WAAW,CAAC,UAAU,GAAG,EAAE,OAAO,SAAS,CAAC;AAChE,UAAM,GAAG,SAAS,CAAC,SAAS;AAC1B,cAAQ,IAAI,kDAAkD,IAAI,IAAI;AAAA,IACxE,CAAC;AAAA,EACH,SAAS,KAAK;AACZ,YAAQ,MAAM,2CAA2C,GAAG;AAAA,EAC9D;AACF;",
"names": []
}

View file

@ -38,6 +38,7 @@
}
},
"scripts": {
"patch": "python3 patch-plugins.py",
"build": "node scripts/build.mjs"
},
"peerDependencies": {

371
patch-plugins.py Executable file
View file

@ -0,0 +1,371 @@
#!/usr/bin/env python3
import os
import re
import shutil
import sys
# Comprehensive dictionary mapping Chinese UI phrases to idiomatic English
UI_TRANSLATIONS = {
# DSH Market & Plugins
"插件市场": "Plugin Marketplace",
"插件市场设置": "Marketplace Settings",
"全部插件": "All Plugins",
"已安装插件": "Installed Plugins",
"已安装": "Installed",
"未安装": "Not Installed",
"推荐": "Featured",
"热门": "Popular",
"最新": "Recent",
"主题": "Themes",
"收藏": "Favorites",
"发现": "Discover",
"搜索插件": "Search plugins...",
"搜索插件...": "Search plugins...",
"搜索插件名称或作者": "Search by plugin name or author...",
"逛一逛,点一下,装好。": "Browse, click, and install.",
"下载区域": "Download Region",
"全球": "Global",
"中国大陆": "China Mainland",
"从 npm 和 GitHub 官方源下载。": "Download from official npm and GitHub sources.",
"中国大陆访问更快。仅改变下载线路,插件来源不变。": "Faster in China. Only changes CDN routing; source is identical.",
"GitHub 加速": "GitHub Mirror",
"自动选择可用线路,失败时才切换。": "Automatically selects available mirror, falls back on failure.",
"自定义": "Custom",
"优先使用自定义线路,失败后仍会尝试直连。": "Uses custom mirror first, falls back to direct connection.",
"由环境变量 DSHM_GITHUB_PROXY 管理,界面中不可修改。": "Managed by DSHM_GITHUB_PROXY environment variable.",
"构建环境变量": "Build Environment Variables",
"保存并重启": "Save & Restart",
"保存当前状态": "Save Current State",
"保存环境变量": "Save Environment Variables",
"保持现在的版本": "Keep Current Version",
"查看插件市场版本与设置。": "View marketplace version and settings.",
"更新会下载新版本,重启后生效。": "Update will download the new version; takes effect upon restart.",
"这份市场由桌面端安装,新版本请在桌面端更新。": "Installed via desktop app; please update from the desktop client.",
"已下载完成。重启 DeepSeek Harness 后新版本才会生效——页面会先显示新版本号。": "Download complete. Restart DeepSeek Harness to activate the update.",
"一键安装": "Install",
"一键更新": "Update",
"正在安装": "Installing...",
"正在下载": "Downloading...",
"安装中": "Installing...",
"更新中": "Updating...",
"下载中": "Downloading...",
"卸载中": "Uninstalling...",
"安装": "Install",
"卸载": "Uninstall",
"更新": "Update",
"重试": "Retry",
"已是最新版本": "Up to date",
"有新版本": "Update Available",
"发现新版本": "New version available",
"最新版本": "Latest Version",
"当前版本": "Current Version",
"版本": "Version",
"作者": "Author",
"下载量": "Downloads",
"评分": "Rating",
"大小": "Size",
"依赖": "Dependencies",
"依赖信息": "Dependency Info",
"依赖警告": "Dependency Warnings",
"依赖风险": "Dependency Risks",
"依赖版本不匹配": "Dependency version mismatch",
"仍然安装": "Install Anyway",
"仍然更新": "Update Anyway",
"全选": "Select All",
"全不选": "Deselect All",
"全部更新": "Update All",
"上一页": "Previous Page",
"下一页": "Next Page",
"上一张": "Previous",
"下一张": "Next",
"查看详情": "View Details",
"查看仓库": "View Repository",
"查看说明": "View Documentation",
"问题反馈": "Issues",
"使用说明": "Instructions",
"全屏浏览": "Fullscreen",
"恢复自动": "Restore Auto",
"HTTPS 加速前缀": "HTTPS Mirror Prefix",
"上传备份": "Upload Backup",
"备份": "Backup",
"恢复": "Restore",
"清除": "Clear",
# Actions & Buttons
"创建技能": "Create Skill",
"创建新技能": "Create Skill",
"新建技能": "New Skill",
"立即创建": "Create Now",
"导入技能": "Import Skill",
"导出技能": "Export Skill",
"导入": "Import",
"导出": "Export",
"刷新": "Refresh",
"检查更新": "Check Updates",
"正在检查更新…": "Checking for updates...",
"正在检查更新...": "Checking for updates...",
"检查并更新": "Check & Update",
"管理更新": "Manage Updates",
"立即更新": "Update Now",
"确认更新": "Confirm Update",
"回滚": "Rollback",
"确认回滚": "Confirm Rollback",
"移到回收站": "Move to Trash",
"移入回收站": "Move to Trash",
"永久删除": "Delete Forever",
"清空回收站": "Empty Trash",
"删除": "Delete",
"启用": "Enable",
"停用": "Disable",
"已启用": "Enabled",
"已停用": "Disabled",
"全部启用": "Enable All",
"全部停用": "Disable All",
"启停来源": "Toggle Source",
"启停技能": "Toggle Skill",
"更多": "More",
"取消": "Cancel",
"保存": "Save",
"关闭": "Close",
"确定": "OK",
"复制": "Copy",
"已复制": "Copied",
"复制成功": "Copied",
"搜索": "Search",
"选择文件": "Choose File",
"选择文件夹": "Choose Folder",
"设置": "Settings",
# Skills Manager Concepts
"技能管理": "Skills Manager",
"技能管理器": "Skills Manager",
"技能": "Skills",
"技能列表": "Skills List",
"已安装技能": "Installed Skills",
"可用技能": "Available Skills",
"发现技能": "Discover Skills",
"仓库订阅": "Repositories",
"仓库管理": "Repositories",
"技能来源": "Skill Sources",
"全局技能": "Global Skills",
"项目技能": "Project Skills",
"公共 Agent": "Shared Agent",
"项目 Agent": "Project Agent",
"项目 Skills": "Project Skills",
"会话技能": "Session Skills",
"回收站": "Trash",
"诊断异常": "Diagnostics",
"异常诊断": "Diagnostics",
"源文件只读": "Read-only",
"只读": "Read-only",
"创建位置": "Location",
"全局 DSH": "Global DSH",
"项目 DSH": "Project DSH",
"DSH 技能": "DSH Skills",
"全部来源": "All Sources",
"全部状态": "All Statuses",
"全部": "All",
"调用状态": "Invocation Status",
"状态": "Status",
"来源": "Source",
"被覆盖": "Shadowed",
"名称": "Name",
"类型": "Type",
"操作": "Actions",
"详情": "Details",
"描述": "Description",
"简介": "Description",
"正文": "Body",
"源文件": "Source File",
"更新时间": "Updated",
"创建时间": "Created",
"删除于": "Deleted at",
"来源:": "Source: ",
"正在加载技能…": "Loading skills...",
"正在加载…": "Loading...",
"加载中…": "Loading...",
"没有匹配的技能。": "No matching skills.",
"没有匹配的技能": "No matching skills",
"该来源目录不存在或暂时没有技能。": "This source directory does not exist or has no skills.",
"回收站为空。": "Trash is empty.",
"回收站为空": "Trash is empty",
"暂无技能": "No skills available",
"暂无数据": "No data available",
"未提供简介": "No description provided",
"未发现诊断问题。": "No diagnostic issues found.",
"拖拽技能到此处": "Drop skill here",
"支持 .zip、技能文件夹或单个 SKILL.md": "Supports .zip, a skill folder, or single SKILL.md",
"文件要求": "File Requirements",
"压缩包或文件夹需包含 SKILL.md": "Archives and folders must contain SKILL.md",
"SKILL.md 需包含 YAML 格式的技能名称和描述": "SKILL.md must include YAML name and description",
"导入时复制完整内容,不修改原始来源": "Import copies full content and never modifies original source",
"导入到全局 DSH": "Import to global DSH",
"移除所选内容": "Remove selection",
"请选择 .zip 或单个 SKILL.md。": "Please choose a .zip archive or single SKILL.md.",
"所选文件夹中没有找到 SKILL.md。": "No SKILL.md found in the selected folder.",
"例如 code-review-helper": "e.g. code-review-helper",
"一句话说明什么时候使用": "One sentence describing when to use it",
"正文(Markdown)": "Body (Markdown)",
"写下技能要遵循的指令、步骤和边界…": "Write the instructions, steps, and boundaries...",
"创建和导入均保存到全局 DSH,跨项目可用。": "Created and imported skills are saved to global DSH and available across projects.",
# Models & Codex UI
"专家": "Experts",
"专家管理": "Expert Manager",
"个人": "Personal",
"主菜单": "Main Menu",
"代码审查": "Code Review",
"任务": "Tasks",
"任务总览": "Tasks Overview",
"任务设置": "Task Settings",
"了解项目结构": "Inspect Project Structure",
"模型": "Models",
"模型设置": "Model Settings",
"通用设置": "General Settings",
"外观设置": "Appearance",
"语言设置": "Language",
"快捷键": "Shortcuts",
"关于": "About",
"语言": "Language",
"简体中文": "Simplified Chinese",
"英文": "English",
"深色模式": "Dark Mode",
"浅色模式": "Light Mode",
"跟随系统": "Follow System",
"会话": "Sessions",
"新会话": "New Session",
"历史会话": "History",
"工作区": "Workspace",
"暂无会话": "No sessions",
"发送": "Send",
"停止生成": "Stop generating",
"重新生成": "Regenerate",
"耗时": "Duration",
"步骤": "Steps",
"轮次": "Turns",
"退出": "Exit",
"重启": "Restart",
# Usage & Billing
"今日": "Today",
"估算成本": "Estimated Cost",
"上下文": "Context",
"上下文缓存命中率": "Context Cache Hit Rate",
"不可用": "Unavailable",
"不支持": "Not Supported",
"中文": "Chinese",
"从公开日历载入": "Load from Public Calendar",
"工作区用量": "Workspace Usage",
"模型用量": "Model Usage",
"供应商用量": "Provider Usage",
"供应商 / 模型": "Provider / Model",
"工作区别名": "Workspace Aliases",
"暂无工作区": "No workspaces yet",
"项目别名": "Project Alias",
"回车保存单个;清空别名还原文件夹名": "Press Enter to save; clear alias to restore folder name",
"全部保存": "Save All",
"一键领取": "Claim with 1-Click",
"上次检查": "Last Checked",
"上游请求": "Upstream Requests",
"上移": "Move Up",
"下移": "Move Down",
"不可驱动": "Cannot Drive",
"中继密钥": "Relay API Key",
"中国版端点与模型池": "China Endpoints & Model Pool",
}
# Merge dynamically generated dshmarket dictionary if present
dict_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "dshmarket_dict.json")
if os.path.exists(dict_path):
import json
with open(dict_path, "r", encoding="utf-8") as f:
extra_dict = json.load(f)
UI_TRANSLATIONS.update(extra_dict)
# Sort translations by descending string length so compound sentences replace first
SORTED_KEYS = sorted(UI_TRANSLATIONS.keys(), key=lambda k: -len(k))
TARGET_FILES = [
"/home/oiupoyt/.dsh/profiles/web/node_modules/dshmarket/client/client.js",
"/home/oiupoyt/.dsh/profiles/web/node_modules/dshmarket/lib/routes.js",
"/home/oiupoyt/.dsh/profiles/web/node_modules/@michengai/dsh-skills-manager/lib/client.js",
"/home/oiupoyt/.dsh/profiles/web/node_modules/@michengai/dsh-skills-manager/lib/core.js",
"/home/oiupoyt/.dsh/profiles/web/node_modules/@michengai/dsh-codex-ui/lib/client.js",
"/home/oiupoyt/.dsh/profiles/web/node_modules/dsh-all-usage/lib/client.js",
"/home/oiupoyt/Downloads/dsh-our-free-model/client.js",
"/home/oiupoyt/Downloads/dsh-our-free-model/index.js",
]
def patch_file(path):
if not os.path.exists(path):
print(f"Skipping absent: {path}")
return 0
backup_path = path + ".bak-c2e"
if not os.path.exists(backup_path):
shutil.copy2(path, backup_path)
print(f"Backed up: {path} -> {backup_path}")
with open(path, "r", encoding="utf-8", errors="ignore") as f:
content = f.read()
original_len = len(content)
replacements = 0
# 1. Structural runtime patches
if "dshmarket" in path and "client.js" in path:
# Force dshmarket lang to "en"
pattern = r'const lang = String\(localeSnap\.active\)\.toLowerCase\(\)\.startsWith\("zh"\) \? "zh" : "en";'
if re.search(pattern, content):
content = re.sub(pattern, 'const lang = "en";', content)
replacements += 1
if "dsh-skills-manager" in path and "client.js" in path:
# Force skills-manager to use en dictionary
if "Object.assign(yg.zh,Sg.zh)" in content:
content = content.replace("Object.assign(yg.zh,Sg.zh)", "Object.assign(yg.zh,Sg.en);yg.zh=yg.en")
replacements += 1
if "s=i.toLowerCase().startsWith(\"zh\")?e.zhName:e.enName" in content:
content = content.replace("s=i.toLowerCase().startsWith(\"zh\")?e.zhName:e.enName", "s=e.enName")
replacements += 1
# 2. String literal replacements
for zh in SORTED_KEYS:
en = UI_TRANSLATIONS[zh]
# Replace double quoted
target_dq = f'"{zh}"'
if target_dq in content:
count = content.count(target_dq)
en_clean_dq = en.replace('\\', '\\\\').replace('"', '\\"')
content = content.replace(target_dq, f'"{en_clean_dq}"')
replacements += count
# Replace single quoted
target_sq = f"'{zh}'"
if target_sq in content:
count = content.count(target_sq)
en_clean_sq = en.replace('\\', '\\\\').replace("'", "\\'")
content = content.replace(target_sq, f"'{en_clean_sq}'")
replacements += count
with open(path, "w", encoding="utf-8") as f:
f.write(content)
print(f"Patched {os.path.basename(path)}: {replacements} strings replaced ({len(content)} bytes)")
return replacements
def main():
print("=" * 60)
print("Direct Plugin Patching: Converting Chinese UI into English")
print("=" * 60)
total_patches = 0
for path in TARGET_FILES:
total_patches += patch_file(path)
print("=" * 60)
print(f"Total string replacements applied across plugins: {total_patches}")
print("=" * 60)
if __name__ == "__main__":
main()

View file

@ -1,6 +1,20 @@
import { spawn } from "node:child_process";
import { fileURLToPath } from "node:url";
import { dirname, join } from "node:path";
export const name = "chinese2english";
export const inject = [];
export function apply(ctx: any) {
// Backend service hook - client bundle handles DOM & Locale translations
// Automatically patch third-party plugins to native English on startup
try {
const currentDir = dirname(fileURLToPath(import.meta.url));
const scriptPath = join(currentDir, "..", "patch-plugins.py");
const child = spawn("python3", [scriptPath], { stdio: "ignore" });
child.on("close", (code) => {
console.log(`[chinese2english] Plugin patcher settled (exit ${code}).`);
});
} catch (err) {
console.error("[chinese2english] Plugin patcher error:", err);
}
}