feat: add Japanese, Arabic, Hindi, Portuguese locales + new currencies

- 4 new locale files (ja, ar, hi, pt) with 567 keys each - full coverage
- Japanese (日本語): Hiragana/Kanji script
- Arabic (العربية): RTL-ready text
- Hindi (हिन्दी): Devanagari script
- Portuguese (Português): Brazilian Portuguese
- SUPPORTED_LOCALES updated in i18n.js (10 → 14 locales)
- LOCALE_LABELS updated in oikos-locale-picker.js
- New currencies: AED, BRL, INR, SAR added to budget settings
- Service Worker v31: new locale files pre-cached in APP_SHELL
- Docs: README, SPEC.md, BACKLOG.md, CHANGELOG.md updated
This commit is contained in:
Ulas
2026-04-14 10:28:17 +02:00
parent 3f387b616e
commit 8af730e9cf
13 changed files with 2426 additions and 6 deletions
+5 -1
View File
@@ -368,7 +368,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` - 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/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` - 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`
@@ -393,6 +393,10 @@ All UI strings are managed via `public/i18n.js`. No hardcoded text in JS files o
| `ru` | Russian | Full translation (added v0.16.3) |
| `tr` | Turkish | Full translation (added v0.16.3) |
| `zh` | Chinese (Simplified) | Full translation (added v0.16.3) |
| `ja` | Japanese | Full translation (added v0.19.0) |
| `ar` | Arabic | Full translation (added v0.19.0) |
| `hi` | Hindi | Full translation (added v0.19.0) |
| `pt` | Portuguese | Full translation (added v0.19.0) |
### Adding a New Language