Fixing translations
This commit is contained in:
parent
dbe196f388
commit
0dc51af51c
9 changed files with 41 additions and 136 deletions
|
|
@ -3,7 +3,7 @@ use std::collections::HashMap;
|
|||
use anyhow::{Context, Result};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::i18n::t;
|
||||
use crate::i18n::{t, t_with_args};
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize)]
|
||||
pub struct HeartbeatEntry {
|
||||
|
|
@ -64,7 +64,13 @@ impl HeartbeatResponse {
|
|||
for (key, percentage) in &self.uptime_list_raw {
|
||||
let parts: Vec<&str> = key.split('_').collect();
|
||||
if parts.len() != 2 {
|
||||
return Err(anyhow::anyhow!("Formato invalido (colocar o t) {}", key));
|
||||
let t_args: &mut HashMap<&str, std::string::String> =
|
||||
&mut HashMap::<&str, String>::new();
|
||||
t_args.insert("key", key.to_string());
|
||||
return Err(anyhow::anyhow!(t_with_args(
|
||||
"invalid-uptime-key-format",
|
||||
t_args
|
||||
)));
|
||||
}
|
||||
|
||||
let monitor_id = parts[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue