Termior v0.2.0
A feature-focused minor release: Termior now ships an embedded i18n runtime covering seven locales, an interactive shell picker for new terminals, and richer SSH profile metadata — together with a fix that lets Windows PowerShell load shell integration on first launch.
Highlights
Embedded i18n runtime (seven locales)
- Termior now carries an embedded i18n runtime via the new
termior-i18ncrate. Translation tables foren,zh-CN,zh-TW,ja,ko,es, anddeare compiled in as flat JSON, queried throught!/tf!/tn!macros. Hot-path lookups returnArc<str>so per-frame rendering stays allocation-free. - A parity test forces every locale's key set to match the English one and rejects empty values, so no locale can silently lose a string during future edits. BCP 47 tags are canonicalized (
zh-Hans/zh-SG→zh-CN,zh-Hant/zh-HK→zh-TW); fallback is current language → English → key name, with no panic on missing keys. - Settings → General → Language now offers a dropdown that lists each language by its native name; choosing one swaps the active locale live and persists through the existing debounced save. "Follow system" remains the default, detected via
sys-locale. - Buttons, menus, tooltips, ARIA labels, empty states, and status text are translated; logs, panic messages, protocol strings (
TERMIOR_*), font names, and element IDs deliberately stay untranslated.
Interactive shell picker for new terminals
- Settings → General → Terminal exposes the default shell: System default, a list of detected shells (including Git Bash on Windows and WSL distributions), or a manual path. The selection maps onto the new
shell_detectionandwsl_distributionsettings, persisted alongside the rest of the terminal config. - An optional "ask on new terminal" toggle (
terminal.shell_prompt) opens a one-shot picker when you click +, pressCtrl+T, or choose New Terminal from a tab menu. The picker's choice applies to that terminal only and clears or overrideswsl_distributionso the two settings can never contradict each other. - Shell discovery is now two-phase: the native shells list fills immediately, and WSL distributions are appended when
wsl.exeenumeration returns (or times out at 5s with no entries).wsl.exeis invoked with stdin null andCREATE_NO_WINDOWso a broken WSL install cannot stall or pop a console. PATH probing also skips the System32 WSLbash.exeshim, which would otherwise shadow the real bash. TerminalSettingsnow fills missing JSON fields from defaults so hand-edited settings files keep loading after the new fields are added.
Richer SSH profile metadata
- The SSH profile editor adds three fields: free-form tags (for grouping and search), notes (a longer-form description), and
sftp_remote_path(the directory the SFTP browser opens by default).PROFILES_VERSIONis bumped to 3 with per-field validation so old profiles still load and malformed values are rejected at parse time. - The Settings view now uses a reusable vertical scrollbar (extracted from
termior-ui-kit) so content that overflows the settings window scrolls instead of clipping. The SSH editor's advanced fields are collapsed by default, and the form has a defined tab order for keyboard navigation. - New SSH-related strings ship in all seven locales, and
ui-screenshot.ps1can size the settings window and seed the SSH manager for fixture captures.
Shell integration no longer blocked by PowerShell's default policy
- Windows PowerShell 5.1 ships with the
Restrictedexecution policy in user scope (the bundled installer never writesLocalMachine), sopowershell -NoProfile -NoExit -File <wrapper>failed withUnauthorizedAccessand the terminal opened showing the policy error rather than the integrated shell. PowerShell 7 hits the same wall on machines without its installer-setRemoteSigned. - The integration spawn now adds
-ExecutionPolicy Bypassfor both engines. The flag is applied at process scope only, the same approach VS Code uses, so the user's persisted policy and any other PowerShell sessions are untouched. - A new
pty_roundtripregression test spawns a realpowershell.exewith the integration wrapper and asserts that the policy error never appears and the prompt becomes interactive.
Compatibility
- i18n:
Settings.language: Option<String>is added withserdebackward compatibility. Existing settings files load unchanged; the field defaults toNone(follow system). Thetext.rsconstants module is removed in favor ofen.json— any external consumer referencing those constants should switch to the locale tables. - SSH profiles:
PROFILES_VERSIONrises from 2 to 3. Older profiles migrate automatically; new fields are validated at parse time and missing values fall back to defaults. - Shell selection:
shell_detection,wsl_distribution, andshell_promptare new fields interminal.*. They default toAuto/None/false, so existing settings files keep working. If a manual override was previously stored only inwsl_distribution, the new shell dropdown will surface it as the matching entry on first launch. - No migration required for stored themes, sessions, editor state, workspace state, or AI cache — formats are unchanged in this release.
- Termior's Windows and macOS installers are unsigned, so SmartScreen or Gatekeeper bypass steps are normally required on first launch.
Downloads
- Windows x64: Inno Setup installer (
termior-0.2.0-windows-x86_64-setup.exe) and portable zip. - macOS:
termior-0.2.0-macos-<arch>.dmgand.tar.gz(<arch>isx86_64for Intel runners,aarch64for Apple Silicon runners). - Linux x86_64:
.deband.tar.gz. - Every asset ships with a matching
.sha256checksum.
Verification
- Release workflow (run for tag v0.2.0):
Package (linux),Package (macos), andPackage (windows)all succeeded, andPublish GitHub Releaseattached every asset with its checksum sidecar. mainCI at eef3130:cargo fmt --all -- --checkandcargo clippy --workspace --all-targets --exclude termior -- -D warningsboth pass; build on all three platforms and the three Desktop jobs pass. The pre-existingCore (ubuntu-latest)Test step andCore coverage ≥ 80%timeout failures documented indocs/release-process.md§1 are unchanged.- Local pre-tag validation (
cargo fmt --check,cargo clippy,git diff --check) clean; every workspace package resolves to version0.2.0viacargo metadata.
Full comparison: v0.1.9...v0.2.0
Termior v0.2.0(中文说明)
一个聚焦功能的次版本发布:Termior 现在内置覆盖七种语言的 i18n 运行时,为新终端提供交互式 shell 选择器,并扩展了 SSH 配置档案元数据,同时修复了 Windows PowerShell 在首次启动时无法加载 shell 集成的问题。
主要更新
内嵌 i18n 运行时(七种语言)
- Termior 通过新增的
termior-i18ncrate 提供内嵌的 i18n 运行时。en、zh-CN、zh-TW、ja、ko、es、de共七种语言的翻译表以扁平 JSON 形式编译进二进制,通过t!/tf!/tn!三个宏查询;热路径返回Arc<str>,逐帧渲染不产生堆分配。 - 一项 parity 测试强制每种语言的键集与英文完全一致,并拒绝空值,确保后续改动不会让某种语言悄悄丢失字符串。BCP 47 标签经规范化合并(
zh-Hans/zh-SG→zh-CN,zh-Hant/zh-HK→zh-TW);回退链为「当前语言 → 英文 → 键名」,缺键不 panic。 - 设置 → 通用 → 语言 现在提供下拉菜单,每种语言以其母语名显示;选择后实时切换生效,并通过既有的防抖保存回调持久化。「跟随系统」仍是默认值,由
sys-locale检测。 - 按钮、菜单、tooltip、aria 标签、空状态与状态提示均进翻译表;日志、panic 信息、协议字符串(
TERMIOR_*)、字体名与元素 id 不进。
新建终端时的交互式 shell 选择器
- 设置 → 通用 → 终端 现在暴露默认 shell:系统默认、检测到的 shell 列表(含 Windows 上的 Git Bash 与 WSL 发行版),或手动指定路径。选择会写入新增的
shell_detection与wsl_distribution设置,并随其他终端配置一起持久化。 - 可选的「新建终端时询问」开关(
terminal.shell_prompt)会在点击 +、按下Ctrl+T**,或在标签页菜单中选择「新建终端」时弹出一个一次性的选择器。选择仅作用于当前终端,并清空或覆盖wsl_distribution`,避免两个设置互相矛盾。 - Shell 发现改为两阶段:本机 shell 列表立即填入,WSL 发行版在
wsl.exe枚举完成后(或 5 秒超时无结果时)追加。wsl.exe调用时 stdin 设为 null 并启用CREATE_NO_WINDOW,损坏的 WSL 安装不会阻塞界面或弹出控制台窗口。PATH 探测也会跳过 System32 中的 WSLbash.exeshim,避免它遮蔽真正的 bash。 TerminalSettings现在会用默认值补齐缺失的 JSON 字段,使手动编辑过的设置文件在新增字段后仍能正常加载。
更丰富的 SSH 配置档案元数据
- SSH 配置档案编辑器新增三个字段:自由格式的 标签(用于分组与搜索)、备注(较长描述)以及
sftp_remote_path(SFTP 浏览器默认打开的目录)。PROFILES_VERSION升级到 3,并对每个字段做校验,旧档案仍可加载,格式不合法的值在解析时被拒绝。 - 设置视图现在使用从
termior-ui-kit抽离出的可复用垂直滚动条,超出设置窗口的内容会滚动而不是被裁剪。SSH 编辑器的高级字段默认折叠,并且表单定义了键盘 tab 顺序以方便键盘导航。 - 与 SSH 相关的新字符串随所有七种语言同步发布;
ui-screenshot.ps1现在可以调整设置窗口尺寸并为 SSH 管理器播种 fixture 以便截图。
PowerShell 默认执行策略不再阻塞 shell 集成
- Windows PowerShell 5.1 在用户作用域的默认策略为
Restricted(官方安装包不会写入LocalMachine),因此powershell -NoProfile -NoExit -File <wrapper>会以UnauthorizedAccess失败,终端启动后显示策略错误而非集成 shell。PowerShell 7 在没有安装包写入RemoteSigned的机器上也会遇到同样的问题。 - 集成脚本的子进程现在为两种 PowerShell 都加上
-ExecutionPolicy Bypass。该参数仅作用于子进程范围,与 VS Code 的做法一致,不影响用户持久化的策略以及其他 PowerShell 会话。 - 新增
pty_roundtrip回归测试,使用真实powershell.exe启动集成包装脚本,并断言策略错误永不出现、提示符最终进入交互状态。
兼容性
- i18n:新增
Settings.language: Option<String>,具备 serde 向后兼容能力。既有设置文件无需改动即可加载;该字段默认为None(跟随系统)。原text.rs常量模块已删除,文案统一迁入en.json,任何外部依赖该常量的消费者应改用语言包。 - SSH 配置档案:
PROFILES_VERSION由 2 升至 3。旧档案自动迁移;新字段在解析时校验,缺失值回退到默认值。 - Shell 选择:
shell_detection、wsl_distribution与shell_prompt为terminal.*下新增字段。默认值为Auto/None/false,既有设置文件保持兼容。若此前的手动覆盖仅保存在wsl_distribution中,首次启动时新下拉菜单会以对应条目呈现。 - 主题、会话、编辑器状态、工作区状态、AI 缓存无需迁移——本版本未改动这些数据的格式。
- Termior 的 Windows 与 macOS 安装包未签名,首次启动通常需要手动绕过 SmartScreen 或 Gatekeeper。
下载
- Windows x64:Inno Setup 安装程序(
termior-0.2.0-windows-x86_64-setup.exe)与便携版 zip。 - macOS:
termior-0.2.0-macos-<arch>.dmg与.tar.gz(<arch>在 Intel runner 上为x86_64,Apple Silicon runner 上为aarch64)。 - Linux x86_64:
.deb与.tar.gz。 - 每个产物均附带对应的
.sha256校验文件。
验证
- 发布工作流(v0.2.0 标签运行):
Package (linux)、Package (macos)与Package (windows)全部成功,Publish GitHub Release已附带每个产物及其校验文件。 mainCI(eef3130):cargo fmt --all -- --check与cargo clippy --workspace --all-targets --exclude termior -- -D warnings均通过;三个平台构建与三个 Desktop 任务全部通过。docs/release-process.md§1 中记录的Core (ubuntu-latest)Test 步骤与Core coverage ≥ 80%超时失败为本预存问题,本版本未变化。- 发布前本地校验(
cargo fmt --check、cargo clippy、git diff --check)全部干净;cargo metadata显示所有工作区包均解析为版本0.2.0。
完整变更对比:v0.1.9...v0.2.0