Add lightweight i18n foundation; route new strings through catalogs
- Backend src/i18n.rs: embedded locales/<lang>.json, t(key,params) with {placeholder} interpolation, process-wide language from config.language (default it), English-then-key fallback. Applied to the identity reminder and name-lock/empty errors.
- Frontend: web/assets/locales/<lang>.json + t()/loadI18n()/applyI18n() (data-i18n attributes); language follows the browser; async bootstrap. Applied to the settings panel.
- Convention: new user-facing and model-facing strings use the catalog; wire/JSON/identifiers never translated. Existing strings migrate in a later round. it+en catalogs; 115 tests; verified live (catalog error messages) + node --check + HTTP. README documents the convention.
This commit is contained in:
1 parent
73b665d1a7
commit
498e3dbc1b
12 files changed
+248
-27
No files matched your search
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"settings.title.session": "Session settings",
|
||||
"settings.title.general": "General settings",
|
||||
"settings.scope.session": "Session",
|
||||
"settings.scope.general": "General",
|
||||
"settings.name": "Name",
|
||||
"settings.notes": "Notes (chat purpose)",
|
||||
"settings.sp": "System Prompt",
|
||||
"settings.temp": "Temperature",
|
||||
"settings.topp": "Top-p",
|
||||
"settings.topk": "Top-k",
|
||||
"settings.minp": "Min-p",
|
||||
"settings.maxtokens": "Max tokens",
|
||||
"settings.save": "Save",
|
||||
"settings.cancel": "Cancel",
|
||||
"settings.hint.session": "Changes apply only to this session.",
|
||||
"settings.hint.general": "General defaults: apply only to future sessions.",
|
||||
"settings.name.locked": "The name is locked after the first interaction.",
|
||||
"settings.name.unlocked": "You can rename until you send the first message.",
|
||||
"settings.error": "Error: {msg}"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"settings.title.session": "Impostazioni sessione",
|
||||
"settings.title.general": "Impostazioni generali",
|
||||
"settings.scope.session": "Sessione",
|
||||
"settings.scope.general": "Generali",
|
||||
"settings.name": "Nome",
|
||||
"settings.notes": "Note (scopo della chat)",
|
||||
"settings.sp": "System Prompt",
|
||||
"settings.temp": "Temperature",
|
||||
"settings.topp": "Top-p",
|
||||
"settings.topk": "Top-k",
|
||||
"settings.minp": "Min-p",
|
||||
"settings.maxtokens": "Max token",
|
||||
"settings.save": "Salva",
|
||||
"settings.cancel": "Annulla",
|
||||
"settings.hint.session": "Modifiche valide solo per questa sessione.",
|
||||
"settings.hint.general": "Default generali: si applicano solo alle sessioni future.",
|
||||
"settings.name.locked": "Il nome è bloccato dopo la prima interazione.",
|
||||
"settings.name.unlocked": "Puoi rinominare finché non invii il primo messaggio.",
|
||||
"settings.error": "Errore: {msg}"
|
||||
}
|
||||
Reference in new issue
Block a user