Files
uur/locales/zh-CN.yml
T
迢辰andXuc Pan 306489d8ad fix(capture): choose a cursor mode the portal advertises (#25)
* fix(capture): choose a cursor mode the portal advertises

`uur run` on a Wayland session aborted during capture negotiation:

    Error: Portal request didn't succeed: Other
    Error: ZBus Error: org.freedesktop.portal.Error.InvalidArgument:
           Unavailable cursor mode 2

`negotiate` hardcoded `CursorMode::Embedded` (2). The portal frontend
validates that against the backend's `AvailableCursorModes` and rejects
anything outside it, so any backend that does not offer Embedded could
never start a session. A frontend whose backend property cache is empty
reports `AvailableCursorModes = 0` and then rejects every mode, which is
what made this fail even on backends that do support Embedded: restarting
`xdg-desktop-portal` restored the flags from 0 to 7 and mode 2 was
accepted again.

`preferred_cursor_mode` now reads the advertised flags and picks Embedded,
then Hidden, then Metadata. If none are advertised it fails with an
actionable message naming the portal restart, instead of surfacing a raw
D-Bus error. Older portals that do not implement the v2 property keep the
previous behaviour.

The same hardcoded mode in the RemoteDesktop input path is routed through
the shared helper.

Adds four tests: preference order, subset fallback, the empty-advertisement
regression, and source-type mapping.

* fix(capture): preserve portal errors and report cursor fallback

---------

Co-authored-by: Xuc Pan <[email protected]>
2026-10-15 14:44:04 +08:00

137 lines
8.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
doctor:
header: "uur 环境报告"
install_hint: "未安装 —— 请按发行版说明安装 wine/pipewire"
no_portal_backend: "未找到 xdg-desktop-portal 后端(Wayland 捕获/注入不可用)"
present: "已就绪"
backend_x11: "X11 会话:XTEST 注入"
backend_wayland: "Wayland 会话:内核 uinput 注入"
backend_portal: "Wayland 会话:标准 RemoteDesktop Portal"
backend_none: "未检测到图形会话"
backend_partial: "仅能控制 XWayland 窗口;原生 Wayland 桌面输入需要 Portal 或 uinput"
backend_wayland_missing: "完整桌面输入不可用;请检查 RemoteDesktop 授权或 /dev/uinput 访问权限"
client_incomplete: "缺少客户端或服务端程序;请运行 uur setup --repair"
service_registered: "已注册;uur run 会检查实际启动结果"
service_missing: "缺少服务注册;请运行 uur setup --repair"
webview_pending: "尚未安装;uur run 会调用客户端自带的 WebView2 安装器"
portal_capture_advertised: "已提供源类型;uur run 会检查授权和实际采集帧"
portal_input_advertised: "已提供键盘和指针类型;uur run 会检查实际会话授权"
uinput_module: "设备存在但内核模块未加载(安装包内附的 udev 规则与 modules-load 条目,然后重启)"
uinput_permission: "当前用户不可写(需要 uur 的 uaccess udev 规则或 input 组)"
uinput_missing: "此内核没有 /dev/uinput"
portal_capture_missing: "当前 Portal 后端未提供 ScreenCast 接口"
portal_input_missing: "当前 Portal 后端未提供 RemoteDesktop 接口;可回退到 uinput"
terminal_missing: "缺少 Win64 终端代理;请重新安装 uur"
launcher_missing: "缺少 Win64 快速启动代理;请重新安装 uur"
xdg_launcher_missing: "请安装 GLib 的 gio 或 gtk-launch"
wallpaper_missing: "未检测到;可将 UUR_WALLPAPER 设为图片路径"
footer: "此报告检查安装文件与系统声明的能力。uur run 会验证输入会话、Wayland 采集帧和 Windows 服务启动。安装中断后可运行 uur setup --repair 重试 Wine 初始化。"
input:
portal_unavailable: "当前会话中 Wayland Portal 输入不可用"
no_display: "未检测到图形会话(DISPLAY 与 WAYLAND_DISPLAY 均未设置)"
uinput_unavailable: "内核 uinput 输入不可用"
wayland_no_full_input: "Wayland 桌面输入需要可用的 RemoteDesktop Portal 或可写的 /dev/uinput。请检查安装包中的 udev 规则和 uinput 内核模块。显式选择 xtest 只能控制 XWayland 窗口。"
bridge:
listening: "输入桥监听于 127.0.0.1:%{port}"
session_summary: "已注入 %{count} 条输入记录"
connected: "钩子已连接;经 %{backend} 注入"
disconnected_clean: "钩子断开;已释放按住的按键"
disconnected_error: "钩子错误:%{error}"
bad_token_fingerprint: "连接被拒绝:桥接令牌不匹配(收到的令牌前缀 %{prefix}…)"
bad_token: "连接被拒绝:桥接令牌不匹配"
stop_requested: "已请求停止"
session:
already_running: "会话已在运行 —— 直接使用它,或先执行 `uur stop`"
server_running: "GameViewerServer 正在运行"
launching_client: "正在启动受管客户端(捕获与输入桥已就绪)"
client_exited: "客户端已退出(代码 %{code});会话结束"
capture_error: "画面捕获不可用:%{error}"
webview_missing: "客户端目录中缺少 WebView2 安装器,管理界面无法启动"
webview_failed: "WebView2 安装失败"
quick_launch_ready: "已向 UU 快速启动导出 %{count} 个 Linux 应用"
audio_backend: "Wine 音频后端:%{backend}"
wine_dpi: "已根据 Xft.dpi 设置 Wine 系统 DPI:%{dpi}"
waiting_capture: "正在等待首个 Wayland 采集帧;请在 Portal 对话框中选择监视器"
waiting_direct_capture: "正在等待原生 Wayland 显示器采集的首帧"
capture_not_ready: "120 秒内未收到 Wayland 采集帧。请检查 ScreenCast Portal 和 PipeWire,选择实际监视器而非尚未指定目标的动态投屏源,并查看会话日志。"
service_failed: "GameViewerService 未能启动。请运行 uur setup --repair,并检查 ~/.local/state/uur/session.log 和 ~/.local/share/uur/hook.log。"
upstream:
unreachable: "无法访问网易官方发布接口"
unparsable: "无法解析发布接口响应:%{url}"
latest: "官方最新版本:%{version}(%{filename})"
up_to_date: "受管客户端已是最新"
newer_available: "当前安装 %{local};官方已发布 %{upstream}"
not_provisioned: "尚未安装受管客户端;请运行 `uur setup`"
capture:
direct_enabled: "已明确启用原生 Wayland 显示器采集,输入使用 uinput,不再弹出 Portal 选屏授权框。运行 uur display backend portal 可恢复 Portal 采集。"
portal_enabled: "已启用 Portal 授权采集"
direct_started: "已启动原生 Wayland 显示器采集"
session_ready: "Portal 会话已建立(视频节点 %{node});正在写入私有运行时传输"
helper_failed: "捕获助手异常退出"
cursor_unsupported: "桌面 Portal 未声明任何可用的光标模式,无法开始屏幕采集。请重启 Portal(systemctl --user restart xdg-desktop-portal)后重试;若仍失败,请确认已安装与当前会话匹配的 ScreenCast 后端。"
cursor_not_embedded: "Portal 无法将光标嵌入画面;采集将继续,但视频帧中不会包含光标"
setup:
eula_prompt: "官方 UU 远程客户端将从网易官方渠道下载,并受其最终用户协议约束:%{url}\n使用 --accept-eula 重新运行以继续。"
eula_required: "需要先接受最终用户协议才能继续安装"
eula_recorded: "已记录协议接受状态"
already_provisioned: "客户端已安装"
downloading: "正在从 %{url} 下载官方安装包"
download_failed: "官方安装包下载失败"
initializing_prefix: "正在初始化受管 Wine 前缀"
prefix_failed: "Wine 前缀初始化失败(%{status});解决 Wine 错误后可运行 uur setup --repair 重试"
repaired: "已更新 Wine 前缀,并确认 %{path} 中的客户端安装完整"
install_failed: "官方安装器失败或被取消(%{status}),安装尚未完成。可运行 uur setup --repair 重试。"
client_incomplete: "安装器未提供完整的 GameViewer.exe 与 GameViewerServer.exe;请运行 uur setup --repair 重试"
service_incomplete: "GameViewerService 未注册有效的服务程序;请运行 uur setup --repair"
installing_client: "正在安装官方客户端(静默模式)"
silent_install_unavailable: "安装包忽略静默模式;若弹出窗口请手动完成安装"
done: "已安装至 %{path}"
tray:
title: "UU 远程"
tooltip: "UU 远程 Linux 客户端"
open: "打开 UU 远程"
quit: "退出"
registered: "已注册原生桌面托盘"
uninstall:
no_root: "请以桌面用户身份运行 uur uninstall,不要加 sudo;系统安装包另用包管理器卸载。"
plan: "将删除以下路径(目录包含其内部文件):"
purge_warning: "这会永久删除受管客户端、登录与账号数据、Wine 环境、安装包缓存、配置和日志。"
keep_data: "保留客户端、账号数据、配置和日志;加 --purge 可一并清除。"
package_hint: "系统安装文件和共享依赖由包管理器处理。在 Arch 上,请在此命令完成后执行 sudo pacman -Rns uur。"
dry_run: "仅预览,未停止进程,也未修改文件。"
confirm_required: "当前没有用于确认的终端。请先查看 --dry-run,再用 --yes 确认卸载。"
confirm: "确认删除吗?[y/N]"
cancelled: "已取消,未修改文件。"
done: "所选用户文件和可识别的源码安装文件已清除。"
autostart:
enabled: "已启用登录自启动:%{path}"
disabled: "已禁用登录自启动"
status_enabled: "登录自启动已启用:%{path}"
status_disabled: "登录自启动未启用"
wol:
interface: "网卡:%{interface}"
mac: "MAC 地址:%{mac}"
magic_support: "Magic Packet 支持:%{state}"
magic_enabled: "Magic Packet 已启用:%{state}"
connection: "NetworkManager 连接:%{connection}"
yes: "是"
no: "否"
unknown_ethtool: "未知(请安装 ethtool)"
unsupported: "%{interface} 未声明支持 Magic Packet 唤醒"
verify_failed: "无法验证 %{interface} 的网络唤醒状态"
enabled: "已在 %{interface} 上启用 Magic Packet 唤醒"
disabled: "已在 %{interface} 上禁用 Magic Packet 唤醒"
display:
status: "Wayland 捕获源:%{source}"
changed: "Wayland 捕获源已切换为 %{source};下次运行时 Portal 会请求新的选择"