commit d3db80c27bcbf6b07f9800c0bbf787c32719e567 Author: catShark <1716967236@qq.com> Date: Sun Oct 11 18:09:36 2026 +0800 SideQuest 简体中文汉化工具包 把官方 SideQuest 桌面版(基线 1.4.1)汉化为简体中文,并产出可覆盖安装的 deb。 不修改任何上游源码:所有改动集中在 build.js 的补丁层,作用于已编译产物 (dist-electron 与 dist/sidequest-desktop),因此本工具包可独立于上游代码工作。 主要内容: - 运行时汉化引擎 engine.js + 主进程统一注入 hook tail.js (应用有 7 个 data:text/html overlay 页且带严格 CSP,故用主进程 hook 一次覆盖全部窗口) - 词典 1806 条(dict-a…i.json)+ 动态规则 137 条(rules.json) - 纯 Node 实现的 asar 打包/解包 asar.js,零外部依赖 - 构建/试运行/安装/校验脚本 覆盖范围:主页、侧载、文件、应用、串流、设备设置、调试(Logcat)、无线、 全部弹窗、命令面板、日期与相对时间。内嵌商店为远程服务端渲染,不在范围内。 diff --git a/README.md b/README.md new file mode 100644 index 0000000..4cc31b3 --- /dev/null +++ b/README.md @@ -0,0 +1,190 @@ +# SideQuest 简体中文汉化工具包(sideQuest-cn) + +把官方 SideQuest 桌面版(当前基线 **1.4.1**)汉化为简体中文,并产出可覆盖安装的 `.deb`。 + +**设计原则:不改任何上游源码。** 本目录是纯新增文件,`git merge` 主线时不会产生冲突; +所有"改动"都发生在**已编译产物的补丁层**,且全部集中在 `build.js` 里,可随时重放。 + +--- + +## 0. 为什么不是"从源码编译" + +上游把新版(1.4.x 新架构:`dist-electron/` + `dist/sidequest-desktop/`)的开发放在**私有仓库** +`SideQuestVR/SideQuestDesktop`;公开仓库 `SideQuestVR/SideQuest` 的 master 停在 2026-05-19 的 +`af2ac70`,仍是旧架构(`desktop-app/` + `electron/*.ts`),且 **v1.0.0~v1.4.1 十个 tag 全部指向 +同一个 commit**。也就是说公开源码里根本没有 1.4.1 的实现。 + +因此本工具包走的是 **"解包官方安装包 → 运行时字典注入 → 重新打包"** 路线: + +* 不依赖源码,也不需要联网装依赖(asar 读写由 `asar.js` 纯 Node 实现) +* 产物与官方二进制逐字节一致,只多了汉化层 +* 上游一旦发新版,重新 `unpack` + `all` 即可(见 §5) + +--- + +## 0.1 仓库分支结构 + +本仓库有两类分支,用途不同: + +| 分支 | 内容 | 用途 | +| --- | --- | --- | +| `main` | 只有本工具包 | 日常使用;补词条、重新构建都在这条线上 | +| `upstream` | 完整的上游 SideQuest 代码与 git 历史(停在 `af2ac70` / 官方 1.4.1 基线) | 需要对照上游源码、对比差异或将来合并主线时用 | + +因为工具包**直接给已编译产物打补丁**,不依赖上游源码,所以 `main` 不带上游代码也能独立工作。 +需要看上游代码时:`git switch upstream`,回到工具包:`git switch main`。 + +上游仓库以 `github` 为 remote 名保存: + +```bash +git fetch github # 拉取上游最新提交 +git log upstream..github/master # 看上游有哪些新提交 +``` + +## 1. 目录内容 + +| 文件 | 说明 | +| --- | --- | +| `build.js` | 构建入口:`unpack` / `app` / `asar` / `deb` / `all` | +| `asar.js` | 纯 Node 实现的 asar 打包/解包(无外部依赖) | +| `engine.js` | **运行时汉化引擎**(注入到页面,翻译 DOM 文本与属性) | +| `tail.js` | **主进程统一注入 hook**(追加到 `dist-electron/main.js` 末尾) | +| `rules.json` | 动态文案正则规则(含 `$1` 捕获组) | +| `dict-a…i.json` | 词典(共 ~1780 条;按提取批次分批,便于维护) | +| `site.json` | 内嵌商店默认站点配置 | +| `test-run.sh` | 隔离试运行(不动系统、不动真实配置) | +| `stop-test.sh` | 停止试运行实例 | +| `install.sh` | 覆盖安装(需 sudo,含哈希校验与自动备份) | +| `verify.sh` | 安装后独立校验(不需要 sudo) | + +--- + +## 2. 快速开始(完整流程) + +```bash +export SQ_ZH_HOME="$HOME/.sidequest-zh" # 工作目录,默认就是它;产物不落在仓库里 + +# ① 准备原版基线(只需一次):从官方 deb 解出原始 app 与打包结构 +node build.js unpack ~/Downloads/SideQuest-1.4.1.deb + +# ② 构建:打补丁 → 出 asar → 出 deb +node build.js all +# 产物: $SQ_ZH_HOME/dist/SideQuest-1.4.1-zh.N-amd64.deb (+ .sha256) +# $SQ_ZH_HOME/dist/app.asar.zh (+ .sha256) + +# ③ 先试运行确认(推荐;完全隔离,不碰系统与真实配置) +bash ./test-run.sh # 默认 9223 端口,10 秒后打印已加载页面 +bash ./stop-test.sh + +# ④ 覆盖安装(需要交互式 sudo) +sudo bash ./install.sh +bash ./verify.sh # 装完后独立复核 +``` + +`unpack` 也接受直接给 `app.asar`(此时只准备 app 基线,不产出 deb,适合只想换 asar 的场景)。 + +--- + +## 3. 汉化是怎么生效的 + +``` +Electron 主进程 (dist-electron/main.js) + └─ 末尾追加的 hook: app.on('web-contents-created', ...) + └─ 对每个本地页面 (file:// 与 data:text/html) 注入 engine.js + └─ 引擎遍历 DOM:文本节点 + placeholder/title/aria-label/alt + + MutationObserver 兜底 Angular 重渲染 +``` + +几个关键点: + +* **为什么用主进程 hook 而不是改 HTML**:应用有 7 个 overlay 页面是以 `data:text/html` + 拼出来并带 `default-src 'none'` CSP 的,无法外链脚本;`index.html` 又没有 CSP。 + 统一 hook 一次覆盖全部窗口(包括以后新增的),所以不需要逐个 HTML 注入。 +* **远程内容不注入**:内嵌商店(默认 `www.vrwanba.com`)是服务端渲染,属于另一个仓库的工作。 +* **幂等**:只做「英文 → 中文」替换,译文不会被再次翻译;规则带"替换结果不得再次命中"的守卫, + 因此可以安全处理 `1.2.3.4:5555 · last seen 5分钟前` 这种混排。 +* **不误伤**:`script` / `style` / `code` / `pre` / `svg` 子树整体跳过; + `mat-icon`、`.material-icons` 跳过(图标用的是 ligature 字形名,翻了就变方块); + 支持 `translate="no"` 与 `data-sq-zh-skip` 显式豁免。 +* **组合文案**:Angular 会把 `说明 + (Default: X)` 拼进同一个文本节点,引擎会拆开分别翻译再拼回, + 而不是为每条说明写一条规则。 + +`build.js` 一共打了 4 类补丁,每处都要求**精确命中**,上游一变就直接报错而不是静默失效: + +| 补丁 | 作用 | 禁用方式 | +| --- | --- | --- | +| 注入 hook + engine | 汉化本体 | — | +| `updater.js` `supportsAppUpdates()` | 禁用官方自动更新,避免中文界面被官方英文版静默覆盖 | 启动时加 `SQ_ZH_ALLOW_UPDATES=1` | +| `site.json` → `webUrl` + `STORE_HOSTS` | 切换内嵌商店默认站点(白名单必须同步,否则 `assertAllowedStoreUrl` 拒绝加载) | 改 `site.json` | +| Angular en-US 语言数据 + `Intl.RelativeTimeFormat` | 日期/相对时间中文化(`2小时前`、`2026/10/11`) | — | + +--- + +## 4. 回滚 + +```bash +# 恢复官方英文版 +sudo dpkg -i ~/Downloads/SideQuest-1.4.1.deb + +# 或者只还原 app.asar(install.sh 每次都会自动备份) +sudo cp $SQ_ZH_HOME/backup/app.asar.before-install-<时间戳> /opt/SideQuest/resources/app.asar +``` + +`install.sh` 不会触碰 `~/.config/SideQuestDesktop`(登录态、设备绑定、已记住的无线设备都在这里; +商店会话在 `Partitions/sidequest-store`)。deb 的 `postrm` 也只删 `/usr/bin/sidequest` 软链。 + +--- + +## 5. 上游发新版后怎么复用 + +```bash +node build.js unpack ~/Downloads/SideQuest-<新版本>.deb +node build.js all +bash ./test-run.sh # 确认没有回退 +sudo bash ./install.sh +``` + +`build.js` 会在补丁点找不到原始代码时直接失败并指出位置,此时按提示更新对应补丁即可 +(补丁函数集中在 `build.js` 的 `patch*()` 里,每个都自带失败诊断)。 + +补词条:改 `dict-*.json`(纯 JSON,键=英文原文,值=译文)或 `rules.json`(正则), +然后 `node build.js all`。**不需要重新 unpack。** + +--- + +## 6. 排查"某处没汉化" + +1. 用 `test-run.sh` 起隔离实例,确认目标文本确实存在 +2. 若文本来自**动态拼接**(含变量),它通常是**单个文本节点**,需要写 `rules.json` 正则, + 而不是词典条目;反之若被插值切成多段,则要用词典条目 +3. 检查该元素是否命中豁免(图标 class / `code` / `pre` / `translate="no"`) +4. 设备页、应用列表、文件列表里的**真实数据**(Android 目录名 `DCIM`、应用名 `WhatsApp`、 + `debug.hwui.*` 这类系统属性名)**故意不翻译**,翻译了反而看不懂、点不对 + +--- + +## 7. 已踩过的坑(都已在脚本里规避) + +* **asar 不能走符号链接**:`resources/app.asar` 若是指向别处的软链,Electron 会静默加载失败 + (退出码 1、无任何报错)。试运行脚本因此强制用实体文件。 +* **`dpkg-deb --build` 的载荷根**:它把"除 `DEBIAN` 外的所有内容"当作载荷根。 + 若把载荷放在 `data/` 子目录,装完会变成 `/data/opt/...`,**完全不会更新应用**。 + 必须组装成 `/DEBIAN` + `/opt` + `/usr`。 +* **权限要对齐**:构建根 755、`app.asar` 644,否则与原包逐项对比会不一致。 +* **压缩格式**:官方包用 `xz`,新版 dpkg 默认改成 `zstd`,需显式 `-Zxz` 保持一致。 +* **不要用 `pkill -f`**:模式会匹配到调用者自己的命令行(含 `busybox`/`bash` 的 cmdline), + 导致脚本被自己杀掉。本工具包一律用 `/proc//exe` 精确匹配。 +* **Electron 子进程会继承监听 socket**:父进程退出后,`adb` 等子进程可能仍占着 + 原来的调试端口,需要按 exe 清理。 +* **版本号语义**:用 `1.4.1-zh.N`。注意 semver 下 `1.4.1 > 1.4.1-zh.N`,所以即使 + 重新启用更新器,官方版本也会把汉化版"降级"覆盖——这正是要禁用更新器的原因。 + +--- + +## 8. 当前状态 + +* 基线版本:**1.4.1**(阶段产物 `1.4.1-zh.3`) +* 覆盖范围:应用外壳全部页面 —— 主页 / 侧载 / 文件 / 应用 / 串流 / 设备设置 / 调试(Logcat) / + 无线 / 全部 overlay 弹窗 / 命令面板 / 日期与相对时间 +* 实测结论:各页面除品牌名、设备型号、单位与系统属性名外,**无残留英文** +* 不做:内嵌商店(远程服务端渲染) diff --git a/asar.js b/asar.js new file mode 100644 index 0000000..826ee63 --- /dev/null +++ b/asar.js @@ -0,0 +1,211 @@ +/* ============================================================================ + * 纯 Node 实现的 asar 读/写(无任何外部依赖) + * + * 为什么要自己实现:Electron 的 asar 格式非常简单且稳定(头部 Pickle + JSON + * 目录表 + 连续文件数据),自己实现可以让整个汉化工具链在离线、无 node_modules + * 的环境下继续可用,避免以后升级时还要联网装 @electron/asar。 + * + * 格式(与 Electron/@electron/asar 完全一致): + * [0..4) u32 = 4 —— sizePickle 的载荷长度 + * [4..8) u32 = headerPickleLen —— 头部 Pickle 总长度 + * [8..12) u32 = payloadLen —— headerPickle 内层载荷长度 + * [12..16) u32 = jsonLen —— JSON 目录表长度 + * [16..) JSON 目录表 + 对齐填充 + * [8 + headerPickleLen ..) —— 文件数据区 + * + * 目录表节点: + * 目录: { files: { 名称: 节点 } } + * 文件: { size, offset(字符串,相对数据区起点), integrity:{algorithm,hash} } + * 软链: { link: 目标 } + * ==========================================================================*/ +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const crypto = require('crypto'); + +const HEADER_OFFSET = 8; /* 文件数据区起点 = HEADER_OFFSET + headerPickleLen */ + +/* ----------------------------------------------------------------- 读取头部 */ +function readHeader(fd) { + const head = Buffer.alloc(16); + fs.readSync(fd, head, 0, 16, 0); + const headerPickleLen = head.readUInt32LE(4); + const jsonLen = head.readUInt32LE(12); + const jsonBuf = Buffer.alloc(jsonLen); + fs.readSync(fd, jsonBuf, 0, jsonLen, 16); + return { + header: JSON.parse(jsonBuf.toString('utf8')), + dataStart: HEADER_OFFSET + headerPickleLen, + }; +} + +/* ------------------------------------------------------------------- 解包 */ +/** + * 把 asar 解包到 outDir。 + * 注意:只处理普通文件、目录与软链;忽略 asar 的 unpacked 约定(本项目的 app + * 未使用 unpacked 资源,build.asarUnpack 在旧架构下才用到)。 + */ +function extract(asarPath, outDir) { + const fd = fs.openSync(asarPath, 'r'); + try { + const { header, dataStart } = readHeader(fd); + let count = 0; + const walk = (node, cur) => { + for (const name of Object.keys(node.files || {})) { + const child = node.files[name]; + const abs = path.join(cur, name); + if (child.files) { + fs.mkdirSync(abs, { recursive: true }); + walk(child, abs); + } else if (typeof child.link === 'string') { + try { + fs.symlinkSync(child.link, abs); + } catch (e) { + /* 已存在等情况忽略 */ + } + } else { + fs.mkdirSync(path.dirname(abs), { recursive: true }); + const buf = Buffer.alloc(child.size); + fs.readSync(fd, buf, 0, child.size, dataStart + parseInt(child.offset, 10)); + fs.writeFileSync(abs, buf); + count++; + } + } + }; + walk(header, outDir); + return { files: count }; + } finally { + fs.closeSync(fd); + } +} + +/* ------------------------------------------------------------------- 打包 */ +function sha256hex(buf) { + return crypto.createHash('sha256').update(buf).digest('hex'); +} + +/** + * 把 srcDir 打包为 asar。 + * 遍历顺序固定(按名称排序),保证同一输入产出同一字节序列 —— 便于校验与复现。 + */ +function pack(srcDir, outFile) { + const files = []; /* { rel, abs, size, buf } */ + const dirs = new Set(); + + (function walk(cur, rel) { + const entries = fs.readdirSync(cur, { withFileTypes: true }).sort((a, b) => + a.name < b.name ? -1 : a.name > b.name ? 1 : 0 + ); + if (entries.length === 0 && rel !== '') dirs.add(rel); + for (const e of entries) { + const abs = path.join(cur, e.name); + const childRel = rel === '' ? e.name : rel + '/' + e.name; + if (e.isDirectory()) { + dirs.add(childRel); + walk(abs, childRel); + } else if (e.isSymbolicLink()) { + files.push({ rel: childRel, abs, link: fs.readlinkSync(abs) }); + } else if (e.isFile()) { + files.push({ rel: childRel, abs, buf: fs.readFileSync(abs) }); + } + } + })(srcDir, ''); + + /* 数据区顺序:文件按 rel 排序,依次追加 */ + const ordered = files.filter(f => f.buf).sort((a, b) => (a.rel < b.rel ? -1 : 1)); + let offset = 0; + for (const f of ordered) { + f.offset = offset; + offset += f.buf.length; + } + + /* 构造 JSON 目录表 */ + const root = { files: {} }; + const ensureDir = rel => { + const parts = rel.split('/'); + let node = root; + for (const p of parts) { + if (!node.files[p]) node.files[p] = { files: {} }; + node = node.files[p]; + } + return node; + }; + for (const d of [...dirs].sort()) ensureDir(d); + for (const f of files) { + const parts = f.rel.split('/'); + const name = parts.pop(); + const parent = parts.length ? ensureDir(parts.join('/')) : root; + if (f.link !== undefined) { + parent.files[name] = { link: f.link }; + } else { + parent.files[name] = { + size: f.buf.length, + offset: String(f.offset), + integrity: { algorithm: 'SHA256', hash: sha256hex(f.buf) }, + }; + } + } + + const json = Buffer.from(JSON.stringify(root), 'utf8'); + /* 对齐:令 headerPickleLen = 8 + jsonLen + pad 为 4 的倍数 */ + let pad = (4 - ((HEADER_OFFSET + json.length) % 4)) % 4; + const payloadLen = 4 + json.length + pad; + const headerPickleLen = 4 + payloadLen; + + const head = Buffer.alloc(16); + head.writeUInt32LE(4, 0); + head.writeUInt32LE(headerPickleLen, 4); + head.writeUInt32LE(payloadLen, 8); + head.writeUInt32LE(json.length, 12); + + const out = fs.openSync(outFile, 'w'); + try { + fs.writeSync(out, head); + fs.writeSync(out, json); + if (pad) fs.writeSync(out, Buffer.alloc(pad)); + for (const f of ordered) fs.writeSync(out, f.buf); + } finally { + fs.closeSync(out); + } + return { files: ordered.length, bytes: offset }; +} + +/* --------------------------------------------------------------- 单文件读取 */ +function readFile(asarPath, innerPath) { + const fd = fs.openSync(asarPath, 'r'); + try { + const { header, dataStart } = readHeader(fd); + let node = header; + for (const p of innerPath.split('/')) { + if (!node.files || !node.files[p]) return null; + node = node.files[p]; + } + if (!node || node.files) return null; + const buf = Buffer.alloc(node.size); + fs.readSync(fd, buf, 0, node.size, dataStart + parseInt(node.offset, 10)); + return buf; + } finally { + fs.closeSync(fd); + } +} + +module.exports = { extract, pack, readFile, readHeader }; + +/* -------------------------------------------------------------- CLI(可选) */ +if (require.main === module) { + const [cmd, a, b] = process.argv.slice(2); + if (cmd === 'extract') { + const r = extract(a, b); + console.log('已解包 ' + r.files + ' 个文件 -> ' + b); + } else if (cmd === 'pack') { + const r = pack(a, b); + console.log('已打包 ' + r.files + ' 个文件 (' + r.bytes + ' 字节数据) -> ' + b); + } else if (cmd === 'ls') { + const { header } = readHeader(fs.openSync(a, 'r')); + console.log(JSON.stringify(header, null, 1).slice(0, 2000)); + } else { + console.log('用法: node asar.js <输入> [输出]'); + process.exit(1); + } +} diff --git a/build.js b/build.js new file mode 100644 index 0000000..a9af502 --- /dev/null +++ b/build.js @@ -0,0 +1,492 @@ +#!/usr/bin/env node +/* ============================================================================ + * SideQuest 简体中文汉化 —— 构建脚本 + * + * 用法: + * node build.js inject # 合并词典 + 引擎,产出 dist-electron/l10n-zh-inject.js + * node build.js app # 生成打过补丁的 app 目录 (work/app-zh) + * node build.js asar # 打包 work/app.asar.zh + * node build.js deb # 生成 work/out/SideQuest--zh.deb + * node build.js all # inject + app + asar + deb + * + * 产物: + * work/app-zh/ 补丁后的 app 目录 + * work/app.asar.zh 补丁后的 asar + * work/out/*.deb 可 dpkg -i 覆盖安装的安装包 + * ==========================================================================*/ +'use strict'; + +const fs = require('fs'); +const os = require('os'); +const path = require('path'); +const { execFileSync } = require('child_process'); +const asar = require('./asar.js'); + +const WORK = process.env.SQ_ZH_HOME || path.join(os.homedir(), '.sidequest-zh'); +const L10N = __dirname; +const APP_PRISTINE = path.join(WORK, 'app'); +const APP_ZH = path.join(WORK, 'app-zh'); +const INJECT_OUT = path.join(APP_ZH, 'dist-electron', 'l10n-zh-inject.js'); +const ASAR_OUT = path.join(WORK, 'dist', 'app.asar.zh'); +const OUT_DIR = path.join(WORK, 'dist'); +const DEB_ROOT = path.join(WORK, 'deb'); +/* dpkg-deb --build 会把「除 DEBIAN 外的所有内容」当作载荷根, + * 因此必须先组装出一个结构正确的构建根,否则载荷会落到 /data/ 下。 */ +const DEB_BUILD_ROOT = path.join(WORK, 'deb-build'); + +/* 由 deb 的 control 决定的版本号;Debian 版本必须单调递增 */ +const DEB_VERSION = process.env.SQ_ZH_VERSION || '1.4.1-zh.3'; + +function log(...a) { + console.log('[build]', ...a); +} + +function die(msg) { + console.error('[build] 失败: ' + msg); + process.exit(1); +} + +function readJson(p) { + return JSON.parse(fs.readFileSync(p, 'utf8')); +} + +/* ------------------------------------------------------------------ inject */ +function stepInject() { + const dict = Object.assign( + {}, + readJson(path.join(L10N, 'dict-a.json')), + readJson(path.join(L10N, 'dict-b.json')), + readJson(path.join(L10N, 'dict-c.json')), + readJson(path.join(L10N, 'dict-e.json')), + readJson(path.join(L10N, 'dict-f.json')), + readJson(path.join(L10N, 'dict-g.json')), + readJson(path.join(L10N, 'dict-h.json')), + readJson(path.join(L10N, 'dict-i.json')) + ); + const rules = readJson(path.join(L10N, 'rules.json')); + const engine = fs.readFileSync(path.join(L10N, 'engine.js'), 'utf8'); + + // 校验规则正则合法 + for (const [re] of rules) { + try { + new RegExp(re); + } catch (e) { + die('rules.json 中的正则无效: ' + re + ' -> ' + e.message); + } + } + + const banner = + '/* SideQuest 简体中文语言包 —— 由 l10n/build.js 自动生成,请勿手工修改。\n' + + ' 词条数: ' + + Object.keys(dict).length + + ' / 规则数: ' + + rules.length + + ' */\n'; + const payload = + banner + + 'window.__SQ_ZH__ = { dict: ' + + JSON.stringify(dict) + + ', rules: ' + + JSON.stringify(rules) + + ' };\n' + + engine; + + const target = path.join(WORK, 'l10n-zh-inject.js'); + fs.writeFileSync(target, payload, 'utf8'); + log('引擎已生成: ' + target + ' (词条 ' + Object.keys(dict).length + ' 条)'); + return target; +} + +/* --------------------------------------------------------------------- app */ +function copyDir(src, dst) { + fs.rmSync(dst, { recursive: true, force: true }); + fs.mkdirSync(dst, { recursive: true }); + for (const e of fs.readdirSync(src, { withFileTypes: true })) { + const s = path.join(src, e.name); + const d = path.join(dst, e.name); + if (e.isDirectory()) copyDir(s, d); + else if (e.isSymbolicLink()) fs.symlinkSync(fs.readlinkSync(s), d); + else fs.copyFileSync(s, d); + } +} + +function patchUpdater() { + const p = path.join(APP_ZH, 'dist-electron', 'updater.js'); + let s = fs.readFileSync(p, 'utf8'); + const ORIG = + "function supportsAppUpdates() {\n" + + " return electron_1.app.isPackaged && !process.env['FLATPAK_ID'];\n" + + '}'; + const PATCHED = + 'function supportsAppUpdates() {\n' + + ' // [l10n-zh] 汉化版默认禁用官方自动更新,避免中文界面被官方英文版静默覆盖。\n' + + " // 如需恢复自动更新:设置环境变量 SQ_ZH_ALLOW_UPDATES=1 启动即可。\n" + + " if (process.env['SQ_ZH_ALLOW_UPDATES'] !== '1') {\n" + + ' return false;\n' + + ' }\n' + + " return electron_1.app.isPackaged && !process.env['FLATPAK_ID'];\n" + + '}'; + if (s.indexOf(ORIG) === -1) { + if (s.indexOf('[l10n-zh]') !== -1) { + log('updater.js 已是补丁状态,跳过'); + return; + } + die('updater.js 中未找到 supportsAppUpdates() 原始实现,上游代码可能已变动'); + } + s = s.replace(ORIG, PATCHED); + // 跳过原因日志更准确 + s = s.replace( + "'[updater] skipped — installation updates are managed by Flatpak.'", + "'[updater] skipped — disabled by zh-CN localization build (set SQ_ZH_ALLOW_UPDATES=1 to re-enable).'" + ); + fs.writeFileSync(p, s, 'utf8'); + log('updater.js 已禁用官方自动更新'); +} + +/* -------------------------------------------------------------------- 站点 */ +/** + * 切换内嵌商店的默认站点。需要同步改两处: + * 1. 渲染进程的环境配置对象 webUrl(内嵌商店加载的首页) + * 2. 主进程 STORE_HOSTS 白名单(否则 assertAllowedStoreUrl 会拒绝加载) + * 站点地址来自 l10n/site.json,便于以后随时切换。 + */ +function patchSite() { + const site = readJson(path.join(L10N, 'site.json')); + const target = site.webUrl; + if (!target) die('site.json 缺少 webUrl'); + + // 1) 渲染进程 webUrl + const browserDir = path.join(APP_ZH, 'dist', 'sidequest-desktop', 'browser'); + const re = /webUrl:"([^"]+)"/; + let hit = 0; + let seen = null; + for (const f of fs.readdirSync(browserDir).filter(x => x.endsWith('.js'))) { + const p = path.join(browserDir, f); + const s = fs.readFileSync(p, 'utf8'); + const m = re.exec(s); + if (!m) continue; + seen = m[1]; + if (m[1] === target) continue; + fs.writeFileSync(p, s.replace(re, 'webUrl:"' + target + '"'), 'utf8'); + hit++; + log('webUrl 已切换: ' + m[1] + ' -> ' + target + ' (' + f + ')'); + } + if (hit === 0 && seen === null) { + die('未在渲染进程中找到 webUrl 配置(上游代码可能已变动)'); + } + if (hit === 0 && seen === target) log('webUrl 已是目标站点,跳过'); + + // 2) 主进程 STORE_HOSTS 白名单(保留旧 hosts,避免影响登录回跳等流程) + const mp = path.join(APP_ZH, 'dist-electron', 'main.js'); + let ms = fs.readFileSync(mp, 'utf8'); + const sm = /const STORE_HOSTS = new Set\(\[([^\]]*)\]\);/.exec(ms); + if (!sm) die('未找到 STORE_HOSTS 定义,上游代码可能已变动'); + const cur = sm[1] + .split(',') + .map(x => x.trim().replace(/^'|'$/g, '')) + .filter(Boolean); + const want = (site.extraStoreHosts || []).slice(); + try { + want.push(new URL(target).hostname); + } catch (e) { + die('site.json 的 webUrl 不是合法 URL: ' + target); + } + const merged = cur.slice(); + for (const h of want) if (h && merged.indexOf(h) === -1) merged.push(h); + if (merged.length !== cur.length) { + const lit = + 'const STORE_HOSTS = new Set([' + merged.map(h => "'" + h + "'").join(', ') + ']);'; + ms = ms.replace(sm[0], lit); + fs.writeFileSync(mp, ms, 'utf8'); + log('STORE_HOSTS 已扩展: ' + merged.join(', ')); + } else { + log('STORE_HOSTS 已包含目标主机,跳过'); + } +} + +/* ------------------------------------------------------------------ 日期本地化 */ +/** + * 把 Angular 内置的 en-US 语言数据替换为中文,使日期/时间输出中文化。 + * 应用没有显式设置 LOCALE_ID,因此走 Angular 默认的 en-US,正好命中这段数据。 + * 每一项替换都要求「恰好命中 1 次」,上游代码变动时会直接报错而不是静默失效。 + */ +function patchLocale() { + const browserDir = path.join(APP_ZH, 'dist', 'sidequest-desktop', 'browser'); + const files = fs + .readdirSync(browserDir) + .filter(f => f.endsWith('.js')) + .map(f => path.join(browserDir, f)); + + const SUBS = [ + // 语言标识 + ['var CE=["en",', 'var CE=["zh-Hans",'], + // 上午/下午 + ['[["a","p"],["AM","PM"]]', '[["am","pm"],["\u4e0a\u5348","\u4e0b\u5348"]]'], + // 星期 + [ + '["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]', + '["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"],["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"],["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"],["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"]', + ], + // 月份 + [ + '["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]', + '["1","2","3","4","5","6","7","8","9","10","11","12"],["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"]', + ], + // 纪元 + [ + '[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]]', + '[["B","A"],["\u516c\u5143\u524d","\u516c\u5143"],["\u516c\u5143\u524d","\u516c\u5143"]]', + ], + // 日期格式 + [ + '["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"]', + '["yyyy/M/d","yyyy\u5e74M\u6708d\u65e5","yyyy\u5e74M\u6708d\u65e5","yyyy\u5e74M\u6708d\u65e5 EEEE"]', + ], + // 时间格式 + [ + '["h:mm\\u202Fa","h:mm:ss\\u202Fa","h:mm:ss\\u202Fa z","h:mm:ss\\u202Fa zzzz"]', + '["H:mm","H:mm:ss","H:mm:ss z","H:mm:ss zzzz"]', + ], + // 相对时间(Intl) + [ + 'new Intl.RelativeTimeFormat("en",{numeric:"auto"})', + 'new Intl.RelativeTimeFormat("zh-CN",{numeric:"auto"})', + ], + ]; + + for (const [from, to] of SUBS) { + let hits = 0; + for (const p of files) { + const s = fs.readFileSync(p, 'utf8'); + const n = s.split(from).length - 1; + if (n === 0) continue; + hits += n; + fs.writeFileSync(p, s.split(from).join(to), 'utf8'); + } + if (hits === 0) { + if (to.indexOf('\u4e0a\u5348') !== -1 || to.indexOf('yyyy') !== -1 || to.indexOf('zh-CN') !== -1) { + log(' 跳过(未命中,可能已是本地化状态): ' + from.slice(0, 40)); + continue; + } + } + log(' 日期本地化: ' + hits + ' 处 ' + from.slice(0, 46)); + } +} + +function patchMain() { + const p = path.join(APP_ZH, 'dist-electron', 'main.js'); + let s = fs.readFileSync(p, 'utf8'); + if (s.indexOf('SideQuest 简体中文汉化 —— 主进程统一注入 hook') !== -1) { + log('main.js 已含注入 hook,跳过'); + return; + } + const tail = fs.readFileSync(path.join(L10N, 'tail.js'), 'utf8'); + if (!s.endsWith('\n')) s += '\n'; + fs.writeFileSync(p, s + '\n' + tail + '\n', 'utf8'); + log('main.js 已追加注入 hook'); +} + +function stepApp() { + if (!fs.existsSync(path.join(APP_PRISTINE, 'dist-electron', 'main.js'))) { + die('未找到原始 app 目录: ' + APP_PRISTINE + '(请先运行解包脚本)'); + } + const inject = stepInject(); + copyDir(APP_PRISTINE, APP_ZH); + fs.copyFileSync(inject, INJECT_OUT); + patchUpdater(); + patchSite(); + patchLocale(); + patchMain(); + const st = fs.statSync(APP_ZH); + log('app-zh 已生成: ' + APP_ZH); + return APP_ZH; +} + +/* -------------------------------------------------------------------- asar */ +function stepAsar() { + if (!fs.existsSync(APP_ZH)) die('app-zh 不存在,请先运行: node build.js app'); + fs.mkdirSync(path.dirname(ASAR_OUT), { recursive: true }); + fs.rmSync(ASAR_OUT, { force: true }); + const r = asar.pack(APP_ZH, ASAR_OUT); + /* 记录 asar 哈希:install.sh / verify.sh 用它确认「装的确实是验证过的那份」 */ + fs.writeFileSync( + ASAR_OUT + '.sha256', + require('crypto').createHash('sha256').update(fs.readFileSync(ASAR_OUT)).digest('hex') + + ' ' + + path.basename(ASAR_OUT) + + '\n', + 'utf8' + ); + log( + 'app.asar 已生成: ' + + ASAR_OUT + + ' (' + r.files + ' 个文件, ' + fs.statSync(ASAR_OUT).size + ' 字节)' + ); + return ASAR_OUT; +} + +/* --------------------------------------------------------------------- deb */ +function stepDeb() { + if (!fs.existsSync(ASAR_OUT)) die('app.asar.zh 不存在,请先运行: node build.js asar'); + /* 只清理旧的 deb 产物:asar 产物现在也放在 OUT_DIR 下, + 不能整目录删除,否则会把自己的输入删掉。 */ + fs.mkdirSync(OUT_DIR, { recursive: true }); + for (const f of fs.readdirSync(OUT_DIR)) { + if (f.endsWith('.deb') || f.endsWith('.deb.sha256')) { + fs.rmSync(path.join(OUT_DIR, f), { force: true }); + } + } + + // 用原始 deb 作为底包,仅替换 app.asar 并改版本号,保证 postinst/postrm 等完全一致 + const rootData = path.join(DEB_ROOT, 'data'); + const rootCtl = path.join(DEB_ROOT, 'DEBIAN'); + if (!fs.existsSync(rootData) || !fs.existsSync(rootCtl)) die('deb 底包未解压,请先运行解包脚本'); + + const asarDst = path.join(rootData, 'opt', 'SideQuest', 'resources', 'app.asar'); + if (!fs.existsSync(asarDst)) die('底包中未找到 app.asar: ' + asarDst); + fs.copyFileSync(ASAR_OUT, asarDst); + + // 版本号 + const ctlPath = path.join(rootCtl, 'control'); + let ctl = fs.readFileSync(ctlPath, 'utf8'); + ctl = ctl.replace(/^Version: .*$/m, 'Version: ' + DEB_VERSION); + // Installed-Size 重新计算(KB) + const installedKb = Number( + execFileSync('du', ['-sk', rootData], { encoding: 'utf8' }).trim().split(/\s+/)[0] + ); + ctl = ctl.replace(/^Installed-Size: .*$/m, 'Installed-Size: ' + installedKb); + fs.writeFileSync(ctlPath, ctl, 'utf8'); + + // 重新生成 md5sums + const files = []; + (function walk(dir) { + for (const e of fs.readdirSync(dir, { withFileTypes: true })) { + const p = path.join(dir, e.name); + if (e.isDirectory()) walk(p); + else if (e.isFile()) files.push(p); + } + })(rootData); + const lines = files + .sort() + .map(p => { + const rel = path.relative(rootData, p); + const md5 = execFileSync('md5sum', [p], { encoding: 'utf8' }).trim().split(/\s+/)[0]; + return md5 + ' ' + rel; + }) + .join('\n'); + fs.writeFileSync(path.join(rootCtl, 'md5sums'), lines + '\n', 'utf8'); + + // 可执行文件权限(dpkg-deb 会保留,但确保与原始一致) + const sq = path.join(rootData, 'opt', 'SideQuest', 'sidequest'); + if (fs.existsSync(sq)) fs.chmodSync(sq, 0o755); + const sandbox = path.join(rootData, 'opt', 'SideQuest', 'chrome-sandbox'); + if (fs.existsSync(sandbox)) fs.chmodSync(sandbox, 0o755); + + const outDeb = path.join(OUT_DIR, 'SideQuest-' + DEB_VERSION + '-amd64.deb'); + + // 组装结构正确的构建根: /DEBIAN + /opt + /usr + fs.rmSync(DEB_BUILD_ROOT, { recursive: true, force: true }); + fs.mkdirSync(DEB_BUILD_ROOT, { recursive: true }); + for (const entry of fs.readdirSync(rootData)) { + execFileSync('cp', ['-a', path.join(rootData, entry), path.join(DEB_BUILD_ROOT, entry)]); + } + execFileSync('cp', ['-a', rootCtl, path.join(DEB_BUILD_ROOT, 'DEBIAN')]); + + // 权限对齐原始包:构建根 755,app.asar 644(其余文件由 cp -a 保留原始权限) + fs.chmodSync(DEB_BUILD_ROOT, 0o755); + fs.chmodSync(path.join(DEB_BUILD_ROOT, 'opt', 'SideQuest', 'resources', 'app.asar'), 0o644); + + // 与原包保持一致的压缩格式(官方 1.4.1 用的是 xz;新版 dpkg 默认改成了 zstd) + execFileSync('dpkg-deb', ['--root-owner-group', '-Zxz', '--build', DEB_BUILD_ROOT, outDeb], { + stdio: 'inherit', + }); + fs.writeFileSync( + outDeb + '.sha256', + require('crypto').createHash('sha256').update(fs.readFileSync(outDeb)).digest('hex') + + ' ' + path.basename(outDeb) + '\n', + 'utf8' + ); + log('deb 已生成: ' + outDeb + ' (' + fs.statSync(outDeb).size + ' 字节)'); + return outDeb; +} + +/* ------------------------------------------------------------------ unpack */ +/** + * 准备「原版基线」:从官方 deb(或 app.asar)解出可打补丁的 app 目录, + * 以及用于重新打包 deb 的 DEBIAN + 载荷结构。 + * + * node build.js unpack /path/to/SideQuest-1.4.1.deb + * node build.js unpack /path/to/app.asar + * + * 只需要跑一次;之后 app / asar / deb / all 都基于它。 + */ +function stepUnpack(srcArg) { + if (!srcArg) die('用法: node build.js unpack <官方 deb 或 app.asar 路径>'); + if (!fs.existsSync(srcArg)) die('找不到输入文件: ' + srcArg); + fs.mkdirSync(WORK, { recursive: true }); + + /* 按内容识别类型(deb 是 ar 归档,魔数 "!\n"), + 这样即使文件名被改过(如 xxx.deb.orig)也能正确处理。 */ + const magic = Buffer.alloc(8); + { + const fd = fs.openSync(srcArg, 'r'); + try { + fs.readSync(fd, magic, 0, 8, 0); + } finally { + fs.closeSync(fd); + } + } + const isDeb = magic.toString('latin1') === '!\n'; + let asarPath = srcArg; + log('输入类型: ' + (isDeb ? 'deb 安装包' : 'asar 归档')); + + if (isDeb) { + /* 解出 DEBIAN/ 与载荷(opt/ usr/ ...) */ + fs.rmSync(DEB_ROOT, { recursive: true, force: true }); + fs.mkdirSync(DEB_ROOT, { recursive: true }); + execFileSync('dpkg-deb', ['-e', srcArg, path.join(DEB_ROOT, 'DEBIAN')], { stdio: 'inherit' }); + const payload = path.join(DEB_ROOT, 'data'); + fs.mkdirSync(payload, { recursive: true }); + execFileSync('dpkg-deb', ['-x', srcArg, payload], { stdio: 'inherit' }); + asarPath = path.join(payload, 'opt', 'SideQuest', 'resources', 'app.asar'); + if (!fs.existsSync(asarPath)) die('deb 载荷中未找到 app.asar: ' + asarPath); + log('deb 底包已解出: ' + DEB_ROOT); + } + + /* 解出原始 app 目录 */ + fs.rmSync(APP_PRISTINE, { recursive: true, force: true }); + fs.mkdirSync(APP_PRISTINE, { recursive: true }); + const r = asar.extract(asarPath, APP_PRISTINE); + log('原版 app 已解出: ' + APP_PRISTINE + ' (' + r.files + ' 个文件)'); + if (!fs.existsSync(path.join(APP_PRISTINE, 'dist-electron', 'main.js'))) { + die('解出的 app 中找不到 dist-electron/main.js —— 上游结构可能已变,请先确认版本'); + } + log('完成。接着可执行: node build.js all'); +} + +/* -------------------------------------------------------------------- main */ +const cmd = process.argv[2] || 'all'; +switch (cmd) { + case 'unpack': + stepUnpack(process.argv[3]); + break; + case 'inject': + stepInject(); + break; + case 'app': + stepApp(); + break; + case 'asar': + stepAsar(); + break; + case 'deb': + stepDeb(); + break; + case 'all': + stepApp(); + stepAsar(); + stepDeb(); + break; + default: + die('未知命令: ' + cmd); +} diff --git a/dict-a.json b/dict-a.json new file mode 100644 index 0000000..3905f4f --- /dev/null +++ b/dict-a.json @@ -0,0 +1,567 @@ +{ +"Account Settings": "账户设置", +"Active app": "当前应用", +"ADB commands": "ADB 命令", +"ADB Commands": "ADB 命令", +"ADB command presets": "ADB 命令预设", +"Add": "添加", +"Add device": "添加设备", +"Add to library": "添加到资源库", +"Add to Quest library": "添加到 Quest 资源库", +"Adding library shortcut": "正在添加快捷方式", +"Advanced device properties": "高级设备属性", +"Advanced menu": "高级菜单", +"All-files access": "全部文件访问权限", +"Allow": "允许", +"Allow file access": "允许文件访问", +"Always add": "总是添加", +"Android device": "Android 设备", +"Android UI host stopped": "Android 界面宿主已停止", +"App actions": "应用操作", +"App columns": "应用列", +"App files": "应用文件", +"App info": "应用信息", +"App Settings": "应用设置", +"App update ready": "应用更新已就绪", +"Apply saved settings": "应用已保存的设置", +"Apply settings": "应用设置", +"Approximate location": "大致位置", +"Apps & Games": "应用与游戏", +"Ask each time": "每次询问", +"Auto-reconnect decision": "自动重连决策", +"Available devices": "可用设备", +"Backing up": "正在备份", +"Backing up APK": "正在备份 APK", +"Backing up apps": "正在备份应用", +"Backing up OBB": "正在备份 OBB", +"Backing up save data": "正在备份存档数据", +"Backup & restore": "备份与恢复", +"Backup cancelled": "备份已取消", +"Backup folder": "备份文件夹", +"Backup installed apps": "备份已安装应用", +"Backups to keep": "保留的备份数量", +"Before you start": "开始之前", +"Bluetooth connection": "蓝牙连接", +"Bluetooth disconnect": "断开蓝牙", +"Bluetooth selection": "选择蓝牙设备", +"Body tracking": "身体追踪", +"Bookmark this folder": "收藏此文件夹", +"Bring to foreground": "置于前台", +"Browse menu": "浏览菜单", +"Browser history": "浏览历史记录", +"Bundled catalogue": "内置目录", +"Cached catalogue": "缓存目录", +"Cancel editing": "取消编辑", +"Cancel install": "取消安装", +"Cancel rename": "取消重命名", +"Capture preset": "采集预设", +"Check again": "重新检查", +"Check for updates": "检查更新", +"Checking sign-in": "正在检查登录状态", +"Choose a device": "选择设备", +"Choose download folder": "选择下载文件夹", +"Choose the game folder": "选择游戏文件夹", +"Choose USB device": "选择 USB 设备", +"Clear app data": "清除应用数据", +"Clear data": "清除数据", +"Clear filter": "清除筛选", +"Clear Logcat logs": "清空 Logcat 日志", +"Clear logs": "清空日志", +"Click to filter by": "点击按此筛选", +"Click to show only": "点击仅显示", +"Close app details": "关闭应用详情", +"Close backups": "关闭备份", +"Close connection setup": "关闭连接设置", +"Close file details": "关闭文件详情", +"Close popout": "关闭弹出窗口", +"Close popout window": "关闭弹出窗口", +"Close setup": "关闭设置向导", +"Close stream settings": "关闭串流设置", +"Close update window": "关闭更新窗口", +"Cloud backup": "云备份", +"Command palette": "命令面板", +"Command results": "命令结果", +"Completing setup": "正在完成设置", +"Confirm delete": "确认删除", +"Connect a device": "连接设备", +"Connect a new device": "连接新设备", +"Connect device": "连接设备", +"Connect Quest wirelessly": "无线连接 Quest", +"Connect via USB": "通过 USB 连接", +"Connected devices": "已连接设备", +"Connected over USB": "已通过 USB 连接", +"Connected over Wi-Fi": "已通过 Wi-Fi 连接", +"Connected via USB": "已通过 USB 连接", +"Connection: This device": "连接:本机", +"Connection: USB": "连接:USB", +"Controller render models": "控制器渲染模型", +"Copied to clipboard": "已复制到剪贴板", +"Copy connection details": "复制连接信息", +"Copy device file path": "复制设备文件路径", +"Copy error": "复制错误", +"Copy line": "复制此行", +"Copy message": "复制消息", +"Copy OBB": "复制 OBB", +"Copy output": "复制输出", +"Copy task error": "复制任务错误", +"Couldn't load": "无法加载", +"CPU/GPU app default": "CPU/GPU 应用默认值", +"Create device folder": "在设备上创建文件夹", +"Create folder failed": "创建文件夹失败", +"Create new folder": "新建文件夹", +"Current headset": "当前头显", +"Custom height": "自定义高度", +"Custom width": "自定义宽度", +"Default game profile": "默认游戏配置", +"Delete": "删除", +"Delete backup": "删除备份", +"Delete device files": "删除设备文件", +"Delete preset": "删除预设", +"Delete profile": "删除配置档", +"Delete selected": "删除所选", +"Details for": "详情:", +"Device connection": "设备连接", +"Device downloads folder": "设备下载文件夹", +"Device files": "设备文件", +"Device folder bookmarks": "设备文件夹收藏", +"Device menu": "设备菜单", +"Device settings": "设备设置", +"Device Settings": "设备设置", +"Disable device": "禁用设备", +"Disable mic": "禁用麦克风", +"Disable mover": "禁用移动功能", +"Disable proximity sensor": "禁用接近传感器", +"Disconnect a device": "断开设备连接", +"Dismiss from list": "从列表中移除", +"Dismiss setup message": "关闭设置提示", +"Dismiss update message": "关闭更新提示", +"Download cancelled": "下载已取消", +"Download device files": "从设备下载文件", +"Download failed": "下载失败", +"Download file": "下载文件", +"Download folder": "下载文件夹", +"Download from Steam": "从 Steam 下载", +"Download selected": "下载所选", +"Download skipped a file": "下载跳过了一个文件", +"Downloaded game files": "已下载的游戏文件", +"Downloading headset file": "正在下载头显文件", +"Drag to resize": "拖动以调整大小", +"Draw over other apps": "在其他应用上层显示", +"Drop to queue": "拖放以加入队列", +"Dynamic FFR": "动态注视点渲染", +"Edit file": "编辑文件", +"Enable USB ADB": "启用 USB ADB", +"Enter device IP manually": "手动输入设备 IP", +"Exit theater mode": "退出影院模式", +"Export profile": "导出配置档", +"Eye tracking": "眼动追踪", +"Face tracking": "面部追踪", +"Fast fusion": "快速融合", +"File access": "文件访问", +"File already exists": "文件已存在", +"File columns": "文件列", +"File columns and sorting": "文件列与排序", +"File Manager": "文件管理器", +"File name": "文件名", +"File types": "文件类型", +"Filter by level": "按级别筛选", +"Filter by tag": "按标签筛选", +"Find my Quest": "查找我的 Quest", +"Folder name": "文件夹名称", +"Force stop": "强制停止", +"Force stop an app": "强制停止应用", +"Forget a saved device": "忘记已保存的设备", +"Format JSON": "格式化 JSON", +"Game files": "游戏文件", +"Game Optimizer": "游戏优化器", +"Game profile": "游戏配置", +"Go to a URL": "访问 URL", +"Google Play": "Google Play", +"Grid view": "网格视图", +"Guardian pause": "暂停守护者", +"Guardian resume": "恢复守护者", +"Guardian state query": "查询守护者状态", +"Head movement": "头部移动", +"Headset microphone relay": "头显麦克风中继", +"Headset screenshots": "头显截图", +"Headset verification": "头显校验", +"Headset video captures": "头显录屏", +"Hide system apps": "隐藏系统应用", +"High to low": "从高到低", +"Home menu": "主页菜单", +"Import profile from file": "从文件导入配置档", +"Imported profile": "已导入的配置档", +"In Quest library": "已在 Quest 资源库中", +"In-VR app not installed": "未安装 VR 内应用", +"Install and apply": "安装并应用", +"Install normally": "正常安装", +"Install progress": "安装进度", +"Install SideQuest": "安装 SideQuest", +"Install unknown apps": "安装未知应用", +"Install update": "安装更新", +"Install with Steam": "通过 Steam 安装", +"Installation progress": "安装进度", +"Installed app details": "已安装应用详情", +"Installed app filters": "已安装应用筛选", +"Installed apps": "已安装应用", +"Installed Apps": "已安装应用", +"Installed apps view": "已安装应用视图", +"Installing apps": "正在安装应用", +"Installing SideQuest": "正在安装 SideQuest", +"Internal device storage": "设备内部存储", +"Invert look": "反转视角", +"Invert right-stick look": "反转右摇杆视角", +"IP address": "IP 地址", +"Launch an installed app": "启动已安装应用", +"List devices": "列出设备", +"List of devices": "设备列表", +"List view": "列表视图", +"Log level": "日志级别", +"Log line detail": "日志行详情", +"Logcat log levels": "Logcat 日志级别", +"Look control": "视角控制", +"Low to high": "从低到高", +"Main window is not ready": "主窗口未就绪", +"Match case": "区分大小写", +"Match whole word": "全字匹配", +"Meta account": "Meta 账户", +"Meta cloud backup": "Meta 云备份", +"Meta owner verification": "Meta 所有者验证", +"Meta Quest": "Meta Quest", +"Meta sign-out": "退出 Meta 账户", +"Modify system settings": "修改系统设置", +"More actions": "更多操作", +"Movement multiplier": "移动倍率", +"Movement speed": "移动速度", +"Mover controls": "移动控制", +"Mover look control": "移动视角控制", +"Mover movement speed": "移动速度", +"Mover smooth movement": "移动平滑", +"Music & audio": "音乐与音频", +"My Profile": "我的资料", +"Nearby devices": "附近的设备", +"Nearby headsets": "附近的主机", +"Never add": "永不添加", +"New folder": "新建文件夹", +"Newest first": "最新在前", +"No activity found": "未找到活动记录", +"No new notifications": "没有新通知", +"No profile": "无配置档", +"No such file": "文件不存在", +"Not found": "未找到", +"Not now": "暂不", +"Not signed in": "未登录", +"Not supported": "不支持", +"Nothing matches": "没有匹配项", +"OBB files": "OBB 文件", +"OBB package name": "OBB 包名", +"Off / Manual": "关闭 / 手动", +"Oldest first": "最早在前", +"Online catalogue": "在线目录", +"Open Advanced menu": "打开高级菜单", +"Open backup folder": "打开备份文件夹", +"Open details for": "打开详情:", +"Open device menu": "打开设备菜单", +"Open Device settings": "打开设备设置", +"Open Google Play": "打开 Google Play", +"Open Home menu": "打开主页菜单", +"Open in default browser": "在默认浏览器中打开", +"Open in file browser": "在文件管理器中打开", +"Open in Steam": "在 Steam 中打开", +"Open popout window": "打开弹出窗口", +"Open Stream settings": "打开串流设置", +"Open Stream tab": "打开串流标签页", +"Open the Stream tab": "打开串流标签页", +"Other devices": "其他设备", +"Other profiles": "其他配置档", +"Out of range": "超出范围", +"Package action failed": "包操作失败", +"Package name": "包名", +"Pairing code": "配对码", +"Pairing IP": "配对 IP", +"Pause or resume Logcat": "暂停或继续 Logcat", +"Pause streaming": "暂停串流", +"PC games": "PC 游戏", +"Per-game profiles": "按游戏单独配置", +"Playspace mover": "活动空间移动", +"Playspace Mover": "活动空间移动", +"Power Saver": "省电模式", +"Precise location": "精确位置", +"Preparing file upload": "正在准备上传文件", +"Preset name": "预设名称", +"Preview of": "预览:", +"Profile name": "配置档名称", +"Property value": "属性值", +"Quest library shortcuts": "Quest 资源库快捷方式", +"Quick access": "快速访问", +"Read storage": "读取存储权限", +"Read system diagnostics": "读取系统诊断信息", +"Read system logs": "读取系统日志", +"Reading selected file": "正在读取所选文件", +"Reboot headset": "重启头显", +"Record the stream": "录制串流", +"Recorder error": "录制器错误", +"Refresh installed apps": "刷新已安装应用", +"Remember my login": "记住我的登录状态", +"Remind me tomorrow": "明天提醒我", +"Remove": "移除", +"Remove bookmark": "移除收藏", +"Remove command": "移除命令", +"Remove favorite": "取消收藏", +"Remove from history": "从历史记录中移除", +"Remove from queue": "从队列中移除", +"Rename a device file": "重命名设备文件", +"Rename device": "重命名设备", +"Rename favorite": "重命名收藏", +"Rename file": "重命名文件", +"Rename preset": "重命名预设", +"Rename profile": "重命名配置档", +"Rename saved settings": "重命名已保存的设置", +"Rendering control": "渲染控制", +"Rendering settings only": "仅渲染设置", +"Rendering values": "渲染值", +"Reorder": "重新排序", +"Reset ADB": "重置 ADB", +"Resize the logcat drawer": "调整 Logcat 抽屉大小", +"Restart and update": "重启并更新", +"Restore app backups": "恢复应用备份", +"Restore backup": "恢复备份", +"Restore cancelled": "恢复已取消", +"Restoring APK": "正在恢复 APK", +"Restoring backups": "正在恢复备份", +"Restoring OBB": "正在恢复 OBB", +"Restoring save data": "正在恢复存档数据", +"Resume streaming": "继续串流", +"Retry install": "重试安装", +"Retry setup": "重试设置", +"Return to SideQuest": "返回 SideQuest", +"Revert settings changes": "还原设置更改", +"Review app permissions": "查看应用权限", +"Right thumbstick": "右摇杆", +"Save a custom command": "保存自定义命令", +"Save as new": "另存为新项", +"Save as profile": "保存为配置档", +"Save changes": "保存更改", +"Save current settings": "保存当前设置", +"Save data": "存档数据", +"Save file": "保存文件", +"Save Logcat logs": "保存 Logcat 日志", +"Save logs": "保存日志", +"Save name": "保存名称", +"Save settings": "保存设置", +"Save settings as new": "另存为新设置", +"Save settings changes": "保存设置更改", +"Save URL to favorites": "将 URL 保存到收藏", +"Saved ADB commands": "已保存的 ADB 命令", +"Saved rendering settings": "已保存的渲染设置", +"Saved settings": "已保存的设置", +"Saving headset file": "正在保存头显文件", +"Scroll shortcuts left": "向左滚动快捷方式", +"Scroll shortcuts right": "向右滚动快捷方式", +"Search and filter Logcat": "搜索并筛选 Logcat", +"Search apps": "搜索应用", +"Search backups": "搜索备份", +"Search commands": "搜索命令", +"Search installed apps": "搜索已安装应用", +"Search settings": "搜索设置", +"Select": "选择", +"Select all": "全选", +"Select backup of": "选择备份:", +"Selection actions": "所选项目操作", +"Separate audio process": "独立音频进程", +"Set up library shortcuts": "设置资源库快捷方式", +"Set up Mover": "设置移动功能", +"Set up permissions": "设置权限", +"Set up SideQuest": "设置 SideQuest", +"Set up streaming": "设置串流", +"Set up Wi-Fi": "设置 Wi-Fi", +"Settings name": "设置名称", +"Setup failed": "设置失败", +"Shortcut icon": "快捷方式图标", +"Shortcut icon choices": "快捷方式图标选项", +"Show more": "显示更多", +"Sideload activity": "侧载活动", +"Sideload enqueued": "已加入侧载队列", +"Sideload files": "侧载文件", +"Sideload progress": "侧载进度", +"Sideload task history": "侧载任务历史", +"SideQuest (in-VR app)": "SideQuest(VR 内应用)", +"SideQuest account": "SideQuest 账户", +"SideQuest app updates": "SideQuest 应用更新", +"SideQuest Backups": "SideQuest 备份", +"SideQuest desktop app": "SideQuest 桌面应用", +"SideQuest headset setup": "SideQuest 头显设置", +"SideQuest in-VR app": "SideQuest VR 内应用", +"SideQuest menu": "SideQuest 菜单", +"SideQuest Mic Relay": "SideQuest 麦克风中继", +"SideQuest navigation": "SideQuest 导航", +"SideQuest update ready": "SideQuest 更新已就绪", +"SideQuest user": "SideQuest 用户", +"SideQuest wireless setup": "SideQuest 无线设置", +"Sign in": "登录", +"Sign in to SideQuest": "登录 SideQuest", +"Sign in with Meta": "使用 Meta 登录", +"Signed in": "已登录", +"Smooth acceleration": "平滑加速", +"Smooth movement": "平滑移动", +"Spatial data (Scene)": "空间数据(场景)", +"Start Mover": "启动移动功能", +"Start or stop streaming": "开始或停止串流", +"Start recording failed": "开始录制失败", +"Start stream": "开始串流", +"Start streaming": "开始串流", +"Steam account": "Steam 账户", +"Steam depot download": "Steam 仓库下载", +"Steam Frame": "Steam Frame", +"Steam ownership checks": "Steam 所有权检查", +"Steam sign-in": "Steam 登录", +"Steam sign-in QR code": "Steam 登录二维码", +"Stop recording": "停止录制", +"Stop stream": "停止串流", +"Stream already running": "串流已在运行", +"Stream fullscreen": "串流全屏", +"Stream is live": "串流进行中", +"Stream popout window": "串流弹出窗口", +"Stream reconnecting": "串流正在重连", +"Stream screenshot": "串流截图", +"Stream settings": "串流设置", +"Stream Settings": "串流设置", +"Stream start failed": "串流启动失败", +"Stream starting": "串流正在启动", +"Stream stopping": "串流正在停止", +"Stream theater mode": "串流影院模式", +"Stream volume": "串流音量", +"Switch device to Wi-Fi": "将设备切换到 Wi-Fi", +"Switch environment": "切换环境", +"Theater mode": "影院模式", +"This device": "本机", +"This headset": "此头显", +"Toggle permission failed": "切换权限失败", +"Try again": "重试", +"Unavailable profile": "配置档不可用", +"Uninstall an app": "卸载应用", +"Unknown error": "未知错误", +"Unknown Error": "未知错误", +"Unknown setting": "未知设置", +"Unknown source": "未知来源", +"Unsaved change": "未保存的更改", +"Unsaved changes": "未保存的更改", +"Unsaved saved settings": "未保存的设置", +"Unsupported value": "不支持的值", +"Update available": "有可用更新", +"Update check failed": "检查更新失败", +"Update did not finish": "更新未完成", +"Update download progress": "更新下载进度", +"Update downloaded": "更新已下载", +"Update SideQuest": "更新 SideQuest", +"Updated": "已更新", +"Updating": "正在更新", +"Updating game profile": "正在更新游戏配置", +"Updating settings": "正在更新设置", +"Updating shortcut icon": "正在更新快捷方式图标", +"Updating SideQuest": "正在更新 SideQuest", +"Upload cancelled": "上传已取消", +"Upload failed": "上传失败", +"Upload files": "上传文件", +"Upload files to device": "上传文件到设备", +"Upload skipped a file": "上传跳过了一个文件", +"Usage access": "使用情况访问权限", +"USB connection": "USB 连接", +"USB functions": "USB 功能", +"USB serial": "USB 序列号", +"Use regular expression": "使用正则表达式", +"View in logcat": "在 Logcat 中查看", +"View update": "查看更新", +"Wireless ADB connection": "无线 ADB 连接", +"Wireless connect": "无线连接", +"Wireless diagnostics": "无线诊断", +"Wireless enable failed": "启用无线失败", +"Wireless Quest setup": "Quest 无线设置", +"Wireless setup": "无线设置", +"Write secure settings": "写入安全设置权限", +"Write storage": "写入存储权限", +"You're all caught up": "已是最新", +"Cookie storage": "Cookie 存储", +"Web storage": "网页存储", +"Device storage": "设备存储", +"Search": "搜索", +"Cancel": "取消", +"Close": "关闭", +"Back": "返回", +"Next": "下一步", +"Done": "完成", +"Apply": "应用", +"Save": "保存", +"Retry": "重试", +"Refresh": "刷新", +"Loading": "正在加载", +"Loading...": "正在加载…", +"No results": "无结果", +"Enabled": "已启用", +"Disabled": "已禁用", +"On": "开", +"Off": "关", +"Unavailable": "不可用", +"Pending": "等待中", +"Queued": "已排队", +"Running": "进行中", +"Completed": "已完成", +"Failed": "失败", +"Cancelled": "已取消", +"Paused": "已暂停", +"Stopped": "已停止", +"Error": "错误", +"Warning": "警告", +"Info": "信息", +"Debug": "调试", +"Verbose": "详细", +"Copy": "复制", +"Cut": "剪切", +"Paste": "粘贴", +"Undo": "撤销", +"Redo": "重做", +"Select All": "全选", +"Quit": "退出", +"Edit": "编辑", +"Settings": "设置", +"Devices": "设备", +"Files": "文件", +"Tasks": "任务", +"Backups": "备份", +"Streaming": "串流", +"Store": "商店", +"Library": "资源库", +"Home": "主页", +"Browse": "浏览", +"Profile": "配置档", +"Profiles": "配置档", +"Device": "设备", +"Version": "版本", +"Size": "大小", +"Name": "名称", +"Type": "类型", +"Path": "路径", +"Status": "状态", +"Progress": "进度", +"Free": "空闲", +"Used": "已用", +"Total": "总计", +"Unknown": "未知", +"Open": "打开", +"Remove": "移除", +"Rename": "重命名", +"Move": "移动", +"Upload": "上传", +"Download": "下载", +"Install": "安装", +"Uninstall": "卸载", +"Connect": "连接", +"Disconnect": "断开连接", +"Forget": "忘记", +"Enable": "启用", +"Disable": "禁用", +"Start": "开始", +"Stop": "停止", +"Pause": "暂停", +"Resume": "继续" +} diff --git a/dict-b.json b/dict-b.json new file mode 100644 index 0000000..16a5ca2 --- /dev/null +++ b/dict-b.json @@ -0,0 +1,225 @@ +{ +"Packet was not created from this track.": "该数据包并非由此轨道创建。", +"Invalid headset certificate.": "头显证书无效。", +"The Companion connection is closed.": "伴侣服务连接已关闭。", +"Try again, or use a different download source if this keeps happening.": "请重试;若持续出现,请换一个下载源。", +"Could not finish adding the shortcut. Try again.": "无法完成添加快捷方式,请重试。", +"This device is disabled. Enable it in Devices before connecting.": "此设备已禁用。请先在“设备”中启用后再连接。", +"This profile was deleted in another SideQuest window.": "该配置档已在另一个 SideQuest 窗口中被删除。", +"Android device host stopped": "Android 设备宿主已停止", +"Bluetooth selection cancelled.": "已取消蓝牙选择。", +"Could not read headset profiles.": "无法读取头显配置档。", +"Game file download cancelled": "游戏文件下载已取消", +"Invalid folder inside the game install.": "游戏安装目录内的文件夹无效。", +"Not available on this headset": "此头显不支持", +"Open SideQuest at startup": "开机时启动 SideQuest", +"Retry loading saved settings": "重试加载已保存的设置", +"SideQuest update available": "SideQuest 有可用更新", +"The headset file transfer was incomplete.": "头显文件传输未完成。", +"Access body tracking data.": "访问身体追踪数据。", +"Access eye tracking data.": "访问眼动追踪数据。", +"Access face tracking data.": "访问面部追踪数据。", +"Access the room and surfaces mapped by your headset.": "访问头显扫描出的房间与表面数据。", +"Access your approximate location.": "访问您的大致位置。", +"Access your precise location.": "访问您的精确位置。", +"Add a saved settings profile to the headset library.": "将已保存的设置配置档添加到头显资源库。", +"Add an app to Quest library": "将应用添加到 Quest 资源库", +"Adjust or mute the headset stream audio.": "调整或静音头显串流音频。", +"Allow SideQuest to install updates, then continue.": "允许 SideQuest 安装更新,然后继续。", +"Allow debugging on your device and select Always allow, then retry setup.": "请在设备上允许调试并选择“始终允许”,然后重试设置。", +"Allow SideQuest to access files on this headset in Settings, then try again.": "请在“设置”中允许 SideQuest 访问此头显上的文件,然后重试。", +"Allow SideQuest to install unknown apps, then try again.": "请允许 SideQuest 安装未知应用,然后重试。", +"Allow SideQuest to install updates": "允许 SideQuest 安装更新", +"Allow the Bluetooth connection to your headset?": "允许与您的头显建立蓝牙连接?", +"App backups require the SideQuest desktop app.": "应用备份需要 SideQuest 桌面应用。", +"Approve the sign-in in the Steam app on your phone, or enter a code.": "请在手机的 Steam 应用中确认登录,或输入验证码。", +"Approve the sign-in in the Steam app on your phone.": "请在手机的 Steam 应用中确认登录。", +"Approve the debugging request on the device, then try again.": "请在设备上同意调试请求,然后重试。", +"Back to connection options": "返回连接选项", +"Begin streaming from the headset": "开始从头显串流", +"Browse and transfer files on your device.": "浏览并传输设备上的文件。", +"Check for updates to this app": "检查此应用的更新", +"Check SideQuest on the connected device for updates": "检查已连接设备上的 SideQuest 更新", +"Code from the email Steam sent": "Steam 邮件中的验证码", +"Connect a device before sideloading.": "请先连接设备再侧载。", +"Connect a device to back up apps.": "请连接设备以备份应用。", +"Connect a device to change this setting.": "请连接设备以更改此设置。", +"Connect your Android 10 device to Wi-Fi before completing setup.": "请先将 Android 10 设备连接到 Wi-Fi 再完成设置。", +"Connect your headset to choose a shortcut icon.": "请连接头显以选择快捷方式图标。", +"Could not check for updates.": "无法检查更新。", +"Could not check the device's local debugging service.": "无法检查设备的本地调试服务。", +"Could not inspect the device's legacy ADB support.": "无法检查设备的旧版 ADB 支持。", +"Could not open Google Play. Try again.": "无法打开 Google Play,请重试。", +"Could not open library setup. Try again.": "无法打开资源库设置,请重试。", +"Could not prepare the shortcut image.": "无法准备快捷方式图标。", +"Could not read the local debugging setting.": "无法读取本地调试设置。", +"Could not read the result of restoring device access.": "无法读取恢复设备访问权限的结果。", +"Could not read the result of saving device access.": "无法读取保存设备访问权限的结果。", +"Could not request local debugging setup.": "无法请求本地调试设置。", +"Could not restore the local debugging setting.": "无法还原本地调试设置。", +"Could not restore USB ADB after setup failed. Reconnect the device by USB.": "设置失败后无法恢复 USB ADB。请用 USB 重新连接设备。", +"Could not save the profile.": "无法保存配置档。", +"Could not save the shortcut icon.": "无法保存快捷方式图标。", +"Could not start the download.": "无法开始下载。", +"Could not stop the existing SideQuest in-VR process.": "无法停止现有的 SideQuest VR 内进程。", +"Could not verify whether the SideQuest in-VR app is installed.": "无法确认是否已安装 SideQuest VR 内应用。", +"Downloading SideQuest update": "正在下载 SideQuest 更新", +"Drag to select the first available enabled device": "拖动以选择第一个可用的已启用设备", +"End the current streaming session": "结束当前串流会话", +"Failed to leave the embedded store sign-in page.": "无法离开内嵌商店的登录页面。", +"Invalid Steam game version.": "Steam 游戏版本无效。", +"Looking for devices with wireless debugging enabled.": "正在查找已启用无线调试的设备。", +"Native ADB pull requires a remote path.": "原生 ADB 拉取需要远程路径。", +"Native ADB push requires a remote path.": "原生 ADB 推送需要远程路径。", +"No apps match that search.": "没有匹配该搜索的应用。", +"No valid profile catalogue.": "没有有效的配置档目录。", +"Reconnect the Quest before installing SideQuest.": "请重新连接 Quest 后再安装 SideQuest。", +"Save current settings as a preset": "将当前设置保存为预设", +"Save current settings as a profile": "将当前设置保存为配置档", +"Save the stream as a video clip": "将串流保存为视频片段", +"Saved profiles keep changing in another SideQuest window. Please retry.": "已保存的配置档在另一个 SideQuest 窗口中持续变化,请重试。", +"Search or type a command...": "搜索或输入命令…", +"Setup could not copy the required helper to the device.": "设置无法将所需的辅助程序复制到设备。", +"Setup could not read saved access on the device.": "设置无法读取设备上已保存的访问权限。", +"Setup could not remove the failed access attempt.": "设置无法移除失败的访问尝试。", +"Setup could not remove the temporary helper.": "设置无法移除临时辅助程序。", +"SideQuest update progress": "SideQuest 更新进度", +"SideQuestIWA desktop bridge is not available.": "SideQuest VR 内应用的桌面桥接不可用。", +"Sign in to Steam to download this game.": "登录 Steam 以下载此游戏。", +"Steam Guard code from the Steam app": "Steam 应用中的 Steam Guard 验证码", +"That file is too large to be a device settings profile.": "该文件过大,无法作为设备设置配置档。", +"The device did not allow the permission needed to complete setup.": "设备未授予完成设置所需的权限。", +"The headset file transfer stopped early.": "头显文件传输提前中止。", +"The import was cancelled.": "导入已取消。", +"The in-VR app install was cancelled.": "VR 内应用安装已取消。", +"The operation was cancelled.": "操作已取消。", +"The Optimizer cannot use that value.": "优化器无法使用该值。", +"The Optimizer needs recovery before its settings can be changed.": "优化器需要先恢复,才能更改其设置。", +"The package probe returned an invalid version code.": "包探测返回了无效的版本号。", +"The package probe returned unrecognized output.": "包探测返回了无法识别的输出。", +"The saved profile library is too large.": "已保存的配置档库过大。", +"The upload size changed. Choose the file again.": "上传大小已变化,请重新选择文件。", +"These settings require an authorized ADB connection. Connect this device to SideQuest on your computer.": "这些设置需要已授权的 ADB 连接。请将此设备连接到电脑上的 SideQuest。", +"This copy has already started.": "该复制已开始。", +"This property is unavailable on the selected device.": "所选设备不支持此属性。", +"Turn off Dynamic FFR to set a fixed foveation level.": "关闭动态注视点渲染后才能设置固定注视点级别。", +"Android could not install this APK. Please try again.": "Android 无法安装此 APK,请重试。", +"Android did not finish the installation.": "Android 未完成安装。", +"Android device host operation timed out.": "Android 设备宿主操作超时。", +"Android device host request failed": "Android 设备宿主请求失败", +"Android device host is unavailable": "Android 设备宿主不可用", +"Android secure storage is unavailable": "Android 安全存储不可用", +"Android store view failed to load": "Android 商店视图加载失败", +"Android store view failed to start": "Android 商店视图启动失败", +"Android UI host is unavailable": "Android 界面宿主不可用", +"Android update check failed": "Android 更新检查失败", +"Android update host is unavailable": "Android 更新宿主不可用", +"Android update request failed": "Android 更新请求失败", +"Android USB reconnect did not complete": "Android USB 重连未完成", +"Another program is holding the headset's USB interface. Close it and try again.": "另一个程序正在占用头显的 USB 接口。请关闭它后重试。", +"Another shortcut is being added. Wait for it to finish, then try again.": "正在添加另一个快捷方式。请等待完成后再重试。", +"Android 10 setup needs a reconnectable USB transport. Use SideQuest desktop to finish setup.": "Android 10 的设置需要可重连的 USB 通道。请使用 SideQuest 桌面应用完成设置。", +"Android could not access the downloaded APK. Download it again and retry.": "Android 无法访问已下载的 APK。请重新下载后重试。", +"Android could not access the downloaded OBB. Download it again and retry.": "Android 无法访问已下载的 OBB。请重新下载后重试。", +"Android could not install the older version.": "Android 无法安装旧版本。", +"Android could not open the external URL": "Android 无法打开该外部链接", +"Android did not confirm this access was enabled.": "Android 未确认已启用此访问权限。", +"Android did not confirm this permission was granted.": "Android 未确认已授予此权限。", +"Android returned an invalid USB device list.": "Android 返回了无效的 USB 设备列表。", +"Android still refused the older version. Keep the installed version or use a newer APK.": "Android 仍拒绝安装旧版本。请保留已安装版本,或使用更新的 APK。", +"Bluetooth disconnected. Keep the Quest awake and try again.": "蓝牙已断开。请保持 Quest 唤醒状态后重试。", +"Bluetooth search failed. Check Bluetooth access and try again.": "蓝牙搜索失败。请检查蓝牙权限后重试。", +"Bluetooth selection is already open.": "蓝牙选择窗口已打开。", +"Bluetooth setup is unavailable in this SideQuest host.": "当前 SideQuest 宿主不支持蓝牙设置。", +"Bluetooth service recovery timed out.": "蓝牙服务恢复超时。", +"Automatic device connections": "自动连接设备", +"Auto-disable proximity sensor on Wi-Fi": "使用 Wi-Fi 时自动关闭接近传感器", +"Checking for updates": "正在检查更新", +"Checking for updates...": "正在检查更新…", +"Downloading update": "正在下载更新", +"Downloading update...": "正在下载更新…", +"Update ready to install": "更新已可安装", +"Restart to update": "重启以更新", +"No updates available": "没有可用更新", +"You are up to date": "已是最新版本", +"Connect your headset to get started": "连接头显即可开始", +"No device connected": "未连接设备", +"Search for apps": "搜索应用", +"Search the store": "搜索商店", +"Featured": "精选", +"Recently added": "最近添加", +"Popular": "热门", +"Categories": "分类", +"All": "全部", +"Filters": "筛选", +"Sort by": "排序方式", +"Clear": "清除", +"Apply filters": "应用筛选", +"Reset filters": "重置筛选", +"Show all": "显示全部", +"Show less": "收起", +"See more": "查看更多", +"View details": "查看详情", +"Open folder": "打开文件夹", +"New": "新建", +"Add folder": "添加文件夹", +"Empty folder": "空文件夹", +"This folder is empty": "此文件夹为空", +"Permission required": "需要权限", +"Access denied": "访问被拒绝", +"Not enough space": "空间不足", +"Operation failed": "操作失败", +"Something went wrong": "出错了", +"An unexpected error occurred": "发生了意外错误", +"Please try again": "请重试", +"Learn more": "了解更多", +"Skip": "跳过", +"Continue": "继续", +"Confirm": "确认", +"Yes": "是", +"No": "否", +"OK": "确定", +"Got it": "知道了", +"Dismiss": "忽略", +"Sign out": "退出登录", +"Sign in to continue": "登录以继续", +"Sign in to SideQuest to continue": "登录 SideQuest 以继续", +"Connection lost": "连接已断开", +"Reconnecting": "正在重连", +"Connected": "已连接", +"Disconnected": "未连接", +"Connecting": "正在连接", +"Disconnecting": "正在断开", +"Wireless": "无线", +"Wired": "有线", +"USB": "USB", +"Wi-Fi": "Wi-Fi", +"Battery": "电池", +"Storage": "存储", +"Model": "型号", +"Serial": "序列号", +"Build": "版本号", +"Android version": "Android 版本", +"Refresh device": "刷新设备", +"Device connected": "设备已连接", +"Device disconnected": "设备已断开", +"Waiting for device": "正在等待设备", +"Preparing": "正在准备", +"Downloading": "正在下载", +"Uploading": "正在上传", +"Installing": "正在安装", +"Uninstalling": "正在卸载", +"Deleting": "正在删除", +"Copying": "正在复制", +"Moving": "正在移动", +"Extracting": "正在解压", +"Verifying": "正在校验", +"Finished": "已完成", +"Cancel all": "全部取消", +"Clear completed": "清除已完成", +"Retry all": "全部重试", +"No tasks": "没有任务", +"No active tasks": "没有进行中的任务", +"Task failed": "任务失败", +"Task completed": "任务已完成" +} diff --git a/dict-c.json b/dict-c.json new file mode 100644 index 0000000..c2895f3 --- /dev/null +++ b/dict-c.json @@ -0,0 +1,102 @@ +{ +"Always allow installs from this site": "始终允许从此站点安装", +"Install anyway": "仍然安装", +"Install from an unknown source?": "从未知来源安装?", +"Open the Steam app on your phone.": "请在手机上打开 Steam 应用。", +"Scanned. Approve the sign-in in the Steam app.": "已扫描。请在 Steam 应用中确认登录。", +"Sign in to Steam": "登录 Steam", +"Sign in with account name and password instead": "改用账户名和密码登录", +"Steam account name": "Steam 账户名", +"Steam Guard code": "Steam Guard 验证码", +"Tap the shield icon, then scan this code.": "点击盾牌图标,然后扫描此二维码。", +"This file is being downloaded from": "此文件下载自", +"to download files for games you own": "以下载你拥有的游戏文件", +"Use a QR code instead": "改用二维码登录", +"an unknown site": "未知站点", +"Sync your account with the desktop app. We will open your browser so you can review and approve the access being requested.": "将你的账户与桌面应用同步。我们会打开浏览器,供你查看并批准所请求的访问权限。", +"Enter your Steam account name and password.": "请输入你的 Steam 账户名和密码。", +"An older APK must be retried through the Sideload page so it uses the provisioned installer.": "旧版 APK 需要通过侧载页面重试,以使用已配置好的安装程序。", +"Choose common permissions before installing to reduce prompts. Sensitive access still requires approval on your device.": "安装前可先勾选常用权限以减少弹窗。敏感权限仍需在设备上批准。", +"Connect your Meta account to set up your Quest over Bluetooth and Wi-Fi. Use the account that owns the headset.": "连接你的 Meta 账户,通过蓝牙和 Wi-Fi 设置 Quest。请使用拥有该头显的账户。", +"Could not check library shortcut support on the headset. Check the connection and try again.": "无法检查头显是否支持资源库快捷方式。请检查连接后重试。", +"Could not reconnect to your Android 10 device over Wi-Fi. Reconnect it by USB and try again.": "无法通过 Wi-Fi 重新连接你的 Android 10 设备。请用 USB 重新连接后重试。", +"Couldn't detect the headset's Wi-Fi IP address. Make sure it's connected to Wi-Fi and try again.": "无法检测头显的 Wi-Fi IP 地址。请确认已连接 Wi-Fi 后重试。", +"Finish setup with SideQuest Desktop or sdq.st/get in Chrome on a computer or Android device.": "请在电脑或 Android 设备上使用 SideQuest 桌面版或 Chrome 打开 sdq.st/get 完成设置。", +"Folders outside internal storage are unavailable until SideQuest reconnects to your headset.": "在 SideQuest 重新连接头显之前,内部存储之外的文件夹不可用。", +"Leave this window open to continue to installation, or download in the background and install later from Settings.": "保持此窗口打开以继续安装,或在后台下载后稍后从「设置」中安装。", +"Likely cause: the file is corrupt, incomplete, not actually an APK, or unsupported by this device build.": "可能原因:文件损坏、不完整、并非 APK,或该设备版本不支持。", +"Manage SideQuest installed on your connected device using its current USB or Wi-Fi connection.": "通过当前的 USB 或 Wi-Fi 连接管理已连接设备上的 SideQuest。", +"Quest rejected owner verification. Sign in with the Meta account that owns this headset and keep it unlocked.": "Quest 拒绝了所有者验证。请使用拥有该头显的 Meta 账户登录,并保持头显解锁。", +"SideQuest could not safely prepare the in-VR app for removal. Reconnect the headset and try again.": "SideQuest 无法安全地准备移除 VR 内应用。请重新连接头显后重试。", +"SideQuest could not verify that the in-VR app is ready to be removed. Reconnect the headset and try again.": "SideQuest 无法确认 VR 内应用是否已可移除。请重新连接头显后重试。", +"SideQuest on this Quest returned an unreadable startup setting. Try again or update the app.": "此 Quest 上的 SideQuest 返回了无法读取的启动设置。请重试或更新该应用。", +"SideQuest only allows what you select. Accessibility and other sensitive access must be approved on your device.": "SideQuest 仅允许你所选择的权限。无障碍等敏感权限仍需在设备上批准。", +"SideQuest was not found on the headset after installation. Keep the headset connected and try again.": "安装后未在头显上找到 SideQuest。请保持头显连接后重试。", +"The in-VR app provides the launcher and app icons for your shortcuts. You only need to install it once.": "VR 内应用为你的快捷方式提供启动器和应用图标,只需安装一次。", +"The install failed because the app is not compatible with this device. Is this a supported VR headset?": "安装失败,因为该应用与此设备不兼容。这是受支持的 VR 头显吗?", +"The installed in-VR app still needs an update for library shortcuts. Try again when a newer update is available.": "已安装的 VR 内应用仍需更新才能支持资源库快捷方式。请在更新可用后重试。", +"This computer is not yet authorized for wireless ADB on the headset. Connect it via USB once to approve.": "此电脑尚未获得头显的无线 ADB 授权。请先用 USB 连接一次以完成授权。", +"This host cannot discover Wi-Fi devices. Use Add device to connect over USB where supported.": "此宿主无法发现 Wi-Fi 设备。请使用「添加设备」在支持的情况下通过 USB 连接。", +"USB ADB was restored, but the browser could not reconnect. Reconnect the device by USB and try setup again.": "USB ADB 已恢复,但浏览器无法重新连接。请用 USB 重新连接设备后重试设置。", +"Your headset does not have enough storage to install this app. Try removing some apps and trying again.": "头显存储空间不足,无法安装此应用。请卸载一些应用后重试。", +"Your Quest did not respond to wireless setup. Keep it awake and try again. If this keeps happening, restart your Quest.": "你的 Quest 未响应无线设置。请保持唤醒后重试;若仍不行,请重启 Quest。", +"Android Device Controls setup failed": "Android 设备控制设置失败", +"App menu bounds are invalid": "应用菜单边界无效", +"App menu environment flag is invalid": "应用菜单环境参数无效", +"App menu environment is invalid": "应用菜单环境无效", +"Bluetooth selection changed.": "蓝牙选择已变化。", +"A download chunk kept failing.": "下载分块持续失败。", +"ADB command timed out": "ADB 命令超时", +"Captured download has not finished yet.": "抓取的下载尚未完成。", +"Companion Bluetooth LE recovery failed.": "伴侣服务蓝牙 LE 恢复失败。", +"Could not open the headset Bluetooth LE service. Keep it awake and try again.": "无法打开头显的蓝牙 LE 服务。请保持头显唤醒后重试。", +"Could not save the in-VR setup report": "无法保存 VR 内设置报告", +"Couldn't start the mic relay process.": "无法启动麦克风中继进程。", +"Download URL is invalid.": "下载链接无效。", +"Download URL must use http or https.": "下载链接必须使用 http 或 https。", +"Download URL must use https.": "下载链接必须使用 https。", +"External URL must be a string": "外部链接必须是字符串", +"Failed to allocate loopback port for reverse forward.": "无法为反向转发分配回环端口。", +"Failed to start SideQuest desktop shell": "SideQuest 桌面外壳启动失败", +"Failed to stop SideQuest-owned ADB server": "无法停止 SideQuest 自有的 ADB 服务", +"Game file path is outside the chosen folder.": "游戏文件路径位于所选文件夹之外。", +"Game file path names the folder itself.": "游戏文件路径指向文件夹本身。", +"Invalid game file path.": "游戏文件路径无效。", +"Invalid media preview request.": "媒体预览请求无效。", +"Launching Steam games with arguments is not supported yet": "暂不支持带参数启动 Steam 游戏", +"Media preview requires a valid file size.": "媒体预览需要有效的文件大小。", +"Media preview requires an absolute on-device path.": "媒体预览需要设备上的绝对路径。", +"Media stream server failed to bind a port.": "媒体串流服务器端口绑定失败。", +"Media stream: adb unavailable": "媒体串流:ADB 不可用", +"Media stream: dd spawn failed": "媒体串流:dd 启动失败", +"No folder was chosen.": "未选择文件夹。", +"Refusing to delete a path outside the backup directory.": "拒绝删除备份目录之外的路径。", +"Refusing to delete the backup root itself.": "拒绝删除备份根目录本身。", +"Steam couldn’t provide the version of this game the port needs.": "Steam 无法提供此移植版所需的游戏版本。", +"Steam couldn’t sign you in. Check your connection and try again.": "Steam 无法登录。请检查网络连接后重试。", +"Steam didn’t send the game’s file lists.": "Steam 未发送该游戏的文件列表。", +"Steam doesn’t know this game.": "Steam 不认识此游戏。", +"Steam has no download servers available right now.": "Steam 当前没有可用的下载服务器。", +"Steam is still installing or updating this game. Finish it in Steam, then try again.": "Steam 仍在安装或更新此游戏。请在 Steam 中完成后再重试。", +"Steam sign-in was cancelled.": "已取消 Steam 登录。", +"Steam took too long to sign in.": "Steam 登录超时。", +"Store bridge origin is invalid": "商店桥接来源无效", +"Store URL must be http or https": "商店 URL 必须使用 http 或 https", +"Stream popout aspect ratio requires positive, finite dimensions.": "串流弹出窗口的宽高比需要正的有限数值。", +"That account name or password didn’t work.": "账户名或密码不正确。", +"That code didn’t work. Check it and try again.": "验证码无效,请检查后重试。", +"The headset Bluetooth LE service did not become available. Keep it awake and try again.": "头显的蓝牙 LE 服务不可用。请保持头显唤醒后重试。", +"The headset Bluetooth service could not be identified.": "无法识别头显的蓝牙服务。", +"The headset Bluetooth state could not be read.": "无法读取头显的蓝牙状态。", +"This download is no longer available. Start the copy again.": "此下载已不可用,请重新开始复制。", +"This game folder is no longer available. Choose it again.": "此游戏文件夹已不可用,请重新选择。", +"This game is not installed in Steam on this PC.": "此游戏未安装在本机的 Steam 中。", +"This setup operation is not supported.": "不支持此设置操作。", +"Too many sign-in attempts. Wait a few minutes and try again.": "登录尝试次数过多。请等待几分钟后重试。", +"Your list of games didn’t arrive in time. Try again.": "你的游戏列表未能及时返回,请重试。", +"Your Steam copy is a different game version from the one this port needs.": "你的 Steam 副本与本移植版所需的游戏版本不同。", +"Your Steam sign-in expired. Sign in again to download this game.": "Steam 登录已过期。请重新登录以下载此游戏。", +"Headset reason: Not captured by the previous desktop version.": "头显原因:此前版本未能捕获。", +"Search": "搜索", +"Open": "打开" +} diff --git a/dict-e.json b/dict-e.json new file mode 100644 index 0000000..dff4668 --- /dev/null +++ b/dict-e.json @@ -0,0 +1,349 @@ +{ +"Home": "主页", +"Sideload": "侧载", +"Files": "文件", +"Apps": "应用", +"Stream": "串流", +"Debugging": "调试", +"Tools": "工具", +"Mover": "移动", +"Logcat": "Logcat", +"Account": "账户", +"Website": "网站", +"Support": "支持", +"Messages": "消息", +"Friends": "好友", +"Downloads": "下载", +"Screenshots": "截图", +"Captures": "录屏", +"Permissions": "权限", +"Rendering": "渲染", +"Source": "来源", +"Pages": "页面", +"Presets": "预设", +"Custom": "自定义", +"Restart": "重启", +"Modified": "已修改", +"Installed": "已安装", +"Installed.": "已安装。", +"Uninstalled.": "已卸载。", +"Restored.": "已恢复。", +"Done.": "完成。", +"Starting…": "正在启动…", +"High": "高", +"Medium": "中", +"Low": "低", +"Full": "完全", +"Left": "左", +"Right": "右", +"Both": "双眼", +"Active": "活跃", +"Authentication": "身份验证", +"View": "视图", +"Update": "更新", +"Updates": "更新", +"Success": "成功", +"Default": "默认", +"System": "系统", +"Network": "网络", +"Reconnect": "重连", +"Script": "脚本", +"Export": "导出", +"Actions": "操作", +"Connections": "连接", +"Columns": "列", +"Change": "更改", +"Block": "阻止", +"Bluetooth": "蓝牙", +"Casting": "投屏", +"Experimental": "实验性", +"Maximize": "最大化", +"Minimize": "最小化", +"Fullscreen": "全屏", +"Mute": "静音", +"Unmute": "取消静音", +"None": "无", +"Sort": "排序", +"Tag": "标签", +"Live": "实时", +"Address": "地址", +"Audio": "音频", +"Camera": "摄像头", +"Cache": "缓存", +"Channels": "声道", +"Attachments": "附件", +"Balanced": "均衡", +"Animate": "动画", +"Time": "时间", +"Range": "范围", +"Commands": "命令", +"Aborted": "已中止", +"App default": "应用默认", +"Add SideQuest to Quest library": "将 SideQuest 添加到 Quest 资源库", +"Allow SideQuest to browse device storage and copy game files. This permission is managed by Android and can be changed in its app settings.": "允许 SideQuest 浏览设备存储并复制游戏文件。此权限由 Android 管理,可在其应用设置中更改。", +"Android file export failed.": "Android 文件导出失败。", +"Android import failed.": "Android 导入失败。", +"Android store host request failed": "Android 商店宿主请求失败", +"Android UI host request failed": "Android 界面宿主请求失败", +"APK installed. Finishing setup…": "APK 已安装,正在完成设置…", +"APK size": "APK 大小", +"Apply or manage saved headset configurations.": "应用或管理已保存的头显配置。", +"Apps and files on this device": "此设备上的应用与文件", +"Authorizing access to this device…": "正在授权访问此设备…", +"Bits per second for screen recording. Higher = better quality + larger files.": "录屏码率(比特/秒)。越高画质越好、文件越大。", +"Browse downloaded files on the device.": "浏览设备上已下载的文件。", +"Browse saved app backups and choose what to restore.": "浏览已保存的应用备份并选择要恢复的内容。", +"Browse screenshots saved on the headset.": "浏览头显上保存的截图。", +"Browse the device’s shared storage.": "浏览设备的共享存储。", +"Browse video recordings saved on the headset.": "浏览头显上保存的录屏。", +"Capture at the headset's current refresh rate (72–120 fps depending on model and mode).": "按头显当前刷新率采集(依机型和模式为 72–120 fps)。", +"Capture bitrate": "采集码率", +"Capture eye": "采集眼别", +"Capture frame rate": "采集帧率", +"Capture resolution": "采集分辨率", +"Checking app permissions…": "正在检查应用权限…", +"Checking copied files…": "正在检查已复制的文件…", +"Checking files already on the headset…": "正在检查头显上已有的文件…", +"Checking space on the headset…": "正在检查头显剩余空间…", +"Checking the latest SideQuest version…": "正在检查最新 SideQuest 版本…", +"Checking whether Android allows this downgrade…": "正在检查 Android 是否允许此降级安装…", +"Choose a connected USB device to enable wireless ADB.": "选择一个已连接的 USB 设备以启用无线 ADB。", +"Choose a device’s actions menu to disconnect it.": "打开设备的操作菜单以断开连接。", +"Choose a file and open its details to rename it.": "选择文件并打开其详情即可重命名。", +"Choose a file or folder to copy its full device path.": "选择文件或文件夹以复制其完整设备路径。", +"Choose a file to view images, play media, or edit text and JSON.": "选择文件以查看图片、播放媒体或编辑文本与 JSON。", +"Choose a saved profile to apply to this device.": "选择要应用到此设备的已保存配置档。", +"Choose an installed app and open its Permissions tab.": "选择一个已安装的应用并打开其权限标签页。", +"Choose an installed app before confirming a data reset.": "确认数据重置前请先选择一个已安装的应用。", +"Choose an installed app before confirming its removal.": "确认移除前请先选择一个已安装的应用。", +"Choose an installed app to create its Quest library shortcut.": "选择一个已安装的应用以创建其 Quest 资源库快捷方式。", +"Choose an installed app to inspect its version and package information.": "选择一个已安装的应用以查看其版本与包信息。", +"Choose an installed app to launch it.": "选择一个已安装的应用以启动它。", +"Choose an installed app to manage its running state.": "选择一个已安装的应用以管理其运行状态。", +"Choose apps to back up locally or with Meta cloud backup.": "选择要备份到本地或 Meta 云备份的应用。", +"Choose device files or folders to download.": "选择要下载的设备文件或文件夹。", +"Choose files or folders before confirming their deletion.": "确认删除前请先选择文件或文件夹。", +"Choose files to copy into the current device folder.": "选择要复制到当前设备文件夹的文件。", +"Choose how installed apps are displayed.": "选择已安装应用的显示方式。", +"Choose or drop install files on the Sideload page.": "在侧载页面选择或拖入安装文件。", +"Choose right-thumbstick look or calibrated head movement.": "选择右摇杆视角或校准后的头部移动。", +"Choose the Game Optimizer fallback for games without their own profile.": "为没有独立配置的游戏选择游戏优化器的回退方案。", +"Choose the left eye, right eye, or both eyes side-by-side for screen capture.": "选择采集左眼、右眼,或双眼并排画面。", +"Choose the log severity levels to show.": "选择要显示的日志级别。", +"Choose when SideQuest adds a shortcut after installing an app. The shortcut opens it from your Quest’s main library.": "设置安装应用后 SideQuest 何时添加快捷方式。该快捷方式可从 Quest 主资源库启动应用。", +"Choose where local app backups are saved.": "选择本地应用备份的保存位置。", +"Choose which permissions SideQuest should grant before an app installs. Android will still ask you to approve permissions that SideQuest can’t set up.": "选择安装应用前由 SideQuest 预先授予哪些权限。SideQuest 无法设置的权限仍会由 Android 向你请求确认。", +"Chromatic aberration correction": "色差校正", +"Clear Oculus TV caches": "清除 Oculus TV 缓存", +"Clear the Oculus VR shell caches so custom home changes are loaded again. The headset interface may restart.": "清除 Oculus VR 外壳缓存,以便重新加载自定义主页更改。头显界面可能会重启。", +"Completing setup…": "正在完成设置…", +"Configure desktop movement in VR.": "配置在 VR 中的桌面移动。", +"Confirm the installation on your headset…": "请在头显上确认安装…", +"Connect to a device using its IP address and port.": "使用设备的 IP 地址和端口连接。", +"Connect your Quest wirelessly, or connect an Android device over USB.": "无线连接你的 Quest,或通过 USB 连接 Android 设备。", +"Connected device SideQuest updates": "已连接设备的 SideQuest 更新", +"Connecting to this device…": "正在连接此设备…", +"Control live Android log streaming.": "控制 Android 日志实时串流。", +"Could not add the library shortcut. Try again.": "无法添加资源库快捷方式,请重试。", +"Could not add the shortcut. Try again.": "无法添加快捷方式,请重试。", +"Could not allow file access.": "无法允许文件访问。", +"Could not apply saved settings.": "无法应用已保存的设置。", +"Could not check headset setup. Try again.": "无法检查头显设置,请重试。", +"Could not check Meta sign-in. Try again.": "无法检查 Meta 登录状态,请重试。", +"Could not check Mover.": "无法检查移动功能。", +"Could not check setup.": "无法检查设置。", +"Could not connect to this device.": "无法连接到此设备。", +"Could not connect. Try again.": "无法连接,请重试。", +"Could not install SideQuest.": "无法安装 SideQuest。", +"Could not load the library shortcut preference.": "无法加载资源库快捷方式偏好设置。", +"Could not load the shortcut icon.": "无法加载快捷方式图标。", +"Could not open Meta setup.": "无法打开 Meta 设置。", +"Could not read file access.": "无法读取文件访问权限。", +"Could not read headset startup status.": "无法读取头显启动状态。", +"Could not read the image.": "无法读取该图片。", +"Could not read this Quest’s startup setting.": "无法读取此 Quest 的启动设置。", +"Could not save setup progress.": "无法保存设置进度。", +"Could not save the shortcut preference.": "无法保存快捷方式偏好设置。", +"Could not save the startup setting.": "无法保存启动设置。", +"Could not save this Quest’s startup setting.": "无法保存此 Quest 的启动设置。", +"Could not start the mic relay.": "无法启动麦克风中继。", +"Couldn't load app names and icons.": "无法加载应用名称和图标。", +"Couldn't load installed apps. Reconnect the headset and try again.": "无法加载已安装应用。请重新连接头显后重试。", +"CPU level": "CPU 级别", +"Create a new folder in device storage.": "在设备存储中新建文件夹。", +"Customize file list columns, order, widths, and sorting.": "自定义文件列表的列、顺序、宽度和排序。", +"Customize the app list columns, order, widths, and sorting.": "自定义应用列表的列、顺序、宽度和排序。", +"Customize the SideQuest icon shown in the Quest library.": "自定义 Quest 资源库中显示的 SideQuest 图标。", +"Data size": "数据大小", +"Device connection priority": "设备连接优先级", +"Device connection troubleshooting": "设备连接疑难解答", +"Device information and name": "设备信息与名称", +"Device props": "设备属性", +"Disable the boundary system. Use with care — you can walk into walls without it.": "禁用边界系统。请谨慎使用——没有边界时你可能撞到墙壁。", +"Display & Power": "显示与电源", +"Display brightness. Adaptive brightness can override this while enabled.": "显示亮度。启用自适应亮度时可能覆盖此设置。", +"Display refresh rate": "显示刷新率", +"Drag devices to choose their connection order.": "拖动设备以调整连接顺序。", +"Each depot can be pinned once.": "每个仓库只能固定一次。", +"Enable desktop Playspace Mover": "启用桌面活动空间移动", +"Enable Meta's experimental feature toggles (passthrough, etc.).": "启用 Meta 的实验性功能开关(透视等)。", +"Enable or disable a device": "启用或禁用设备", +"Every chunk of a game file job must use the same handle.": "游戏文件任务的每个分块必须使用同一句柄。", +"Experimental & Miscellaneous": "实验性与杂项", +"Experimental features": "实验性功能", +"Export a selected saved settings profile.": "导出所选的已保存设置配置档。", +"Export filtered Android logs to a file.": "将筛选后的 Android 日志导出为文件。", +"Filter Android logs with case, whole-word, or regular-expression matching.": "使用区分大小写、全字或正则表达式匹配来筛选 Android 日志。", +"Find apps by their name or package name.": "按名称或包名查找应用。", +"Force chromatic aberration correction on, off, or let the app decide.": "强制开启、关闭色差校正,或交由应用决定。", +"Foveation level": "注视点渲染级别", +"Frames per second for screen recording and casting. Full captures at the headset's current refresh rate (72–120 fps depending on model and mode), overriding the fixed rates.": "录屏与投屏的帧率。完全采集会按头显当前刷新率(依机型和模式为 72–120 fps)并覆盖固定帧率。", +"Full HD — 1920 × 1080 @ 60 fps, 10 Mbps": "全高清 — 1920 × 1080 @ 60 fps,10 Mbps", +"Game files downloaded from Steam are saved on this computer for future installations. Clear these downloads to free up space.": "从 Steam 下载的游戏文件会保存在本机以便日后安装。清除这些下载可释放空间。", +"GPU level": "GPU 级别", +"Hand tracking frequency": "手部追踪频率", +"Hear the headset microphone on this computer.": "在本机收听头显麦克风。", +"High Top": "高顶", +"How long the device stays awake without input before the display sleeps. Other device power controls can put it to sleep sooner.": "设备在无输入状态下保持唤醒、直至屏幕休眠的时长。其他电源控制可能让它更早休眠。", +"How often the headset updates hand tracking. Higher frequencies can improve responsiveness at the cost of more processing time.": "头显更新手部追踪的频率。频率越高响应越好,但处理开销更大。", +"Include or exclude a device from selection and automatic connections.": "将该设备纳入或排除于选择与自动连接之外。", +"Inspect additional properties reported by the headset.": "查看头显上报的更多属性。", +"Inspect remembered devices and recent wireless connection events.": "查看已记住的设备与最近的无线连接事件。", +"Install APK, OBB, or ZIP files": "安装 APK、OBB 或 ZIP 文件", +"Installed app columns and sorting": "已安装应用的列与排序", +"Installed app list or grid view": "已安装应用的列表或网格视图", +"Installed app permissions": "已安装应用权限", +"Installing on device…": "正在安装到设备…", +"Installing on headset…": "正在安装到头显…", +"Installing the older version…": "正在安装旧版本…", +"Internal storage": "内部存储", +"Invalid regex": "正则表达式无效", +"Keep supported headsets awake when connecting over Wi-Fi.": "通过 Wi-Fi 连接时保持受支持的头显唤醒。", +"Keep the connected headset awake while it is off your head.": "头显离开头部时保持唤醒。", +"Keep the SideQuest app you’re using now up to date. Check its version here and install an available update.": "保持你正在使用的 SideQuest 应用为最新。可在此查看版本并安装可用更新。", +"Manage and remove saved settings profiles.": "管理与移除已保存的设置配置档。", +"Manage automatic connections in a device’s actions menu.": "在设备的操作菜单中管理自动连接。", +"Manage remembered Wi-Fi connections in a device’s actions menu.": "在设备的操作菜单中管理已记住的 Wi-Fi 连接。", +"Manage reusable custom command shortcuts.": "管理可复用的自定义命令快捷方式。", +"Maximize the stream player inside the app.": "在应用内最大化串流播放器。", +"Meta sign-in could not finish. Try again.": "Meta 登录未能完成,请重试。", +"Mover action failed.": "移动操作失败。", +"Mover invert right-stick look": "移动:反转右摇杆视角", +"MTP (Media Transfer Protocol)": "MTP(媒体传输协议)", +"No active device.": "没有活动设备。", +"No active headset is connected.": "未连接活动头显。", +"Nothing to back up.": "没有可备份的内容。", +"Nothing to restore.": "没有可恢复的内容。", +"OBB copied.": "OBB 已复制。", +"OBB pushed.": "OBB 已推送。", +"OBB size": "OBB 大小", +"Open an installed app’s Optimizer tab to choose its profile.": "打开已安装应用的「优化器」标签页以选择其配置。", +"Open SideQuest automatically after a headset restart.": "头显重启后自动打开 SideQuest。", +"Open the stream in a separate window for capture.": "在单独窗口中打开串流以便采集。", +"Open, add, remove, or reorder quick-access folders.": "打开、添加、移除或重排快速访问文件夹。", +"Override the per-app CPU clock budget. Higher levels boost performance at the cost of more heat and faster battery drain. Leave at App default to respect each title's own choice.": "覆盖单个应用的 CPU 频率预算。级别越高性能越强,但发热更大、耗电更快。保持「应用默认」以尊重各游戏自身的选择。", +"Override the per-app GPU clock budget. Higher levels boost performance at the cost of more heat and faster battery drain. Leave at App default to respect each title's own choice.": "覆盖单个应用的 GPU 频率预算。级别越高性能越强,但发热更大、耗电更快。保持「应用默认」以尊重各游戏自身的选择。", +"Paste text to device": "粘贴文本到设备", +"Pause Guardian": "暂停守护者", +"Pixel dimensions for screen recording / casting output.": "录屏 / 投屏输出的像素尺寸。", +"Portrait — 1080 × 1920 @ 60 fps, 10 Mbps": "竖屏 — 1080 × 1920 @ 60 fps,10 Mbps", +"Preparing folders on the headset…": "正在准备头显上的文件夹…", +"Preparing the replacement APK…": "正在准备替换用 APK…", +"Preview and edit device files": "预览和编辑设备文件", +"Quest — 1216 × 1344": "Quest — 1216 × 1344", +"Quest 2 / Quest Pro — 1440 × 1584": "Quest 2 / Quest Pro — 1440 × 1584", +"Quest 3 / Quest 3S — 1680 × 1760": "Quest 3 / Quest 3S — 1680 × 1760", +"Quest 3 only. Runs at full display resolution and requires Horizon OS v2.7 or later.": "仅限 Quest 3。以完整显示分辨率运行,需要 Horizon OS v2.7 或更高版本。", +"Ramp up to the selected controller movement speed.": "逐渐加速至所选的手柄移动速度。", +"Ramp up to the selected movement speed.": "逐渐加速至所选的移动速度。", +"Reboot device": "重启设备", +"Reload the saved settings library for this device.": "为此设备重新加载已保存的设置库。", +"Rename a selected saved settings profile.": "重命名所选的已保存设置配置档。", +"Restart the device. The connection drops while it boots. Wireless ADB may need to be connected again after a restart.": "重启设备。启动期间连接会中断,重启后可能需要重新连接无线 ADB。", +"Reverse both mouse-look axes.": "反转鼠标视角的两个轴。", +"Reverse the controller’s look axes.": "反转手柄的视角轴。", +"Review installs, retry failed tasks, or cancel queued tasks.": "查看安装记录、重试失败任务或取消排队任务。", +"Review streaming setup and troubleshooting controls.": "查看串流设置与疑难排查控制项。", +"Review the control for clearing the current log buffer.": "查看用于清空当前日志缓冲区的控件。", +"Review the control for moving around the headset playspace from the desktop.": "查看用于从桌面在头显活动空间中移动的控件。", +"Review the control for reloading the installed app list.": "查看用于重新加载已安装应用列表的控件。", +"Review the control for restoring the selected profile’s settings.": "查看用于恢复所选配置档设置的控件。", +"Review the headset casting controls.": "查看头显投屏控件。", +"Review USB debugging and Wi-Fi connection tips.": "查看 USB 调试与 Wi-Fi 连接提示。", +"Run microphone relay audio in its own process.": "在独立进程中运行麦克风中继音频。", +"Save the current changes as a new profile.": "将当前更改另存为新配置档。", +"Save the current changes to the selected profile.": "将当前更改保存到所选配置档。", +"Save the current stream frame as a PNG.": "将当前串流画面保存为 PNG。", +"Save the headset stream as a video clip.": "将头显串流保存为视频片段。", +"Save your current headset settings for later.": "保存当前头显设置以备后用。", +"Screen brightness": "屏幕亮度", +"screen brightness": "屏幕亮度", +"Screen capture": "屏幕采集", +"Screen timeout": "屏幕超时", +"screen timeout": "屏幕超时", +"Search pages, settings, apps...": "搜索页面、设置、应用…", +"Search SideQuest apps...": "搜索 SideQuest 应用…", +"Select a connected device or reconnect a saved device.": "选择已连接设备,或重新连接已保存的设备。", +"Send text to the device as keystrokes. Useful for long passwords or URLs that are difficult to type on its keyboard.": "以按键形式向设备发送文本。适用于难以在其键盘上输入的长密码或网址。", +"Set backup retention per app or keep unlimited backups.": "按应用设置备份保留数量,或保留无限备份。", +"Set how quickly controller movement moves through the playspace.": "设置手柄移动在活动空间中的移动速度。", +"Set how quickly movement keys move through the playspace.": "设置移动按键在活动空间中的移动速度。", +"Set up a SideQuest shortcut in your Quest library.": "在 Quest 资源库中设置 SideQuest 快捷方式。", +"Set up Mover and review its start controls.": "设置移动功能并查看其启动控件。", +"Set up or reinstall the casting service": "设置或重新安装投屏服务", +"Setting up app permissions…": "正在设置应用权限…", +"Show system apps, running apps, or apps with assigned profiles.": "显示系统应用、正在运行的应用,或已分配配置的应用。", +"SideQuest Home": "SideQuest 主页", +"SideQuest installed and setup finished.": "SideQuest 已安装且设置完成。", +"SideQuest library shortcut icon": "SideQuest 资源库快捷方式图标", +"Sign in to download the original game files needed by supported ports. SideQuest uses games you own on that Steam account.": "登录以下载受支持移植版所需的原始游戏文件。SideQuest 会使用该 Steam 账户中你拥有的游戏。", +"Sign-in failed. Please try again.": "登录失败,请重试。", +"Something went wrong.": "出错了。", +"Square — 1600 × 1600 @ 60 fps, 10 Mbps": "方形 — 1600 × 1600 @ 60 fps,10 Mbps", +"Start or stop headset Mover": "启动或停止头显移动功能", +"Switch rendering profiles automatically while games run.": "游戏运行期间自动切换渲染配置。", +"Switch USB to MTP so file explorers on your computer can browse the headset. Turning off returns USB to ADB-only.": "将 USB 切换为 MTP,以便电脑上的文件管理器浏览头显。关闭后 USB 仅用于 ADB。", +"Target SDK": "目标 SDK", +"Temporarily unavailable due to severe display artifacts on current headset software.": "由于当前头显软件存在严重显示异常,暂时不可用。", +"Text to send": "要发送的文本", +"Texture resolution": "纹理分辨率", +"The Android logcat stream failed.": "Android Logcat 串流失败。", +"The connection to this device is not available.": "无法连接到此设备。", +"the headset did not answer": "头显无响应", +"This format can't be played here.": "无法在此播放该格式。", +"Tools and actions": "工具与操作", +"Unknown wireless ADB error.": "未知的无线 ADB 错误。", +"unreadable API level": "API 级别不可读", +"USB interface is busy.": "USB 接口被占用。", +"USB transfer failed.": "USB 传输失败。", +"Version code": "版本代码", +"View the current device’s information or rename it in the device menu.": "在设备菜单中查看当前设备信息或重命名。", +"View the stream in fullscreen.": "全屏查看串流。", +"virtual proximity state": "虚拟接近状态", +"Waiting for Android install permission…": "正在等待 Android 安装权限…", +"Waiting for permission to uninstall and reinstall…": "正在等待卸载并重新安装的权限…", +"Waiting for setup to finish…": "正在等待设置完成…", +"Waiting to install SideQuest…": "正在等待安装 SideQuest…", +"Waiting to install…": "正在等待安装…", +"When on, the headset stays awake even when it's off your head — handy for testing and so Wi-Fi ADB doesn't drop. Uses more battery, and resets when the headset restarts.": "开启后,头显离开头部时仍保持唤醒——便于测试,且避免 Wi-Fi ADB 断开。会更耗电,并在头显重启后重置。", +"When on, the runtime manages the foveation level automatically based on GPU headroom. Turn off to set a fixed Foveation level yourself below (useful when measuring frame times).": "开启后由运行时根据 GPU 余量自动管理注视点渲染级别。关闭后可在下方自行设置固定级别(测量帧耗时很有用)。", +"Your profiles": "你的配置档", +"1 min": "1 分钟", +"5 min": "5 分钟", +"15 s": "15 秒", +"30 min": "30 分钟", +"5 Mbps": "5 Mbps", +"10 Mbps": "10 Mbps", +"15 Mbps": "15 Mbps", +"20 Mbps": "20 Mbps", +"24 fps": "24 fps", +"30 fps": "30 fps", +"60 fps": "60 fps", +"120 Hz": "120 Hz", +"60 Hz": "60 Hz", +"72 Hz": "72 Hz", +"90 Hz": "90 Hz", +"207 Hz": "207 Hz", +"240 Hz (experimental)": "240 Hz(实验性)", +"Too many profile entries": "配置档条目过多" +} diff --git a/dict-f.json b/dict-f.json new file mode 100644 index 0000000..0c8698d --- /dev/null +++ b/dict-f.json @@ -0,0 +1,330 @@ +{ +"View devices": "查看设备", +"View your device on this screen in real time.": "在此屏幕上实时查看你的设备。", +"Connect your Quest wirelessly, or use USB with an Android device.": "无线连接你的 Quest,或用 USB 连接 Android 设备。", +"Install APK, OBB, or ZIP files on your device.": "在设备上安装 APK、OBB 或 ZIP 文件。", +"Manage display, sleep, and other Android settings.": "管理显示、休眠及其他 Android 设置。", +"Run ADB and shell commands, and inspect Android logs.": "运行 ADB 和 shell 命令,并查看 Android 日志。", +"Enter command": "输入命令", +"Run": "运行", +"Run a command to see its output here.": "运行命令后,其输出会显示在这里。", +"History": "历史记录", +", then": ",然后", +"· folders upload recursively": "· 文件夹会递归上传", +"(installed:": "(已安装:", +"← Back to stream": "← 返回串流", +"A shortcut chip for a command you run often.": "为你常用命令准备的快捷按钮。", +"A stuck adb server or leftover reverse mapping from a previous session can block the new stream.": "卡住的 adb 服务或上次会话残留的反向映射可能阻塞新的串流。", +"Add library shortcuts": "添加资源库快捷方式", +"Add shortcut to Library": "添加快捷方式到资源库", +"Added to your library.": "已添加到你的资源库。", +"Advanced permissions": "高级权限", +"All selected files and folders will be removed.": "所有选中的文件和文件夹都将被移除。", +"Allow SideQuest to browse and manage files on this device.": "允许 SideQuest 浏览并管理此设备上的文件。", +"Allow USB debugging": "允许 USB 调试", +"Always allow from this computer": "始终允许来自此电脑的连接", +"Always on Wi-Fi": "有线时也保持 Wi-Fi 连接", +"Android blocks installing this older version over the current app. SideQuest can uninstall it first, then install the prepared APK.": "Android 不允许用旧版本覆盖当前应用。SideQuest 可以先卸载它,再安装已准备好的 APK。", +"Any selected folders will be recursively deleted with everything inside them. This cannot be undone.": "所选文件夹将被递归删除,其中内容一并清除,且无法撤销。", +"App details": "应用详情", +"App installed": "应用已安装", +"App listing": "应用列表页", +"Application Audio Capture": "应用程序音频采集", +"Applied when this game runs. Select Default to use the default game profile, or edit the settings below to customize this game.": "在此游戏运行时生效。选择「默认」以使用默认游戏配置,或编辑下方设置为此游戏单独定制。", +"Apply all settings stored in a saved configuration.": "应用已保存配置中的全部设置。", +"Apply to all remaining conflicts": "应用于所有剩余的冲突项", +"Ask me later": "稍后询问", +"Ask this headset to back up selected apps with Meta's native backup service.": "让此头显使用 Meta 原生备份服务备份所选应用。", +"Auto-disable proximity sensor": "自动禁用接近传感器", +"Auto-reconnect": "自动重连", +"Back to devices": "返回设备列表", +"Back to Mover": "返回移动功能", +"Back up": "备份", +"Backup": "备份", +"Begin streaming from the headset.": "开始从头显串流。", +"Both devices must be on the same Wi-Fi network.": "两台设备必须处于同一 Wi-Fi 网络。", +"Bring it back": "恢复显示", +"Browse and organize internal storage.": "浏览并整理内部存储。", +"Browse SideQuest or install your own APKs.": "浏览 SideQuest 商店,或安装你自己的 APK。", +"Builds from 1× to the selected speed over 750 ms.": "在 750 毫秒内从 1 倍加速到所选速度。", +"Calculating size…": "正在计算大小…", +"Change permissions in Android's App info.": "请在 Android 的应用信息中更改权限。", +"Check its Wi-Fi connection or reconnect via USB.": "请检查其 Wi-Fi 连接,或改用 USB 重新连接。", +"Check setup": "检查设置", +"Checking casting service on the headset…": "正在检查头显上的投屏服务…", +"Checking SideQuest on your headset…": "正在检查头显上的 SideQuest…", +"Checking Steam sign-in…": "正在检查 Steam 登录状态…", +"Choose the icon used when adding this app to your Quest library.": "选择将此应用添加到 Quest 资源库时使用的图标。", +"Clear downloads": "清除下载", +"Clear search": "清除搜索", +"Click to browse, or multi-select files.": "点击浏览,或按住多选文件。", +"Close anything else that's casting.": "请关闭其他正在投屏的程序。", +"Close other apps that may be using the connection.": "请关闭其他可能占用该连接的应用。", +"Close the popout to resume playback here.": "关闭弹出窗口即可在此继续播放。", +"Command": "命令", +"Connect a headset to control its proximity sensor here.": "连接头显后即可在此控制其接近传感器。", +"Connect a Quest, Pico or other Android device with a USB cable.": "使用 USB 数据线连接 Quest、Pico 或其他 Android 设备。", +"Connect again": "重新连接", +"Connect this device over USB": "通过 USB 连接此设备", +"Connect to your Quest over Wi-Fi to install apps and manage files.": "通过 Wi-Fi 连接你的 Quest,以安装应用和管理文件。", +"Connect your Android device with a USB data cable.": "使用 USB 数据线连接你的 Android 设备。", +"Connect your device with a USB data cable, then select": "用 USB 数据线连接设备,然后选择", +"Connect your Quest wirelessly or use a USB cable with any Android device.": "无线连接你的 Quest,或用 USB 数据线连接任意 Android 设备。", +"Connect your Quest wirelessly to install apps and manage files.": "无线连接你的 Quest,以安装应用和管理文件。", +"Connected device": "已连接设备", +"Connection details": "连接信息", +"Copy details": "复制信息", +"Copy path": "复制路径", +"Could not use Meta’s casting component. Check setup and try again.": "无法使用 Meta 的投屏组件。请检查设置后重试。", +"Create": "新建", +"Current": "当前", +"Customize": "自定义", +"Customize app icon": "自定义应用图标", +"Date": "日期", +"Delete backup?": "删除备份?", +"Detail": "详情", +"Details": "详情", +"Device not appearing?": "设备没有出现?", +"Device settings → Startup": "设备设置 → 启动", +"Diagnostics": "诊断", +"Discover what you can do right on your headset:": "了解你可以在头显上直接做什么:", +"Don't ask me again": "不再询问", +"Download in background": "后台下载", +"Download the files you own for supported VR ports.": "下载你拥有的、受支持 VR 移植版所需的文件。", +"Drag to set connection priority. The first available enabled device is selected.": "拖动以设置连接优先级。会自动选择第一个可用的已启用设备。", +"Drop to upload": "拖放到此处上传", +"Enable more features": "启用更多功能", +"Enable startup": "启用开机启动", +"Enable USB debugging in Developer options on your device.": "请在设备的开发者选项中启用 USB 调试。", +"Enable USB debugging in your device's developer settings, then approve the connection on your device.": "请在设备的开发者设置中启用 USB 调试,然后在设备上批准该连接。", +"End the current streaming session.": "结束当前串流会话。", +"Ensure Bluetooth is enabled on both devices.": "请确保两台设备均已开启蓝牙。", +"Enter a name for the new folder.": "输入新文件夹的名称。", +"Enter IP manually": "手动输入 IP", +"Explore SideQuest": "探索 SideQuest", +"Face forward and keep your head still for a few seconds. Move when Mover says it is active.": "面朝前方并保持头部静止数秒。当移动功能提示已启用时即可移动。", +"Failed to load installed apps.": "加载已安装应用失败。", +"File": "文件", +"Files land in": "文件将存放于", +"Find your apps in your main Quest library.": "在 Quest 主资源库中查找你的应用。", +"Finding nearby Quests…": "正在查找附近的 Quest…", +"Finished with errors": "完成但存在错误", +"First installed": "首次安装时间", +"For Android wireless debugging, enter the pairing port above and its code here.": "对于 Android 无线调试,请在上方输入配对端口,在此输入配对码。", +"For Wi-Fi connections, both devices must be on the same network. Guest networks can prevent devices from finding each other.": "Wi-Fi 连接要求两台设备在同一网络。访客网络可能导致设备之间无法互相发现。", +"Friendly name": "显示名称", +"Game Optimizer also resumes if you left it on. You can change this anytime in": "若此前已开启,游戏优化器也会一并恢复。你可随时在以下位置更改:", +"Game Optimizer manages rendering settings. Only other settings will be applied.": "渲染设置由游戏优化器管理,本次仅应用其他设置。", +"Game Optimizer switches resolution, refresh rate and foveation automatically while a game runs. Open a game's details and pick Optimizer to set it up.": "游戏运行期间,游戏优化器会自动切换分辨率、刷新率和注视点渲染。请打开游戏详情并选择「优化器」进行设置。", +"Get Steam game files": "获取 Steam 游戏文件", +"Give each game its own rendering profile": "为每个游戏单独设置渲染配置", +"Has profile": "已配置", +"Have SideQuest ready when you put on your headset, without finding and opening it each time.": "戴上头显时即可直接使用 SideQuest,无需每次查找并打开它。", +"Having trouble?": "遇到问题?", +"Headset starts": "头显启动时", +"Hear your headset's microphone on this PC.": "在本机收听头显麦克风。", +"Hold the power button → Restart. A previous Meta Casting session may still be running and blocking new connections.": "长按电源键 → 重启。此前可能仍有 Meta 投屏会话在运行并阻塞新连接。", +"Host": "主机", +"How quickly WASD/Q/E moves through the playspace.": "WASD/Q/E 在活动空间中的移动速度。", +"If a connection stalls, close other ADB tools and try again.": "若连接卡住,请关闭其他 ADB 工具后重试。", +"If the confirmation didn't appear": "如果没有出现确认提示", +"Import…": "导入…", +"in Browser to save the shortcut.": "在浏览器中保存快捷方式。", +"In Browser, open the menu and choose": "在浏览器中打开菜单并选择", +"in Chrome on a computer, Chromebook or Android device.": "在电脑、Chromebook 或 Android 设备上的 Chrome 中。", +"in Chrome on Windows, Mac, Linux, a Chromebook, or an Android phone or tablet. Connect your headset by USB and reinstall SideQuest to complete setup.": "在 Windows、Mac、Linux、Chromebook,或 Android 手机/平板上的 Chrome 中。请用 USB 连接头显并重新安装 SideQuest 以完成设置。", +"In OBS, add an": "在 OBS 中添加一个", +"Install games and apps": "安装游戏与应用", +"Install the in-VR app to browse and install apps directly from your Quest.": "安装 VR 内应用,即可直接在 Quest 上浏览和安装应用。", +"Installed casting service:": "已安装的投屏服务:", +"Installer": "安装包", +"Jump to bottom": "跳到末尾", +"Just this once": "仅此次", +"Keep current device": "保留当前设备", +"Keep it awake and try another USB data cable or port.": "请保持设备唤醒,并尝试其他 USB 数据线或端口。", +"Last connected": "上次连接", +"Last error:": "上次错误:", +"Last updated": "上次更新", +"Launch": "启动", +"Leaving this page or closing SideQuest stops Mover. The game also receives controller input.": "离开此页面或关闭 SideQuest 会停止移动功能。游戏同时也会收到手柄输入。", +"Left stick moves. The triggers move up and down.": "左摇杆平移,扳机键上下移动。", +"Loading backups…": "正在加载备份…", +"Loading installed apps...": "正在加载已安装应用…", +"Loading Meta Quest Developer Hub…": "正在加载 Meta Quest Developer Hub…", +"Loading permissions…": "正在加载权限…", +"Loading preview…": "正在加载预览…", +"Loading setup…": "正在加载设置…", +"Loading SideQuest store…": "正在加载 SideQuest 商店…", +"Loading…": "正在加载…", +"Make sure nothing inside the headset is using Casting (system Casting menu, MQDH on another PC, the Meta Quest mobile app, etc.) — only one consumer can be attached at a time.": "请确认头显内没有任何应用正在使用投屏(系统投屏菜单、另一台电脑上的 MQDH、Meta Quest 手机应用等)——同一时间只允许一个接收方接入。", +"Make the window larger to continue": "请放大窗口以继续", +"Manage your files": "管理你的文件", +"Manual retry": "手动重试", +"Message": "消息", +"Meta cloud uses the headset's native backup service. Local backup saves files to this computer.": "Meta 云备份使用头显的原生备份服务;本地备份则将文件保存到本机。", +"Meta sign-in": "Meta 登录", +"Meta sign-in code": "Meta 登录码", +"Min SDK": "最低 SDK", +"Move around in VR from your PC.": "在电脑上控制 VR 中的移动。", +"Movement": "移动", +"Mover is available on Meta Quest headsets.": "移动功能仅支持 Meta Quest 头显。", +"Navigate": "导航", +"Newer Meta Quest Developer Hub releases ship a newer casting service that fixes most streaming failures.": "较新的 Meta Quest Developer Hub 版本附带更新的投屏服务,可修复大多数串流故障。", +"No apps to back up.": "没有可备份的应用。", +"No auto-enable events recorded this session.": "本次会话没有记录到自动启用事件。", +"No backups for this app yet.": "此应用还没有备份。", +"No backups found in your backup folder yet.": "备份文件夹中还没有找到备份。", +"No backups match your search.": "没有匹配搜索的备份。", +"No devices currently connected.": "当前没有已连接的设备。", +"No devices yet. Select Add device to connect your Quest wirelessly or use USB.": "还没有设备。选择「添加设备」以无线连接 Quest,或使用 USB。", +"No preview available for this file type.": "此文件类型不支持预览。", +"No preview available.": "没有可用的预览。", +"No remembered entries match a currently-connected USB device.": "没有与当前已连接 USB 设备匹配的已记住条目。", +"No remembered entries yet.": "还没有已记住的条目。", +"No settings match your search": "没有匹配搜索的设置", +"No thanks": "不用了", +"Not signed in.": "未登录。", +"Note: with this on, the mic plays through the separate process, so Record won't capture it. Turn it off to include the mic in recordings.": "注意:开启后麦克风通过独立进程播放,因此录制不会捕获它。关闭后即可将麦克风纳入录制。", +"on it.": "上操作。", +"One-time USB setup also enables Game Optimizer, device settings, automatic startup, Mover, and advanced file access.": "一次 USB 设置还会启用游戏优化器、设备设置、自动启动、移动功能和高级文件访问。", +"Open App info": "打开应用信息", +"Open Browser again": "重新打开浏览器", +"Open Meta Quest Developer Hub to update…": "打开 Meta Quest Developer Hub 进行更新…", +"Open Meta sign-in": "打开 Meta 登录", +"Open Meta sign-in and enter this code, then return here.": "打开 Meta 登录并输入此验证码,然后返回此处。", +"Open Meta’s sign-in page and enter the code below to approve the connection. Once you finish signing in, you can return here to continue.": "打开 Meta 登录页面并输入下方验证码以批准连接。登录完成后返回此处继续。", +"Open SideQuest directly from your Quest library.": "直接从 Quest 资源库打开 SideQuest。", +"Open SideQuest in browser": "在浏览器中打开 SideQuest", +"Opens SideQuest automatically when your headset turns on. Game Optimizer resumes if it was on.": "头显开机时自动打开 SideQuest。若此前已开启,游戏优化器也会恢复。", +"Optimizer": "优化器", +"Outcome": "结果", +"Pairing code (if required)": "配对码(如需要)", +"Per app. Older backups are pruned automatically.": "按应用单独设置。较旧的备份会自动清理。", +"PID": "PID", +"Port": "端口", +"Preparing your sign-in code…": "正在准备登录码…", +"Quest library shortcut": "Quest 资源库快捷方式", +"Queued.": "已排队。", +"Ramp up to the selected speed while movement keys are held.": "按住移动键时逐渐加速到所选速度。", +"Reading device properties...": "正在读取设备属性…", +"Ready to use": "可使用", +"Ready to use in SideQuest.": "可在 SideQuest 中使用。", +"Recent auto-enable events": "最近的自动启用事件", +"Reconnect this device": "重新连接此设备", +"Reconnecting…": "正在重连…", +"Record": "录制", +"Reinstall the casting service": "重新安装投屏服务", +"Reinstall with SideQuest Desktop or visit": "请使用 SideQuest 桌面版重新安装,或访问", +"Reload remembered list": "重新加载已记住列表", +"Remembered wireless entries": "已记住的无线条目", +"Renaming…": "正在重命名…", +"Replace": "替换", +"Replace it, or skip it?": "要替换还是跳过?", +"Reset": "重置", +"Reset to default": "重置为默认值", +"Reset to defaults": "重置为默认值", +"Restart the headset.": "重启头显。", +"Restart this PC.": "重启本机。", +"Restore": "恢复", +"Retry auto-enable": "重试自动启用", +"Retrying…": "正在重试…", +"Reverses both look axes. Applies to the right thumbstick only.": "反转视角的两个轴。仅对右摇杆生效。", +"Revert": "还原", +"Run the mic relay as its own app with an isolated audio output other apps can capture on their own channel.": "将麦克风中继作为独立应用运行,使用独立的音频输出,其他应用可在各自通道中采集。", +"Running only": "仅显示运行中", +"Running…": "运行中…", +"Save as new…": "另存为新项…", +"Save as profile…": "保存为配置档…", +"Save command": "保存命令", +"Save copies of your installed apps and restore them whenever you need.": "备份已安装应用的副本,随时按需恢复。", +"Save current settings…": "保存当前设置…", +"Save the current frame as a PNG.": "将当前画面保存为 PNG。", +"Save the stream as a video clip.": "将串流保存为视频片段。", +"Saving video clip — click to finish.": "正在保存视频片段——点击结束。", +"Scanning for more devices…": "正在扫描更多设备…", +"Screenshot": "截图", +"Searching...": "正在搜索…", +"Select Allow on the connected device’s debugging prompt if it appears.": "若已连接设备出现调试提示,请选择「允许」。", +"Select your Quest.": "选择你的 Quest。", +"Selected": "已选择", +"Set up shortcut": "设置快捷方式", +"SHARED FILE": "共享文件", +"Show in folder": "在文件夹中显示", +"SideQuest is ready to use.": "SideQuest 已可使用。", +"SideQuest opens": "SideQuest 启动方式", +"SideQuest setup": "SideQuest 设置", +"SideQuest update": "SideQuest 更新", +"Sign in with the Meta account that owns your Quest.": "请使用拥有该 Quest 的 Meta 账户登录。", +"Signed in as": "已登录为", +"Some features may be unavailable": "部分功能可能不可用", +"Some permissions still need approval. Expand to see file details.": "部分权限仍需批准。展开可查看文件详情。", +"source for this window.": "作为此窗口的来源。", +"Speed": "速度", +"Starting stream…": "正在启动串流…", +"Startup": "开机启动", +"Stream didn't start": "串流未能启动", +"Streaming in the popout window": "正在弹出窗口中串流", +"Succeeded": "已成功", +"Support details": "支持详情", +"Target app": "目标应用", +"The casting service on your headset isn't responding to start requests. The most common fixes, in order:": "头显上的投屏服务未响应启动请求。按顺序尝试以下最常见的解决方法:", +"The headset sleeps shortly after you take it off, dropping the Wi-Fi connection. Disabling the proximity sensor keeps it awake — this uses more battery, and resets when the headset restarts.": "头显摘下后不久就会休眠,导致 Wi-Fi 连接中断。禁用接近传感器可保持唤醒——但会更耗电,并在头显重启后重置。", +"The installed SideQuest version couldn’t be confirmed.": "无法确认已安装的 SideQuest 版本。", +"The store couldn’t load": "商店无法加载", +"This app": "此应用", +"This app build does not include Mover. Install the updated in-VR build.": "此应用版本不包含移动功能。请安装更新后的 VR 内应用版本。", +"This app declares no toggleable permissions.": "此应用未声明可切换的权限。", +"This device needs to be paired with SideQuest before it can connect.": "此设备需要先与 SideQuest 配对才能连接。", +"This file will be deleted from the device. This cannot be undone.": "此文件将从设备上删除,且无法撤销。", +"This permanently deletes the app’s saved data and settings. Reinstalling could still fail.": "此操作将永久删除该应用的存档与设置。重新安装仍可能失败。", +"This version of SideQuest can’t download games from Steam yet.": "此版本的 SideQuest 尚无法从 Steam 下载游戏。", +"This will recursively delete the folder and everything inside it. This cannot be undone.": "此操作将递归删除该文件夹及其全部内容,且无法撤销。", +"to remember this connection.": "以记住此连接。", +"to your Quest library.": "添加到你的 Quest 资源库。", +"Transferred": "已传输", +"Transport": "传输方式", +"Troubleshooting": "疑难解答", +"Try a different term or clear your search to see all settings.": "请尝试其他关键词,或清除搜索以查看全部设置。", +"Try a USB connection.": "请尝试使用 USB 连接。", +"Try restarting SideQuest, or open the website in your browser.": "请尝试重启 SideQuest,或在浏览器中打开该网站。", +"Turn on your Quest": "打开你的 Quest", +"Uninstall and install": "卸载并安装", +"Unlimited": "无限制", +"Unsaved changes to": "未保存的更改:", +"Update now": "立即更新", +"Update required": "需要更新", +"Update the casting service via Meta Quest Developer Hub.": "请通过 Meta Quest Developer Hub 更新投屏服务。", +"Update the in-VR app to the latest version": "将 VR 内应用更新到最新版本", +"Updates for this app are managed by Google Play. Open its store page to check for an available update.": "此应用的更新由 Google Play 管理。请打开其商店页面查看是否有可用更新。", +"Use a USB OTG cable or adapter. Allow SideQuest to access USB on this device, then allow debugging on the connected device.": "请使用 USB OTG 线或转接头。允许 SideQuest 访问此设备的 USB,然后在已连接设备上允许调试。", +"Use Bluetooth and your Meta account. No USB cable required.": "使用蓝牙和你的 Meta 账户,无需 USB 数据线。", +"Use device": "使用设备", +"View the setup guide": "查看设置指南", +"Waiting for a USB device…": "正在等待 USB 设备…", +"Waiting for your device…": "正在等待你的设备…", +"Wake and unlock your device if the prompt isn’t visible.": "若看不到提示,请唤醒并解锁你的设备。", +"Wake both controllers. Press the left Menu button or both thumbsticks to stop. The Meta button also releases Mover.": "唤醒两个手柄。按左手柄菜单键或同时按下两个摇杆可停止。Meta 键也会解除移动功能。", +"We’ll try to add the shortcut automatically. You may need to finish setup on your headset.": "我们会尝试自动添加快捷方式。你可能需要在头显上完成设置。", +"When a headset connects over Wi-Fi, turn off its proximity sensor so it stays awake — wireless ADB drops as soon as the headset sleeps.": "当头显通过 Wi-Fi 连接时,请关闭其接近传感器以保持唤醒——头显一旦休眠,无线 ADB 就会断开。", +"Window too small": "窗口过小", +"Wireless ADB drops when the headset sleeps": "头显休眠会导致无线 ADB 断开", +"Wireless adb sometimes drops the casting service's broadcasts. Plug the headset in with a USB-C cable and reconnect.": "无线 ADB 有时会丢失投屏服务的广播。请用 USB-C 线连接头显后重新连接。", +"Wireless setup is unavailable. Connect your device via USB instead.": "无线设置不可用。请改用 USB 连接你的设备。", +"You can change this preference in Settings.": "你可以在「设置」中更改此偏好。", +"You can retry setup or continue using your connected Quest.": "你可以重试设置,或继续使用已连接的 Quest。", +"You left the SideQuest website.": "你已离开 SideQuest 网站。", +"Your code": "你的验证码", +"Your current page will stay open.": "你当前所在的页面会保持打开。", +"Your image": "你的图片", +"Your Quest disconnected. Keep it awake and on the same Wi-Fi network, then connect again.": "你的 Quest 已断开。请保持其唤醒并处于同一 Wi-Fi 网络,然后重新连接。", +"Your Quest must be nearby, awake, and unlocked.": "你的 Quest 需要处于附近、唤醒且解锁状态。", +"Your sideloads will appear here.": "你的侧载任务会显示在这里。", +"APK": "APK", +"OBB": "OBB", +"Esc": "Esc", +"SHARED FILE": "共享文件", +"Aa": "Aa", +"Add library shortcuts": "添加资源库快捷方式", +"Check setup": "检查设置", +"Device settings → Startup": "设备设置 → 启动" +} diff --git a/dict-g.json b/dict-g.json new file mode 100644 index 0000000..61dc976 --- /dev/null +++ b/dict-g.json @@ -0,0 +1,35 @@ +{ +"Manage your connected devices and saved Wi-Fi connections.": "管理已连接的设备和已保存的 Wi-Fi 连接。", +"Manage updates, account connections, app installation, and storage.": "管理更新、账户连接、应用安装与存储。", +"Search and manage apps installed on your device.": "搜索并管理设备上已安装的应用。", +"Stream, inspect, and save Android logs from your device.": "串流、查看并保存设备上的 Android 日志。", +"Run ADB and shell commands. Output is kept for this session.": "运行 ADB 和 shell 命令。输出仅在本次会话中保留。", +"Device connection unavailable": "设备连接不可用", +"Open SideQuest on a supported computer or phone to connect your device.": "请在受支持的电脑或手机上打开 SideQuest 以连接你的设备。", +"If \"Switch to Wi-Fi\" fails, check that your device is connected to Wi-Fi.": "如果「切换到 Wi-Fi」失败,请检查设备是否已连接到 Wi-Fi。", +"If “Switch to Wi-Fi” fails, check that your device is connected to Wi-Fi.": "如果「切换到 Wi-Fi」失败,请检查设备是否已连接到 Wi-Fi。", +"Download failed before the response could be read.": "在读取响应之前下载就已失败。", +"The installed-package probe did not run.": "未运行已安装包探测。", +"The installed-package probe has not completed.": "已安装包探测尚未完成。", +"The package probe omitted the installed app version.": "包探测未返回已安装应用的版本。", +"The package probe returned contradictory package state.": "包探测返回了自相矛盾的包状态。", +"The package probe returned duplicate package blocks.": "包探测返回了重复的包块。", +"The package probe returned duplicate version fields.": "包探测返回了重复的版本字段。", +"The package probe wrote an unexpected error.": "包探测写入了意外错误。", +"ADB was not found. Install Android platform-tools or add adb to your PATH.": "未找到 ADB。请安装 Android platform-tools,或将 adb 加入 PATH。", +"Settings": "设置", +"Installed apps": "已安装应用", +"Device files": "设备文件", +"ADB commands": "ADB 命令", +"Devices": "设备", +"Devices and files on this device": "此设备上的设备与文件", +"after installing an app": "安装应用之后", +"before installing": "安装之前", +"An older version of this app is already installed.": "已安装此应用的更旧版本。", +"Enter a command and press Enter": "输入命令后按回车", +"Search pages, settings, apps…": "搜索页面、设置、应用…", +"Search pages, settings, apps...": "搜索页面、设置、应用…", +"Type to search or run a command": "输入以搜索或运行命令", +"Wireless headset": "无线头显", +"Wired device": "有线设备" +} \ No newline at end of file diff --git a/dict-h.json b/dict-h.json new file mode 100644 index 0000000..9c87fbf --- /dev/null +++ b/dict-h.json @@ -0,0 +1,161 @@ +{ +"· now": "· 现在", +"— custom": "— 自定义", +"· PID": "· PID", +"Access your controller’s render models.": "访问手柄的渲染模型。", +"Adding shortcut to your Quest library…": "正在将快捷方式添加到你的 Quest 资源库…", +"Adding shortcut…": "正在添加快捷方式…", +"Adding…": "正在添加…", +"Allow Bluetooth access in this device’s settings, then try again.": "请在此设备的设置中允许蓝牙访问,然后重试。", +"Android’s security check blocked installation. Review the message on your device, then try again.": "Android 安全检查阻止了安装。请查看设备上的提示,然后重试。", +"Browser does not support File System Access — download is unavailable.": "浏览器不支持文件系统访问——无法下载。", +"Browser does not support File System Access — recursive download is unavailable.": "浏览器不支持文件系统访问——无法递归下载。", +"Can't format — this isn't valid JSON.": "无法格式化——这不是有效的 JSON。", +"Cancelling…": "正在取消…", +"Change this later in Installed apps → SideQuest → Customize.": "稍后可在「已安装应用 → SideQuest → 自定义」中更改。", +"Check developer-mode access for the headset owner’s Meta account, then try again.": "请检查头显所有者的 Meta 账户是否具备开发者模式访问权限,然后重试。", +"Checking Meta sign-in…": "正在检查 Meta 登录状态…", +"Checking Mover…": "正在检查移动功能…", +"Checking file access…": "正在检查文件访问权限…", +"Checking for updates…": "正在检查更新…", +"Checking headset setup…": "正在检查头显设置…", +"Checking installation…": "正在检查安装…", +"Checking installed version…": "正在检查已安装版本…", +"Checking rendering control…": "正在检查渲染控制…", +"Checking setup availability…": "正在检查设置可用性…", +"Checking shortcut…": "正在检查快捷方式…", +"Checking sign-in…": "正在检查登录状态…", +"Checking the headset…": "正在检查头显…", +"Checking the startup setting…": "正在检查启动设置…", +"Cloud backup requested. Manage it from Meta’s cloud-backup page.": "已请求云备份。请在 Meta 的云备份页面进行管理。", +"Confirm the update in Android’s installer. We’ll try to reopen SideQuest when it finishes. Your settings will be kept.": "请在 Android 安装程序中确认更新。完成后我们会尝试重新打开 SideQuest,你的设置会保留。", +"Connecting over Bluetooth…": "正在通过蓝牙连接…", +"Connecting over Wi-Fi… Select Allow on your Quest if prompted.": "正在通过 Wi-Fi 连接…若 Quest 出现提示请选择「允许」。", +"Connecting to your headset…": "正在连接你的头显…", +"Connecting your device…": "正在连接你的设备…", +"Connecting…": "正在连接…", +"Could not check this Quest’s user. Check the connection and try again.": "无法检查此 Quest 的用户。请检查连接后重试。", +"Could not read the device’s setup result.": "无法读取设备的设置结果。", +"Could not read this Quest’s startup setting. Check the connection and try again.": "无法读取此 Quest 的启动设置。请检查连接后重试。", +"Could not save this Quest’s startup setting. Complete setup on the Quest and try again.": "无法保存此 Quest 的启动设置。请在 Quest 上完成设置后重试。", +"Couldn't install the casting service. Re-opening Meta Quest Developer Hub…": "无法安装投屏服务。正在重新打开 Meta Quest Developer Hub…", +"Couldn’t reach the headset. Make sure it’s awake and on the same Wi-Fi network.": "无法连接到头显。请确认它已唤醒并处于同一 Wi-Fi 网络。", +"Couldn’t reach your device. Check that it’s awake and on the same Wi-Fi network, or connect via USB.": "无法连接到你的设备。请确认它已唤醒并处于同一 Wi-Fi 网络,或改用 USB 连接。", +"Couldn’t reconnect your device. Check its Wi-Fi connection or connect via USB.": "无法重新连接你的设备。请检查其 Wi-Fi 连接,或改用 USB 连接。", +"Device setup didn’t finish": "设备设置未完成", +"Disabled — excluded from device selection and automatic connections": "已禁用——不参与设备选择和自动连接", +"Disabling mic…": "正在禁用麦克风…", +"Dismiss this device’s update reminder": "忽略此设备的更新提醒", +"Don’t remind me for this device": "此设备不再提醒", +"Downloading installer…": "正在下载安装程序…", +"Downloading…": "正在下载…", +"Enable “Allow from this source” in Android settings, then return here and continue.": "请在 Android 设置中启用「允许来自此来源」,然后返回此处继续。", +"Enabling mic…": "正在启用麦克风…", +"Filter logs…": "筛选日志…", +"Finish signing in on Meta’s sign-in page.": "请在 Meta 登录页面完成登录。", +"Finishing headset setup…": "正在完成头显设置…", +"Foveation, refresh, capture…": "注视点渲染、刷新率、采集…", +"Game Optimizer · Needs attention": "游戏优化器 · 需要处理", +"Game Optimizer · Restarting…": "游戏优化器 · 正在重启…", +"Game Optimizer · Waiting": "游戏优化器 · 等待中", +"Headset setup didn’t finish": "头显设置未完成", +"In-VR app installation didn’t finish": "VR 内应用安装未完成", +"Installing casting service on the headset…": "正在头显上安装投屏服务…", +"Installing…": "正在安装…", +"Measuring…": "正在测量…", +"Meta sign-in was declined. Approve access on Meta’s website to continue.": "Meta 登录被拒绝。请在 Meta 网站批准访问以继续。", +"Mic relay on — headset mic now plays on this PC.": "麦克风中继已开启——头显麦克风的声音现在会在本机播放。", +"Mic relay running — capture this window in OBS.": "麦克风中继运行中——可在 OBS 中采集此窗口。", +"OBB asset packs can be very large (often several GB) — backing them up may take a while and use a lot of disk space.": "OBB 资源包可能非常大(通常数 GB)——备份可能需要较长时间并占用大量磁盘空间。", +"On your network — ready to connect over Wi-Fi": "已在你的网络中——可通过 Wi-Fi 连接", +"Open Android’s App info to clear data or force stop": "打开 Android 的应用信息以清除数据或强制停止", +"Opening Meta Quest Developer Hub…": "正在打开 Meta Quest Developer Hub…", +"Preparing Meta sign-in…": "正在准备 Meta 登录…", +"Preparing SideQuest installation…": "正在准备安装 SideQuest…", +"Preparing casting service…": "正在准备投屏服务…", +"Preparing installation…": "正在准备安装…", +"Preparing wireless setup…": "正在准备无线设置…", +"Press Download on Meta’s page and accept the licence to continue.": "请在 Meta 页面点击「下载」并接受许可协议以继续。", +"Preview disabled — file is": "预览已禁用——文件为", +"Reconnecting over Bluetooth…": "正在通过蓝牙重连…", +"Recording saved unoptimized — it may play out of sync. VLC plays it correctly.": "录制已保存但未优化——播放时可能不同步。用 VLC 播放可正常。", +"Refreshing…": "正在刷新…", +"Removes the app and all of its data from this headset. This cannot be undone — you can reinstall later by sideloading or via the store.": "将此应用及其全部数据从头显上移除。此操作无法撤销——日后可通过侧载或商店重新安装。", +"Restore SideQuest’s connection to this": "恢复 SideQuest 与此的连接:", +"Resuming Game Optimizer…": "正在恢复游戏优化器…", +"Saved settings…": "已保存的设置…", +"Saved — not currently on this network": "已保存——当前不在此网络中", +"Saving the startup setting…": "正在保存启动设置…", +"Saving video clip — click to finish": "正在保存视频片段——点击结束", +"Setting up SideQuest on your Quest…": "正在你的 Quest 上设置 SideQuest…", +"Setting up the mic relay…": "正在设置麦克风中继…", +"Setting up…": "正在设置…", +"Setup could not read SideQuest’s debugging identity on this Android 10 device.": "设置无法读取此 Android 10 设备上 SideQuest 的调试标识。", +"Setup could not read the device’s Android version.": "设置无法读取设备的 Android 版本。", +"Setup could not verify the device’s saved access.": "设置无法验证设备上已保存的访问权限。", +"Setup didn’t finish.": "设置未完成。", +"SideQuest can’t write OBB files on this headset right now. Restart SideQuest and try again, or complete device setup.": "SideQuest 目前无法在此头显上写入 OBB 文件。请重启 SideQuest 后重试,或完成设备设置。", +"SideQuest could not be installed. Check the Quest’s free storage and try again.": "无法安装 SideQuest。请检查 Quest 的可用存储后重试。", +"SideQuest couldn’t open the file access settings on this headset.": "SideQuest 无法打开此头显的文件访问设置。", +"SideQuest installation didn’t finish": "SideQuest 安装未完成", +"SideQuest is installed, but setup didn’t finish.": "SideQuest 已安装,但设置未完成。", +"SideQuest’s saved debugging access could not be verified on this Android 10 device.": "无法在此 Android 10 设备上验证 SideQuest 已保存的调试访问权限。", +"Sign in on the Quest with its owner’s Meta account, then try again.": "请在 Quest 上使用其所有者的 Meta 账户登录,然后重试。", +"Signing in…": "正在登录…", +"Starting cloud backup on the headset…": "正在头显上启动云备份…", +"Starting the mic relay in its own process…": "正在独立进程中启动麦克风中继…", +"Stopping…": "正在停止…", +"The device didn’t finish installation in time. Try again.": "设备未及时完成安装。请重试。", +"The recording was empty — nothing was saved.": "录制内容为空——没有保存任何数据。", +"Theater mode — maximize the player": "影院模式——最大化播放器", +"This SideQuest app can’t choose a game folder here.": "此 SideQuest 应用无法在此选择游戏文件夹。", +"This SideQuest app can’t download from Steam yet.": "此 SideQuest 应用尚无法从 Steam 下载。", +"This SideQuest app can’t get this version of the game yet.": "此 SideQuest 应用尚无法获取该游戏版本。", +"This SideQuest app can’t search the Steam library here.": "此 SideQuest 应用无法在此搜索 Steam 库。", +"This device’s software does not support this setup method.": "此设备的软件不支持该设置方式。", +"This port’s game files are set up wrong. Tell its developer.": "此移植版的游戏文件配置有误,请告知其开发者。", +"This task's source is no longer available — sideload the file again instead.": "此任务的来源已不可用——请重新侧载该文件。", +"To remove this shortcut, open your Quest library and choose Remove from the shortcut’s menu.": "要移除此快捷方式,请打开 Quest 资源库,并在该快捷方式菜单中选择「移除」。", +"Updates, accounts, permissions…": "更新、账户、权限…", +"Updating…": "正在更新…", +"Uploading…": "正在上传…", +"Use your device’s camera.": "使用你设备的摄像头。", +"Verifying download…": "正在校验下载…", +"Verifying headset ownership…": "正在验证头显所有权…", +"View in logcat — jump to the lines logged right after this ran": "在 Logcat 中查看——跳转到此操作执行后立即产生的日志行", +"Waiting for Android installation confirmation…": "正在等待 Android 安装确认…", +"Waiting for a headset…": "正在等待头显…", +"Waiting for log output…": "正在等待日志输出…", +"Windows’ Bluetooth Support Service is disabled. Enable it in Windows Services, then try again.": "Windows 的蓝牙支持服务已禁用。请在 Windows 服务中启用后重试。", +"Wipes the app’s saved data, accounts, and preferences. The app stays installed; the next launch will be a fresh first-run.": "清除该应用的存档、账户和偏好设置。应用仍保持安装状态,下次启动将是全新的首次运行。", +"Wireless auto-enable not ready yet — retrying": "无线自动启用尚未就绪——正在重试", +"Working…": "处理中…", +"You’re currently using": "你当前正在使用", +"You’re ready to use SideQuest": "你可以开始使用 SideQuest 了", +"app(s) · choose what to back up": "个应用 · 选择要备份的内容", +"app(s) · choose what to restore": "个应用 · 选择要恢复的内容", +"from disk. This can’t be undone.": "(从磁盘删除)。此操作无法撤销。", +"is asleep — wake it (or reconnect) to change this.": "处于休眠状态——请唤醒它(或重新连接)以更改此设置。", +"doesn't support proximity sensor control.": "不支持接近传感器控制。", +"Another app asked SideQuest to": "另一个应用请求 SideQuest", +"this file. Continue only if you trust where it came from.": "此文件。仅当你信任其来源时才继续。", +"install": "安装", +"copy": "复制", +"Set up": "设置", +"Couldn't load preview:": "无法加载预览:", +"limit). Download to view.": "上限)。下载后查看。", +"(over the": "(超出", +"SideQuest on your headset to add": "请在头显上使用 SideQuest 将", +"needs a component included in Meta Quest Developer Hub. SideQuest installs only that component.": "需要 Meta Quest Developer Hub 中包含的组件。SideQuest 只会安装该组件。", +"This permanently deletes": "此操作将永久删除", +"this backup": "此备份", +"these backups": "这些备份", +"On = keep": "开启 = 保持", +"Install this APK?": "安装此 APK?", +"Copy this OBB?": "复制此 OBB?", +"connected directly": "直连", +"Connected via USB": "已通过 USB 连接", +"Delete backup": "删除备份", +"Not now": "暂不", +"Just this once": "仅此次" +} \ No newline at end of file diff --git a/dict-i.json b/dict-i.json new file mode 100644 index 0000000..9e4575f --- /dev/null +++ b/dict-i.json @@ -0,0 +1,58 @@ +{ +"Tune refresh rate, resolution, and other headset properties.": "调整刷新率、分辨率以及其他头显属性。", +"Manual control": "手动控制", +"Switches rendering profiles automatically while a game runs, even after SideQuest closes. Turning it off returns rendering to your selected saved settings.": "游戏运行时自动切换渲染配置,即使 SideQuest 已关闭也会继续生效。关闭后则回到你选择的已保存设置。", +"Used for games without their own profile while Game Optimizer is on.": "游戏优化器开启时,用于没有独立配置档的游戏。", +"Set up individual games in Installed apps.": "请在「已安装应用」中为各游戏单独设置。", +"Smooth": "流畅", +"HQ": "高画质", +"HQ+": "极致画质", +"Reboot": "重启", +"Send": "发送", +"Clear caches": "清除缓存", +"Default": "默认", +"How aggressively shading is reduced toward the edges of the lens — higher means more performance, lower means better edge quality. Adjustable only while Dynamic FFR is off; with it on, the runtime sets the level automatically.": "镜片边缘着色削减的力度——越高越省性能,越低边缘画质越好。仅在动态注视点渲染关闭时可调;开启时由运行时自动设置级别。", +"Higher rates feel smoother but cost more GPU time. Extended rates require a Quest 3 and Horizon OS v2.7 or later. 240 Hz is experimental and can cause severe visual artifacts in Home or unsupported apps; select another rate or reboot to recover.": "刷新率越高越流畅,但会占用更多 GPU 时间。扩展刷新率需要 Quest 3 及 Horizon OS v2.7 或更高版本。240 Hz 属于实验性功能,可能导致主页或不受支持的应用出现严重显示异常;请改选其他刷新率或重启以恢复。", +"Per-eye render texture size. Higher values produce sharper graphics at the cost of GPU time. Pick the \"Default\" row matching your headset to return to stock; bump up or down from there to taste.": "单眼渲染纹理尺寸。数值越高画面越清晰,但会占用更多 GPU 时间。选择与你的头显匹配的「默认」一行即可恢复出厂值;之后可按喜好上下调整。", +"Force chromatic aberration correction on, off, or let the app decide.": "强制开启或关闭色差校正,或交由应用自行决定。", +"Apply a saved combination of capture settings, or save the current ones as a named preset with +. Editing any capture row switches the selection to Custom; saving under an existing name updates that preset.": "应用已保存的一组采集设置,或用 + 将当前设置保存为命名预设。编辑任意采集项都会把选择切换为「自定义」;用已有名称保存则更新该预设。", +"Pixel dimensions for screen recording / casting output.": "录屏 / 投屏输出的像素尺寸。", +"Frames per second for screen recording and casting. Full captures at the headset's current refresh rate (72–120 fps depending on model and mode), overriding the fixed rates.": "录屏与投屏的帧率。完全采集会按头显当前刷新率(依机型和模式为 72–120 fps)并覆盖固定帧率。", +"Bits per second for screen recording. Higher = better quality + larger files.": "录屏码率(比特/秒)。越高画质越好、文件越大。", +"Choose the left eye, right eye, or both eyes side-by-side for screen capture.": "选择采集左眼、右眼,或双眼并排画面。", +"Manage display, sleep, and other Android settings.": "管理显示、休眠及其他 Android 设置。", +"Full control": "完全控制", +"Not set": "未设置", +"Currently applied": "当前已应用", +"Applies to new connections only": "仅对新连接生效", +"Takes effect after reboot": "重启后生效", +"Requires a reboot": "需要重启", +"Restart required": "需要重启", +"Changes saved": "更改已保存", +"Save failed": "保存失败", +"Read only": "只读", +"Protected": "受保护", +"Unsupported on this headset": "此头显不支持", +"Not available on this device": "此设备不支持", +"Refresh rate": "刷新率", +"Resolution": "分辨率", +"Texture size": "纹理尺寸", +"Foveation": "注视点渲染", +"Boundary": "边界", +"Boundary system": "边界系统", +"Passthrough": "透视", +"Experimental toggles": "实验性开关", +"System properties": "系统属性", +"Property": "属性", +"Read device properties": "读取设备属性", +"Write failed": "写入失败", +"Read failed": "读取失败", +"Rebooting headset": "正在重启头显", +"Clearing caches": "正在清除缓存", +"Sending": "正在发送", +"Caches cleared": "缓存已清除", +"Command sent": "命令已发送", +"Reboot the headset to apply": "重启头显以生效", +"Drop APK, OBB, or ZIP files": "拖入 APK、OBB 或 ZIP 文件", +"Drop to queue": "拖放以加入队列" +} \ No newline at end of file diff --git a/engine.js b/engine.js new file mode 100644 index 0000000..d5c31de --- /dev/null +++ b/engine.js @@ -0,0 +1,269 @@ +/* ============================================================================ + * SideQuest 简体中文运行时汉化引擎 (l10n-zh) + * 通过 Electron 主进程统一注入到所有本地页面(file:// 与 data:text/html)。 + * 设计原则: + * - 不修改任何上游业务代码,仅做 DOM 文本/属性替换 + * - 幂等:只做「英文 → 中文」单向替换,中文不会被二次翻译 + * - 兜底:MutationObserver 捕获 Angular 重渲染产生的新文本 + * ==========================================================================*/ +(function () { + 'use strict'; + + var NS = window.__SQ_ZH__; + if (!NS || NS.installed) return; + NS.installed = true; + + var DICT = NS.dict || {}; + var RULES = (NS.rules || []).map(function (r) { + try { + return [new RegExp(r[0]), r[1]]; + } catch (e) { + return null; + } + }).filter(Boolean); + + /* 不进入的子树 */ + var SKIP_TAGS = { + SCRIPT: 1, STYLE: 1, NOSCRIPT: 1, TEMPLATE: 1, + CODE: 1, PRE: 1, KBD: 1, SAMP: 1, TEXTAREA: 1, SVG: 1, MATH: 1 + }; + /* 图标元素(ligature 字形名绝不能被翻译) */ + var ICON_TOKENS = { + 'mat-icon': 1, 'material-icons': 1, 'material-icons-outlined': 1, + 'material-symbols': 1, 'material-symbols-outlined': 1, + 'material-symbols-rounded': 1, 'material-symbols-sharp': 1, + 'icon': 1, 'sq-icon': 1, 'fa': 1, 'fas': 1, 'far': 1, 'fab': 1 + }; + /* 需要翻译的属性 */ + var ATTRS = ['placeholder', 'title', 'aria-label', 'aria-description', 'alt', 'data-tooltip']; + + var WS = /\s+/g; + var HAS_LATIN = /[A-Za-z]/; + var EDGES = /^(\s*)([\s\S]*?)(\s*)$/; + /* Angular 会把「说明文案」与「(Default: X)」拼进同一个文本节点, + 这里先把后缀拆出来,分别翻译后再拼回,避免为每条说明单独写规则。 */ + var DEFAULT_RE = /^(.*?)\s*\(Default: ([^()]*)\)$/; + + function norm(s) { + return s.replace(WS, ' ').trim(); + } + + /* 词典 + 规则的纯查表逻辑;无命中返回 null */ + function lookupCore(s) { + var t = DICT[s]; + if (t !== undefined) return t; + if (!HAS_LATIN.test(s)) return null; + for (var i = 0; i < RULES.length; i++) { + var re = RULES[i][0]; + if (re.test(s)) { + var out = s.replace(re, RULES[i][1]); + /* 幂等保证:若替换结果仍会被同一条规则命中,说明会无限增长,则放弃。 + 这样就能安全处理「英文前缀 + 已汉化尾部」的混排字符串 + (如 “1.2.3.4:5555 · last seen 5分钟前”)。 */ + if (out !== s && !re.test(out)) return out; + } + } + return null; + } + + /* 返回译文;无匹配返回 null */ + function look(s) { + var t = lookupCore(s); + if (t !== null) return t; + var m = DEFAULT_RE.exec(s); + if (m) { + var base = lookupCore(m[1]); + var def = lookupCore(m[2]); + if (base !== null || def !== null) { + return ( + (base === null ? m[1] : base) + + '(默认:' + + (def === null ? m[2] : def) + + ')' + ); + } + } + return null; + } + + function isIconElement(el) { + if (!el || el.nodeType !== 1) return false; + if (el.tagName === 'MAT-ICON' || el.tagName === 'SVG') return true; + var cls = el.getAttribute('class'); + if (cls) { + var parts = cls.split(/\s+/); + for (var i = 0; i < parts.length; i++) { + if (ICON_TOKENS[parts[i]]) return true; + } + } + if (el.hasAttribute('data-sq-zh-skip')) return true; + if (el.getAttribute('translate') === 'no') return true; + return false; + } + + function translateTextNode(node) { + var parent = node.parentNode; + if (!parent || parent.nodeType !== 1) return; + if (SKIP_TAGS[parent.tagName]) return; + if (isIconElement(parent)) return; + var orig = node.data; + if (!orig || orig.length > 600 || !HAS_LATIN.test(orig)) return; + var key = norm(orig); + if (key.length < 2) return; + var t = look(key); + if (t === null) return; + var m = EDGES.exec(orig); + var next = (m[1] || '') + t + (m[3] || ''); + if (next !== orig) node.data = next; + } + + function translateAttrs(el) { + if (!el.getAttribute) return; + if (isIconElement(el)) return; + for (var i = 0; i < ATTRS.length; i++) { + var a = ATTRS[i]; + var v = el.getAttribute(a); + if (!v || v.length > 600 || !HAS_LATIN.test(v)) continue; + var t = look(norm(v)); + if (t !== null && t !== v) el.setAttribute(a, t); + } + if (el.tagName === 'INPUT' || el.tagName === 'BUTTON') { + var ty = (el.getAttribute('type') || '').toLowerCase(); + if (el.tagName === 'INPUT' && ty !== 'button' && ty !== 'submit' && ty !== 'reset') return; + var val = el.getAttribute('value'); + if (val && HAS_LATIN.test(val)) { + var tv = look(norm(val)); + if (tv !== null && tv !== val) el.setAttribute('value', tv); + } + } + } + + function filterNode(n) { + if (n.nodeType === 1) { + if (SKIP_TAGS[n.tagName] || isIconElement(n)) return 2; /* REJECT: 连同子树 */ + } + return 1; + } + + function walkSubtree(root) { + if (!root) return; + if (root.nodeType === 3) { + translateTextNode(root); + return; + } + if (root.nodeType !== 1 && root.nodeType !== 9) return; + if (root.nodeType === 1) { + if (SKIP_TAGS[root.tagName] || isIconElement(root)) return; + translateAttrs(root); + } + var walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT, filterNode, false); + var n; + while ((n = walker.nextNode())) { + if (n.nodeType === 3) translateTextNode(n); + else translateAttrs(n); + } + } + + function translateTitle() { + var t = document.title; + if (!t || !HAS_LATIN.test(t)) return; + var v = look(norm(t)); + if (v !== null && v !== t) document.title = v; + } + + /* ---------- 观察器 ---------- */ + var observer = null; + var pendingRoots = []; + var scheduled = false; + + function startObserving() { + if (observer) return; + observer = new MutationObserver(function (muts) { + var needFull = false; + for (var i = 0; i < muts.length; i++) { + var m = muts[i]; + if (m.type === 'characterData') { + translateTextNode(m.target); + } else if (m.type === 'attributes') { + translateAttrs(m.target); + } else { + for (var j = 0; j < m.addedNodes.length; j++) { + var a = m.addedNodes[j]; + if (a.nodeType === 1 || a.nodeType === 3) { + if (pendingRoots.length < 500) pendingRoots.push(a); + needFull = true; + } + } + } + } + if (needFull) schedule(); + }); + observer.observe(document.documentElement, { + childList: true, + subtree: true, + characterData: true, + attributes: true, + attributeFilter: ATTRS + }); + } + + function stopObserving() { + if (!observer) return; + try { + observer.takeRecords(); + observer.disconnect(); + } catch (e) { /* ignore */ } + observer = null; + } + + function schedule() { + if (scheduled) return; + scheduled = true; + setTimeout(function () { + scheduled = false; + stopObserving(); + try { + var roots = pendingRoots; + pendingRoots = []; + for (var i = 0; i < roots.length; i++) { + var r = roots[i]; + if (r && r.isConnected) walkSubtree(r); + } + translateTitle(); + } finally { + startObserving(); + } + }, 30); + } + + function fullPass() { + if (!document.documentElement) return; + stopObserving(); + try { + walkSubtree(document.documentElement); + translateTitle(); + } finally { + startObserving(); + } + } + + NS.fullPass = fullPass; + + function boot() { + fullPass(); + /* Angular 首屏是异步渲染的,前几秒多扫几轮兜底 */ + [120, 400, 1000, 2500, 5000].forEach(function (d) { + setTimeout(fullPass, d); + }); + /* 窗口重新可见时再扫一遍(弹出窗口可能在被展示前不渲染) */ + document.addEventListener('visibilitychange', function () { + if (!document.hidden) fullPass(); + }); + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', fullPass); + } + } + + if (document.documentElement) boot(); + else document.addEventListener('DOMContentLoaded', boot, { once: true }); +})(); diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..90ec5b8 --- /dev/null +++ b/install.sh @@ -0,0 +1,141 @@ +#!/usr/bin/env bash +# ============================================================================ +# SideQuest 简体中文汉化版 —— 覆盖安装脚本 +# +# 用法: sudo bash ./install.sh [deb路径] +# +# 行为: +# 1. 校验安装包哈希(与构建时一致才继续) +# 2. 退出正在运行的 SideQuest 并清理单实例锁残留 +# 3. 备份当前 app.asar(可事后回滚) +# 4. dpkg -i 覆盖安装(同包名 sidequest-desktop,dpkg 识别为升级) +# 5. 安装后逐项校验版本、asar 哈希、汉化标记、启动器 +# +# 不会触碰 ~/.config/SideQuestDesktop(登录态 / 设备绑定 / 已记住的无线设备)。 +# ============================================================================ +set -euo pipefail + +TOOL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +WORK="${SQ_ZH_HOME:-$HOME/.sidequest-zh}" +INSTALL_DIR="/opt/SideQuest" +ASAR="$INSTALL_DIR/resources/app.asar" + +say() { printf '\n\033[1m== %s ==\033[0m\n' "$*"; } +ok() { printf ' \033[32m✓\033[0m %s\n' "$*"; } +bad() { printf ' \033[31m✗\033[0m %s\n' "$*"; } +die() { bad "$*"; exit 1; } + +[ "$(id -u)" -eq 0 ] || die "请用 sudo 运行: sudo bash $TOOL_DIR/install.sh" + +# sudo 下 $HOME 可能是 /root,用 SUDO_USER 还原真实用户 +if [ -n "${SUDO_USER:-}" ]; then + USER_HOME="$(getent passwd "$SUDO_USER" | cut -d: -f6)" +else + USER_HOME="$HOME" +fi +WORK="${SQ_ZH_HOME:-$USER_HOME/.sidequest-zh}" +DATA_DIR="$USER_HOME/.config/SideQuestDesktop" + +DEB="${1:-}" +if [ -z "$DEB" ]; then + DEB="$(ls -1 "$WORK"/dist/SideQuest-*-zh.*-amd64.deb 2>/dev/null | sort -V | tail -1 || true)" +fi +[ -n "$DEB" ] && [ -f "$DEB" ] || die "找不到安装包(请先执行 node build.js all,或把 deb 路径作为参数传入)" + +say "1. 待安装内容" +dpkg-deb -f "$DEB" Package Version Architecture | sed 's/^/ /' +echo " 当前已安装:" +dpkg-query -W -f=' ${Package} ${Version} ${Status}\n' sidequest-desktop 2>/dev/null || echo " (未安装)" + +say "2. 校验安装包哈希" +SHA_FILE="$DEB.sha256" +if [ -f "$SHA_FILE" ]; then + ACT="$(sha256sum "$DEB" | awk '{print $1}')" + EXP="$(awk '{print $1}' "$SHA_FILE")" + [ "$ACT" = "$EXP" ] && ok "deb sha256 与构建时一致" || die "deb 哈希不匹配(期望 $EXP,实际 $ACT)" +else + bad "缺少 $SHA_FILE,跳过 deb 哈希校验" +fi + +say "3. 校验包内 app.asar" +# 期望值来自 build.js 的产物记录;不存在则跳过 +EXP_ASAR_FILE="$WORK/dist/app.asar.zh.sha256" +if [ -f "$EXP_ASAR_FILE" ]; then + EXP_ASAR="$(awk '{print $1}' "$EXP_ASAR_FILE")" + PKG_ASAR="$(dpkg-deb --fsys-tarfile "$DEB" | tar -xO -f - ./opt/SideQuest/resources/app.asar 2>/dev/null | sha256sum | awk '{print $1}')" + [ "$PKG_ASAR" = "$EXP_ASAR" ] && ok "包内 app.asar 与实测通过的版本一致" || die "包内 app.asar 哈希不符" +else + bad "缺少 $EXP_ASAR_FILE,跳过 asar 哈希校验" +fi + +say "4. 退出正在运行的 SideQuest" +if pgrep -f "$INSTALL_DIR/sidequest" >/dev/null 2>&1; then + pkill -f "$INSTALL_DIR/sidequest" 2>/dev/null || true + for _ in $(seq 1 10); do + pgrep -f "$INSTALL_DIR/sidequest" >/dev/null 2>&1 || break + sleep 0.5 + done + if pgrep -f "$INSTALL_DIR/sidequest" >/dev/null 2>&1; then + pkill -9 -f "$INSTALL_DIR/sidequest" 2>/dev/null || true + sleep 1 + fi + ok "已退出" +else + ok "未在运行" +fi +rm -f "$DATA_DIR"/Singleton* 2>/dev/null || true + +say "5. 备份当前 app.asar" +mkdir -p "$WORK/backup" +if [ -f "$ASAR" ]; then + STAMP="$(date +%Y%m%d-%H%M%S)" + cp -f "$ASAR" "$WORK/backup/app.asar.before-install-$STAMP" + ok "已备份到 $WORK/backup/app.asar.before-install-$STAMP" +fi + +say "6. 安装(dpkg -i 覆盖升级)" +dpkg -i "$DEB" + +say "7. 安装后校验" +NEW_VER="$(dpkg-query -W -f='${Version}' sidequest-desktop 2>/dev/null || echo '?')" +echo " 已安装版本: $NEW_VER" +case "$NEW_VER" in *zh*) ok "汉化版已就位" ;; *) bad "版本号不含 zh,可能装错了包" ;; esac + +ASAR_SHA="$(sha256sum "$ASAR" 2>/dev/null | awk '{print $1}')" +if [ -f "$EXP_ASAR_FILE" ] && [ "$ASAR_SHA" = "$(awk '{print $1}' "$EXP_ASAR_FILE")" ]; then + ok "app.asar 与构建产物一致" +else + bad "app.asar 哈希为 $ASAR_SHA(请核对)" +fi + +for pair in "简体中文汉化:汉化注入 hook" "SQ_ZH_ALLOW_UPDATES:自动更新已禁用" "vrwanba.com:默认站点 vrwanba" "一月:日期本地化"; do + needle="${pair%%:*}"; label="${pair##*:}" + grep -qa -- "$needle" "$ASAR" 2>/dev/null && ok "$label" || bad "$label 缺失" +done + +[ -x "$INSTALL_DIR/sidequest" ] && ok "主程序可执行" || bad "主程序缺失" +[ -e /usr/bin/sidequest ] && ok "启动器 /usr/bin/sidequest" || bad "启动器缺失" +[ -f /usr/share/applications/sidequest.desktop ] && ok "桌面项存在" || bad "桌面项缺失" + +say "8. 用户数据(应保持不变)" +if [ -d "$DATA_DIR" ]; then + ok "用户数据目录存在: $DATA_DIR" + du -sh "$DATA_DIR" | sed 's/^/ /' +else + bad "用户数据目录不存在(异常)" +fi + +cat < + # 或恢复 app.asar: + sudo cp $WORK/backup/app.asar.before-install-* $ASAR + +临时恢复官方自动更新(会被官方版本覆盖汉化): + SQ_ZH_ALLOW_UPDATES=1 sidequest +============================================================ +EOF diff --git a/rules.json b/rules.json new file mode 100644 index 0000000..f3112b7 --- /dev/null +++ b/rules.json @@ -0,0 +1,550 @@ +[ +[ +"^(.+) of (.+) free$", +"可用 $1 / 共 $2" +], +[ +"^Search \\((.+)\\)$", +"搜索($1)" +], +[ +"^Search (.+)$", +"搜索 $1" +], +[ +"^Wireless headset \\(…(.{2,8})\\)$", +"无线头显(…$1)" +], +[ +"^Wired device \\(…(.{2,8})\\)$", +"有线设备(…$1)" +], +[ +"^Another app asked SideQuest to install this file\\. Continue only if you trust where it came from\\.$", +"另一个应用请求 SideQuest 安装此文件。仅当你信任其来源时才继续。" +], +[ +"^Another app asked SideQuest to copy this file\\. Continue only if you trust where it came from\\.$", +"另一个应用请求 SideQuest 复制此文件。仅当你信任其来源时才继续。" +], +[ +"^This permanently deletes this backup from disk\\. This can['’]t be undone\\.$", +"此操作将永久删除此备份(从磁盘删除)。此操作无法撤销。" +], +[ +"^This permanently deletes these backups from disk\\. This can['’]t be undone\\.$", +"此操作将永久删除这些备份(从磁盘删除)。此操作无法撤销。" +], +[ +"^Installed: v(.+)\\. Checking for updates…$", +"已安装:v$1。正在检查更新…" +], +[ +"^Installed: v(.+)\\. Could not check for updates\\.$", +"已安装:v$1。无法检查更新。" +], +[ +"^Restarting (.+)…$", +"正在重启 $1…" +], +[ +"^Mover needs a component included in Meta Quest Developer Hub\\. SideQuest installs only that component\\.$", +"移动功能需要 Meta Quest Developer Hub 中包含的组件。SideQuest 只会安装该组件。" +], +[ +"^Streaming needs a component included in Meta Quest Developer Hub\\. SideQuest installs only that component\\.$", +"串流需要 Meta Quest Developer Hub 中包含的组件。SideQuest 只会安装该组件。" +], +[ +"^Connecting over Wi-Fi\\.\\.\\. Select Allow on your Quest if prompted\\.$", +"正在通过 Wi-Fi 连接…若 Quest 出现提示请选择「允许」。" +], +[ +"^On = keep (.+) awake while it['’]s off your head \\(uses more battery\\); resets when the headset restarts\\.$", +"开启后,摘下头显时 $1 仍保持唤醒(更耗电);头显重启后重置。" +], +[ +"^Another app asked SideQuest to (.+) this file\\. Continue only if you trust where it came from\\.$", +"另一个应用请求 SideQuest $1 此文件。仅当你信任其来源时才继续。" +], +[ +"^Preview disabled — file is (.+) \\(over the (.+) limit\\)\\. Download to view\\.$", +"预览已禁用——文件为 $1(超出 $2 上限)。下载后查看。" +], +[ +"^This permanently deletes (.+) from disk\\. This can['’]t be undone\\.$", +"此操作将永久删除 $1(从磁盘删除)。此操作无法撤销。" +], +[ +"^(.+) needs a component included in Meta Quest Developer Hub\\. SideQuest installs only that component\\.$", +"$1 需要 Meta Quest Developer Hub 中包含的组件。SideQuest 只会安装该组件。" +], +[ +"^(.+) doesn['’]t support proximity sensor control\\.$", +"$1 不支持接近传感器控制。" +], +[ +"^(.+) is asleep — wake it \\(or reconnect\\) to change this\\.$", +"$1 处于休眠状态——请唤醒它(或重新连接)以更改此设置。" +], +[ +"^You[’']re currently using (.+)\\.$", +"你当前正在使用 $1。" +], +[ +"^Couldn['’]t load preview: (.+)$", +"无法加载预览:$1" +], +[ +"^Update SideQuest on your headset to add$", +"更新头显上的 SideQuest,以将" +], +[ +"^Install SideQuest on your headset to add$", +"安装头显上的 SideQuest,以将" +], +[ +"^(.+) · now$", +"$1 · 现在" +], +[ +"^(.+) · last seen (.+)$", +"$1 · 上次出现 $2" +], +[ +"^(.+) · connected directly$", +"$1 · 直连" +], +[ +"^(.+) partially disconnected — some connections may linger\\.$", +"$1 部分断开——部分连接可能仍然存在。" +], +[ +"^(.+) — SideQuest Stream$", +"$1 — SideQuest 串流" +], +[ +"^Installed: v(.+)\\. (.+)$", +"已安装:v$1。$2" +], +[ +"^(\\d+) of (\\d+) files · (.+)$", +"共 $2 个文件中的 $1 个 · $3" +], +[ +"^(.+) · 上次出现 (\\d+)(\\D+)$", +"$1 · 上次出现 $2$3" +], +[ +"^· last seen (.+)$", +"· 上次出现 $1" +], +[ +"^· now$", +"· 现在" +], +[ +"^Back up · (.+)$", +"备份 · $1" +], +[ +"^Restore · (.+)$", +"恢复 · $1" +], +[ +"^Game files · (.+)$", +"游戏文件 · $1" +], +[ +"^Game Optimizer · (.+)$", +"游戏优化器 · $1" +], +[ +"^Battery (\\d+)% · Charging$", +"电量 $1% · 充电中" +], +[ +"^Queued · (\\d+) files$", +"已排队 · $1 个文件" +], +[ +"^Backed up · skipped (\\d+) unreadable files?$", +"已备份 · 跳过 $1 个无法读取的文件" +], +[ +"^Custom: (\\d+) × (\\d+)$", +"自定义:$1 × $2" +], +[ +"^Custom \\((\\d+) × (\\d+)\\)$", +"自定义($1 × $2)" +], +[ +"^Downloading version (.+)…(.*)$", +"正在下载版本 $1…$2" +], +[ +"^Downloading v(.+)…$", +"正在下载 v$1…" +], +[ +"^Downloading (.+)…(\\s*\\d+%)?$", +"正在下载 $1…$2" +], +[ +"^Downloading (.+) · (.+)$", +"正在下载 $1 · $2" +], +[ +"^Copying (.+)…$", +"正在复制 $1…" +], +[ +"^Copying (.+) · (.+)$", +"正在复制 $1 · $2" +], +[ +"^Preparing (\\d+)/(\\d+)…$", +"正在准备 $1/$2…" +], +[ +"^Preparing (.+)…$", +"正在准备 $1…" +], +[ +"^Preparing (.+) · (.+)$", +"正在准备 $1 · $2" +], +[ +"^Pushing (.+)…$", +"正在推送 $1…" +], +[ +"^Pushing (.+) \\((.+)\\) · (.+)$", +"正在推送 $1($2)· $3" +], +[ +"^Pushing (.+) · (.+)$", +"正在推送 $1 · $2" +], +[ +"^Installing (.+) · (.+)$", +"正在安装 $1 · $2" +], +[ +"^Uninstalling (.+)…$", +"正在卸载 $1…" +], +[ +"^Restoring (.+)…$", +"正在恢复 $1…" +], +[ +"^Finishing (.+)…$", +"正在完成 $1…" +], +[ +"^Reading (.+)…$", +"正在读取 $1…" +], +[ +"^Scanning (.+)…$", +"正在扫描 $1…" +], +[ +"^Updating to v(.+)…$", +"正在更新到 v$1…" +], +[ +"^Opening SideQuest on your (.+)…$", +"正在你的 $1 上打开 SideQuest…" +], +[ +"^Opening (.+)…$", +"正在打开 $1…" +], +[ +"^Proximity sensor disabled — (.+) will stay awake\\.$", +"接近传感器已禁用——$1 将保持唤醒。" +], +[ +"^Proximity sensor turned off on (.+) — it'll stay awake on Wi-Fi\\.$", +"已关闭 $1 的接近传感器——它将在 Wi-Fi 下保持唤醒。" +], +[ +"^Delete (\\d+) backups$", +"删除 $1 个备份" +], +[ +"^Showing the last known values\\.(.*)$", +"显示最近已知的值。$1" +], +[ +"^(.+) \\(…(.{2,8})\\)$", +"$1(…$2)" +], +[ +"^(.+) \\(in-VR app\\) (.+)$", +"$1(VR 内应用)$2" +], +[ +"^SideQuest \\(in-VR app\\)$", +"SideQuest(VR 内应用)" +], +[ +"^(\\d+) of (\\d+) files installed\\.$", +"已安装 $1/$2 个文件。" +], +[ +"^(\\d+) of (\\d+) files installed; (\\d+) failed$", +"已安装 $1/$2 个文件;$3 个失败" +], +[ +"^(\\d+) of (\\d+) files installed$", +"已安装 $1/$2 个文件" +], +[ +"^(\\d+) of (\\d+) free$", +"$1 / 共 $2 可用" +], +[ +"^(.+) free of (.+)$", +"$1 可用,共 $2" +], +[ +"^(.+) of (.+) files?$", +"共 $2 个文件中的 $1 个" +], +[ +"^(\\d+) files$", +"$1 个文件" +], +[ +"^(\\d+) file$", +"$1 个文件" +], +[ +"^(\\d+) game files$", +"$1 个游戏文件" +], +[ +"^(\\d+) selected items?$", +"已选 $1 项" +], +[ +"^(\\d+) items?$", +"$1 项" +], +[ +"^(\\d+) devices?$", +"$1 台设备" +], +[ +"^(\\d+) apps?$", +"$1 个应用" +], +[ +"^(\\d+) tasks?$", +"$1 个任务" +], +[ +"^(\\d+) backups?$", +"$1 个备份" +], +[ +"^(\\d+) skipped so far\\.$", +"目前已跳过 $1 个。" +], +[ +"^All (\\d+) files installed\\.$", +"全部 $1 个文件已安装。" +], +[ +"^(.+): All (\\d+) files installed\\.$", +"$1:全部 $2 个文件已安装。" +], +[ +"^(.+): (\\d+) of (\\d+) files installed\\.(.+)?$", +"$1:已安装 $2/$3 个文件。" +], +[ +"^(.+): (\\d+) of (\\d+) files installed; (\\d+) failed(.+)?$", +"$1:已安装 $2/$3 个文件;$4 个失败" +], +[ +"^(.+) is not installed on the headset\\.$", +"头显上未安装 $1。" +], +[ +"^(.+) queued in SideQuest\\.$", +"已在 SideQuest 中排队:$1" +], +[ +"^(\\S+) installed\\.$", +"已安装 $1。" +], +[ +"^(.+) is disconnected$", +"$1 已断开" +], +[ +"^(.+) is connected$", +"$1 已连接" +], +[ +"^(.+) disconnected\\.$", +"$1 已断开。" +], +[ +"^(.+) connected$", +"$1 已连接" +], +[ +"^Couldn't delete (.+)\\.$", +"无法删除 $1。" +], +[ +"^Couldn't delete (.+)$", +"无法删除 $1" +], +[ +"^Deleted (.+)$", +"已删除 $1" +], +[ +"^Deleted profile \"(.+)\"$", +"已删除配置档“$1”" +], +[ +"^Uninstall (.+)$", +"卸载 $1" +], +[ +"^Uninstalling (.+)$", +"正在卸载 $1" +], +[ +"^Installing (.+)$", +"正在安装 $1" +], +[ +"^Downloading (.+)$", +"正在下载 $1" +], +[ +"^Uploading (.+)$", +"正在上传 $1" +], +[ +"^Not available on (.+)\\.$", +"$1 不支持。" +], +[ +"^(.+) timed out\\. Keep the headset awake and try again\\.$", +"$1 超时。请保持头显唤醒后重试。" +], +[ +"^(.+) failed: (.+)$", +"$1 失败:$2" +], +[ +"^(.+) error: (.+)$", +"$1 错误:$2" +], +[ +"^(Headset|Device) model: (.+)$", +"设备型号:$3" +], +[ +"^(In-VR app|SideQuest) version: (.+)$", +"$1 版本:$3" +], +[ +"^(.+) \\(this headset\\)$", +"$1(此头显)" +], +[ +"^(.+) \\(asleep\\)$", +"$1(休眠中)" +], +[ +"^(.+) \\(headset rejected the change\\)$", +"$1(头显拒绝了该更改)" +], +[ +"^(\\d+) of (\\d+)$", +"$1 / $2" +], +[ +"^Can't determine package for OBB \"(.+)\"\\. Rename it to main\\.$", +"无法确定 OBB「$1」对应的包名,请重命名为 main。" +], +[ +"^Can't tell which app \"(.+)\" belongs to\\. OBB filenames must be main\\.$", +"无法判断「$1」属于哪个应用。OBB 文件名必须为 main。" +], +[ +"^(.+) is missing on the headset after copying\\.$", +"复制后头显上缺少 $1。" +], +[ +"^(.+) is running with no profile\\.$", +"$1 正在运行且未应用任何配置档。" +], +[ +"^(.+) is (.+) on the headset, expected (.+)\\.$", +"头显上的 $1 为 $2,预期为 $3。" +], +[ +"^(.+) does not support more than (\\d+) tracks? in total\\.$", +"$1 最多只支持 $2 条轨道。" +], +[ +"^(\\d+)%%$", +"$1%" +], +[ +"^App #(\\d+)$", +"应用 #$1" +], +[ +"^(.+) profile$", +"$1 配置档" +], +[ +"^(.+) presets?$", +"$1 预设" +], +[ +"^Adding (.+)$", +"正在添加 $1" +], +[ +"^Removing (.+)$", +"正在移除 $1" +], +[ +"^Deleting (.+)$", +"正在删除 $1" +], +[ +"^Copying (.+)$", +"正在复制 $1" +], +[ +"^Moving (.+)$", +"正在移动 $1" +], +[ +"^Rename (.+)$", +"重命名 $1" +], +[ +"^Open (.+)$", +"打开 $1" +], +[ +"^Send (.+)$", +"发送 $1" +] +] \ No newline at end of file diff --git a/site.json b/site.json new file mode 100644 index 0000000..5b51e29 --- /dev/null +++ b/site.json @@ -0,0 +1,5 @@ +{ + "_comment": "内嵌商店的默认站点配置。改这里即可切换站点,无需修改其他文件。", + "webUrl": "https://www.vrwanba.com", + "extraStoreHosts": ["vrwanba.com", "www.vrwanba.com"] +} diff --git a/stop-test.sh b/stop-test.sh new file mode 100644 index 0000000..a0557bc --- /dev/null +++ b/stop-test.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +# ============================================================================ +# 停止隔离试运行实例(按 /proc//exe 精确匹配,绝不误杀调用者或其他进程) +# 用法: bash ./stop-test.sh +# ============================================================================ +set -uo pipefail + +WORK="${SQ_ZH_HOME:-$HOME/.sidequest-zh}" +RT="$WORK/test-run" +DATA_TEST="$HOME/.config/SideQuestDesktop-zhtest" + +match() { + case "$1" in "$RT"/*) return 0 ;; *) return 1 ;; esac +} + +kill_matching() { + local sig="$1" p pid exe + for p in /proc/[0-9]*; do + pid="${p#/proc/}" + exe="$(readlink "$p/exe" 2>/dev/null)" || continue + match "$exe" && kill "-$sig" "$pid" 2>/dev/null + done +} + +kill_matching TERM; sleep 2 +kill_matching TERM; sleep 2 +kill_matching KILL; sleep 1 + +rm -f "$DATA_TEST"/Singleton* 2>/dev/null || true +find "$DATA_TEST" -name LOCK -delete 2>/dev/null || true + +for port in 9222 9223 9224; do + ss -ltn 2>/dev/null | grep -q ":$port" && echo "提示: 端口 $port 仍被占用(可能不是本工具启动的实例)" +done +echo "已停止隔离试运行" diff --git a/tail.js b/tail.js new file mode 100644 index 0000000..7d72744 --- /dev/null +++ b/tail.js @@ -0,0 +1,87 @@ +/* ============================================================================ + * SideQuest 简体中文汉化 —— 主进程统一注入 hook + * 由 l10n-zh 构建脚本追加到 dist-electron/main.js 末尾(不改动上游任何逻辑)。 + * 作用:为每个「本地页面」(file:// 与 data:text/html)注入汉化引擎。 + * 远程内容(内嵌商店 sidequestvr.com、Steam 等 https 页面)不会被注入。 + * 卸载:删除 main.js 末尾本段即可完全还原。 + * ==========================================================================*/ +(function () { + 'use strict'; + var TAG = '[l10n-zh]'; + try { + var fs = require('fs'); + var path = require('path'); + var electron = require('electron'); + var app = electron.app; + + var SOURCE = fs.readFileSync(path.join(__dirname, 'l10n-zh-inject.js'), 'utf8'); + + /** 只处理本地页面;远程 https 页面保持原样 */ + function isLocalPage(url) { + return ( + typeof url === 'string' && + (url.indexOf('file://') === 0 || url.indexOf('data:text/html') === 0) + ); + } + + /** 注入一次;失败时少量重试 */ + function runOnce(wc, retries) { + if (!wc || wc.isDestroyed()) return; + var url = ''; + try { + url = wc.getURL(); + } catch (e) { + url = ''; + } + if (!isLocalPage(url)) return; + try { + var p = wc.executeJavaScript(SOURCE, false); + if (p && typeof p.catch === 'function') { + p.catch(function (err) { + if (retries > 0) { + setTimeout(function () { + runOnce(wc, retries - 1); + }, 150); + } else { + console.warn(TAG + ' 注入失败: ' + ((err && err.message) || err)); + } + }); + } + } catch (e) { + console.warn(TAG + ' 注入异常: ' + e.message); + } + } + + function attach(wc) { + try { + wc.on('dom-ready', function () { + runOnce(wc, 2); + }); + wc.on('did-finish-load', function () { + runOnce(wc, 1); + }); + if (!wc.isLoadingMainFrame()) { + runOnce(wc, 2); + } + } catch (e) { + /* ignore */ + } + } + + app.on('web-contents-created', function (_event, wc) { + attach(wc); + }); + + app.whenReady().then(function () { + try { + electron.webContents.getAllWebContents().forEach(attach); + } catch (e) { + /* ignore */ + } + }); + + console.log(TAG + ' 简体中文汉化已启用'); + } catch (e) { + console.error(TAG + ' 初始化失败:', e); + } +})(); diff --git a/test-run.sh b/test-run.sh new file mode 100644 index 0000000..249ac4e --- /dev/null +++ b/test-run.sh @@ -0,0 +1,117 @@ +#!/usr/bin/env bash +# ============================================================================ +# SideQuest 简体中文汉化 —— 隔离试运行(asar 模式,最接近真实安装形态) +# +# 用法: bash ./test-run.sh [端口] # 默认 9223 +# +# 特点: +# - 用「隔离的 userData 目录」运行,完全不碰 ~/.config/SideQuestDesktop +# - 与正在运行的官方 SideQuest 互不干扰(单实例锁位于各自 userData 内) +# - 首次会把真实配置复制一份过去,因此能直观看到登录态/设备绑定是否保留 +# - 走 resources/app.asar 加载,验证的就是最终会被安装的那份 asar +# +# 结束后用 stop-test.sh 清理。 +# ============================================================================ +set -euo pipefail + +TOOL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +WORK="${SQ_ZH_HOME:-$HOME/.sidequest-zh}" +APP_ZH="$WORK/app-zh" +PORT="${1:-9223}" +RUNTIME="$WORK/test-run" +DATA_LIVE="$HOME/.config/SideQuestDesktop" +DATA_TEST="$HOME/.config/SideQuestDesktop-zhtest" +INSTALL_DIR="/opt/SideQuest" +GLIBC_MARK="$(mktemp -d)" + +ok() { printf ' \033[32m✓\033[0m %s\n' "$*"; } +bad() { printf ' \033[31m✗\033[0m %s\n' "$*"; } +die() { bad "$*"; exit 1; } +say() { printf '\n\033[1m== %s ==\033[0m\n' "$*"; } + +command -v node >/dev/null || die "需要 node" +[ -d "$APP_ZH" ] || die "缺少 $APP_ZH —— 请先执行: node $TOOL_DIR/build.js all" +[ -d "$INSTALL_DIR" ] || die "未找到已安装的 SideQuest: $INSTALL_DIR" + +say "1/5 生成隔离版 app(userData -> SideQuestDesktop-zhtest)" +rm -rf "$WORK/app-zh-test" +cp -a "$APP_ZH" "$WORK/app-zh-test" +node -e ' +const fs = require("fs"); +const p = process.argv[1]; +let s = fs.readFileSync(p, "utf8"); +const from = "const MAIN_USER_DATA_DIR = \x27SideQuestDesktop\x27;"; +const to = "const MAIN_USER_DATA_DIR = \x27SideQuestDesktop-zhtest\x27;"; +if (s.indexOf(from) !== -1) { + fs.writeFileSync(p, s.replace(from, to), "utf8"); + console.log(" 已隔离 userData"); +} else if (s.indexOf(to) !== -1) { + console.log(" 已隔离,跳过"); +} else { + console.error(" 未找到 MAIN_USER_DATA_DIR,上游结构可能已变"); + process.exit(1); +} +' "$WORK/app-zh-test/dist-electron/main.js" +ok "app 就绪: $WORK/app-zh-test" + +say "2/5 打包隔离版 asar" +node "$TOOL_DIR/asar.js" pack "$WORK/app-zh-test" "$WORK/app.test.asar" >/dev/null +ok "asar 就绪($(stat -c%s "$WORK/app.test.asar") 字节)" + +say "3/5 准备隔离配置" +if [ ! -d "$DATA_TEST" ]; then + if [ -d "$DATA_LIVE" ]; then + cp -a "$DATA_LIVE" "$DATA_TEST" + ok "已复制真实配置 -> $DATA_TEST" + else + mkdir -p "$DATA_TEST" + ok "真实配置不存在,使用空配置" + fi +else + ok "沿用已有的隔离配置: $DATA_TEST" +fi + +say "4/5 组装运行时 $RUNTIME" +rm -rf "$RUNTIME" +mkdir -p "$RUNTIME/resources" +# 主二进制必须真实复制:Node 会解析符号链接,process.execPath 决定 Electron 去哪里找 resources +cp --reflink=auto "$INSTALL_DIR/sidequest" "$RUNTIME/sidequest" +for f in "$INSTALL_DIR"/*; do + name="$(basename "$f")" + [ "$name" = "sidequest" ] && continue + [ "$name" = "resources" ] && continue + ln -s "$f" "$RUNTIME/$name" +done +for f in "$INSTALL_DIR"/resources/*; do + name="$(basename "$f")" + [ "$name" = "app.asar" ] && continue + ln -s "$f" "$RUNTIME/resources/$name" +done +# asar 不走符号链接(Electron 会加载失败),必须是实体文件 +cp --reflink=auto "$WORK/app.test.asar" "$RUNTIME/resources/app.asar" +ok "运行时就绪: $RUNTIME" + +say "5/5 启动(远程调试端口 $PORT)" +rm -f "$DATA_TEST"/Singleton* 2>/dev/null || true +find "$DATA_TEST" -name LOCK -delete 2>/dev/null || true +LOG="$WORK/test-run.log" +mkdir -p "$WORK" +setsid nohup "$RUNTIME/sidequest" --remote-debugging-port="$PORT" >"$LOG" 2>&1 /dev/null 2>&1; then + ok "启动成功" + curl -s --max-time 6 "http://127.0.0.1:$PORT/json/list" | node -e ' +let d = ""; process.stdin.on("data", c => d += c).on("end", () => { + try { JSON.parse(d).filter(t => t.type === "page").forEach(t => console.log(" " + String(t.title || "").slice(0, 34) + " | " + String(t.url || "").slice(0, 60))); } catch (e) {} +});' +else + bad "启动失败,日志尾部:" + tail -25 "$LOG" + rm -rf "$GLIBC_MARK" + exit 1 +fi +grep -q "l10n-zh" "$LOG" && ok "汉化注入已生效" || bad "未见汉化注入日志" +rm -rf "$GLIBC_MARK" +echo +echo "结束请执行: bash $TOOL_DIR/stop-test.sh" diff --git a/verify.sh b/verify.sh new file mode 100755 index 0000000..2c44dff --- /dev/null +++ b/verify.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +# ============================================================================ +# 安装后独立校验(不需要 sudo) +# 用法: bash ./verify.sh +# ============================================================================ +set -uo pipefail + +TOOL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +WORK="${SQ_ZH_HOME:-$HOME/.sidequest-zh}" +INSTALL_DIR="/opt/SideQuest" +ASAR="$INSTALL_DIR/resources/app.asar" +DATA_DIR="$HOME/.config/SideQuestDesktop" + +ok() { printf ' \033[32m✓\033[0m %s\n' "$*"; } +bad() { printf ' \033[31m✗\033[0m %s\n' "$*"; } +say() { printf '\n\033[1m== %s ==\033[0m\n' "$*"; } + +say "安装状态" +dpkg-query -W -f=' ${Package} ${Version} ${Status}\n' sidequest-desktop 2>/dev/null || bad "未安装" +if dpkg-query -W -f='${Version}' sidequest-desktop 2>/dev/null | grep -q 'zh'; then + ok "已安装汉化版" +else + bad "当前安装的不是汉化版" +fi + +say "程序文件" +[ -x "$INSTALL_DIR/sidequest" ] && ok "主程序存在且可执行" || bad "主程序异常" +[ -e /usr/bin/sidequest ] && ok "启动器: $(readlink -f /usr/bin/sidequest)" || bad "启动器缺失" + +say "汉化内容" +ASAR_SHA="$(sha256sum "$ASAR" 2>/dev/null | awk '{print $1}')" +EXP_FILE="$WORK/dist/app.asar.zh.sha256" +echo " 当前 app.asar sha256: $ASAR_SHA" +if [ -f "$EXP_FILE" ]; then + EXP="$(awk '{print $1}' "$EXP_FILE")" + [ "$ASAR_SHA" = "$EXP" ] && ok "与构建产物完全一致" || bad "与构建产物不一致(期望 $EXP)" +else + bad "未找到 $EXP_FILE,无法比对" +fi +for pair in "简体中文汉化:汉化注入 hook" "SQ_ZH_ALLOW_UPDATES:自动更新已禁用" "vrwanba.com:默认站点 vrwanba" "一月:日期本地化"; do + needle="${pair%%:*}"; label="${pair##*:}" + grep -qa -- "$needle" "$ASAR" 2>/dev/null && ok "$label" || bad "$label 缺失" +done + +say "用户数据(登录态 / 设备绑定)" +if [ -d "$DATA_DIR" ]; then + ok "目录存在: $DATA_DIR" + du -sh "$DATA_DIR" | sed 's/^/ /' + [ -d "$DATA_DIR/Partitions/sidequest-store" ] && ok "内嵌商店会话分区存在(登录态载体)" || bad "缺少商店会话分区" +else + bad "用户数据目录不存在" +fi + +say "回滚预案" +[ -f "$WORK/backup/app.asar.orig" ] && ok "app.asar.orig" || echo " - 无 app.asar.orig(可用 install 时的 before-install 备份)" +ls -1 "$WORK/backup"/app.asar.before-install-* 2>/dev/null | tail -3 | sed 's/^/ ✓ /' +ls -1 "$WORK"/dist/SideQuest-*-zh.*-amd64.deb 2>/dev/null | tail -3 | sed 's/^/ ✓ /' + +say "当前进程" +if pgrep -f "$INSTALL_DIR/sidequest" >/dev/null 2>&1; then + echo " SideQuest 正在运行($(pgrep -cf "$INSTALL_DIR/sidequest") 个进程)" +else + echo " SideQuest 未在运行——启动后即可看到中文界面" +fi