translate_status_text

Function translate_status_text 

Source
pub fn translate_status_text(app: &AppState, text: &str) -> String
Expand description

What: Translate Arch systems status text from English to the current locale.

Inputs:

  • app: Application state containing translations
  • text: English status text to translate

Output:

  • Translated status text, or original text if translation not found

Details:

  • Parses English status messages and maps them to translation keys
  • Handles dynamic parts like percentages and service names
  • Falls back to original text if pattern doesn’t match