Skip to content

Make Ceiling English-only: drop the 5 non-English locale files#41

Merged
tsouth89 merged 2 commits into
mainfrom
tsouth2/english-only-locale
Jul 17, 2026
Merged

Make Ceiling English-only: drop the 5 non-English locale files#41
tsouth89 merged 2 commits into
mainfrom
tsouth2/english-only-locale

Conversation

@tsouth89

@tsouth89 tsouth89 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

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

  • Delete es-MX, zh-CN, zh-TW, ja-JP, ko-KR .ftl files.
  • locale.rs: the loader resolves every Language value to the English bundle (language_id always returns en-US). Kept the Language enum and get_text(lang, key) signatures as-is to avoid churning ~60 call sites — they're just English-only now.
  • Trim locale/tests.rs to English assertions + an en-US key-coverage check.

Scope note

I deliberately did not rip out the Language enum / ui_language setting / set_ui_language command. 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 pass
  • locale tests + cargo fmt --check — green

Relates to the English-only direction.

Summary by CodeRabbit

  • Bug Fixes
    • Standardized interface text to consistently use English strings, even when a different UI language is selected.
  • Localization
    • Removed existing Fluent translation content for Chinese (Simplified/Traditional), Japanese, Korean, and Spanish (Mexico), resulting in English as the fallback for non-English locales.
  • Tests
    • Updated locale- and tray-related unit tests to validate English completeness and language-neutral tray tooltip behavior, removing several non-English-specific assertions.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Locale 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.

Changes

Locale resolution

Layer / File(s) Summary
English-only locale resolution
rust/src/locale.rs, rust/src/locale/*.ftl
language_id always selects en-US, and the non-English Fluent resource contents are removed.
English resource validation
rust/src/locale/tests.rs
Tests verify every LocaleKey name exists in the English resource and resolves to non-empty text.
English and language-neutral UI coverage
apps/desktop-tauri/src-tauri/src/commands/*, apps/desktop-tauri/src-tauri/src/proof_harness.rs, apps/desktop-tauri/src-tauri/src/tray_*.rs
Language-specific tray, chart, menu, proof-harness, and locale roundtrip assertions are removed or replaced with English and language-neutral behavior checks.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: finesssee

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: making the app English-only and removing the five non-English locale files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tsouth2/english-only-locale

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
rust/src/locale/tests.rs (1)

18-27: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover every retained Language variant.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d09b623 and cef7911.

📒 Files selected for processing (7)
  • rust/src/locale.rs
  • rust/src/locale/es-MX.ftl
  • rust/src/locale/ja-JP.ftl
  • rust/src/locale/ko-KR.ftl
  • rust/src/locale/tests.rs
  • rust/src/locale/zh-CN.ftl
  • rust/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

tsouth89 added 2 commits July 16, 2026 23:26
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.
@tsouth89
tsouth89 force-pushed the tsouth2/english-only-locale branch from c3debd8 to 9850566 Compare July 17, 2026 03:29

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between c3debd8 and 9850566.

📒 Files selected for processing (13)
  • apps/desktop-tauri/src-tauri/src/commands/bridge.rs
  • apps/desktop-tauri/src-tauri/src/commands/chart.rs
  • apps/desktop-tauri/src-tauri/src/commands/locale_cmd.rs
  • apps/desktop-tauri/src-tauri/src/proof_harness.rs
  • apps/desktop-tauri/src-tauri/src/tray_bridge.rs
  • apps/desktop-tauri/src-tauri/src/tray_menu.rs
  • rust/src/locale.rs
  • rust/src/locale/es-MX.ftl
  • rust/src/locale/ja-JP.ftl
  • rust/src/locale/ko-KR.ftl
  • rust/src/locale/tests.rs
  • rust/src/locale/zh-CN.ftl
  • rust/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

Comment thread rust/src/locale/tests.rs
@tsouth89
tsouth89 merged commit 6f07780 into main Jul 17, 2026
6 checks passed
@tsouth89
tsouth89 deleted the tsouth2/english-only-locale branch July 17, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant