feat: add Danish locale

This commit is contained in:
OpenClaw Bot
2026-05-12 12:06:39 +02:00
parent 4aa2db7c63
commit 06554644fc
7 changed files with 1484 additions and 4 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ The goal is a single, private place for everything that keeps a household runnin
- **PWA** — installable on any device, works offline, dark mode, responsive from phone to desktop
- **Privacy First** — SQLCipher AES-256 encrypted database, fully self-hosted, zero telemetry
- **Zero Build Step** — pure ES modules, no bundler, no transpiler, no framework
- **Multilingual** — 16 languages with automatic locale detection (de, en, es, fr, it, sv, el, ru, tr, zh, ja, ar, hi, pt, uk, pl)
- **Multilingual** — 17 languages with automatic locale detection (de, en, es, fr, it, sv, da, el, ru, tr, zh, ja, ar, hi, pt, uk, pl)
## Quick Start
+16
View File
@@ -0,0 +1,16 @@
# Danish translation notes
No blocking translation issues found.
A few terms involved product-style judgment calls:
- `notes.title` / `nav.notes`**"Tavle"** to match the family-planner/board feel better than a literal "Noter".
- `housekeeping.title`**"Rengøringsområde"** while navigation keeps **"Rengøring"** for shorter UI labels.
- `dashboard.title` / `nav.dashboard`**"Oversigt"** to stay natural in Danish UI copy.
- Existing non-English source strings inside `en.json` (mainly a few German settings labels) were translated into Danish from their apparent UI meaning.
Verified:
- `public/locales/da.json` parses as valid JSON.
- `da.json` matches `en.json` key structure exactly.
- Placeholder tokens such as `{{name}}`, `{{count}}`, `{{date}}`, and `{{title}}` were preserved exactly.
+1 -1
View File
@@ -791,7 +791,7 @@ All UI strings are managed via `public/i18n.js`. No hardcoded text in JS files o
### Architecture
- **Module:** `public/i18n.js` - exports: `initI18n()`, `setLocale()`, `t(key, params?)`, `getLocale()`, `getSupportedLocales()`, `formatDate(date)`, `formatTime(date)`
- **Locale files:** `public/locales/de.json` (reference), `public/locales/en.json`, `public/locales/es.json`, `public/locales/fr.json`, `public/locales/it.json`, `public/locales/sv.json`, `public/locales/el.json`, `public/locales/ru.json`, `public/locales/tr.json`, `public/locales/zh.json`, `public/locales/ja.json`, `public/locales/ar.json`, `public/locales/hi.json`, `public/locales/pt.json`, `public/locales/uk.json`, `public/locales/pl.json` - structure: `{ "module.camelCaseKey": "Value" }`
- **Locale files:** `public/locales/de.json` (reference), `public/locales/en.json`, `public/locales/es.json`, `public/locales/fr.json`, `public/locales/it.json`, `public/locales/sv.json`, `public/locales/da.json`, `public/locales/el.json`, `public/locales/ru.json`, `public/locales/tr.json`, `public/locales/zh.json`, `public/locales/ja.json`, `public/locales/ar.json`, `public/locales/hi.json`, `public/locales/pt.json`, `public/locales/uk.json`, `public/locales/pl.json` - structure: `{ "module.camelCaseKey": "Value" }`
- **Variables:** `{{variable}}` syntax in translation strings, e.g. `t('tasks.assignedTo', { name: 'Anna' })`
- **Fallback chain:** active locale → German (`de`) → key itself
- **Date format:** `Intl.DateTimeFormat` with current locale - use `formatDate()` and `formatTime()` from `i18n.js`
+1
View File
@@ -14,6 +14,7 @@ const LOCALE_LABELS = {
fr: 'Français',
it: 'Italiano',
sv: 'Svenska',
da: 'Dansk',
el: 'Ελληνικά',
ru: 'Русский',
tr: 'Türkçe',
+1 -1
View File
@@ -5,7 +5,7 @@
* Dependencies: none (vanilla JS, Fetch API, Intl API)
*/
const SUPPORTED_LOCALES = ['de', 'en', 'es', 'fr', 'it', 'sv', 'el', 'ru', 'tr', 'zh', 'ja', 'ar', 'hi', 'pt', 'uk', 'pl'];
const SUPPORTED_LOCALES = ['de', 'en', 'es', 'fr', 'it', 'sv', 'da', 'el', 'ru', 'tr', 'zh', 'ja', 'ar', 'hi', 'pt', 'uk', 'pl'];
const DEFAULT_LOCALE = 'de';
const STORAGE_KEY = 'oikos-locale';
const DATE_FORMAT_KEY = 'oikos-date-format';
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -15,7 +15,7 @@
const SHELL_CACHE = 'oikos-shell-v72';
const PAGES_CACHE = 'oikos-pages-v67';
const LOCALES_CACHE = 'oikos-locales-v16';
const LOCALES_CACHE = 'oikos-locales-v17';
const ASSETS_CACHE = 'oikos-assets-v67';
const BYPASS_CACHE = 'oikos-bypass-flag';
const ALL_CACHES = [SHELL_CACHE, PAGES_CACHE, LOCALES_CACHE, ASSETS_CACHE];
@@ -64,6 +64,7 @@ const APP_SHELL = [
const APP_LOCALES = [
'/locales/ar.json',
'/locales/da.json',
'/locales/de.json',
'/locales/el.json',
'/locales/en.json',