use crate::i18n::{current, Language};
pub fn queue_clear_failed(err: &impl std::fmt::Display) -> String {
match current() {
Language::English => format!("queue clear failed: {err}"),
Language::Portuguese => format!("falha ao limpar a fila: {err}"),
}
}
pub fn queue_insert_failed(err: &impl std::fmt::Display) -> String {
match current() {
Language::English => format!("queue insert failed: {err}"),
Language::Portuguese => format!("falha ao inserir na fila: {err}"),
}
}
pub fn queue_namespace_migration_failed(err: &impl std::fmt::Display) -> String {
match current() {
Language::English => format!("queue namespace migration failed: {err}"),
Language::Portuguese => {
format!("migração de namespace da fila falhou: {err}")
}
}
}
pub fn queue_resume_failed(err: &impl std::fmt::Display) -> String {
match current() {
Language::English => format!("queue resume failed: {err}"),
Language::Portuguese => format!("falha ao retomar a fila: {err}"),
}
}
pub fn queue_retry_failed_reset_failed(err: &impl std::fmt::Display) -> String {
match current() {
Language::English => format!("queue retry-failed reset failed: {err}"),
Language::Portuguese => {
format!("falha ao redefinir itens com falha da fila: {err}")
}
}
}
pub fn requeue_dead_failed(err: &impl std::fmt::Display) -> String {
match current() {
Language::English => format!("requeue-dead failed: {err}"),
Language::Portuguese => format!("requeue-dead falhou: {err}"),
}
}
pub fn requeue_skipped_failed(err: &impl std::fmt::Display) -> String {
match current() {
Language::English => format!("requeue-skipped failed: {err}"),
Language::Portuguese => format!("requeue-skipped falhou: {err}"),
}
}
pub fn invalid_chunk_id_in_reembed_key(chunk_key: &str) -> String {
match current() {
Language::English => format!("invalid chunk id in re-embed key: {chunk_key}"),
Language::Portuguese => {
format!("id de chunk inválido na chave de re-embed: {chunk_key}")
}
}
}
pub fn llm_missing_calibrated_weight() -> String {
match current() {
Language::English => "LLM result missing 'calibrated_weight'".to_string(),
Language::Portuguese => "resultado LLM sem 'calibrated_weight'".to_string(),
}
}
pub fn llm_missing_description_field() -> String {
match current() {
Language::English => "LLM result missing 'description' field".to_string(),
Language::Portuguese => "resultado LLM sem campo 'description'".to_string(),
}
}
pub fn llm_missing_enriched_body_field() -> String {
match current() {
Language::English => "LLM result missing 'enriched_body' field".to_string(),
Language::Portuguese => "resultado LLM sem campo 'enriched_body'".to_string(),
}
}
pub fn llm_missing_relation() -> String {
match current() {
Language::English => "LLM result missing 'relation'".to_string(),
Language::Portuguese => "resultado LLM sem 'relation'".to_string(),
}
}
pub fn deep_research_output_empty(path: &str) -> String {
match current() {
Language::English => {
format!("deep-research --output failed: written file is empty (0 bytes): {path}")
}
Language::Portuguese => {
format!("deep-research --output falhou: arquivo escrito está vazio (0 bytes): {path}")
}
}
}
pub fn deep_research_output_missing(path: &str) -> String {
match current() {
Language::English => {
format!("deep-research --output failed: path does not exist after atomic write: {path}")
}
Language::Portuguese => format!(
"deep-research --output falhou: caminho não existe após escrita atômica: {path}"
),
}
}