Implements the gen2 v0.9.3 doc baseline's first slice of code work:
* SRS-201: split the audio engine's `ptt` AtomicBool into the
authoritative `transmit_active` flag. The legacy `set_ptt` /
`ptt` accessors are retained as `#[doc(hidden)]` thin wrappers
so the existing bridge command and the existing Flutter
hold-to-talk UI keep compiling.
* SAD-075 / SDD-089 acknowledged at the type level: only
`AudioEngine::set_transmit_active` (or its legacy alias)
mutates the flag; the encoder feed reads it once per outbound
frame and never writes.
* SDD-082: new `chanora_audio::ptt` module ships the
`PttCapabilityLevel` enum (`L0Focused`, `L1GlobalShortcut`,
`L2GlobalHoldToTalk`, `L3GlobalWithMouseButtons`,
`L4DeviceAware` reserved) with a stable `as_str` mapping and
an `is_global` classifier.
* SDD-087: `PttBackendDescriptor::focused()` constant value for
the universal Focused-PTT fallback. The struct shape carries
only privacy-safe fields (`level`, `backend_id`,
`bound_input_class`) — a key code cannot fit through this
surface by construction (DEC-027).
* SAD-077 / SDD-090: `RedactingLogLayer` now hosts the
`PttBanCheckVisitor` and the `PTT_BANNED_FIELDS` constant
(`key_code`, `scan_code`, `virtual_key`, `vk`, `keysym`,
`keysym_string`, `key_sequence`, `key_press_history`,
`key_timing`). Any record whose field set names a banned key
is dropped before reaching the in-memory log sink or the
user-initiated diagnostic export. The check is structural and
runs ahead of formatting / redaction.
* `SessionEvent::PttCapability` carries the diagnostics-safe
descriptor through the broadcast event stream;
`chanora_core::ChanoraSession::start_audio` publishes the
Focused-PTT descriptor when the audio engine starts (SRS-196
/ SDD-091).
* `BridgeEvent::PttCapability` mirrors the event across the
FFI boundary. flutter_rust_bridge codegen regenerated.
* Flutter `_AudioControls` renders a capability badge above the
PTT button: a globe icon for Global levels, a focus-frame
icon for `L0Focused`, plus a Tooltip exposing the bound input
class. New ARB key `pttCapabilityBadge(level, backend)` in
`app_en.arb` and `app_zh.arb`.
Per-platform global PTT backends (`WindowsRawInputBackend`,
`MacOSEventTapBackend`, `LinuxGnomeWaylandBackend`) and the
`MissedKeyUpWatchdog` task land in a separate follow-up commit;
this milestone ships only PTT-L0 universally so the application's
runtime capability reporting is honest from day one.
Tests
-----
* `chanora_audio` rises from 1 to 4 unit tests covering
`PttCapabilityLevel::as_str`, `is_global`, and the
`PttBackendDescriptor::focused()` shape contract.
* `chanora_diagnostics` rises from 9 to 11 unit tests covering
the new `PttBanCheckVisitor` over every banned field name and
the `PTT_BANNED_FIELDS` stability assertion.
* Workspace total: 53 unit + integration tests, all green with
`CHANORA_DISABLE_KEYRING=1` (was 49 at v1.0.0-rc.2).
* `flutter analyze`: clean.
* `cargo deny check`: advisories ok, bans ok, licenses ok,
sources ok.
* `cargo about generate`: zero warnings (license inventory
regenerated).
* `tools/dump_flutter_licenses.sh`: 94 packages, zero without
LICENSE.
* Linux x86_64 release bundle builds clean.
No Android live verification in this commit per the user's note
that the test device was removed. Android arm64-v8a continues to
build via the same `cargo ndk` path; runtime reporting on Android
is `L0Focused` for the foreseeable future.
58 lines
2.6 KiB
Plaintext
58 lines
2.6 KiB
Plaintext
{
|
||
"@@locale": "zh",
|
||
"@@x-source-of-truth": "DEC-015 (register v0.9.5). Simplified Chinese for the Beta key set.",
|
||
|
||
"appTitle": "Chanora",
|
||
"homeNotProductionReadyBanner": "Beta 版本——已接通语音收发;尚未达到生产环境质量。",
|
||
|
||
"fieldServerHost": "服务器地址",
|
||
"fieldNickname": "昵称",
|
||
"fieldServerPassword": "服务器密码",
|
||
"fieldServerPasswordHelp": "如果服务器无需密码,留空即可。",
|
||
"fieldPassword": "密码",
|
||
"fieldDisplayName": "显示名称",
|
||
|
||
"connectAction": "连接",
|
||
"disconnectAction": "断开连接",
|
||
"refreshAction": "刷新",
|
||
"diagnosticsAction": "诊断信息",
|
||
"aboutAction": "关于",
|
||
"aboutVersion": "版本 {version}",
|
||
"aboutNonAffiliation": "Chanora 是独立项目,与 TeamSpeak 之间不存在任何附属、认可、赞助或官方关联关系。",
|
||
"aboutLicenseHeading": "许可协议",
|
||
"aboutLicenseBody": "Chanora 采用 Apache License 2.0 或 MIT License 双协议授权,使用者可任选其一。完整协议文本以 LICENSE-APACHE 与 LICENSE-MIT 形式随仓库一同分发。",
|
||
"aboutThirdPartyHeading": "第三方组件",
|
||
"aboutThirdPartyBody": "Chanora 基于 tsclientlib、flutter_rust_bridge、cpal、rusqlite、Flutter 框架等开源组件构建。完整归属信息请参阅仓库根目录的 NOTICE 文件。",
|
||
"copyAction": "复制",
|
||
"closeAction": "关闭",
|
||
"startAudioAction": "启动语音",
|
||
"pttHoldToTalk": "按住说话",
|
||
"pttTransmitting": "正在发送…",
|
||
"pttCapabilityBadge": "对讲能力:{level}({backend})",
|
||
"inputMuteAction": "静音麦克风",
|
||
"inputUnmuteAction": "取消麦克风静音",
|
||
"outputMuteAction": "静音扬声器",
|
||
"outputUnmuteAction": "取消扬声器静音",
|
||
"joinChannelAction": "加入频道",
|
||
"channelPasswordTitle": "频道密码",
|
||
"bookmarksHeading": "书签",
|
||
"bookmarksEmpty": "尚无书签。先在上方填写服务器,然后点击“保存书签”。",
|
||
"bookmarkAddAction": "保存书签",
|
||
"bookmarkAddTitle": "保存书签",
|
||
"bookmarkDeleteAction": "删除书签",
|
||
|
||
"statusIdle": "未连接",
|
||
"statusConnecting": "正在连接…",
|
||
"statusConnected": "已连接到 {server}",
|
||
"statusError": "错误:{message}",
|
||
|
||
"statusReconnecting": "正在重新连接……第 {attempt} 次尝试,{delay} 秒后",
|
||
"statusConnectionLost": "连接已断开:{reason}",
|
||
|
||
"audioStatsLine": "发送 {sent} 帧 • 接收 {received} 帧 • PTT {ptt}",
|
||
|
||
"channelsHeading": "频道",
|
||
"clientsHeading": "在线用户",
|
||
"countChannelsAndClients": "{channels} 个频道 • {clients} 在线"
|
||
}
|