Far-Beyond-Pulsar/Pulsar-Native

ui_log_viewer: rust-i18n dependency wired but never initialized, zero translations

Chiusa

#479 aperta il 29 lug 2026

 (0 commenti) (0 reazioni) (0 assegnatari)Rust (29 fork)auto 404
bugdifficulty: easyenhancementgood first issuehelp wantedpriority: medium

Metriche repository

Star
 (348 stelle)
Metriche merge PR
 (Merge medio 11h 37m) (69 PR mergiate in 30 g)

Descrizione

Summary

crates/editor/ui_log_viewer/Cargo.toml:28 adds rust-i18n.workspace = true as a dependency, but the crate:

  1. Never calls rust_i18n::i18n!("locales", ...) — the macro that initializes per-crate locale loading (compare with ui_common/src/lib.rs:6, ui_problems/src/lib.rs:6, etc.)
  2. Has no locales/ directory
  3. Has zero t!() macro usages anywhere in its source

All UI strings are hardcoded English — panel labels, filter controls, column headers in the log viewer, system info panel, GPU metrics, etc.

This is dead configuration: the dependency is pulled in but does nothing.

Affected components

  • MissionControlPanel — panel title, workspace labels
  • LogDrawer — filter buttons, column headers, search placeholder
  • LogsPanel, SystemInfoPanel, GpuMetricsPanel, ResourceMonitorPanel, MemoryBreakdownPanel, AdvancedMetricsPanel, CallerSitesPanel — section titles, labels, empty states

Suggested fix

  1. Add rust_i18n::i18n!("locales", fallback = "en"); to crates/editor/ui_log_viewer/src/lib.rs
  2. Create locales/en.yml with translation keys for all user-facing strings in the crate
  3. Replace hardcoded strings with t!("Key.Name") calls
  4. Either remove rust-i18n from Cargo.toml if unused, or complete the implementation

Guida contributor