Far-Beyond-Pulsar/Pulsar-Native

Plugin vendor crates lack any translation support (~300+ hardcoded English strings)

Aperta

#480 aperta il 29 lug 2026

 (3 commenti) (0 reazioni) (2 assegnatari)Rust (29 fork)auto 404
difficulty: easyenhancementgood first issuehelp wantedpriority: high

Metriche repository

Star
 (348 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Summary

All 6 plugin vendor crates have zero translation support — no rust-i18n dependency, no t!() calls, no locale files. Collectively they contain ~300+ hardcoded English UI strings that cannot be localized.

This was previously tracked in #63 ("We need a way for plugin UI to support localization") which was closed, but the underlying gap remains.

Affected crates and estimated hardcoded strings

Crate Est. Strings Key examples
blueprint_editor ~100+ Toolbar (Save, Compile, Debug), palette search, properties panel, overlay zoom/debug, prefab/event/macro panels
shader_editor ~50+ Toolbar (Save, Compile, Reload), panel titles, palette, properties, compilation messages, overlay zoom
table_editor ~30+ Query editor toolbar (Execute, Clear, Export CSV/JSON), row actions (Add, Duplicate, Delete)

Common patterns

All crates hardcode strings via these patterns:

  • .child("English text") — text nodes
  • .tooltip("English text") — button tooltips
  • .label("English text") — button labels
  • .placeholder("English text") — input placeholders
  • .title(...) returning "English text" — panel titles
  • format!("English text {}", value) — dynamic strings (zoom %, counts, etc.)
  • PluginMetadata / FileTypeDefinition fields — plugin names, descriptions, categories

Additionally, "Editor not available" is a shared fallback string duplicated across multiple plugins.

Suggested approach

  1. Establish a plugin i18n pattern — either each plugin crate vendors its own locales/ + rust_i18n::i18n!(), or a shared mechanism via a plugin SDK crate
  2. Add rust-i18n dependency to each plugin crate's Cargo.toml
  3. Create locales/en.yml for each crate with all keys
  4. Replace all hardcoded strings with t!("Key.Name") calls
  5. Add locale files for other supported languages

Guida contributor