Piik can now let one invited Viewer control the Host's shared desktop or window, using the existing media route and explicit source-scoped consent. This phase also finishes Viewer playback settings, the combined interaction window, the shared control/theme/icon polish, and concrete forwarding-feedback recovery fixes. Remote input stays off by default, uses one controller and releases held input on revocation, retirement or loss. Existing 2.x sharing remains compatible; new capabilities are negotiated with supporting App/Site/relay peers. No virtual input driver, new media listener or route planner is added. Validation: full Web check (97 files / 1,677 tests), Windows Go/native checks; seven real Browser/App lifecycle scenarios covering P2P, SFU and fallback-to-direct continuity; existing cross-version and physical Windows routed-input evidence; native macOS/Linux packaging, Go race/security and container checks through the publishing pipeline. Physical macOS/Linux permissions, mobile devices, mixed DPI and commercial games retain their documented limits. README/wiki keep deployment under the optional self-hosted Server chapters. Refs #472, #477, #479, #480. Issue follow-up happens after publication; unmatched field reports remain open. ## Release notes ### 中文 这是一次功能更新:一起看屏幕时,可以把键鼠交给一位朋友操作,聊天和表情也整合进了同一个互动窗口。本次还整理了分享与播放设置,并修复部分连接恢复和中转画质停滞的问题。 #### 新功能与体验 - **可选键鼠远控**:房主可以让一位朋友操作当前分享的桌面或窗口,随时撤回授权;换源或停播后关闭远控。提供手机触控、缩放和小键盘。当前实机验证覆盖 Windows App。 - **观众播放设置**:新增完整显示、等比铺满、拉伸铺满,以及自动/仅 P2P/仅 SFU 线路选择;站点和房主的线路限制仍然生效。 - **互动窗口**:聊天、参与者和表情放在同一窗口;可以从聊天头像选择接收者,新增点赞、倒彩等表情。支持的浏览器可以独立置顶,继续查看聊天和互动。全屏保留弹幕开关。 - **分享与播放设置更清楚**:暂停与停止相邻,画面、声音、连接和远控各有对应入口。观众播控在移动鼠标时显现,远控时收进画面边缘的小抽屉;点击画面不再意外暂停。没有声音输入时播控给出明确反馈,恢复输入后保留观众的音量设置。 #### 修复 - **连接与播放修复**:修正部分中转路径的媒体时钟、往返时间与重复反馈统计,改善这些错误导致的画质恢复停滞;重新进入房间后,SFU 连接仍可继续尝试直连。同步底层握手恢复修复。 - **界面修复**:修复浮窗返回后遮挡全屏、无法操作,窄屏控件错位、菜单超出边界等问题。虚拟键盘长按不会选中文字,拖出、取消或失焦后释放按键。页面和选源面板统一中性底色;App 图标与 favicon 保留小电视轮廓,精修对比度与底板层次。 - **兼容性修复**:新表情按站点支持情况显示,避免旧站点拒收后断开连接。补齐旧浏览器的浮层支持;修正 macOS `.app` 对包外启动文件的依赖。macOS 的 Finder、权限和远控仍需实机验证。 #### 更新说明 沿用 2.x 兼容边界。使用远控需要更新房主 App 和所连接的站点;要获得完整的中转修复,请同时更新 App 与自部署 Server。 ### English This feature update lets a Host hand keyboard and mouse control to one friend while sharing a screen. Chat and reactions now share one interaction window. It also clarifies sharing and playback settings and fixes specific connection-recovery and server-forwarding quality stalls. #### Features and experience - **Optional keyboard and mouse control:** the Host can let one friend control the shared desktop or window and revoke access at any time. Changing sources or stopping sharing disables control. Touch controls, zoom and an on-screen keyboard are included. Physical validation currently covers the Windows App. - **Viewer playback settings:** choose fit, crop or stretch, and Auto, P2P-only or SFU-only routing. Site and Host restrictions still apply. - **One interaction window:** chat, participants and reactions stay together. Choose a recipient from their chat avatar and use new reactions, including thumbs up and down. Supported browsers can detach the window and keep chat and reactions visible on top. Fullscreen retains the chat-overlay toggle. - **Clearer sharing and playback controls:** pause and stop stay together, with separate picture, sound, connection and remote-control settings. Pointer movement reveals the playback bar during viewing; remote control uses a small drawer at the picture edge. Clicking the picture no longer pauses it accidentally. Sound controls reflect missing input and retain the Viewer's volume when it returns. #### Fixes - **Connection and playback fixes:** correct media clocks, round-trip-time updates and duplicate feedback accounting on affected forwarding paths, improving recovery from the quality stalls caused by those errors. Rejoining a room restores direct-connection attempts while SFU playback continues. Incorporate upstream handshake-recovery fixes. - **Interface fixes:** returning a detached tool during fullscreen no longer leaves an inaccessible panel over the picture. Fix compact-layout shifts and overflowing menus. Holding a virtual key no longer selects its label; release, cancellation and focus loss clear held keys. Pages and the source picker use shared neutral surfaces. Refine App icons and favicons while retaining the familiar television outline. - **Compatibility fixes:** show new reactions only when the site supports them, preventing disconnects on older sites. Support popovers on older browsers and remove the macOS `.app` launcher's dependency on files outside the bundle. Finder, permissions and remote input still need physical macOS validation. #### Updating The existing 2.x compatibility boundary is retained. Remote control needs an updated Host App and site; update both App and self-hosted Server for the complete forwarding fix.
215 lines
12 KiB
Markdown
215 lines
12 KiB
Markdown
# Help translate Piik
|
|
|
|
[中文](./translating.zh-CN.md) · [Contributing](../../CONTRIBUTING.md)
|
|
|
|
Piik currently includes Simplified Chinese and English. You can improve a label,
|
|
proofread a guide, or contribute another language. Translations are reviewed
|
|
through GitHub issues and pull requests.
|
|
|
|
For a wording suggestion, [open an issue](https://github.com/TNTcraftHIM/Piik/issues/new/choose)
|
|
with the language, page or control, current text, proposed text and a brief reason.
|
|
A screenshot or the steps to reach the text help establish context. Remove
|
|
private invitations, passwords and personal content from screenshots. A wording
|
|
suggestion does not require a development environment.
|
|
|
|
## Make your first correction
|
|
|
|
1. Try the affected screen and read the nearby controls. Check both existing
|
|
languages when helpful; the [terminology and voice guide](../standards/naming.md#voice-and-terminology)
|
|
owns names and writing style.
|
|
2. Fork Piik and work on a branch from current `main`, following
|
|
[Contributing](../../CONTRIBUTING.md#lean-workflow). Small text edits can also
|
|
be proposed through GitHub's file editor.
|
|
3. Find the text in the files below. In a locale file, change the string value
|
|
after the colon. Keep the key and its placeholders. Search the key in the
|
|
source to see where it appears; for example:
|
|
|
|
```sh
|
|
rg -n -F 'host.title' src/client
|
|
```
|
|
|
|
4. Preview the affected screen and run the [relevant checks](#preview-and-check).
|
|
For a typo in one language, edit that language. If the underlying meaning
|
|
changes, update the corresponding messages in every registered language.
|
|
5. Open a PR to `main`. Explain the wording problem, the language and surfaces
|
|
changed, and what you checked. Mention anything you could not preview;
|
|
maintainers can help with technical validation. PR format and publication
|
|
follow [Contributing](../../CONTRIBUTING.md#pull-request-scope).
|
|
|
|
## Find the right text
|
|
|
|
| Surface | Editable source |
|
|
| --- | --- |
|
|
| App launcher and shared Browser/App UI, including tooltips and accessible labels | [English](../../src/client/locales/en.ts), [Chinese](../../src/client/locales/zh.ts) |
|
|
| Welcome lines, waiting captions and changing browser-tab titles | The `enPlayful` / `zhPlayful` pools and title-frame catalogs in those same files; website welcome lines reuse these pools |
|
|
| Website | [Page markup](../../site/index.html) and [interactive labels](../../site/main.js); text is paired by `en` and `zh-CN` |
|
|
| Introduction film | [Film sources](../../site/film/README.md); captions, artwork and playback labels have their own bilingual text |
|
|
| App console window | `consoleCopy` in [console.go](../../internal/app/console.go); entries are ordered English, Chinese, visual; retain the third slot even when empty |
|
|
| README and entry guides | [README pair](../../README.md), [documentation home](./README.md), [getting started](./getting-started.md), [troubleshooting](./troubleshooting.md) and [self-hosting](../operations/self-hosting.md), each with a `.zh-CN.md` counterpart |
|
|
|
|
The App and Server serve the same web UI. Edit source files; build output and
|
|
release packages are generated. Translating an App message does not also
|
|
translate a website caption. Update related instructions when an action name
|
|
changes. Technical references keep one shared version; see
|
|
[documentation ownership](../standards/documentation.md).
|
|
|
|
Language catalogs are bundled with the web assets; a new language also needs
|
|
the registry import described below. Rebuild and publish the App or Server that
|
|
serves the affected UI after an edit. Installed packages do not load external
|
|
language files. When the App connects to a remote site, that site serves its UI,
|
|
so updating the site's web translations does not require reinstalling the App.
|
|
The website has its own build and deployment workflow.
|
|
The documentation website renders those same Markdown sources; editing a guide
|
|
updates its web page on the next website publication. Its navigation and search
|
|
labels live in `site/docs/`. Use the [website preview](../operations/website.md#preview)
|
|
to check the generated page as well as GitHub's Markdown view.
|
|
|
|
## Preserve meaning and syntax
|
|
|
|
Write naturally for the target audience. Use the shared glossary for role and
|
|
password names. Introductions may be light; actions, errors and deployment steps
|
|
must be clear. Preserve the conditions on performance, platform and connection
|
|
claims. A cultural reference should still make sense to someone unfamiliar with it.
|
|
Machine-assisted drafts need proofreading by someone who understands the language
|
|
and the screen; raise unclear source text in the PR instead of guessing.
|
|
|
|
App startup failures share reason codes between the launcher and console. Translate
|
|
their user-facing explanations in both catalogs; keep error codes and raw technical
|
|
details unchanged so reports remain useful for diagnosis.
|
|
|
|
Locale files are TypeScript objects. These are existing examples:
|
|
|
|
```ts
|
|
// en.ts
|
|
"host.title": "{name}'s screen",
|
|
// zh.ts
|
|
"host.title": "{name} 的屏幕",
|
|
```
|
|
|
|
`host.title` is the lookup key; `{name}` is supplied by the application. Move the
|
|
placeholder to fit the sentence, preserving its spelling, braces and number of
|
|
occurrences. The current formatter substitutes each supplied variable once;
|
|
repeating `{name}` would leave the second occurrence visible. It accepts plain
|
|
strings, not HTML or ICU plural expressions. If a language needs plural forms
|
|
or different sentence composition, describe the actual case so the caller and
|
|
formatter can be changed together.
|
|
|
|
Keep quotes, escapes and commas valid. Preserve commands, config keys, URLs,
|
|
download filenames and format markers such as `%s` in Go console text. Translate
|
|
link labels and image descriptions; repair internal anchors when translating
|
|
Markdown headings. Keep legal license text and third-party notices intact.
|
|
|
|
## Add a language
|
|
|
|
Search existing issues and PRs for the language first. For a larger translation,
|
|
start an issue with its language tag, intended coverage and any terminology or
|
|
layout questions, so contributors can coordinate work and review.
|
|
|
|
1. Copy `src/client/locales/en.ts` to a file such as `fr.ts`. Translate the
|
|
messages and title labels, write natural [playful entries](#playful-copy), and
|
|
rename the three exports. Retain `Record<CopyKey, string>`, `TitleFrameCatalog`
|
|
and `PlayfulCatalog` from `zh.ts`.
|
|
Chinese currently defines the key set; either existing language can provide
|
|
context. Complete all keys rather than spreading an English catalog over
|
|
missing translations.
|
|
2. Import the exports in [locales/index.ts](../../src/client/locales/index.ts)
|
|
and add one registry entry. For example, **after translating** the catalogs:
|
|
|
|
```ts
|
|
fr: { name: "Français", short: "FR", tag: "fr", copy: fr,
|
|
titleFrames: frTitleFrames, playful: frPlayful },
|
|
```
|
|
|
|
Use an ASCII locale filename/key, the language's own name in `name`, a compact
|
|
button label in `short`, and a matching language tag in `tag`. Keep the short
|
|
label recognizable in one to three characters, such as `中`, `EN` or `FR`;
|
|
distinguish regional/script variants when they coexist. The registry supplies
|
|
the language controls, document language, saved selection and App launch handoff.
|
|
Chinese, English and visual mode retain their direct buttons; additional
|
|
languages share one dropdown slot after visual mode. The selected extra
|
|
language's short label appears on that slot, with its full name in the menu.
|
|
Initial selection matches a registered tag or key, then its base language;
|
|
unregistered languages use English. A saved choice takes precedence.
|
|
The shared [system-language policy](../standards/presentation-lifecycle.md#visual-language)
|
|
also covers Chinese script and region variants across App, Server UI and website.
|
|
3. Check complete screens and the launch flow. New UI languages use English in
|
|
the App console until its own translation is added. Console additions also
|
|
require updating the launcher and loopback accepted-language checks together;
|
|
use the [App module map](../standards/engineering.md#module-map).
|
|
4. State coverage in the PR. Website, film and documentation translations can be
|
|
contributed separately; their existing language controls must be updated when
|
|
adding a language there. For right-to-left scripts, include text direction and
|
|
layout verification; a translated catalog alone does not establish RTL support.
|
|
|
|
Pure-visual mode is an optional presentation, not another language to translate.
|
|
The small visual scenes are shared with text modes; translate their labels and
|
|
explanations in the normal catalog. Keep the visual option available.
|
|
|
|
## Playful copy
|
|
|
|
Each language owns its welcome and waiting arrays, and each playful title has a
|
|
fixed `label` plus a `variations` array. Add or remove entries in that language
|
|
without matching another language's count, order or references. An empty array
|
|
omits the decoration; one entry stays static. Operational keys and title labels
|
|
still require complete translations. Errors, pauses, endings, required actions
|
|
and slogans stay fixed.
|
|
|
|
Welcome entries carry `text` and two `symbols`, chosen from the existing
|
|
[icon vocabulary](../../src/client/ui/icons.tsx) to express that sentence in the
|
|
visual cipher. For example:
|
|
|
|
```ts
|
|
{ text: "Your seat is right here.", symbols: ["couch", "heart"] },
|
|
```
|
|
|
|
Waiting entries are plain strings such as `"Pull up a comfy chair."`. Keep them
|
|
brief and natural in context. Avoid temporary trends, literal borrowed dialogue
|
|
and statements that invent progress, success or remaining time.
|
|
|
|
All these surfaces show a line immediately and share the
|
|
[playful-copy lifecycle](../standards/visual-language.md#playful-copy-lifecycle).
|
|
Keep timing in that owner. Preview welcome text and its cipher at
|
|
`/__tooltip-preview`; use `/__status-preview` for waiting captions and titles.
|
|
Check both narrow windows and language changes. The website's build picks up
|
|
welcome edits automatically; its other copy remains separate.
|
|
|
|
## Preview and check
|
|
|
|
Use the Node/npm versions and local setup in [Run from source](../README.md#run-from-source).
|
|
For UI catalog edits, run from the repository root:
|
|
|
|
```sh
|
|
npm ci
|
|
npm run typecheck
|
|
npm test -- tests/copy.test.ts
|
|
```
|
|
|
|
Type checking catches missing keys. The copy tests check registered catalogs for
|
|
empty text and mismatched placeholders, plus language selection and handoff.
|
|
Tests do not judge translation quality.
|
|
|
|
Run the local UI and server as described in the source guide. Choose the language
|
|
from the top-right controls, open the affected screen and inspect long names or counts
|
|
in context. Check narrow windows, keyboard focus, tooltips and accessible labels.
|
|
With extra languages registered, verify that the dropdown stays usable near
|
|
viewport edges and exposes its expanded/collapsed state to assistive technology.
|
|
For new languages, also check a reload, App launch, switching back to English,
|
|
and the optional visual mode. Keep meaningful phrases together instead of adding
|
|
spaces or hard line breaks to force one desktop layout.
|
|
|
|
Website and film changes use the [website preview](../operations/website.md#preview).
|
|
For Markdown changes, run `node scripts/check-docs.mjs` after staging new files,
|
|
then review GitHub's rendered Markdown and translated links. Additional checks
|
|
for code changes follow [Contributing](../../CONTRIBUTING.md#verification-entrypoints).
|
|
|
|
## Further reading
|
|
|
|
Reviewed 2026-09-13. These resources inform context-based proofreading and syntax
|
|
preservation; Piik's contribution steps above use its own repository workflow.
|
|
|
|
- [OBS translation guide](https://github.com/obsproject/obs-studio/wiki/How-To-Contribute-Translations-For-OBS): proofread in the running application and understand technical terms.
|
|
- [Godot translation guide](https://contributing.godotengine.org/en/latest/other/translations.html): locate source context and coordinate terminology.
|
|
- [Weblate translation guidance](https://docs.weblate.org/en/latest/user/translating.html#translating-special-text-safely): handle placeholders and markup carefully.
|
|
- [W3C language-tag guidance](https://www.w3.org/International/questions/qa-choosing-language-tags): use BCP 47 tags to identify languages and their variants.
|
|
- [Unicode CLDR language names](https://cldr.unicode.org/translation/displaynames/languagelocale-names): reference names for menus. Browser `Intl.DisplayNames` can help look up native names. Piik's one-to-three-character button labels are editorial choices, not standardized CLDR language names; keep them in the registry with each reviewed translation.
|