logs translated from Chinese into English

This commit is contained in:
coolcoala
2025-08-23 04:15:49 +03:00
parent db442b2746
commit 10397d0847
20 changed files with 290 additions and 275 deletions

View File

@@ -69,9 +69,9 @@ impl Config {
}
// 生成运行时配置
if let Err(err) = Self::generate().await {
logging!(error, Type::Config, true, "生成运行时配置失败: {}", err);
logging!(error, Type::Config, true, "Failed to generate runtime config: {}", err);
} else {
logging!(info, Type::Config, true, "生成运行时配置成功");
logging!(info, Type::Config, true, "Runtime config generated successfully");
}
// 生成运行时配置文件并验证
@@ -79,7 +79,7 @@ impl Config {
let validation_result = if config_result.is_ok() {
// 验证配置文件
logging!(info, Type::Config, true, "开始验证配置");
logging!(info, Type::Config, true, "Starting config validation");
match CoreManager::global().validate_config().await {
Ok((is_valid, error_msg)) => {
@@ -88,7 +88,7 @@ impl Config {
warn,
Type::Config,
true,
"[首次启动] 配置验证失败,使用默认最小配置启动: {}",
"[First launch] Config validation failed, starting with minimal default config: {}",
error_msg
);
CoreManager::global()
@@ -96,12 +96,12 @@ impl Config {
.await?;
Some(("config_validate::boot_error", error_msg))
} else {
logging!(info, Type::Config, true, "配置验证成功");
logging!(info, Type::Config, true, "Config validation succeeded");
Some(("config_validate::success", String::new()))
}
}
Err(err) => {
logging!(warn, Type::Config, true, "验证进程执行失败: {}", err);
logging!(warn, Type::Config, true, "Validation process execution failed: {}", err);
CoreManager::global()
.use_default_config("config_validate::process_terminated", "")
.await?;
@@ -109,7 +109,7 @@ impl Config {
}
}
} else {
logging!(warn, Type::Config, true, "生成配置文件失败,使用默认配置");
logging!(warn, Type::Config, true, "Failed to generate config file; using default config");
CoreManager::global()
.use_default_config("config_validate::error", "")
.await?;

View File

@@ -257,7 +257,7 @@ impl IVerge {
warn,
Type::Config,
true,
"启动时发现无效的clash_core配置: '{}', 将自动修正为 'koala-mihomo'",
"Invalid clash_core config detected at startup: '{}', auto-fixing to 'koala-mihomo'",
core
);
config.clash_core = Some("koala-mihomo".to_string());
@@ -268,7 +268,7 @@ impl IVerge {
info,
Type::Config,
true,
"启动时发现未配置clash_core, 将设置为默认值 'koala-mihomo'"
"clash_core not configured at startup; setting default to 'koala-mihomo'"
);
config.clash_core = Some("koala-mihomo".to_string());
needs_fix = true;
@@ -276,13 +276,13 @@ impl IVerge {
// 修正后保存配置
if needs_fix {
logging!(info, Type::Config, true, "正在保存修正后的配置文件...");
logging!(info, Type::Config, true, "Saving fixed configuration file...");
help::save_yaml(&config_path, &config, Some("# Koala Clash Config"))?;
logging!(
info,
Type::Config,
true,
"配置文件修正完成,需要重新加载配置"
"Configuration file fixed; reloading config required"
);
Self::reload_config_after_fix(config)?;
@@ -291,7 +291,7 @@ impl IVerge {
info,
Type::Config,
true,
"clash_core配置验证通过: {:?}",
"clash_core config validation passed: {:?}",
config.clash_core
);
}