feat(i18n): replace ad-hoc loader with rust-i18n backend bundles

This commit is contained in:
Slinetrac
2025-11-06 17:36:07 +08:00
Unverified
parent 0a098ce83c
commit cfdfec8fe6
24 changed files with 1064 additions and 254 deletions

View File

@@ -1,8 +1,5 @@
use super::{CmdResult, StringifyErr};
use crate::{
core::service::{self, SERVICE_MANAGER, ServiceStatus},
utils::i18n::t,
};
use crate::core::service::{self, SERVICE_MANAGER, ServiceStatus};
use smartstring::SmartString;
async fn execute_service_operation_sync(status: ServiceStatus, op_type: &str) -> CmdResult {
@@ -13,7 +10,7 @@ async fn execute_service_operation_sync(status: ServiceStatus, op_type: &str) ->
.await
{
let emsg = format!("{} Service failed: {}", op_type, e);
return Err(SmartString::from(&*t(emsg.as_str()).await));
return Err(SmartString::from(emsg));
}
Ok(())
}