fix(i18n): translate backend errors at UI boundaries

This commit is contained in:
Rahul authored and GitHub committed 2026-07-29 02:40:45 +08:00
1 parent 4422ac8e01
commit 2f44d36018
82 files changed
+1862 -335

No files matched your search

+1 -1
View File
@@ -79,7 +79,7 @@ pub async fn login(State(state): State<Arc<WebState>>, Json(body): Json<LoginReq
let remaining = (locked_until - std::time::Instant::now()).as_secs();
return Ok((
StatusCode::TOO_MANY_REQUESTS,
Json(serde_json::json!({"error": format!("请 {remaining} 秒后再试")})),
Json(serde_json::json!({"error": format!("Please try again in {remaining}s")})),
)
.into_response());
}
+1 -1
View File
@@ -342,7 +342,7 @@ async fn ensure_no_agent_update_blockers(
if blockers.is_empty() {
Ok(())
} else {
Err(format!("请先关闭以下数据库连接后再更新驱动: {}", blockers.join(", ")))
Err(format!("Close these database connections before updating drivers: {}", blockers.join(", ")))
}
}