## Problem and outcome This phase adds consented remote co-play to normal App/Web rooms and integrates the accepted audio, playback, participant-state and multi-site improvements. It also rebuilds the bilingual README/documentation reading path, refreshes real-component illustrations, and publishes the selected website film. The candidate preserves the established 2.x sharing/viewing contracts. Optional new behavior follows negotiated capabilities; Windows gamepads use an externally installed driver. The separate accompaniment experiment and unselected film studies are outside this phase. ## Release notes **Play together. Your turn!** Approved friends can now play together with shared keyboard and mouse controls or optional gamepads. **远程同乐,轮到你啦!** 获准的朋友现在可以共用键鼠,或使用可选手柄,一起玩本地多人游戏。 ### English Piik 2.4 adds remote co-play, improves shared sound and room controls, and rewrites the bilingual getting-started and help guides around what you want to do. #### Highlights - Let approved friends control together. Each player's held keys and gamepad retire independently; everyone shares the Host's mouse pointer. On Windows x64, optional virtual gamepads use a Host-installed ViGEmBus driver. Piik does not bundle or install it. - Control shared output volume from the Host's playback bar. The optional share microphone adds your voice to the picture, independently of room voice; stopping the share leaves room voice running. Room voice now defaults to 64 kbps and offers a Host bitrate control. - See voice and remote-control participation directly on the couch. Connection details group picture and voice by receive/send direction. Playback actions, chat-overlay settings and dismissible operation feedback have clearer, consistent places. - Approve several Piik sites in App and manage each separately, with one optional startup favorite. - Follow rewritten English and Chinese README and documentation paths: watching, starting a share, room tools, remote control/co-play, and symptom-based help. Illustrated guides use current product components, theme-aware screenshots and shared diagrams. A dedicated network guide covers campus networks, media UDP, SFU sites and optional virtual LANs. - The website has clearer App and co-play FAQs and the selected bilingual 64-second film, with shared playback controls and a held closing card. #### Fixes - Tolerate small macOS capture-crop rounding errors without accepting genuinely invalid geometry. - Keep shared-audio and microphone volume changes independent, preserve commentary through source replacement, and retire each input at its owning lifecycle boundary. - Improve narrow-player controls, touch-held volume menus, tooltip placement and feedback cleanup after reconnection. - Repair the release recovery test on macOS and refresh the build and tunnel runtimes. #### Updating and limits Update the Host's App and the room site, then refresh open pages to use the new features. Established sharing and viewing remain compatible within 2.x; older peers retain the features they support. The wire versions and SQLite schema are unchanged. Restarting App or Server interrupts active sessions. Before downgrading App, remove extra approved sites in the newer launcher so at most one remains. Use the [remote-control guide](https://piik.tv/docs/remote-control.html?lang=en) for the optional Windows driver. Linux gamepads remain experimental; macOS virtual gamepads are not currently available. Windows 10 window-sharing black screens ([#495](https://github.com/TNTcraftHIM/Piik/issues/495)) remain under investigation; use screen sharing if affected. ### 中文 Piik 2.4 新增多人远程同乐,改进分享声音与房间控制,并围绕实际任务重写双语上手教程和帮助文档。 #### 主要更新 - 允许获准的朋友同时控制。各人的按键持有和手柄独立释放,大家共用房主的鼠标指针。Windows x64 可使用房主自行安装的 ViGEmBus 驱动提供虚拟手柄;Piik 不捆绑或安装驱动。 - 房主可通过播控调整分享输出音量。可选的分享麦克风把说话声加入画面,与房间语音独立;停播后房间语音继续。房间语音默认提升至 64 kbps,并提供房主码率设置。 - 沙发人物直接呈现语音和远控参与状态;连接详情按画面/语音、接收/发送分组。播放操作、弹幕设置和可关闭的操作提示各有清楚、一致的位置。 - App 可授权多个 Piik 站点,逐个管理,并选择一个启动时打开的星标站点。 - 重写中英文 README 和文档中心:从观看、开始分享、房间工具、远控/同乐到按症状排障。图文教程使用当前正式组件、明暗主题截图与同源示意图;独立网络指南说明校园网、媒体 UDP、SFU 站点和可选虚拟局域网的用法。 - 官网改进 App 与多人同乐 FAQ,采用选定的双语 64 秒短片,复用产品播控并保留结尾品牌卡。 #### 修复 - 容忍 macOS 采集裁剪中的微小舍入误差,仍拒绝真正无效的画面边界。 - 分享总音量与麦克风音量分别更新;换源保留解说,各项输入按所属生命周期释放。 - 改进窄屏播控、触摸长按音量菜单、提示定位,以及重连后的提示清理。 - 修复 macOS 上发布恢复测试的可移植性,更新构建与公网隧道运行组件。 #### 更新与限制 将房主 App 和房间站点更新后,刷新已打开的页面,即可使用新功能。2.x 内保留已有分享与观看兼容性,旧端继续使用其支持的功能;协议版本和 SQLite schema 不变。重启 App 或 Server 会中断当前会话。 如需降级 App,先在新版启动页删除额外授权,最多保留一个站点。可选的 Windows 驱动安装方法见[远控指南](https://piik.tv/docs/zh/remote-control.html)。Linux 手柄仍属实验能力,macOS 当前暂不提供虚拟手柄。Windows 10 窗口分享黑屏而整屏正常的反馈([#495](https://github.com/TNTcraftHIM/Piik/issues/495))仍在调查,本版不声称已修复。 ## Verification - Integrated Web typecheck, 98 test files / 1,734 tests and production build passed. Later scoped UI repairs passed focused typecheck/tests and preview checks. - Focused Go checks cover input grant/held-state ownership, delayed device retirement, native control/Host, config/launcher/loopback, voice negotiation and source-volume binding. Windows capture compilation/probe and the isolated Linux uinput kernel gate passed. - Normal-page P2P (22 checks) and embedded-SFU (19 checks) gates passed. P2P explicitly exercised source commentary with room voice, independent shutdown, share retirement and the next share's default-off state; SFU also covers live voice bitrate and voice recovery. - Documentation links (108 Markdown files), generated-diagram freshness, the complete bilingual/theme screenshot pipeline and website production build passed. Website/readers were checked at 320, 768 and 1440 px with both languages/themes. - macOS crop logic retains geometric self-tests; this Windows environment did not repeat a macOS SDK/hardware run. Linux desktop/game recognition and macOS virtual-gamepad entitlement/runtime remain explicit limits. - Windows native window-sharing acceptance passed: Host/Viewer decoding, live and paused quality changes, resize/minimize/restore, source replacement, stop and restart. Capturing the Host Chrome window also passed with Auto/H.264 and VP8, including decoded-frame and pixel checks. The Windows 10 case in #495 was not reproduced and remains separate. - Current Go serializers passed the published v2.0.0/v2.3.0 TypeScript readers; existing native input opt-in checks passed. This checks payload compatibility, not an end-to-end run of old published clients. ## Impact Compatible 2.x feature release; Browser/server v24, Native control v10, capture v7 and SQLite schema 2 remain unchanged. New co-play, presence, voice settings and native volume behavior are capability-negotiated. Multi-site App settings retain the older single-site reader path; arbitrary binary downgrade is not promised. No independent room/router, new NAT policy, driver installer or separate accompaniment channel is introduced. ## Related work Includes the macOS crop correction reported in #492 and the macOS deployment-test portability contribution from #496. Supersedes the incomplete phase PR #494. #495 remains open. ## Attribution Co-authored-by: Yuqing Huang <670081066@qq.com> Co-authored-by: luol75569-collab <297886760+luol75569-collab@users.noreply.github.com>
9.5 KiB
参与 Piik 翻译
Piik 提供简体中文和英文,可通过 GitHub Issue 与 Pull Request(PR)建议措辞、修正译文或新增语言。
只想改一句话,可以直接提交建议: 写明语言、页面或控件、原文、建议译文及理由。附上截图或进入该页面的步骤,便于理解上下文; 截图中请移除私人邀请链接、密码和个人内容。提交措辞建议无需搭建开发环境。
从一处修改开始
-
先试用对应界面,看看附近有哪些操作。必要时对照中英文理解含义; 角色名称、术语与文风以命名和文案规范为准。
-
Fork 仓库,从当前
main创建工作分支,按贡献流程修改。 少量文字也可以通过 GitHub 文件编辑器提出修改。 -
在下表对应的文件里查找原文。语言文件中只修改冒号后的译文,保留键名和占位符。 找到键名后,可以搜索它在哪些界面使用,例如:
rg -n -F 'host.title' src/client -
预览对应界面并运行相关检查。仅修正某种语言的错字时,修改该语言即可; 如果调整的是功能含义,需要同步所有已登记语言中的对应内容。
-
向
main提交 PR,说明措辞问题、修改的语言和页面,以及预览结果。 PR 格式见贡献指南。
文案在哪里
| 内容 | 修改位置 |
|---|---|
| App 启动页、网页端与 App 共用的操作界面,含 tooltip 和无障碍标签 | 英文词库、中文词库 |
| 欢迎语、等待短句、浏览器标签页的轮换标题 | 同一语言文件中的 zhPlayful / enPlayful 及标题词库;官网欢迎语共用这些词库 |
| 官网 | 页面正文和交互文案,按 en、zh-CN 成对组织 |
| 宣传短片 | 短片源码说明,字幕、插画和播放控件有各自的中英文内容 |
| App 终端 | console.go 中的 consoleCopy,每项按英文、中文、纯视觉排列;第三项即使为空也需保留 |
| README 与读者文档 | README、文档首页、使用指南、问题排查、部署指南,均有对应的 .zh-CN.md 文件 |
修改源码后,重新构建提供该内容的页面或程序:
- App/Server 界面: 词库随网页资源打包,需发布更新后的 App 或 Server;远程站点的界面由该 Server 提供。
- 官网与短片: 使用官网工作流。
- 指南: 文档网站在下次发布时从仓库 Markdown 生成,导航与搜索文案位于
site/docs/。
操作名称变化时,同步相关教程。技术参考保留一份公共版本,详见文档职责。
翻译时保留什么
按目标语言的习惯表达,角色和密码名称沿用公共术语表。介绍可以轻松,操作、错误和部署步骤要清楚。 性能、平台、连接条件等限制应保留原意。梗和彩蛋应让不懂出处的人也能理解。 机器辅助翻译需要由理解目标语言和使用场景的人校对;原文本身有歧义时,在 PR 中说明。
App 启动错误需同时翻译网页与终端的说明,保留共用的原因代码和原始技术详情。
语言文件使用 TypeScript 对象。下面是现有的一组内容:
// en.ts
"host.title": "{name}'s screen",
// zh.ts
"host.title": "{name} 的屏幕",
保留查找键名 host.title。可调整 {name} 的位置,保留其拼写、花括号和出现次数。
格式化函数对每个变量替换一次,使用普通字符串。需要复数、HTML 或其他句子组合时,
在 PR 中给出具体需求,连同调用处与格式化函数一起调整。
保留代码的引号、转义和逗号。命令、配置项、URL、下载文件名,以及 Go 终端文案中的 %s
等格式标记保持原样。链接显示文字和图片说明可以翻译;Markdown 标题变化后,要修正对应的页内链接。
许可证原文及第三方声明保持完整。
新增一种语言
先搜索是否已有相关 Issue 或 PR。准备翻译较多内容时,可以开一个 Issue,说明语言代码、 翻译范围,以及术语或排版疑问,方便大家分工和校对。
-
复制
src/client/locales/en.ts,例如命名为fr.ts。翻译正文与标题标签,按语境编写 俏皮话,修改三个导出变量名。 保留从zh.ts引入的Record<CopyKey, string>、TitleFrameCatalog、PlayfulCatalog类型。 中文词库目前定义键名集合,理解内容时可以参考任一现有语言。 请补全全部键名,不要用展开英文词库的方式填充缺失译文。 -
在 locales/index.ts 中导入三个导出变量,并添加一项登记。 例如,完成词库翻译后:
fr: { name: "Français", short: "FR", tag: "fr", copy: fr, titleFrames: frTitleFrames, playful: frPlayful },文件名和键名使用 ASCII,
name使用语言本名,short使用一至三个易识别的字符,tag使用对应语言标签;同时提供地区或文字变体时,简称应能区分。 额外语言显示在纯视觉模式后的共用下拉菜单中。 按系统语言规则检查初始选择、偏好保存与 App 跳转。 -
检查完整界面与启动流程。新增的界面语言在 App 终端中暂用英文; 翻译终端时,还需同步启动服务和 loopback 对语言的校验,相关位置见 App 模块地图。
-
在 PR 中写清覆盖范围。官网、短片和文档可以分别翻译,新增语言时需同步各自的语言切换入口。 从右向左书写的语言还需实现并检查文字方向与布局。
纯视觉模式的文字标签与说明在普通词库中翻译,保留这个呈现选项即可。
俏皮话
各语言独立维护欢迎语、等待短句数组;可轮换标题由固定的 label 和 variations 数组组成。
可以单独增删某种语言的条目,不要求与其他语言的数量、顺序或梗一一对应。
空数组不显示装饰文案;只有一条时保持静止。操作键名和标题标签仍须完整翻译,
错误、暂停、结束、必需操作提示及 slogan 保持固定。
欢迎语每项包含 text 和两个 symbols,从现有的
图标词汇中选择能表达这句话的图形,用于纯视觉暗号。例如:
{ text: "沙发给你留着呢。", symbols: ["couch", "heart"] },
等待短句直接写成字符串,例如 "先搬个小板凳。"。短句应简洁、自然、符合所在场景;
避免时效热点、直接照搬台词,以及虚构进度、成功状态或剩余时间的说法。
轮换时间遵循俏皮话生命周期。
欢迎语及其暗号在 /__tooltip-preview 预览;等待短句与标题在 /__status-preview 预览。
检查窄窗口和切换语言的效果。官网构建会自动使用更新后的欢迎语,其他官网文案单独维护。
预览与检查
Node/npm 版本及本地启动方法见从源码运行。 修改应用词库后,在仓库根目录执行:
npm ci
npm run typecheck
npm test -- tests/copy.test.ts
这些检查覆盖缺少键名、空文案、占位符、语言选择和启动跳转;同时在运行界面中校对译文。
按源码指南启动本地界面与服务端,通过右上角控件选择语言,进入被修改的页面。 结合长昵称、数量等实际内容,检查窄窗口、键盘焦点、tooltip 和无障碍标签。 登记额外语言后,检查下拉菜单在视口边缘仍可操作,并能向辅助技术提供展开与收起状态。 新增语言还应检查刷新、App 启动、切回英文及纯视觉模式。 按完整语义断句,避免用空格或强制换行去适配单一桌面尺寸。
官网与短片使用官网预览流程。
Markdown 修改在暂存新文件后执行 node scripts/check-docs.mjs,并检查 GitHub 渲染结果与翻译后的链接。
涉及代码时,额外检查按贡献指南执行。
延伸阅读
- OBS 翻译指南:在运行中的界面校对,理解技术术语。
- Godot 翻译指南:查找源码上下文,协作统一术语。
- Weblate 翻译说明:处理占位符与标记语法。
- W3C 语言标签指南:用 BCP 47 标签区分语言及其变体。
- Unicode CLDR 语言名称:菜单名称参考,也可用浏览器
Intl.DisplayNames查找语言本名;Piik 按钮简称在登记表中选定。