diff --git a/web/src/lib/palette.ts b/web/src/lib/palette.ts index 6ca042a..a1ec3cb 100644 --- a/web/src/lib/palette.ts +++ b/web/src/lib/palette.ts @@ -23,10 +23,20 @@ export interface PaletteMeta { name: string; /** Shown in Settings and in NOTICE; who to credit and under what. */ credit?: string; + /** + * Whether the name is a word rather than a name. + * + * Five of these six are proper names -- ihasmail, Dracula, Gruvbox, Rosé + * Pine, Tokyo Night -- and are rendered translate="no" so a page translator + * leaves them alone. "Classic" is not a name, it is an adjective describing + * the theme, and a German reader should see "Klassisch". Reported by a + * native speaker reviewing the German catalogue (#247). + */ + translatable?: boolean; } export const PALETTES: PaletteMeta[] = [ - { id: "default", name: "Classic" }, + { id: "default", name: "Classic", translatable: true }, { id: "ihasmail", name: "ihasmail" }, { id: "dracula", name: "Dracula", credit: "Dracula Theme (MIT) — dark: Dracula, light: Alucard" }, { id: "gruvbox", name: "Gruvbox", credit: "gruvbox by morhetz (MIT)" }, diff --git a/web/src/views/settings/AppearanceSettings.tsx b/web/src/views/settings/AppearanceSettings.tsx index 883719b..d89826e 100644 --- a/web/src/views/settings/AppearanceSettings.tsx +++ b/web/src/views/settings/AppearanceSettings.tsx @@ -75,7 +75,9 @@ export function AppearanceSettings() { return ( ); })} diff --git a/web/src/views/settings/RuleDialog.tsx b/web/src/views/settings/RuleDialog.tsx index 0bb8006..02f6cc2 100644 --- a/web/src/views/settings/RuleDialog.tsx +++ b/web/src/views/settings/RuleDialog.tsx @@ -60,7 +60,7 @@ export function RuleDialog({ rule, onClose, onSave, applyMailbox, applyByDefault else if (v === "address") setTest(i, { type: "address", header: "from", part: "domain", op: "is", value: "" }); else setTest(i, { type: "header", header: v === "__custom__" ? "" : v, op: "contains", value: "" }); }}> - {HEADER_CHOICES.map((h) => )} + {HEADER_CHOICES.map((h) => )} @@ -75,7 +75,7 @@ export function RuleDialog({ rule, onClose, onSave, applyMailbox, applyByDefault ) : t.type === "true" ? : ( )} {t.type === "size" ? ( diff --git a/web/src/views/settings/ShortcutsSettings.tsx b/web/src/views/settings/ShortcutsSettings.tsx index b721b9f..9a9ecce 100644 --- a/web/src/views/settings/ShortcutsSettings.tsx +++ b/web/src/views/settings/ShortcutsSettings.tsx @@ -21,9 +21,15 @@ export function ShortcutsSettings() {
{groups.map(([group, items]) => (
-

{group}

+ {/* Group names and descriptions are registered in English at the + call sites -- see views/Shortcuts.tsx -- because the binding + table is data, not markup, and the English is the catalogue + key. Translating at render keeps the registration simple and + means a binding added anywhere is translatable without the + registrar knowing about i18n. */} +

{t(group)}

{items.map((b) => ( -
{b.description}
+
{t(b.description)}
))}
))}