Make Ceiling English-only: drop the 5 non-English locale files#41
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ceiling | 9850566 | Commit Preview URL Branch Preview URL |
Jul 17 2026, 03:29 AM |
📝 WalkthroughWalkthroughLocale resolution now always uses en-US. Non-English Fluent resources and language-specific tests were removed, while English resource completeness and language-neutral tray behavior are validated. ChangesLocale resolution
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
rust/src/locale/tests.rs (1)
18-27: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover every retained
Languagevariant.This verifies English resource completeness but not the changed contract that all language settings resolve to English. Iterate over every retained variant and assert each produces the same text as
Language::English.As per coding guidelines, “Add or extend focused Rust tests near the changed module.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@rust/src/locale/tests.rs` around lines 18 - 27, Extend test_all_locale_keys_present_in_english to iterate over every retained Language variant and assert get_text for each variant matches the English result for every LocaleKey. Keep the existing Fluent key presence and non-empty English text assertions, and add the language-resolution equality check in this focused Rust test.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@rust/src/locale/tests.rs`:
- Around line 18-27: Extend test_all_locale_keys_present_in_english to iterate
over every retained Language variant and assert get_text for each variant
matches the English result for every LocaleKey. Keep the existing Fluent key
presence and non-empty English text assertions, and add the language-resolution
equality check in this focused Rust test.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: b3033afa-dfeb-4a50-a31d-95e403de2463
📒 Files selected for processing (7)
rust/src/locale.rsrust/src/locale/es-MX.ftlrust/src/locale/ja-JP.ftlrust/src/locale/ko-KR.ftlrust/src/locale/tests.rsrust/src/locale/zh-CN.ftlrust/src/locale/zh-TW.ftl
💤 Files with no reviewable changes (5)
- rust/src/locale/ja-JP.ftl
- rust/src/locale/es-MX.ftl
- rust/src/locale/zh-TW.ftl
- rust/src/locale/zh-CN.ftl
- rust/src/locale/ko-KR.ftl
Ceiling only ships English. Remove the vestigial es-MX/zh-CN/zh-TW/ ja-JP/ko-KR Fluent files (inherited from the CodexBar fork) so adding a UI string is a single-file change instead of six, and so nobody has to write or maintain translations. - Delete the 5 non-English .ftl files. - locale.rs: the loader now resolves every Language value to the English bundle (language_id always returns en-US). The Language enum and the get_text(lang, key) signatures are kept as-is to avoid churning ~60 call sites; they're simply English-only now. - Trim locale/tests.rs to the English assertions plus an en-US key- coverage check. The unused Language enum / ui_language plumbing remains in the backend (invisible to users); removing that dead code is a separate, no-user- impact follow-up if wanted.
CI surfaced non-English tests I missed (the shared-crate fmt line-length and desktop-crate tests asserting Japanese/Chinese output): - Delete tests that only asserted non-English strings (bridge/chart tray labels, locale_cmd roundtrips, proof_harness menu language, tray_menu static labels, tray_bridge japanese tooltip). English equivalents already cover the behavior. - Rewrite two tests to keep their English coverage (compact tooltip format; tray provider names stay raw). - cargo fmt --all. Verified: shared 618 tests, desktop 360 tests, clippy -D warnings, and fmt --all --check all green locally.
c3debd8 to
9850566
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rust/src/locale/tests.rs`:
- Around line 22-30: Update the translation assertion in the LocaleKey::ALL loop
to verify get_text(Language::English, *key) does not equal key.name() before or
alongside the existing non-empty check, ensuring the test rejects Fluent lookup
fallbacks while preserving empty-text validation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 421a0801-28eb-43ac-bec0-bf0a65148838
📒 Files selected for processing (13)
apps/desktop-tauri/src-tauri/src/commands/bridge.rsapps/desktop-tauri/src-tauri/src/commands/chart.rsapps/desktop-tauri/src-tauri/src/commands/locale_cmd.rsapps/desktop-tauri/src-tauri/src/proof_harness.rsapps/desktop-tauri/src-tauri/src/tray_bridge.rsapps/desktop-tauri/src-tauri/src/tray_menu.rsrust/src/locale.rsrust/src/locale/es-MX.ftlrust/src/locale/ja-JP.ftlrust/src/locale/ko-KR.ftlrust/src/locale/tests.rsrust/src/locale/zh-CN.ftlrust/src/locale/zh-TW.ftl
💤 Files with no reviewable changes (9)
- rust/src/locale/ko-KR.ftl
- rust/src/locale/ja-JP.ftl
- apps/desktop-tauri/src-tauri/src/commands/chart.rs
- rust/src/locale/zh-CN.ftl
- rust/src/locale/zh-TW.ftl
- apps/desktop-tauri/src-tauri/src/commands/locale_cmd.rs
- apps/desktop-tauri/src-tauri/src/commands/bridge.rs
- rust/src/locale/es-MX.ftl
- apps/desktop-tauri/src-tauri/src/proof_harness.rs
🚧 Files skipped from review as they are similar to previous changes (3)
- rust/src/locale.rs
- apps/desktop-tauri/src-tauri/src/tray_bridge.rs
- apps/desktop-tauri/src-tauri/src/tray_menu.rs
Ceiling only ships English. This removes the vestigial non-English Fluent files (inherited from the CodexBar fork) so adding a UI string is a one-file change and nobody has to write or maintain translations.
What
es-MX,zh-CN,zh-TW,ja-JP,ko-KR.ftlfiles.locale.rs: the loader resolves everyLanguagevalue to the English bundle (language_idalways returns en-US). Kept theLanguageenum andget_text(lang, key)signatures as-is to avoid churning ~60 call sites — they're just English-only now.locale/tests.rsto English assertions + an en-US key-coverage check.Scope note
I deliberately did not rip out the
Languageenum /ui_languagesetting /set_ui_languagecommand. That's a ~60-call-site refactor plus a settings-schema change, and there is no visible language selector in the app, so it buys nothing a user can see. Left as dead backend plumbing; happy to remove it separately if you want the code gone.Verification
cargo test(shared crate) — 618 passcargo fmt --check— greenRelates to the English-only direction.
Summary by CodeRabbit