Skip to main content

Crate i18n_ui

Crate i18n_ui 

Source
Expand description

Terminal UI for i18n translation progress.

  • Interactive mode: a two-line ratatui inline scan viewport (files checked / found, Ctrl+C hint) that never takes over the screen, keeps the cursor hidden, and scrolls log lines above itself; then a ratatui elastic alternate-screen board (live token pool matrix, active translation stream with smart folding, and global footer with concurrency and token totals); finished and failed tasks scroll into terminal history.
  • Non-interactive mode (CI, pipes, Node bindings): line-by-line stderr output, no color.

Interruption is not wired to a signal inside this crate: the caller forwards its platform signal to Ui::interrupt, keeping the library independent of any async runtime.

Structs§

Interrupt
Interrupt handle: the async side sets it, the interactive render stage polls it
Job
Task handle; dropping without calling Job::done / Job::fail counts as cancellation
PoolStat
Global concurrency pool metrics
Reply
Reply output callback; when tx is None (non-interactive mode) it passes through and sends nothing
Retry
Failure retry callback
SlotMeta
Static metadata of a single (endpoint, token) slot
SlotRow
Live telemetry row for a single slot
Ui
UI handle: lightweight, shareable by reference across concurrent tasks; drop prints the summary and restores the terminal

Enums§

Mode
UI mode
SlotState
Live adaptive phase of a single slot

Functions§

note
Emit a note immediately, with the same format as non-interactive mode