Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦
C
fix(web): interpolate the image alt count and repair the German image labels
benmaster825e8281473344
diff --git a/web/src/i18n/de.ts b/web/src/i18n/de.tsindex e7f1ded3..d2b2c16c 100644--- a/web/src/i18n/de.ts+++ b/web/src/i18n/de.ts@@ -47,11 +47,6 @@ const de: Record<string, string> = {"sidebar.temperature": "Temperatur","sidebar.maxTokens": "Maximale Ausgabetokens","sidebar.reasoning": "Reasoning",- "sidebar.reasoning.off": "Aus",- "sidebar.reasoning.low": "Niedrig",- "sidebar.reasoning.medium": "Mittel",- "sidebar.reasoning.high": "Hoch",- "sidebar.reasoning.max": "Max","sidebar.transport": "OpenAI-kompatibler Transport",// Kopfzeile@@ -77,8 +72,8 @@ const de: Record<string, string> = {"chat.colibri": "colibrì","chat.placeholder": "Nachricht an colibrì…","chat.inputHint": "Eingabetaste zum Senden · Umschalt+Eingabetaste für Zeilenumbruch",- "chat.attachImage": "Bild anhängen",- "chat.removeImage": "Bild entfernen",+ "ui.attachImage": "Bild anhängen",+ "ui.removeImage": "Bild entfernen","chat.stop": "Generierung stoppen","chat.send": "Nachricht senden",diff --git a/web/src/i18n/en.ts b/web/src/i18n/en.tsindex c365c0cf..8dd0e60a 100644--- a/web/src/i18n/en.ts+++ b/web/src/i18n/en.ts@@ -24,7 +24,7 @@ const en: Record<string, string> = {"ui.copy": "Copy response","ui.attachImage": "Attach an image","ui.removeImage": "Remove image",- "ui.attachedImage": "Attached image {n}",+ "ui.attachedImage": "Attached image {{n}}","ui.copied": "Copied","ui.copyError": "Could not copy the text. Select the response to copy it.","ui.regenerate": "Regenerate response",diff --git a/web/src/i18n/i18n.test.ts b/web/src/i18n/i18n.test.tsnew file mode 100644index 00000000..30efa123--- /dev/null+++ b/web/src/i18n/i18n.test.ts@@ -0,0 +1,39 @@+import { describe, expect, it } from "vitest"++import en from "./en"+import zhCN from "./zh-CN"+import zhTW from "./zh-TW"+import de from "./de"+import itDict from "./it"+import id from "./id"++/* The `t` interpolator only understands the double-brace form, `{{name}}`+ * (see interpolate() in index.ts). A single-brace `{name}` is left verbatim,+ * so it reaches the DOM as literal text — e.g. an image `alt` reading+ * "Attached image {n}". Keep every placeholder in the {{name}} form. */+const DICTS: Record<string, Record<string, string>> = {+ en, "zh-CN": zhCN, "zh-TW": zhTW, de, it: itDict, id,+}++describe("locale dictionaries", () => {+ for (const [code, dict] of Object.entries(DICTS)) {+ it(`${code} uses the {{name}} placeholder form only`, () => {+ const bad: string[] = []+ for (const [key, value] of Object.entries(dict)) {+ for (const run of value.match(/\{+\w+\}+/g) ?? []) {+ if (!run.startsWith("{{") || !run.endsWith("}}")) bad.push(`${key}: ${value}`)+ }+ }+ expect(bad).toEqual([])+ })+ }++ it("every non-English key also exists in English so the fallback resolves", () => {+ const missing: string[] = []+ for (const [code, dict] of Object.entries(DICTS)) {+ if (code === "en") continue+ for (const key of Object.keys(dict)) if (!(key in en)) missing.push(`${code}: ${key}`)+ }+ expect(missing).toEqual([])+ })+})diff --git a/web/src/i18n/id.ts b/web/src/i18n/id.tsindex 76bb4cc0..3ea18cb7 100644--- a/web/src/i18n/id.ts+++ b/web/src/i18n/id.ts@@ -24,7 +24,7 @@ const id: Record<string, string> = {"ui.copy": "Salin respons","ui.attachImage": "Lampirkan gambar","ui.removeImage": "Hapus gambar",- "ui.attachedImage": "Gambar terlampir {n}",+ "ui.attachedImage": "Gambar terlampir {{n}}","ui.copied": "Disalin","ui.copyError": "Teks tidak dapat disalin. Pilih respons untuk menyalinnya.","ui.regenerate": "Buat ulang respons",diff --git a/web/src/i18n/it.ts b/web/src/i18n/it.tsindex de0a359e..b9b60c68 100644--- a/web/src/i18n/it.ts+++ b/web/src/i18n/it.ts@@ -24,7 +24,7 @@ const it: Record<string, string> = {"ui.copy": "Copia risposta","ui.attachImage": "Allega un'immagine","ui.removeImage": "Togli l'immagine",- "ui.attachedImage": "Immagine allegata {n}",+ "ui.attachedImage": "Immagine allegata {{n}}","ui.copied": "Copiato","ui.copyError": "Non è stato possibile copiare il testo. Seleziona la risposta per copiarla.","ui.regenerate": "Rigenera risposta",