use std::borrow::Cow;
#[non_exhaustive]
#[derive(Debug, Clone)]
pub struct Labels {
pub time: Cow<'static, str>,
pub level: Cow<'static, str>,
pub target: Cow<'static, str>,
pub message: Cow<'static, str>,
pub clear: Cow<'static, str>,
pub to_bottom: Cow<'static, str>,
pub close: Cow<'static, str>,
pub event_details: Cow<'static, str>,
pub message_too_long: Cow<'static, str>,
pub level_filter: Cow<'static, str>,
pub target_filter: Cow<'static, str>,
pub add: Cow<'static, str>,
pub delete: Cow<'static, str>,
pub target_placeholder: Cow<'static, str>,
}
impl Labels {
pub fn english() -> Self {
Self {
time: "Time".into(),
level: "Level".into(),
target: "Target".into(),
message: "Message".into(),
clear: "Clear".into(),
to_bottom: "To Bottom".into(),
close: "Close".into(),
event_details: "Event Details".into(),
message_too_long: "(message too long)".into(),
level_filter: "Level Filter".into(),
target_filter: "Target Filter".into(),
add: "Add".into(),
delete: "Delete".into(),
target_placeholder: "example: eframe::*".into(),
}
}
pub fn portuguese() -> Self {
Self {
time: "Tempo".into(),
level: "Nível".into(),
target: "Alvo".into(),
message: "Mensagem".into(),
clear: "Limpar".into(),
to_bottom: "Até ao Fundo".into(),
close: "Fechar".into(),
event_details: "Detalhes do Evento".into(),
message_too_long: "(mensagem muito longa)".into(),
level_filter: "Filtro de Nível".into(),
target_filter: "Filtro de Alvo".into(),
add: "Adicionar".into(),
delete: "Excluir".into(),
target_placeholder: "exemplo: eframe::*".into(),
}
}
}
impl Default for Labels {
fn default() -> Self {
Self::english()
}
}