i18n on the web - deepseek translations

This commit is contained in:
Priec
2026-08-14 20:35:37 +02:00
parent 2dc0d94ba0
commit 8f1bfdbe0c
91 changed files with 4679 additions and 1237 deletions

View File

@@ -1,5 +1,6 @@
use askama::Template;
use crate::{i18n::Locale, tr};
use crate::ui::{ErrorPage, Nav, render};
use super::state::EcbPageState;
@@ -16,6 +17,7 @@ struct EcbPage<'a> {
#[derive(Template)]
#[template(path = "pages/admin/ecb/status.html")]
struct StatusFragment<'a> {
nav: Nav,
page: &'a EcbPageState,
}
@@ -27,13 +29,16 @@ pub(crate) fn render_page(page: &EcbPageState) -> String {
}
pub(crate) fn render_status(page: &EcbPageState) -> String {
render(&StatusFragment { page })
render(&StatusFragment {
nav: page.nav.clone(),
page,
})
}
pub(crate) fn render_error(message: &str) -> String {
pub(crate) fn render_error(locale: Locale, message: &str) -> String {
render(&ErrorPage {
nav: Nav::default(),
heading: "Exchange rates unavailable",
heading: &tr!(locale, "ecb-unavailable-title"),
message,
})
}