Repository navigation
feat(i18n): add live launcher language switching - #45
ItzJerry317 wants to merge 2 commits into
Conversation
Assisted-by: OpenAI Codex Signed-off-by: ItzJerry <85010676+ItzJerry317@users.noreply.github.com>
审查者指南数据结构添加持久化的启动器语言偏好设置,以英语作为向后兼容的默认语言,并添加 Minecraft 语言代码映射。
API向前端公开 UI kit 的区域设置器,以便前端同步内置组件的翻译。
实现打包语言目录,并实现语言查询、插值、活动语言切换和目录验证测试。
仅当用户未单独配置游戏语言覆盖项时,才将启动器语言用作 Minecraft 的初始语言。
UI添加可即时生效的语言选择器,并刷新其依赖控件;同时持久化所选语言,并在保存失败时恢复先前的语言。
通过当前活动语言目录本地化安装、启动、整合包、账户、活动、下载调试、设置、实例、Java、配置文件创建、来源和导航界面字符串。
配置配置 Crowdin 的英语源文件和简体中文导出路径,并在 REUSE 许可注释中纳入区域设置 JSON 文件。
文档说明翻译键约定、Crowdin 设置和目录检查命令。
测试验证启动器语言具有独立于 Minecraft 语言覆盖项的默认值、能够持久化,并且会使用稳定的区域设置代码进行序列化。
锁文件和供应商代码在工作区锁文件中记录新增的前端依赖项。
忽略新增的本地构建产物或路径。
其他更改未归入其他类别的文件。
提示和命令与 Sourcery 交互
自定义使用体验访问你的控制面板,以便:
获取帮助Original review guide in EnglishReviewer's GuideData structuresAdd a persisted launcher-language preference with English as the backward-compatible default and a Minecraft language-code mapping.
APIExpose the UI kit’s locale setter to the frontend so it can synchronize built-in component translations.
ImplementationBundle the catalogs and implement language lookup, interpolation, active-language changes, and catalog validation tests.
Use the launcher language as Minecraft’s initial language only when the user has not configured a separate game-language override.
UIAdd the live language picker and refresh its dependent controls while persisting the selection and restoring the prior language on save failure.
Localize installation, launch, modpack, account, activity, download-debug, settings, instance, Java, profile-creation, source, and navigation UI strings through the active catalog.
ConfigurationConfigure Crowdin’s English source and Simplified Chinese export paths and include the locale JSON files in REUSE licensing annotations.
DocumentationDocument translation key conventions, Crowdin setup, and catalog-checking command.
TestsVerify that the launcher language defaults independently of Minecraft’s override, persists, and serializes under its stable locale code.
Lock files and vendored codeRecord the added frontend dependency in the workspace lockfile.
Ignore the newly added local artifact or path.
Other changesFiles not grouped.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Impact analysisNote Advisory only: the affected test list is broad by design and does not gate this pull request. A missing index fails the job instead of posting an empty result. 41 changed files · 31 source · 2 test · 8 other · 98 affected test files
Changed files
Affected testsCodeGraph followed imports 5 steps deep from the changed sources with Mirrors (
|
Summary
Verification
cargo test --workspace --locked: 557 passed, 7 ignored.cargo-nextestwas unavailable.Some lower-level diagnostics and debug text remain in English.
Replaces #43. The head commit is unchanged; this PR uses a branch in the upstream repository so the impact workflow can check it out. Previous review discussion remains on #43.
Sourcery 摘要
支持在整个桌面启动器中实时切换英语和简体中文,同时保留用户状态和语言偏好。
新功能:
错误修复:
改进:
文档:
测试:
杂项:
Original summary in English
Summary by Sourcery
Enable live switching between English and Simplified Chinese throughout the desktop launcher while preserving user state and language preferences.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests:
Chores: