Skip to main content

ravenrs_app_i18n/
model.rs

1//! Translations of the model that come with the framework, as differences in JSON for
2//! `translation`: the captions of the entities and navigation its modules add.
3
4use crate::Language;
5
6/// The entities of signing in and of the audit trail, in Brazilian Portuguese.
7pub const SECURITY_PT_BR: &str = include_str!("../model/pt-BR/security.json");
8
9/// The entities of stored reports and of analytics dashboards, in Brazilian Portuguese.
10pub const REPORTS_PT_BR: &str = include_str!("../model/pt-BR/reports.json");
11
12/// The model of signing in, in this language, when it is not the one it was written in.
13pub fn security(language: Language) -> Option<&'static str> {
14    match language {
15        Language::BrazilianPortuguese => Some(SECURITY_PT_BR),
16        _ => None,
17    }
18}
19
20/// The model of reports, in this language, when it is not the one it was written in.
21pub fn reports(language: Language) -> Option<&'static str> {
22    match language {
23        Language::BrazilianPortuguese => Some(REPORTS_PT_BR),
24        _ => None,
25    }
26}