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

@@ -108,9 +108,11 @@ pub(crate) async fn load_page(
{
let missing = std::mem::take(&mut inputs.selection.profile);
inputs.selection.table.clear();
inputs
.error
.get_or_insert(format!("Profile `{missing}` no longer exists."));
inputs.error.get_or_insert(crate::tr!(
crate::i18n::Locale::from_headers(headers),
"td-err-profile-gone",
"missing" => missing,
));
}
// The same two sources the admin panel browses by, so a table it offers is
@@ -163,10 +165,13 @@ pub(crate) async fn load_page(
.any(|table| table.name == inputs.selection.table)
{
let missing = std::mem::take(&mut inputs.selection.table);
let scope = inputs.selection.scope_label();
inputs
.error
.get_or_insert(format!("`{missing}` is not a table of {scope}."));
let scope = inputs.selection.scope_label(&crate::i18n::Locale::from_headers(headers));
inputs.error.get_or_insert(crate::tr!(
crate::i18n::Locale::from_headers(headers),
"td-err-not-a-table",
"missing" => missing,
"scope" => scope,
));
}
let detail = match inputs.selection.has_table() {