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,7 @@
|
||||
{
|
||||
"identity.name": "Your name is {name}.",
|
||||
"identity.folder": " Your personal folder is {folder}.",
|
||||
"error.name_locked": "The session name is immutable after the first interaction.",
|
||||
"error.name_empty": "The name must not be empty.",
|
||||
"error.session_not_found": "Session not found."
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"identity.name": "Il tuo nome è {name}.",
|
||||
"identity.folder": " La tua cartella personale è {folder}.",
|
||||
"error.name_locked": "Il nome della sessione è immutabile dopo la prima interazione.",
|
||||
"error.name_empty": "Il nome non può essere vuoto.",
|
||||
"error.session_not_found": "Sessione non trovata."
|
||||
}
|
||||
Reference in new issue
Block a user