Skip to content

refactor(localization): extract hardcoded localization texts into JSON and load via rust-i18n(#3537)#3583

Open
hongqitai wants to merge 2 commits into
Hmbown:mainfrom
hongqitai:refactor/localization
Open

refactor(localization): extract hardcoded localization texts into JSON and load via rust-i18n(#3537)#3583
hongqitai wants to merge 2 commits into
Hmbown:mainfrom
hongqitai:refactor/localization

Conversation

@hongqitai

Copy link
Copy Markdown
Contributor

Summary

Ref #3537
Follow-up of #3549, #3559

  • Extract hardcoded localization texts from crates/tui/src/localization.rs to crates/tui/locales
  • Add crate rust-i18n to load localization texts
  • Next step: use rust-i18n::t! macro to replace manual string concatenation
  • If you think rust-i18n is a wrong way, merge crates/tui/locales only

Testing

  • [ x ] cargo fmt --all -- --check
  • [ x ] cargo clippy --workspace --all-targets --all-features
  • [ x ] cargo test --workspace --all-features

Checklist

  • [ x ] Updated docs or comments as needed
  • [ x ] Added or updated tests where relevant
  • [ x ] Verified TUI behavior manually if UI changes
  • [ x ] Harvested/co-authored credit uses a GitHub numeric noreply address

@hongqitai hongqitai requested a review from Hmbown as a code owner June 25, 2026 14:22
@Hmbown

Hmbown commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Thanks for taking on the localization extraction. This is a broad refactor plus a new runtime dependency, so I’m going to keep it out of the late 0.8.65 release lane until the checks are fully green and we have more room to review the i18n shape.

Current blocker: macOS fails in commands::plugins::tests::test_plugins_empty_directory at crates/tui/src/commands/plugins.rs:215 because the emitted message no longer contains the canonical empty plugin directory path. Windows was cancelled after that failure. The likely fix is to preserve the path interpolation in the localized/plugin empty-directory message, then rerun the TUI test job.

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.

2 participants