{t("Your filter script {damage}, so only part of it arrived. Adding a rule would write that part back over the whole thing. Reload the page and try again.", { damage })}
) : loaded ? ( -{t("Your active Sieve script was written by hand, so rules can't be added automatically. Open")} {t("Settings → Filters & rules")} {t("to edit the script or switch to managed rules.")}
+{tNode("Your active Sieve script was written by hand, so rules can't be added automatically. Open {where} to edit the script or switch to managed rules.", { where: {t("Settings → Filters & rules")} })}
) : ({t("Your filter script couldn't be read just now, so adding a rule would risk overwriting it. Reload the page and try again.")}
)} diff --git a/web/src/views/mail/MailView.tsx b/web/src/views/mail/MailView.tsx index d00d75f..4f84828 100644 --- a/web/src/views/mail/MailView.tsx +++ b/web/src/views/mail/MailView.tsx @@ -16,7 +16,8 @@ import { confirmDialog } from "@/ui/dialog"; import { toast } from "@/ui/toast"; import { isUnknownMailbox } from "@/lib/mailboxRoute"; import { scheduledMailboxIdFrom, useScheduled } from "@/store/scheduled"; -import { t as translate } from "@/lib/i18n"; +import { plural, t as translate, tNode } from "@/lib/i18n"; +import { mailboxDisplayName } from "@/lib/mailboxName"; export function MailView({ mailboxId, threadId, search }: { mailboxId?: string; threadId?: string; search?: boolean }) { const [, navigate] = useLocation(); @@ -306,7 +307,7 @@ export function MailView({ mailboxId, threadId, search }: { mailboxId?: string; [emails, mailboxId, mailboxes, openThread, openDraft], ); - const title = search ? `Search: ${listQuery?.label ?? q}` : (mailboxId && mailboxes[mailboxId]?.name) || "Mail"; + const title = search ? translate("Search: {query}", { query: listQuery?.label ?? q }) : (mailboxId && mailboxDisplayName(mailboxes[mailboxId])) || translate("Mail"); const reading = Boolean(threadId); const paneClass = settings.readingPane === "bottom" ? "pane-bottom" : settings.readingPane === "off" ? "pane-off" : "pane-right"; const showList = !(settings.readingPane === "off" && reading) && !(narrow && reading); @@ -353,8 +354,8 @@ export function MailView({ mailboxId, threadId, search }: { mailboxId?: string; ) : (
- + {tNode("This translation was generated by AI and has not been checked by a native speaker, so it is marked Beta until somebody who speaks it signs it off. Anything that reads wrongly is worth reporting — {report}.", { + report: {translate("tell us about it")}, + })} +
+ )}- {translate("Only languages ihasmail has been translated into appear here, so this list grows as translations land rather than ahead of them — a language offered without strings behind it would leave the page claiming to be in a language it is not.")}
- {translate("This is separate from")} {translate("Language & region")} {translate("in General, which decides how dates, times and numbers are written. You can read an English interface with German dates, or the other way round.")} + {tNode("This is separate from {setting} in General, which decides how dates, times and numbers are written. You can read an English interface with German dates, or the other way round.", { setting: {translate("Language & region")} })}
{t("Tip: press")} l {t("on a conversation to apply labels. Search with")} label:name.
{tNode("Tip: press {key} on a conversation to apply labels. Search with {operator}.", { key: l, operator: label:name })}
{t("You're signed in as")} {session?.username}{t(". Your password is never stored in the browser; the server keeps it encrypted per-session for talking to Stalwart.")}
+{tNode("You're signed in as {user}. Your password is never stored in the browser; the server keeps it encrypted per-session for talking to Stalwart.", { user: {session?.username} })}
{t("Copy it into")} {issued.description} {t("now — it isn't shown again.")}
+{tNode("Copy it into {name} now — it isn't shown again.", { name: {issued.description} })}
{t("Gmail-style shortcuts are always on. Press")} ? {t("anywhere to see this list.")}
+{tNode("Gmail-style shortcuts are always on. Press {key} anywhere to see this list.", { key: ? })}