diff --git a/TRANSLATIONS.md b/TRANSLATIONS.md index f4f8c6e0..264d45b9 100644 --- a/TRANSLATIONS.md +++ b/TRANSLATIONS.md @@ -1,20 +1,27 @@ # Translation Status -Last updated: 2026-03-31 10:04:24 +Last updated: 2026-10-01 08:50:49 -Reference locale (en): **345 keys** +Reference locale (en): **332 keys** ## Overview | Locale | File | Missing | Additional | Status | |--------|------|---------|------------|--------| -| pt-br | pt-br.json | 0 | 0 | ✅ | +| tr | tr.json | 0 | 0 | ✅ | +| es-co | es-co.json | 0 | 0 | ✅ | | nl | nl.json | 0 | 0 | ✅ | +| pt-br | pt-br.json | 0 | 0 | ✅ | +| es-ar | es-ar.json | 0 | 0 | ✅ | | de | de.json | 0 | 0 | ✅ | ## Details -### pt-br (pt-br.json) +### tr (tr.json) + +✅ All translations complete + +### es-co (es-co.json) ✅ All translations complete @@ -22,6 +29,14 @@ Reference locale (en): **345 keys** ✅ All translations complete +### pt-br (pt-br.json) + +✅ All translations complete + +### es-ar (es-ar.json) + +✅ All translations complete + ### de (de.json) ✅ All translations complete diff --git a/frontend/extract-i18n-keys.js b/frontend/extract-i18n-keys.js index 9f9903a5..69d54e65 100644 --- a/frontend/extract-i18n-keys.js +++ b/frontend/extract-i18n-keys.js @@ -7,19 +7,19 @@ * all used keys exist in your translation files. */ -const fs = require("fs"); -const path = require("path"); +import fs from "fs"; +import path from "path"; +import { fileURLToPath } from "url"; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); const SRC_DIR = path.join(__dirname, "src"); const LOCALES_DIR = path.join(__dirname, "src/lib/i18n/locales"); const SOURCE_FILE = "en.json"; -// Regex patterns to match translation calls -const T_PATTERNS = [ - /\bt\(['"`]([^'"`]+)['"`]\)/g, // t("key") or t('key') - /\$t\(['"`]([^'"`]+)['"`]\)/g, // $t("key") - Svelte store syntax - /\{\s*t\(['"`]([^'"`]+)['"`]\)\s*\}/g, // { t("key") } - in templates -]; +// Matches t("key"), t('key'), $t("key"), t("key", { params }) and tKey("key"). +// tKey() marks keys that are defined in one place and passed to t() later. +const T_PATTERNS = [/(? 0) { console.log( - '\n💡 Tip: Search for "[NEEDS TRANSLATION]" in de.json, nl.json, and pt-br.json', + '\n💡 Tip: Search for "[NEEDS TRANSLATION]" in the non-English locale files', ); } } else { diff --git a/frontend/src/lib/components/Breadcrumbs.svelte b/frontend/src/lib/components/Breadcrumbs.svelte index 82a3c892..834d4767 100644 --- a/frontend/src/lib/components/Breadcrumbs.svelte +++ b/frontend/src/lib/components/Breadcrumbs.svelte @@ -1,5 +1,6 @@